Skip to content

Commit 60a9a86

Browse files
authored
Merge branch 'main' into auto-luamod-reload-rebase2
2 parents 5e7a573 + 7aee8ae commit 60a9a86

File tree

121 files changed

+4965
-726
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+4965
-726
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/${CMAKE_INSTALL
5959
add_subdirectory("cmake/modules/CompilerOptions")
6060

6161
# Set compiler options
62-
add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:ASM_MASM>>:${DEFAULT_COMPILER_FLAGS}>")
63-
add_link_options("${DEFAULT_SHARED_LINKER_FLAGS}" "${DEFAULT_EXE_LINKER_FLAGS}")
62+
# NOTE: Do NOT use add_compile_options/add_link_options here as they won't propagate to external consumers
63+
# Instead, these are applied via apply_compiler_settings_to_targets() which uses target_*_options with PUBLIC
64+
# visibility on the UE4SS target, ensuring proper propagation to downstream projects
65+
# add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:ASM_MASM>>:${DEFAULT_COMPILER_FLAGS}>")
66+
# add_link_options("${DEFAULT_SHARED_LINKER_FLAGS}" "${DEFAULT_EXE_LINKER_FLAGS}")
6467
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6568

6669
# Initialize Compiler flags after compiler detection.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ The easiest installation is via downloading the non-dev version of the latest no
2727

2828
If your game is in the custom config list, extract the contents from the relevant folder to `Win64` as well.
2929

30-
If you are planning on doing mod development using UE4SS, you can do the same as above but download the zDEV version instead.
30+
If you are planning on doing mod development using UE4SS, you can do the same as above but download the zDEV version instead.
31+
32+
### Command Line Options
33+
34+
If RE-UE4SS is installed via proxy DLL, the following command line options are available:
35+
36+
- `--disable-ue4ss` - Temporarily disable UE4SS without uninstalling by launching the game with this argument.
37+
- `--ue4ss-path <path>` - Specify a custom path to UE4SS.dll. Supports both absolute paths (e.g., `C:\custom\UE4SS.dll`) and relative paths (e.g., `dev\builds\UE4SS.dll` relative to the game executable directory). Useful for testing different UE4SS builds without modifying installation files.
3138

3239
## Links
3340

UE4SS/CMakeLists.txt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,6 @@ else()
4545
set(UE4SS_LIB_BUILD_GITSHA "no-git")
4646
endif()
4747

48-
# Add version definitions
49-
add_compile_definitions(
50-
UE4SS_LIB_VERSION_MAJOR=${UE4SS_LIB_VERSION_MAJOR}
51-
UE4SS_LIB_VERSION_MINOR=${UE4SS_LIB_VERSION_MINOR}
52-
UE4SS_LIB_VERSION_HOTFIX=${UE4SS_LIB_VERSION_HOTFIX}
53-
UE4SS_LIB_VERSION_PRERELEASE=${UE4SS_LIB_VERSION_PRERELEASE}
54-
UE4SS_LIB_VERSION_BETA=${UE4SS_LIB_VERSION_BETA}
55-
UE4SS_LIB_BETA_STARTED=$<BOOL:${UE4SS_LIB_BETA_IS_STARTED}>
56-
UE4SS_LIB_IS_BETA=$<BOOL:${UE4SS_LIB_IS_BETA}>
57-
UE4SS_LIB_BUILD_GITSHA="${UE4SS_LIB_BUILD_GITSHA}"
58-
UE4SS_CONFIGURATION="$<CONFIG>"
59-
)
60-
6148
message("UE4SS Version: ${UE4SS_LIB_VERSION_MAJOR}.${UE4SS_LIB_VERSION_MINOR}.${UE4SS_LIB_VERSION_HOTFIX}.${UE4SS_LIB_VERSION_PRERELEASE}.${UE4SS_LIB_VERSION_BETA} (${UE4SS_LIB_BUILD_GITSHA})")
6249

6350
# ---------------------------------------------------------------------------
@@ -75,11 +62,24 @@ add_library(UE4SS SHARED ${UE4SS_SOURCES})
7562
target_compile_features(UE4SS PUBLIC cxx_std_23)
7663

7764
# Add include directories
78-
target_include_directories(UE4SS PUBLIC
65+
target_include_directories(UE4SS PUBLIC
7966
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
8067
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/generated_include>
8168
)
8269

70+
# Add version definitions with PUBLIC visibility so external consumers get them
71+
target_compile_definitions(UE4SS PUBLIC
72+
UE4SS_LIB_VERSION_MAJOR=${UE4SS_LIB_VERSION_MAJOR}
73+
UE4SS_LIB_VERSION_MINOR=${UE4SS_LIB_VERSION_MINOR}
74+
UE4SS_LIB_VERSION_HOTFIX=${UE4SS_LIB_VERSION_HOTFIX}
75+
UE4SS_LIB_VERSION_PRERELEASE=${UE4SS_LIB_VERSION_PRERELEASE}
76+
UE4SS_LIB_VERSION_BETA=${UE4SS_LIB_VERSION_BETA}
77+
UE4SS_LIB_BETA_STARTED=$<BOOL:${UE4SS_LIB_BETA_IS_STARTED}>
78+
UE4SS_LIB_IS_BETA=$<BOOL:${UE4SS_LIB_IS_BETA}>
79+
UE4SS_LIB_BUILD_GITSHA="${UE4SS_LIB_BUILD_GITSHA}"
80+
UE4SS_CONFIGURATION="$<CONFIG>"
81+
)
82+
8383
# Add headers as sources for IDE integration
8484
target_sources(UE4SS PUBLIC
8585
FILE_SET ue4ss_headers TYPE HEADERS
@@ -137,7 +137,8 @@ target_link_libraries(UE4SS PUBLIC
137137
# Enable link-time optimization
138138
set_property(TARGET UE4SS PROPERTY INTERPROCEDURAL_OPTIMIZATION ON)
139139

140-
# Set runtime library to DLL for C++ mods compatibility
140+
# Set runtime library to dynamic CRT (/MD, /MDd)
141+
# This matches Visual Studio's default, so external mods don't need to set it explicitly.
141142
set_property(TARGET UE4SS PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
142143

143144
# Set output name and standard

UE4SS/generated_include/MacroSetter.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ if (auto val = parser.get_int64(STR("UFunction"), STR("EventGraphCallOffset"), -
146146
Unreal::UFunction::MemberOffsets.emplace(STR("EventGraphCallOffset"), static_cast<int32_t>(val));
147147
if (auto val = parser.get_int64(STR("UFunction"), STR("Func"), -1); val != -1)
148148
Unreal::UFunction::MemberOffsets.emplace(STR("Func"), static_cast<int32_t>(val));
149+
if (auto val = parser.get_int64(STR("USparseDelegateFunction"), STR("OwningClassName"), -1); val != -1)
150+
Unreal::USparseDelegateFunction::MemberOffsets.emplace(STR("OwningClassName"), static_cast<int32_t>(val));
151+
if (auto val = parser.get_int64(STR("USparseDelegateFunction"), STR("DelegateName"), -1); val != -1)
152+
Unreal::USparseDelegateFunction::MemberOffsets.emplace(STR("DelegateName"), static_cast<int32_t>(val));
149153
if (auto val = parser.get_int64(STR("UField"), STR("Next"), -1); val != -1)
150154
Unreal::UField::MemberOffsets.emplace(STR("Next"), static_cast<int32_t>(val));
151155
if (auto val = parser.get_int64(STR("FField"), STR("ClassPrivate"), -1); val != -1)

UE4SS/include/GUI/LiveView.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ namespace RC::GUI
9999
bool m_modal_edit_property_value_is_open{};
100100
bool m_modal_edit_property_value_opened_this_frame{};
101101
bool m_modal_edit_property_value_error_unable_to_edit{};
102+
bool m_modal_search_by_address_error_not_hex{};
103+
bool m_modal_search_by_address_error_out_of_range{};
102104
bool m_listeners_set{};
103105
bool m_listeners_allowed{};
104106
bool m_is_initialized{};
@@ -140,6 +142,7 @@ namespace RC::GUI
140142
static bool s_watches_loaded_from_disk;
141143
static bool s_filters_loaded_from_disk;
142144
static bool s_use_regex_for_search;
145+
static bool s_search_by_address;
143146

144147
private:
145148
enum class AffectsHistory

UE4SS/include/LuaLibrary.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace RC::LuaLibrary
3131

3232
// Global Lua functions are meant to be called with intact Lua stack
3333
auto global_print(const LuaMadeSimple::Lua&) -> int;
34+
auto load_export(const LuaMadeSimple::Lua&) -> int;
3435

3536
// Used exclusively for the scripts inside the 'UE4SS_Signatures' folder
3637
auto deref_to_int32(const LuaMadeSimple::Lua&) -> int;
Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,5 @@
11
#pragma once
22

3-
#include <LuaType/LuaUObject.hpp>
3+
// Forward include of this to the new Lua Unreal String file for backwards compatability
4+
#include <LuaType/LuaUnrealString.hpp>
45

5-
namespace RC::Unreal
6-
{
7-
class FString;
8-
}
9-
10-
namespace RC::LuaType
11-
{
12-
struct FStringName
13-
{
14-
constexpr static const char* ToString()
15-
{
16-
return "FString";
17-
}
18-
};
19-
class FString : public LocalObjectBase<Unreal::FString, FStringName>
20-
{
21-
private:
22-
explicit FString(Unreal::FString* object);
23-
24-
public:
25-
FString() = delete;
26-
auto static construct(const LuaMadeSimple::Lua&, Unreal::FString*) -> const LuaMadeSimple::Lua::Table;
27-
auto static construct(const LuaMadeSimple::Lua&, BaseObject&) -> const LuaMadeSimple::Lua::Table;
28-
29-
private:
30-
auto static setup_metamethods(BaseObject&) -> void;
31-
32-
private:
33-
template <LuaMadeSimple::Type::IsFinal is_final>
34-
auto static setup_member_functions(const LuaMadeSimple::Lua::Table&) -> void;
35-
};
36-
} // namespace RC::LuaType

UE4SS/include/LuaType/LuaUDataTable.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@ namespace RC::LuaType
1717
}
1818
};
1919

20-
class UDataTable : public RemoteObjectBase<Unreal::UDataTable, UDataTableName>
20+
class UDataTable : public UObjectBase<Unreal::UDataTable, UDataTableName>
2121
{
22-
private:
23-
explicit UDataTable(const PusherParams&);
24-
2522
public:
23+
explicit UDataTable(Unreal::UDataTable* object);
2624
UDataTable() = delete;
2725

28-
auto static construct(const PusherParams&) -> const LuaMadeSimple::Lua::Table;
29-
auto static construct(const LuaMadeSimple::Lua&, BaseObject&) -> const LuaMadeSimple::Lua::Table;
3026
auto static construct(const LuaMadeSimple::Lua& lua, Unreal::UDataTable* unreal_object) -> const LuaMadeSimple::Lua::Table;
27+
auto static construct(const LuaMadeSimple::Lua&, BaseObject&) -> const LuaMadeSimple::Lua::Table;
3128

3229
private:
3330
auto static setup_metamethods(BaseObject&) -> void;

UE4SS/include/LuaType/LuaUObject.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,13 @@ namespace RC::LuaType
384384
RC_UE4SS_API auto push_nameproperty(const PusherParams&) -> void;
385385
RC_UE4SS_API auto push_textproperty(const PusherParams&) -> void;
386386
RC_UE4SS_API auto push_strproperty(const PusherParams&) -> void;
387+
RC_UE4SS_API auto push_utf8strproperty(const PusherParams&) -> void;
388+
RC_UE4SS_API auto push_ansistrproperty(const PusherParams&) -> void;
387389
RC_UE4SS_API auto push_softobjectproperty(const PusherParams&) -> void;
388390
RC_UE4SS_API auto push_interfaceproperty(const PusherParams&) -> void;
391+
RC_UE4SS_API auto push_delegateproperty(const PusherParams&) -> void;
392+
RC_UE4SS_API auto push_multicastdelegateproperty(const PusherParams&) -> void;
393+
RC_UE4SS_API auto push_multicastsparsedelegateproperty(const PusherParams&) -> void;
389394

390395
RC_UE4SS_API auto push_functionproperty(const FunctionPusherParams&) -> void;
391396
// Push to Lua -> END
@@ -716,8 +721,8 @@ No overload found for function 'UObject.ProcessConsoleExec'.
716721

717722
table.add_pair("IsValid", [](const LuaMadeSimple::Lua& lua) -> int {
718723
const auto& lua_object = lua.get_userdata<SelfType>();
719-
if (lua_object.get_remote_cpp_object() && !lua_object.get_remote_cpp_object()->IsUnreachable() &&
720-
is_object_in_global_unreal_object_map(lua_object.get_remote_cpp_object()))
724+
if (lua_object.get_remote_cpp_object() && is_object_in_global_unreal_object_map(lua_object.get_remote_cpp_object()) &&
725+
!lua_object.get_remote_cpp_object()->IsUnreachable())
721726
{
722727
lua.set_bool(true);
723728
}

0 commit comments

Comments
 (0)