Skip to main content

Ue4Game

Struct Ue4Game 

Source
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

Source

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).

Source

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.

Source

pub fn paks_root(&self, install: &Path) -> PathBuf

<install>/<ProjectName>/Content/Paks

Source

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

Source§

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>

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 game_id(&self) -> &str

Unique game identifier (e.g. “skyrim-se”).
Source§

fn display_name(&self) -> &str

Human-readable display name.
Source§

fn save_directory(&self) -> Option<PathBuf>

Return the save directory for this game, if known.
Source§

fn supports_save_profiles(&self) -> bool

Whether this game participates in modde’s per-profile save layer. Read more
Source§

fn deploy_targets(&self) -> &'static [DeployTarget]

Alternate deployment roots this game exposes to the installer (e.g. user-config dirs for INI tweak packs). Default: none, in which case the installer only ever stages into the game install dir. The order is significant: when the analyzer needs to pick a default target for a given DeployTargetKind it takes the first one of that kind.
Source§

fn executable_dir(&self, install: &Path) -> PathBuf

Return the directory containing the game executable, relative to the install root. Used to locate proxy DLLs that need Wine overrides.
Source§

fn wine_dll_overrides(&self, game_dir: &Path) -> SmallVec<[String; 4]>

Scan the game directory for proxy/hook DLLs that need Wine n,b overrides. Read more
Source§

fn wine_dll_overrides_from_staging( &self, staging: &Path, ) -> SmallVec<[String; 4]>

Scan the staging directory for proxy DLLs that mods deploy. This catches DLLs that may have been deleted by other tools (e.g. fgmod) from the game directory but are still needed.
Source§

fn classify_mod(&self, mod_dir: &Path) -> ModSafety

Classify whether a mod is save-breaking based on its installed content. Read more
Source§

fn classify_extension(&self, ext: &str) -> ContentCategory

Classify a file extension into a content category.
Source§

fn archive_extensions(&self) -> &[&str]

Source§

fn steam_app_id_u32(&self) -> Option<u32>

Source§

fn nexus_game_domain(&self) -> Option<&str>

Source§

fn analyze_mod_archive(&self, extracted_dir: &Path) -> Option<InstallMethod>

Claim an extracted archive as a game-specific install method. Read more
Source§

fn detect_install(&self) -> Option<PathBuf>

Attempt to detect the game’s install location. Default: delegates to detection::find_game_install(self.game_id()).
Source§

fn mod_root(&self, install: &Path) -> Result<PathBuf>

Resolve the actual deployment root for enabled mods. Read more
Source§

fn deploy(&self, staging: &Path, target: &Path) -> Result<()>

Deploy staged mods into the game’s mod directory. Default: recursive symlink farm via modde_core::fs::deploy_symlinks.
Source§

fn deploy_to_install(&self, staging: &Path, install: &Path) -> Result<()>

Deploy staged mods using the game install root as context. Read more
Source§

fn post_deploy(&self, _install: &Path) -> Result<()>

Run any post-deployment steps (e.g. REDmod deploy).
Source§

fn ini_file_names(&self) -> &[&str]

Source§

fn has_plugin_system(&self) -> bool

Source§

fn plugins_txt_folder(&self) -> Option<&str>

Source§

fn nexus_game_id_u32(&self) -> Option<u32>

Numeric Nexus game ID. Required by the GraphQL v2 API for browse/search queries (which take 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

Decide whether an extracted archive drops cleanly into the game’s mod dir without any staging (e.g. a Skyrim archive with a top-level Data/ directory, or a Cyberpunk archive with r6/). Read more
Source§

fn summarize_content(&self, mod_dir: &Path) -> ContentSummary

Scan a mod directory and return a content summary.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more