### Unreal Engine Name and String Integration Example Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Demonstrates how to initialize the name system, find an object, and retrieve its name, full path, and a valid C++ identifier. This example requires Unreal Engine headers. ```cpp #include "Unreal/NameArray.h" #include "Unreal/UnrealTypes.h" #include "Unreal/ObjectArray.h" // Initialize name system if (!NameArray::TryInit()) { return; } FName::Init_Windows(); // Find an object UEObject Obj = ObjectArray::FindObjectFast("MyObject"); if (!Obj) return; // Get its name FName ObjName = Obj.GetFName(); std::string Name = ObjName.ToString(); uint32 Suffix = ObjName.GetNumber(); std::cout << "Object: " << Name; if (Suffix != 0) std::cout << "_" << Suffix; std::cout << "\n"; // Get full path std::string FullPath = Obj.GetFullName(); std::cout << "Full name: " << FullPath << "\n"; // Get valid C++ identifier std::string ValidName = ObjName.ToValidString(); std::cout << "Valid C++ name: " << ValidName << "\n"; ``` -------------------------------- ### Example INI for Configuration Loading Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/configuration.md An example INI file demonstrating how to set configuration options for Dumper-7, including sleep timeout, dump key, and SDK generation path. ```ini [Settings] SleepTimeout=30 DumpKey=0x77 SDKNamespaceName=MyNamespace SDKGenerationPath=./MySDK ``` -------------------------------- ### Programmatic Configuration Example Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/configuration.md Example of modifying Dumper settings programmatically before engine initialization. Note that some settings are constexpr and cannot be changed at runtime; use INI files for runtime configuration. ```cpp #include "Settings.h" #include "Generators/Generator.h" // Before Generator::InitEngineCore() Settings::Config::SDKNamespaceName = "MyGame"; Settings::Generator::GameName = "MyGame"; Settings::Generator::GameVersion = "5.0"; Settings::Generator::SDKGenerationPath = "C:\\Output\\SDK"; // Configure C++ generation // (Note: these are constexpr, cannot be changed at runtime) // Use INI file instead for runtime configuration // Load INI if present Settings::Config::Load(); // Wait before starting Settings::Config::DelayDumperStart(); // Initialize dumper Generator::InitEngineCore(); Generator::InitInternal(); // Generate SDKs Generator::Generate(); Generator::Generate(); ``` -------------------------------- ### Dumper-7 Configuration Example Source: https://github.com/encryqed/dumper-7/blob/main/README.md Example Dumper-7.ini file settings. These settings configure the SDK generation path, namespace, and dump trigger conditions. ```ini [Settings] SleepTimeout=30 SDKNamespaceName=MyOwnSDKNamespace DumpKey=0x77 SDKGenerationPath=./ ``` -------------------------------- ### UEFunction Example: Get Function and Return Property Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Demonstrates how to find a specific function (TakeDamage) within a UEClass and retrieve its return property's C++ type. This is useful for understanding function signatures at runtime. ```cpp UEClass MyClass = ObjectArray::FindClassFast("AMyCharacter"); UEFunction MyFunc = MyClass.GetFunction("AMyCharacter", "TakeDamage"); if (MyFunc) { UEProperty RetProp = MyFunc.GetReturnProperty(); std::cout << "Returns: " << RetProp.GetCppType() << "\n"; } ``` -------------------------------- ### Minimal INI Configuration Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/configuration.md Example of a minimal INI file configuration for Dumper settings. ```ini [Settings] SDKNamespaceName=MyNamespace SDKGenerationPath=./ ``` -------------------------------- ### Example: Executing Generators Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md Demonstrates how to initialize the dumper and then sequentially execute different SDK generators like CppGenerator, MappingGenerator, IDAMappingGenerator, and DumpspaceGenerator. ```cpp // From main.cpp Generator::InitEngineCore(); Generator::InitInternal(); Generator::Generate(); Generator::Generate(); Generator::Generate(); Generator::Generate(); ``` -------------------------------- ### PostInit() - Finalize Initialization Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Completes the FName system initialization after all necessary offsets and configurations have been set. This should be called after `SetGNamesWithoutCommitting` or other setup methods. ```cpp static void PostInit(); ``` -------------------------------- ### Initialize Dumper-7 Engine Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/overview.md Load configuration, set delays, and initialize the engine core and internal setup before executing generators. ```cpp // 1. Load configuration Settings::Config::Load(); Settings::Config::DelayDumperStart(); // 2. Initialize engine core (probe process) Generator::InitEngineCore(); // 3. Finalize internal setup Generator::InitInternal(); // 4. Execute generators Generator::Generate(); Generator::Generate(); Generator::Generate(); Generator::Generate(); ``` -------------------------------- ### Complete INI Configuration Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/configuration.md Example of a complete INI file configuration for Dumper settings, including SleepTimeout and DumpKey. ```ini [Settings] SleepTimeout=30 DumpKey=0x77 SDKNamespaceName=MyNamespace SDKGenerationPath=C:\Output\SDK ``` -------------------------------- ### Using InitObjectArrayDecryption Macro Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Example of using the InitObjectArrayDecryption macro with a lambda function for XOR-based decryption. ```cpp InitObjectArrayDecryption([](void* Ptr) -> uint8* { return static_cast(Ptr) ^ 0xFF; }); ``` -------------------------------- ### FName Initialization and Usage Example Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Demonstrates how to initialize the FName system using auto-detection on Windows and how to convert an FName object obtained from a UEObject into a string format. This is typically done during the dumper's initialization phase. ```cpp // During dumper initialization FName::Init_Windows(); // Auto-detect // Later, convert a FName UEObject Obj = ObjectArray::GetByIndex(42); FName ObjName = Obj.GetFName(); std::string Name = ObjName.ToString(); std::string ValidName = ObjName.ToValidString(); uint32 Suffix = ObjName.GetNumber(); // Get numeric suffix if present ``` -------------------------------- ### EPropertyFlags Usage Examples Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/types.md Demonstrates how to check for specific property flags using bitwise operations and the HasPropertyFlags method. Also shows how to retrieve all flags. ```cpp UEProperty Prop = /* ... */; if (Prop.HasPropertyFlags(EPropertyFlags::Net)) { // This property is replicated } EPropertyFlags Flags = Prop.GetPropertyFlags(); if (Flags & (EPropertyFlags::Parm | EPropertyFlags::OutParm)) { // This is a function parameter } ``` -------------------------------- ### PackageManager::GetPackages() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Retrieves a vector containing all available packages. Use this to get a list of all packages. ```cpp static std::vector GetPackages(); ``` -------------------------------- ### Enabling Unreal Engine Console and Interacting with Game Objects Source: https://github.com/encryqed/dumper-7/blob/main/UsingTheSDK.md This example demonstrates how to enable the Unreal Engine console, access core engine objects like UEngine and UWorld, iterate through game objects, and modify input settings. ```c++ #include #include #include "SDK/Engine_classes.hpp" // Basic.cpp was added to the VS project // Engine_functions.cpp was added to the VS project DWORD MainThread(HMODULE Module) { /* Code to open a console window */ AllocConsole(); FILE* Dummy; freopen_s(&Dummy, "CONOUT$", "w", stdout); freopen_s(&Dummy, "CONIN$", "r", stdin); /* Functions returning "static" instances */ SDK::UEngine* Engine = SDK::UEngine::GetEngine(); SDK::UWorld* World = SDK::UWorld::GetWorld(); /* Getting the PlayerController, World, OwningGameInstance, ... should all be checked not to be nullptr! */ SDK::APlayerController* MyController = World->OwningGameInstance->LocalPlayers[0]->PlayerController; /* Print the full-name of an object ("ClassName PackageName.OptionalOuter.ObjectName") */ std::cout << Engine->ConsoleClass->GetFullName() << std::endl; /* Manually iterating GObjects and printing the FullName of every UObject that is a Pawn (not recommended) */ for (int i = 0; i < SDK::UObject::GObjects->Num(); i++) { SDK::UObject* Obj = SDK::UObject::GObjects->GetByIndex(i); if (!Obj) continue; if (Obj->IsDefaultObject()) continue; /* Only the 'IsA' check using the cast flags is required, the other 'IsA' is redundant */ if (Obj->IsA(SDK::APawn::StaticClass()) || Obj->HasTypeFlag(SDK::EClassCastFlags::Pawn)) { std::cout << Obj->GetFullName() << "\n"; } } /* You might need to loop all levels in UWorld::Levels */ SDK::ULevel* Level = World->PersistentLevel; SDK::TArray& Actors = Level->Actors; for (SDK::AActor* Actor : Actors) { /* The 2nd and 3rd checks are equal, prefer using EClassCastFlags if available for your class. */ if (!Actor || !Actor->IsA(SDK::EClassCastFlags::Pawn) || !Actor->IsA(SDK::APawn::StaticClass())) continue; SDK::APawn* Pawn = static_cast(Actor); // Use Pawn here } /* * Changes the keyboard-key that's used to open the UE console * * This is a rare case of a DefaultObjects' member-variables being changed. * By default you do not want to use the DefaultObject, this is a rare exception. */ SDK::UInputSettings::GetDefaultObj()->ConsoleKeys[0].KeyName = SDK::UKismetStringLibrary::Conv_StringToName(L"F2"); /* Creates a new UObject of class-type specified by Engine->ConsoleClass */ SDK::UObject* NewObject = SDK::UGameplayStatics::SpawnObject(Engine->ConsoleClass, Engine->GameViewport); /* The Object we created is a subclass of UConsole, so this cast is **safe**. */ Engine->GameViewport->ViewportConsole = static_cast(NewObject); return 0; } BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved) { switch (reason) { case DLL_PROCESS_ATTACH: CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MainThread, hModule, 0, 0); break; } return TRUE; } ``` -------------------------------- ### Manual Offset and Pointer Override Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/INDEX.md Provides examples for manually overriding memory offsets for object arrays, name arrays, and function pointers, including pointer encryption setup. ```cpp // In Generator::InitEngineCore(): FChunkedFixedUObjectArrayLayout Layout{ /* ... */ }; ObjectArray::Init(0x12345678, 0x10000, Layout); NameArray::TryInit(0x87654321, true); // true = FNamePool FName::Init(0x11111111, FName::EOffsetOverrideType::AppendString, false); Off::InSDK::ProcessEvent::InitPE(0); // vtable index // Pointer encryption (if needed) InitObjectArrayDecryption([](void* Ptr) -> uint8* { return reinterpret_cast(uint64(Ptr) ^ 0x8375); }); ``` -------------------------------- ### Basic DllMain and MainThread Setup Source: https://github.com/encryqed/dumper-7/blob/main/UsingTheSDK.md This snippet shows the fundamental structure for DllMain and a MainThread function, which is commonly used for initializing operations when a DLL is attached to a process. ```c++ #include #include DWORD MainThread(HMODULE Module) { /* Code to open a console window */ AllocConsole(); FILE* Dummy; freopen_s(&Dummy, "CONOUT$", "w", stdout); freopen_s(&Dummy, "CONIN$", "r", stdin); // Your code here return 0; } BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved) { switch (reason) { case DLL_PROCESS_ATTACH: CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MainThread, hModule, 0, 0); break; } return TRUE; } ``` -------------------------------- ### Finding and Processing a UEObject Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Illustrates how to find a specific UEObject by its name, check its type, retrieve its full name, and process an event on it. This example is useful for interacting with game objects at runtime. ```cpp UEObject Obj = ObjectArray::FindObjectFast("MyActor"); if (Obj && Obj.IsA(EClassCastFlags::Actor)) { std::cout << Obj.GetFullName() << "\n"; UEClass ActorClass = Obj.GetClass(); UEFunction MyFunc = ActorClass.GetFunction("MyClass", "MyFunction"); Obj.ProcessEvent(MyFunc, nullptr); } ``` -------------------------------- ### UEEnum Example: Iterating Name-Value Pairs Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Iterates through all members of a UEEnum and prints their names and values. Ensure the UEEnum object is valid before iterating. ```cpp UEEnum MyEnum = ObjectArray::FindObjectFast("EMyEnum"); for (auto [Name, Value] : MyEnum.GetNameValuePairs()) { std::cout << Name.ToString() << " = " << Value << "\n"; } ``` -------------------------------- ### UEStruct Example: Iterating Properties Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Iterates through all properties of a UEStruct and prints their names and offsets. Use this to inspect the members of a structure. ```cpp UEStruct MyStruct = ObjectArray::FindStructFast("FMyStruct"); for (UEProperty Prop : MyStruct.GetProperties()) { std::cout << Prop.GetName() << " at offset 0x" << std::hex << Prop.GetOffset() << "\n"; } ``` -------------------------------- ### StructManager::Init() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Initializes the struct metadata database by scanning all structs, detecting name collisions, calculating sizes, marking final structs, and identifying cyclic dependencies. Call this once at the start of your application. ```cpp static void Init(); ``` -------------------------------- ### UEClass Example: Find Function by Name and Type Check Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Shows how to find a UClass (APawn) and then retrieve a specific function (PostInitializeComponents) from it after verifying the class type. This is useful for dynamic function invocation or inspection. ```cpp UEClass PawnClass = ObjectArray::FindClassFast("APawn"); if (PawnClass.IsType(EClassCastFlags::Class)) { UEFunction PostInitPropsFunc = PawnClass.GetFunction("APawn", "PostInitializeComponents"); } ``` -------------------------------- ### DelayDumperStart Function Signature Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/configuration.md Function signature for DelayDumperStart, which waits for a timeout or key press before starting the dump process based on configuration settings. ```cpp void Settings::Config::DelayDumperStart(); ``` -------------------------------- ### Iterating Through Struct Properties with UEFField Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Demonstrates how to iterate through child properties of a struct using the UEFField wrapper. This example shows a common pattern for accessing and processing properties within a struct. ```cpp UEFField Field = Struct.GetChildProperties(); while (Field) { std::cout << Field.GetName() << "\n"; Field = Field.GetNext(); } ``` -------------------------------- ### TryInit() - Manual Initialization Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Initializes the FName system with a specified GNames offset and type (FNamePool or TNameEntryArray). Useful when automatic detection fails or for specific configurations. ```cpp static bool TryInit(int32 OffsetOverride, bool bIsNamePool, const char* const ModuleName = Settings::General::DefaultModuleName); ``` -------------------------------- ### TryInit() - Automatic Initialization Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Automatically detects and initializes the FName system. Use this for general-purpose initialization. The `bIsTestOnly` flag prevents committing initialization if set to true. ```cpp static bool TryInit(bool bIsTestOnly = false); ``` ```cpp if (!NameArray::TryInit()) { std::cerr << "Failed to initialize NameArray\n"; } ``` -------------------------------- ### UEInterfaceProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents an interface pointer. Use GetCppType() to get its C++ type name. ```cpp class UEInterfaceProperty : public UEObjectProperty { std::string GetCppType() const; }; ``` -------------------------------- ### Configure Project with Xmake Source: https://github.com/encryqed/dumper-7/blob/main/Xmake.md Configure the project for a specific platform, architecture, and build mode. Use 'release' for optimized builds and 'debug' for development. ```bash xmake f -p windows -a -m ``` ```bash # Examples xmake f -p windows -a x64 -m release # As Release xmake f -p windows -a x64 -m debug # as Debug ``` -------------------------------- ### UESoftClassProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a TSoftClassPtr to a UClass. Use GetCppType() to get its C++ type name. ```cpp class UESoftClassProperty : public UEClassProperty { std::string GetCppType() const; }; ``` -------------------------------- ### UESoftObjectProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a TSoftObjectPtr to a UObject. Use GetCppType() to get its C++ type name. ```cpp class UESoftObjectProperty : public UEObjectProperty { std::string GetCppType() const; }; ``` -------------------------------- ### UELazyObjectProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a TLazyObjectPtr to a UObject. Use GetCppType() to get its C++ type name. ```cpp class UELazyObjectProperty : public UEObjectProperty { std::string GetCppType() const; }; ``` -------------------------------- ### InitInternal() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md Completes the initialization of internal dumper systems after InitEngineCore(). This is called once before the generation process begins. ```cpp static void InitInternal(); ``` -------------------------------- ### UEWeakObjectProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a TWeakObjectPtr to a UObject. Use GetCppType() to get its C++ type name. ```cpp class UEWeakObjectProperty : public UEObjectProperty { std::string GetCppType() const; }; ``` -------------------------------- ### Configure Dumper-7 Settings Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/INDEX.md Illustrates two methods for configuring Dumper-7: via an INI file or programmatically before initializing the engine core. ```cpp // Via INI file (easiest) // Create Dumper-7.ini: // [Settings] // SDKNamespaceName=MyNamespace // SDKGenerationPath=./SDK // SleepTimeout=30 // DumpKey=0x77 // Or programmatically (before InitEngineCore) Settings::Config::SDKNamespaceName = "MyNamespace"; Settings::Generator::SDKGenerationPath = "C:\\Output"; ``` -------------------------------- ### Get Maximum Chunk Capacity Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Retrieves the maximum capacity of chunks. This method is applicable only for chunked layout. ```cpp static int32 MaxChunks(); ``` -------------------------------- ### InitEngineCore() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md Initializes engine-level data, including detecting offsets and setting up core reflection systems like ObjectArray and NameArray. This is called once at dumper startup. ```cpp static void InitEngineCore(); ``` -------------------------------- ### Get Chunk Count Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Retrieves the current number of allocated chunks. This method is applicable only for chunked layout. ```cpp static int32 NumChunks(); ``` -------------------------------- ### Perform a Fresh Build with Xmake Source: https://github.com/encryqed/dumper-7/blob/main/Xmake.md Clean the project and then perform a fresh build. This ensures no stale artifacts affect the build process. ```bash xmake clean xmake build ``` -------------------------------- ### Initialize and Find Unreal Objects Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/INDEX.md Initializes the object array system and demonstrates finding Unreal Engine classes and objects by name or index. Also shows how to iterate through all objects. ```cpp #include "Unreal/ObjectArray.h" // Auto-detect and initialize ObjectArray::Init(); // Find by name only UEClass MyClass = ObjectArray::FindClassFast("AMyCharacter"); // Find by full name UEClass Engine = ObjectArray::FindClass("Class Engine.Engine"); // Get by index UEObject Obj = ObjectArray::GetByIndex(42); // Iterate all objects for (UEObject Obj : ObjectArray()) { /* ... */ } ``` -------------------------------- ### UEObjectProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a pointer to a UObject. Use GetPropertyClass() to get the associated UClass and GetCppType() for its C++ type name. ```cpp class UEObjectProperty : public UEProperty { UEClass GetPropertyClass() const; std::string GetCppType() const; }; ``` -------------------------------- ### InitDecryption() Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Sets up pointer decryption for GObjects entries if the engine uses XOR encryption. Requires a decryption function and its string representation. ```APIDOC ## InitDecryption() ### Description Set up pointer decryption for GObjects entries if the engine uses XOR encryption. ### Method `static void InitDecryption(uint8_t* (*DecryptionFunction)(void* ObjPtr), const char* DecryptionLambdaAsStr)` ### Parameters #### Path Parameters - **DecryptionFunction** (uint8_t* (*)(void*)) - Required - Lambda or function pointer that decrypts an object pointer - **DecryptionLambdaAsStr** (const char*) - Required - String representation of the lambda for documentation ### Returns void ### Example ```cpp ObjectArray::InitDecryption( [](void* ObjPtr) -> uint8* { return reinterpret_cast(uint64(ObjPtr) ^ 0x8375); }, "[](void* ObjPtr) -> uint8* { return reinterpret_cast(uint64(ObjPtr) ^ 0x8375); }" ); // Or use the convenience macro: InitObjectArrayDecryption([](void* ObjPtr) -> uint8* { return reinterpret_cast(uint64(ObjPtr) ^ 0x8375); }); ``` ``` -------------------------------- ### ObjectsIterator Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md A custom iterator for GObjects arrays, providing methods to dereference, advance, compare, and get the index of the current object. ```APIDOC ## ObjectsIterator ### Description Custom iterator for GObjects array. ### Methods - **operator*()** (UEObject) - Dereference to current object - **operator++()** (ObjectsIterator&) - Advance to next object - **operator==()** (bool) - Compare iterators - **operator!=()** (bool) - Compare iterators - **GetIndex()** (int32) - Get current index ### Example ```cpp for (auto It = ObjectArray::begin(); It != ObjectArray::end(); ++It) { UEObject Obj = *It; if (Obj.IsA(EClassCastFlags::Actor)) { // Process actor } } ``` ``` -------------------------------- ### StringEntry Struct Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Defines a single entry in a hash table, including methods to get the stored name and check for uniqueness. ```cpp struct StringEntry { std::string GetName() const; bool IsUnique() const; }; ``` -------------------------------- ### Introspect Unreal Class Properties and Functions Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/INDEX.md Demonstrates how to find a class by name, retrieve its parent class, and iterate through its properties and functions, printing their names and offsets. ```cpp #include "Unreal/UnrealObjects.h" UEClass MyClass = ObjectArray::FindClassFast("ACharacter"); // Get parent class UEClass ParentClass = MyClass.GetSuper().Cast(); // Get properties for (UEProperty Prop : MyClass.GetProperties()) { std::cout << Prop.GetName() << " at 0x" << Prop.GetOffset() << "\n"; } // Get functions for (UEFunction Func : MyClass.GetFunctions()) { std::cout << Func.GetName() << "\n"; } // Type checking if (MyClass.IsType(EClassCastFlags::Class)) { // This is a class } ``` -------------------------------- ### UEFieldPathProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents an FFieldPath property (UE5+). Use GetFieldClass() to get the field class and GetCppType() for its C++ type name. ```cpp class UEFieldPathProperty : public UEProperty { UEFFieldClass GetFieldClass() const; std::string GetCppType() const; }; ``` -------------------------------- ### UESetProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a TSet. Use GetElementProperty() to get the element property type and GetCppType() for its C++ type name. ```cpp class UESetProperty : public UEProperty { UEProperty GetElementProperty() const; std::string GetCppType() const; }; ``` -------------------------------- ### Generate() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md Executes a specific generator (e.g., C++, mapping). It creates output directories, dumps GObjects, initializes predefined members and functions, and then calls the generator's specific Generate method. ```cpp template static void Generate(); ``` -------------------------------- ### Convert Unreal Names to Strings Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/INDEX.md Demonstrates initializing the name system and converting an Unreal Engine FName object to standard C++ strings (std::string and std::wstring), also retrieving its suffix. ```cpp #include "Unreal/NameArray.h" FName::Init_Windows(); // Initialize name system UEObject Obj = ObjectArray::GetByIndex(0); FName Name = Obj.GetFName(); std::string SimpleString = Name.ToString(); std::wstring WideString = Name.ToWString(); uint32 Suffix = Name.GetNumber(); ``` -------------------------------- ### UEDelegateProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a single-cast delegate. Use GetSignatureFunction() to get the associated function signature and GetCppType() for its C++ type name. ```cpp class UEDelegateProperty : public UEProperty { UEFunction GetSignatureFunction() const; std::string GetCppType() const; }; ``` -------------------------------- ### UEStructProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a struct value or pointer. Use GetUnderlayingStruct() to get the struct definition and GetCppType() for its C++ type name. ```cpp class UEStructProperty : public UEProperty { UEStruct GetUnderlayingStruct() const; std::string GetCppType() const; }; ``` -------------------------------- ### Get Maximum Object Capacity Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Retrieves the maximum capacity of the object array. This indicates the total number of object slots available. ```cpp static int32 Max(); ``` -------------------------------- ### Generate SDKs with Different Generators Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/INDEX.md Shows the standard flow for generating SDKs using various generator types after initializing the engine core and internal systems. ```cpp // Standard flow Generator::InitEngineCore(); // Detect offsets Generator::InitInternal(); // Setup Generator::Generate(); Generator::Generate(); Generator::Generate(); Generator::Generate(); ``` -------------------------------- ### ExecuteSDKCompilationTestScript() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md Runs a Python script to validate the generated SDK's compilation using MSVC and Clang. Requires specific settings to be enabled. ```cpp static bool ExecuteSDKCompilationTestScript(); ``` -------------------------------- ### Iterate and Print All Names Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Demonstrates how to iterate through all available name entries using `GetNumElements` and `GetNameEntry`, then print their string representations. ```cpp // Iterate all names for (int32 i = 0; i < NameArray::GetNumElements(); ++i) { FNameEntry Entry = NameArray::GetNameEntry(i); std::cout << Entry.GetString() << "\n"; } ``` -------------------------------- ### NameArray Initialization Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Methods for initializing and finding the name system, including auto-detection for Windows and manual configuration. ```APIDOC ## NameArray Initialization Methods ### TryFindNameArray_Windows() Auto-detect TNameEntryArray on Windows (legacy UE4 systems). **Returns:** bool - True if found ```cpp static bool TryFindNameArray_Windows(); ``` ### TryFindNamePool_Windows() Auto-detect FNamePool on Windows (UE5+ systems). **Returns:** bool - True if found ```cpp static bool TryFindNamePool_Windows(); ``` ### TryInit(bool bIsTestOnly) Auto-detect and initialize name system. **Parameters:** - **bIsTestOnly** (bool, optional, default: false) - If true, don't commit initialization **Returns:** bool - True if successful ```cpp static bool TryInit(bool bIsTestOnly = false); ``` ### TryInit(int32 OffsetOverride, bool bIsNamePool, const char* const ModuleName) Initialize with explicit offset and type. **Parameters:** - **OffsetOverride** (int32) - GNames offset in memory - **bIsNamePool** (bool) - True for FNamePool, false for TNameEntryArray - **ModuleName** (const char*, optional, default: Settings::General::DefaultModuleName) - Target module (nullptr = main executable) **Returns:** bool - True if successful ```cpp static bool TryInit(int32 OffsetOverride, bool bIsNamePool, const char* const ModuleName = Settings::General::DefaultModuleName); ``` ### SetGNamesWithoutCommitting() Set the GNames offset without fully initializing (deferred initialization). **Returns:** bool - True if offset found ```cpp static bool SetGNamesWithoutCommitting(); ``` ### PostInit() Finalize name system initialization after all offsets are set. ```cpp static void PostInit(); ``` ``` -------------------------------- ### UEMulticastInlineDelegateProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a multicast inline delegate. Use GetSignatureFunction() to get the associated function signature and GetCppType() for its C++ type name. ```cpp class UEMulticastInlineDelegateProperty : public UEProperty { UEFunction GetSignatureFunction() const; std::string GetCppType() const; }; ``` -------------------------------- ### Generate() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md The main routine for generating the C++ SDK. It processes engine structures to create header and implementation files. ```cpp static void Generate(); ``` -------------------------------- ### UEArrayProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a TArray of elements. Use GetInnerProperty() to get the property type of the array elements and GetCppType() for its C++ type name. ```cpp class UEArrayProperty : public UEProperty { UEProperty GetInnerProperty() const; std::string GetCppType() const; }; ``` -------------------------------- ### Generate Visual Studio Project with Xmake Source: https://github.com/encryqed/dumper-7/blob/main/Xmake.md Generate a Visual Studio project file to build your project using Xmake. Supports specifying multiple build modes. ```bash xmake project -k vs -m "debug;release" ``` ```bash # Or xmake project -k vsxmake2022 -m "debug;release" ``` -------------------------------- ### Get Object by Index Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Retrieves an object from GObjects using its index. Supports casting to a specific UEType. Returns nullptr if the index is invalid. ```cpp template static UEType GetByIndex(int32 Index); ``` ```cpp UEObject Obj = ObjectArray::GetByIndex(42); UEClass MyClass = ObjectArray::GetByIndex(100); ``` -------------------------------- ### Get Object Count Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Retrieves the current number of allocated object entries in GObjects. Use this to understand the current size of the object array. ```cpp static int32 Num(); ``` -------------------------------- ### Init() - Fixed Layout Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Initializes the ObjectArray with explicit GObjects offset and a fixed array layout, suitable for UE4.11-UE4.20. ```APIDOC ## Init() - Fixed Layout (UE4.11-UE4.20) ### Description Initialize with explicit GObjects offset and fixed array layout. ### Method `static void Init(int32 GObjectsOffset, const FFixedUObjectArrayLayout& ObjectArrayLayout = FFixedUObjectArrayLayout(), const char* const ModuleName = Settings::General::DefaultModuleName)` ### Parameters #### Path Parameters - **GObjectsOffset** (int32) - Required - Offset of GObjects pointer in memory #### Query Parameters - **ObjectArrayLayout** (FFixedUObjectArrayLayout) - Optional - Layout structure defining object, max, and num offsets - **ModuleName** (const char*) - Optional - Target module name ### Returns void ### Example ```cpp FFixedUObjectArrayLayout Layout{ .ObjectsOffset = 0x0, .MaxObjectsOffset = 0x8, .NumObjectsOffset = 0xC }; ObjectArray::Init(0x12345678, Layout); ``` ``` -------------------------------- ### InitPredefinedFunctions() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md Loads predefined function definitions. This allows for the addition of custom function signatures for engine functions. ```cpp static void InitPredefinedFunctions(); ``` -------------------------------- ### Custom ObjectsIterator Class Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Defines a custom iterator for GObjects arrays, providing methods for dereferencing, advancing, comparing, and getting the current index. ```cpp class ObjectsIterator { public: UEObject operator*() const; ObjectsIterator& operator++(); bool operator==(const ObjectsIterator& Other) const; bool operator!=(const ObjectsIterator& Other) const; int32 GetIndex() const; }; ``` -------------------------------- ### CollisionManager::Init Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Scans for all naming conflicts within the system. ```APIDOC ## CollisionManager::Init ### Description Scans for all naming conflicts. ### Method ```cpp static void Init(); ``` ``` -------------------------------- ### UEOptionalProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a TOptional (UE5+). Use GetValueProperty() to get the contained value's property type and GetCppType() for its C++ type name. ```cpp class UEOptionalProperty : public UEProperty { UEProperty GetValueProperty() const; std::string GetCppType() const; }; ``` -------------------------------- ### Generator::InitInternal() Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md Completes the initialization of internal dumper systems after InitEngineCore has been called. This method should be invoked once before any generation process begins. ```APIDOC ## Generator::InitInternal() ### Description Complete initialization of internal dumper systems. ### Method static void InitInternal() ### Purpose Finalizes initialization after InitEngineCore(). Called once before generation. ``` -------------------------------- ### SetGNamesWithoutCommitting() - Deferred Initialization Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Sets the GNames offset in memory without finalizing the initialization process. This allows for deferred initialization, useful in complex setup scenarios. ```cpp static bool SetGNamesWithoutCommitting(); ``` -------------------------------- ### Runtime Type Checking with IsA() Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/types.md Demonstrates how to use EClassCastFlags with the IsA() method to check an object's type at runtime. Includes casting to a specific UEClass. ```cpp UEObject Obj = ObjectArray::FindObjectFast("MyActor"); if (Obj.IsA(EClassCastFlags::AActor)) { // Safe to cast as AActor } if (Obj.IsA(EClassCastFlags::UClass)) { UEClass AsClass = Obj.Cast(); } ``` -------------------------------- ### Initialize Weak Object Pointer Settings Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/configuration.md Call this function to auto-detect the TWeakObjectPtr format. ```cpp extern void InitWeakObjectPtrSettings(); ``` -------------------------------- ### UEMapProperty Definition Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/unreal-objects.md Represents a TMap. Use GetKeyProperty() and GetValueProperty() to get the key and value property types, respectively, and GetCppType() for its C++ type name. ```cpp class UEMapProperty : public UEProperty { UEProperty GetKeyProperty() const; UEProperty GetValueProperty() const; std::string GetCppType() const; }; ``` -------------------------------- ### Initialize ObjectArray with Fixed Layout (UE4.11-UE4.20) Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Initializes the ObjectArray for older UE versions using explicit GObjects offset and a fixed array layout structure. Ensure the provided offsets match the engine version. ```cpp static void Init(int32 GObjectsOffset, const FFixedUObjectArrayLayout& ObjectArrayLayout = FFixedUObjectArrayLayout(), const char* const ModuleName = Settings::General::DefaultModuleName); ``` ```cpp FFixedUObjectArrayLayout Layout{ .ObjectsOffset = 0x0, .MaxObjectsOffset = 0x8, .NumObjectsOffset = 0xC }; ObjectArray::Init(0x12345678, Layout); ``` -------------------------------- ### Init() - Chunked Layout Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Initializes the ObjectArray with explicit GObjects offset and a chunked array layout, suitable for UE4.21+. ```APIDOC ## Init() - Chunked Layout (UE4.21+) ### Description Initialize with explicit GObjects offset and chunked array layout. ### Method `static void Init(int32 GObjectsOffset, int32 ElementsPerChunk, const FChunkedFixedUObjectArrayLayout& ObjectArrayLayout = FChunkedFixedUObjectArrayLayout(), const char* const ModuleName = Settings::General::DefaultModuleName)` ### Parameters #### Path Parameters - **GObjectsOffset** (int32) - Required - Offset of GObjects pointer in memory - **ElementsPerChunk** (int32) - Required - Number of elements per chunk (typically 0x10000) #### Query Parameters - **ObjectArrayLayout** (FChunkedFixedUObjectArrayLayout) - Optional - Layout structure defining chunk and element offsets - **ModuleName** (const char*) - Optional - Target module name ### Returns void ``` -------------------------------- ### Iterating Over Object Properties Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Demonstrates how to use AllFieldIterator to loop through and print the names of properties in GObjects. ```cpp for (UEProperty Prop : AllFieldIterator()) { std::cout << Prop.GetName() << "\n"; } ``` -------------------------------- ### Configuration Loading Variables Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/configuration.md Variables for configuration loading, including sleep timeout, dump key, and SDK namespace name. These can be set via INI files. ```cpp namespace Settings::Config { inline int SleepTimeout = 0; inline int DumpKey = 0; inline std::string SDKNamespaceName = "SDK"; void Load(); void DelayDumperStart(); } ``` -------------------------------- ### Scan All Memory Sections for GObjects Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/offset-finder.md Use this when GObjects are not found due to differing memory layouts. Set bScanAllMemory to true during initialization. ```cpp // Try scanning all memory sections ObjectArray::Init(true); // bScanAllMemory = true ``` -------------------------------- ### DependencyManager::Init Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Analyzes all struct dependencies. This method should be called once to initialize the dependency manager. ```APIDOC ## DependencyManager::Init ### Description Analyze all struct dependencies. ### Method static void ### Parameters None ### Returns None ``` -------------------------------- ### Generator::InitEngineCore() Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/generators.md Initializes engine-level data, including detecting offsets and setting up core reflection systems like ObjectArray and NameArray. This is a prerequisite for other generation functions. ```APIDOC ## Generator::InitEngineCore() ### Description Initialize engine-level data: detect offsets, initialize ObjectArray, NameArray, and other core systems. ### Method static void InitEngineCore() ### Purpose Called once at dumper startup to probe the target process and establish basic reflection access. ### Side effects - Initializes `ObjectArray` (GObjects) - Initializes `NameArray` (GNames or FNamePool) - Initializes `FName` resolution - Scans for ProcessEvent offset - Sets up Settings::Internal flags for engine compatibility ``` -------------------------------- ### EnumManager::Init() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Initializes the EnumManager by scanning and indexing all enums in ObjectArray. Call this before using other EnumManager methods. ```cpp static void Init(); ``` -------------------------------- ### TryFindNamePool_Windows() - Auto-detect UE5+ Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/name-and-strings.md Attempts to automatically locate and initialize the FNamePool structure on Windows systems, typically used in newer UE5+ versions. ```cpp static bool TryFindNamePool_Windows(); ``` -------------------------------- ### Attempt Windows Name Array and Pool for GNames Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/offset-finder.md Try finding GNames using both the name array and name pool methods for Windows systems when the FName system uses a non-standard format. ```cpp // Try both name array and name pool if (!NameArray::TryFindNameArray_Windows()) { NameArray::TryFindNamePool_Windows(); } ``` -------------------------------- ### PackageManager::Init Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Initializes the PackageManager by scanning the ObjectArray and grouping objects into packages. This method should be called before accessing any package information. ```APIDOC ## PackageManager::Init ### Description Scan ObjectArray and group objects into packages. ### Method static void Init() ### Parameters None ``` -------------------------------- ### PackageManager::GetPackage() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Retrieves a specific package by its index. Requires a valid package index. ```cpp static PackageInfoHandle GetPackage(int32 Index); ``` -------------------------------- ### Initialize ObjectArray with Chunked Layout (UE4.21+) Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Initializes the ObjectArray for newer UE versions using explicit GObjects offset, elements per chunk, and a chunked array layout structure. ```cpp static void Init(int32 GObjectsOffset, int32 ElementsPerChunk, const FChunkedFixedUObjectArrayLayout& ObjectArrayLayout = FChunkedFixedUObjectArrayLayout(), const char* const ModuleName = Settings::General::DefaultModuleName); ``` -------------------------------- ### Init() - Automatic Scan Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Initializes the ObjectArray by automatically scanning memory for GObjects. This method can optionally scan all memory sections or a specific module. ```APIDOC ## Init() ### Description Initialize ObjectArray by scanning memory for GObjects automatically. ### Method `static void Init(bool bScanAllMemory = false, const char* const ModuleName = Settings::General::DefaultModuleName)` ### Parameters #### Query Parameters - **bScanAllMemory** (bool) - Optional - If true, scan all memory sections; if false, only scan executable sections - **ModuleName** (const char*) - Optional - Name of the module to scan (nullptr = main executable) ### Returns void ### Throws Fails silently if GObjects cannot be found; check state before use. ``` -------------------------------- ### PackageManager::FindPackage() Method Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/wrappers-and-managers.md Finds a package by its name. Provide the exact package name for lookup. ```cpp static PackageInfoHandle FindPackage(const std::string& Name); ``` -------------------------------- ### Generator Settings Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/configuration.md Define output path and naming conventions for all generated files. These settings control where the SDK is saved and how it is organized. ```cpp namespace Settings::Generator { inline std::string GameName = ""; inline std::string GameVersion = ""; inline std::string SDKGenerationPath = "C:/Dumper-7"; } ``` -------------------------------- ### Range-based for Loop for ObjectArray Source: https://github.com/encryqed/dumper-7/blob/main/_autodocs/object-array.md Shows how to use C++11 range-based for loops for convenient iteration over `ObjectArray`. ```cpp for (UEObject Obj : ObjectArray()) { if (Obj.IsA(EClassCastFlags::Pawn)) { std::cout << Obj.GetFullName() << "\n"; } } ```