Skip to content

Commit

Permalink
Begin adding basic Dev/Debug built games dynamic support
Browse files Browse the repository at this point in the history
Update settings ini
  • Loading branch information
narknon committed Oct 7, 2024
1 parent b1f9216 commit 1e7f915
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions UE4SS/include/SettingsManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace RC
{
int64_t MajorVersion{-1};
int64_t MinorVersion{-1};
bool DebugBuild{false};
} EngineVersionOverride;

struct SectionObjectDumper
Expand Down
1 change: 1 addition & 0 deletions UE4SS/src/SettingsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ namespace RC
constexpr static File::CharType section_engine_version_override[] = STR("EngineVersionOverride");
REGISTER_INT64_SETTING(EngineVersionOverride.MajorVersion, section_engine_version_override, MajorVersion)
REGISTER_INT64_SETTING(EngineVersionOverride.MinorVersion, section_engine_version_override, MinorVersion)
REGISTER_BOOL_SETTING(EngineVersionOverride.DebugBuild, section_engine_version_override, DebugBuild)

constexpr static File::CharType section_object_dumper[] = STR("ObjectDumper");
REGISTER_BOOL_SETTING(ObjectDumper.LoadAllAssetsBeforeDumpingObjects, section_object_dumper, LoadAllAssetsBeforeDumpingObjects)
Expand Down
4 changes: 3 additions & 1 deletion UE4SS/src/UE4SSProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,9 @@ namespace RC
config.bHookLocalPlayerExec = settings_manager.Hooks.HookLocalPlayerExec;
config.bHookAActorTick = settings_manager.Hooks.HookAActorTick;
config.FExecVTableOffsetInLocalPlayer = settings_manager.Hooks.FExecVTableOffsetInLocalPlayer;

// Apply Debug Build setting from settings file only for now.
Unreal::Version::DebugBuild = settings_manager.EngineVersionOverride.DebugBuild;
Output::send<LogLevel::Warning>(STR("DebugGame Setting Enabled? {}\n"), Unreal::Version::DebugBuild);
Unreal::UnrealInitializer::Initialize(config);

bool can_create_custom_events{true};
Expand Down
3 changes: 3 additions & 0 deletions assets/UE4SS-settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ bUseUObjectArrayCache = true
[EngineVersionOverride]
MajorVersion =
MinorVersion =
; True if the game is built as Debug, Development, or Test.
; Default: false
DebugBuild =

[ObjectDumper]
; Whether to force all assets to be loaded before dumping objects
Expand Down
2 changes: 1 addition & 1 deletion deps/first/Unreal

0 comments on commit 1e7f915

Please sign in to comment.