pub struct Ue4Game { /* private fields */ }Expand description
Data-driven UE4 game plugin.
UE4 titles share a near-identical layout: a project folder under the install
root (SB/, Palworld/, etc.) that contains Content/Paks/ for pak files
and Binaries/Win64/ for the shipping executable and proxy DLLs. Mods drop
into Content/Paks/~mods/ (the tilde forces mount order after base paks).
A new UE4 game needs only a new const instance; the trait impl is shared.
Implementations§
Source§impl Ue4Game
impl Ue4Game
Sourcepub const fn new(
game_id: &'static str,
display_name: &'static str,
steam_app_id: &'static str,
project_name: &'static str,
nexus_domain: Option<&'static str>,
) -> Self
pub const fn new( game_id: &'static str, display_name: &'static str, steam_app_id: &'static str, project_name: &'static str, nexus_domain: Option<&'static str>, ) -> Self
Construct a UE4 game definition; save-profile support defaults off
(enable it via Ue4Game::with_save_profiles).
Sourcepub const fn with_save_profiles(self, enabled: bool) -> Self
pub const fn with_save_profiles(self, enabled: bool) -> Self
Opt this UE4 game into modde’s per-profile save layer.
This is a const builder so game definitions can stay data-only while avoiding engine-wide assumptions about save-file layout.
Sourcepub fn project_name(&self) -> &'static str
pub fn project_name(&self) -> &'static str
The UE4 project short name (the folder under the install root).
Trait Implementations§
Source§impl GamePlugin for Ue4Game
impl GamePlugin for Ue4Game
Source§fn mod_directory(&self, install: &Path) -> PathBuf
fn mod_directory(&self, install: &Path) -> PathBuf
Deploy target: <install>/<ProjectName>/Content/Paks/~mods.
The tilde prefix forces UE4’s pak mounter to load these after the shipping paks so mods can override base content.
Source§fn resolve_deploy_target(&self, id: &str, _install: &Path) -> Option<PathBuf>
fn resolve_deploy_target(&self, id: &str, _install: &Path) -> Option<PathBuf>
Resolve the per-user config dir under the Proton prefix:
<steam_root>/compatdata/<APP_ID>/pfx/drive_c/users/steamuser/
AppData/Local/<Project>/Saved/Config/Windows/.
Returns None if the prefix doesn’t exist yet — the caller is
expected to surface that to the user (typically: launch the
game once so Proton creates the prefix).
Source§fn display_name(&self) -> &str
fn display_name(&self) -> &str
Source§fn save_directory(&self) -> Option<PathBuf>
fn save_directory(&self) -> Option<PathBuf>
Source§fn supports_save_profiles(&self) -> bool
fn supports_save_profiles(&self) -> bool
Source§fn deploy_targets(&self) -> &'static [DeployTarget]
fn deploy_targets(&self) -> &'static [DeployTarget]
DeployTargetKind it takes the
first one of that kind.Source§fn executable_dir(&self, install: &Path) -> PathBuf
fn executable_dir(&self, install: &Path) -> PathBuf
Source§fn wine_dll_overrides(&self, game_dir: &Path) -> SmallVec<[String; 4]>
fn wine_dll_overrides(&self, game_dir: &Path) -> SmallVec<[String; 4]>
n,b overrides. Read moreSource§fn wine_dll_overrides_from_staging(
&self,
staging: &Path,
) -> SmallVec<[String; 4]>
fn wine_dll_overrides_from_staging( &self, staging: &Path, ) -> SmallVec<[String; 4]>
Source§fn classify_mod(&self, mod_dir: &Path) -> ModSafety
fn classify_mod(&self, mod_dir: &Path) -> ModSafety
Source§fn classify_extension(&self, ext: &str) -> ContentCategory
fn classify_extension(&self, ext: &str) -> ContentCategory
fn archive_extensions(&self) -> &[&str]
fn steam_app_id_u32(&self) -> Option<u32>
fn nexus_game_domain(&self) -> Option<&str>
Source§fn analyze_mod_archive(&self, extracted_dir: &Path) -> Option<InstallMethod>
fn analyze_mod_archive(&self, extracted_dir: &Path) -> Option<InstallMethod>
Source§fn detect_install(&self) -> Option<PathBuf>
fn detect_install(&self) -> Option<PathBuf>
detection::find_game_install(self.game_id()).Source§fn mod_root(&self, install: &Path) -> Result<PathBuf>
fn mod_root(&self, install: &Path) -> Result<PathBuf>
Source§fn deploy(&self, staging: &Path, target: &Path) -> Result<()>
fn deploy(&self, staging: &Path, target: &Path) -> Result<()>
modde_core::fs::deploy_symlinks.Source§fn deploy_to_install(&self, staging: &Path, install: &Path) -> Result<()>
fn deploy_to_install(&self, staging: &Path, install: &Path) -> Result<()>
Source§fn post_deploy(&self, _install: &Path) -> Result<()>
fn post_deploy(&self, _install: &Path) -> Result<()>
REDmod deploy).fn ini_file_names(&self) -> &[&str]
fn has_plugin_system(&self) -> bool
fn plugins_txt_folder(&self) -> Option<&str>
Source§fn nexus_game_id_u32(&self) -> Option<u32>
fn nexus_game_id_u32(&self) -> Option<u32>
gameId: Int, not a domain
string). Games that only speak REST can leave this None.Source§fn recognizes_bare_layout(&self, _extracted_dir: &Path) -> bool
fn recognizes_bare_layout(&self, _extracted_dir: &Path) -> bool
Data/ directory, or a Cyberpunk archive with r6/). Read more