The project was closed due to development complexity and is no longer maintained. Development of Ember patches continues in the Flame project https://github.com/DiaLight/Flame
Ember is Dungeon Keeper II patching launcher.
Ember is trying to achieve several DKII patch/mod development goals:
- Building a good patch ecosystem! There is a hook engine(
utils/include/utils/patch.h). But, you don't need to write hooks most of the time. I've collected all thechunk referencesbetween code and data(mappings/references.map). Instead of writing hook, you can just replace cross-references to your proxy method. Every fix/patch/tweak should be placed in thepatchesdirectory with a proper file name/path and defined inpatches/include/dk2_patches.hheader file. Enable them inmain.cppfor now. If your patches depends on each other, then create subdirectory in thepatchesdirectory and apply them as group or create api for your patch inpatches/include/patches/<patch_name>.h. Allow users to check with api that your patch was applied or not. - You can work with
dk2.dllinstead of exe file.DKII.exejust has norelocation table, so exe is always loading at0x400000base address. But, dll has therelocation table, built from thechunk referencesfile! - You can link your code directly to
dk2.dll. Ember has autogenerateddk2/include/*.hheader files anddk2/*.cppwith symbol stubs. Links to these stubs are replaced at runtime with references to the corresponding symbols fromdk2.dll. A lot of researching work was made to build function/data mapping(mappings/v170.map). Based on this mapping, dll also has anexport table. As dll hasexport table, you can generate lib file with Visual Studio toolliband use it in build process. - You can collect the stack trace!
DKII.exedoes not use ebp register as frame stack bottom location. So you can't walk DKII stack frames using this register. I've collected all theesp register modification instruction locations, so you can walk the stack based on this mapping(mappings/stack.map). - Users can enable/disable/configure patches in the launcher gui
Usage:
- Download zip archive from releases
- Unpack wherever you like. Consider it a separate program with its own folder
- Run
launcher.exe - First you need to find the
Dungeon Keeper 2directory using launcher. The program looks for theDKII.exefile and determines its version. Currently only version1.70is supported. - Then you can configure resolution, etc
- Start the game with the big
startbutton
The program does not modify existing game files.
For a complete removal, you must remove launcher's and Dungeon Keeper 2\resources directories and remove HKEY_CURRENT_USER\SOFTWARE\Ember Launcher registry key
Requirements:
- Python 3
- Visual Studio 2022
- Dungeon Keeper II v1.70
How to build:
mkdir build && cd build"D:\Program Files\Visual Studio Community\2022\VC\Auxiliary\Build\vcvars32.bat"cmake -DCMAKE_BUILD_TYPE=Debug -GNinja -DDK2_DIR="D:/Games/Dungeon Keeper 2" -DCMAKE_INSTALL_PREFIX=../bin ..cmake --build .cmake --install ."..\bin\launcher.exe"