Skip to content

Commit

Permalink
Merge pull request #677 from UE4SS-RE/DevBuildCompat
Browse files Browse the repository at this point in the history
Housekeeping for adding basic dynamic dev/debug built game support
  • Loading branch information
narknon authored Nov 14, 2024
2 parents dc62bc8 + 60a6e99 commit 2f6002a
Show file tree
Hide file tree
Showing 6 changed files with 16 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
7 changes: 7 additions & 0 deletions assets/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ some notes about most important changes such as:

## New
Added support for UE Version 5.4 - ([UE4SS #503](https://github.com/UE4SS-RE/RE-UE4SS/pull/503))
Added basic support for Development/Debug/Test built Unreal Engine games ([UE4SS #607](https://github.com/UE4SS-RE/RE-UE4SS/pull/607))
- To use this functionality, set DebugBuild to true in UE4SS-Settings.ini

### General
UE Platform support, which allows for much easier internal implementation of new Unreal classes ([UEPseudo #80](https://github.com/Re-UE4SS/UEPseudo/pull/80)) - narknon, localcc
Expand Down Expand Up @@ -165,6 +167,11 @@ Fixes mods not loading when UE4SS initializes too late ([UE4SS #454](https://git

### Added
```ini
[EngineVersionOverride]
; True if the game is built as Debug, Development, or Test.
; Default: false
DebugBuild =

[Hooks]
HookLoadMap = 1
HookAActorTick = 1
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 2f6002a

Please sign in to comment.