Skip to content

Commit

Permalink
fixed ability to drop creature anywhere by grabbing it with a CTA flag
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
DiaLight committed Oct 29, 2024
1 parent 42e4137 commit 42e38cf
Show file tree
Hide file tree
Showing 14 changed files with 1,098 additions and 556 deletions.
1,057 changes: 564 additions & 493 deletions mapping/DKII_EXE_v170.sgmap

Large diffs are not rendered by default.

46 changes: 28 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
# Flame
A new approach to modifying the compiled code of Dungeon Keeper 2

Flame recompiles some functions of `DKII.EXE` into a separate `.exe` file.
Then it merges this file with the original `.exe` file, replacing the references to
the original functions with the references to recompiled functions.
Recompiled functions are supplemented with switchable changes that fix some game bugs
Flame modifies the Dungeon Keeper 2 code to fix the bugs found in both single and multiplayer.
It works with the Disk, Steam and GOG versions of the game.

[Earlier](https://github.com/DiaLight/Flame/tree/46e5b0c1df93060bd01a83bb6d14d064e9c8c3dc "Full relinking approach"), this project implemented an approach to fully relinking `DKII.EXE`,
which contains false positive references that caused new bugs.
If you have any bugs in the game, please describe them in the discord channel: https://discord.gg/RvrQpCFUZc
When you do, be sure to have followed the recommended installation steps.

## How to install
- download `flame.zip` file from github actions https://github.com/DiaLight/Flame/actions
- copy `DKII-Flame-1.7.0-*.exe` from `flame.zip` to game directory (no need rename to DKII-DX.exe or DKII.exe. exe name does not matter)
- (optional, but recommended) copy `Data` directory from `flame.zip` with replacement to the game directory
- (optional, but recommended) copy `ddraw.dll` from `flame.zip` to the game directory
- run `DKII-Flame-1.7.0-*.exe`
1) Go to the [releases](https://github.com/DiaLight/Flame/releases) page and download the Flame-1.7.0-*.zip file of the newest release
2) Extract the zip file into your Dungeon Keeper 2 game directory

Now run `DKII-Flame-1.7.0-*.exe` to play. It is possible to rename the .exe file to play Multiplayer via GameRanger.

Note: It is possible to find newer test builds on [github actions](https://github.com/DiaLight/Flame/actions)

The `DKII-Flame-1.7.0-*.map` file in the `flame.zip` file you dont need to copy.
I need it if I suddenly need to debug an old build
Note 2: The `Data` directory and `ddraw.dll` file are not required for this to work, but are recommended.

The `Date` folder in the `flame.zip` file contains patches for some campaign maps taken from the link https://keeperklan.com/downloads.php?do=file&id=141
## Files explained

The `Data` folder in the zip file contains patches for some campaign maps taken from the link https://keeperklan.com/downloads.php?do=file&id=141. These fix creatures like Dark Angels not spawning in some campaign maps.

The `ddraw.dll` in the `flame.zip` file are taken from https://github.com/narzoul/DDrawCompat/releases/tag/v0.5.3
It fixing some graphical bugs and i think improve general stability.
This dll is especially needed for those who observe graphic artifacts when starting the game
or whose game crashes immediately upon starting any game level
The Steam version of the game is installed along with this `ddraw.dll`

If you have any bugs in the game, please describe them in the discord channel https://discord.gg/RvrQpCFUZc
When report issue please ensure that you are uses `ddraw.dll`
# For Software Developers

## How it is done

Flame is a new approach to modifying the compiled code of Dungeon Keeper 2

Flame recompiles some functions of `DKII.EXE` into a separate `.exe` file.
Then it merges this file with the original `.exe` file, replacing the references to
the original functions with the references to recompiled functions.
Recompiled functions are supplemented with switchable changes that fix some game bugs

[Earlier](https://github.com/DiaLight/Flame/tree/46e5b0c1df93060bd01a83bb6d14d064e9c8c3dc "Full relinking approach"), this project implemented an approach to fully relinking `DKII.EXE`,
which contains false positive references that caused new bugs.

## Build requirements
- CMake 3.25 or higher https://cmake.org/download/
Expand All @@ -42,4 +52,4 @@ When report issue please ensure that you are uses `ddraw.dll`
- `cmake -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_INSTALL_PREFIX=../install ..`
- `cmake --build .`
- `cmake --install .`
- `copy "..\install\DKII-Flame-<version>.exe" "<Dungeon Keeper2 dir>/DKII-Flame.exe"`
- `copy "..\install\DKII-Flame-<version>.exe" "<Dungeon Keeper2 dir>/DKII-Flame.exe"`
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ add_executable(${TARGET}
patches/use_wheel_to_zoom.cpp
patches/micro_patches.cpp
patches/game_version_patch.cpp
patches/drop_thing_from_hand_fix.cpp

patches/gog_patch_dll/gog_patch_dll.cpp
patches/gog_patch_dll/gog_cfg.cpp
Expand Down
Loading

0 comments on commit 42e38cf

Please sign in to comment.