Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housekeeping for adding basic dynamic dev/debug built game support #677

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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