Archive

Archive for June, 2008

DK2 Editor – Adding Actions to Hero Party Members PATCH

June 12th, 2008

So (quite a few years on) I started playing Dungeon Keeper 2 again – it’s still a great game and very recommended.

Having completed the single campaign I thought it’d be fun to start making my own levels, however I hit a problem in that the DK2 Editor crashes under both WinXP (and Win98 – yes, I tried it…) when trying to add an Action to a Hero Party member. This is quite annoying since if you have the Lord of the Land in a hero party you’re unable to setup some important actions, like: “Attach Portal Gem” and “Make Objective”.

Searching the newsgroup alt.games.dungeon-keeper. I found someone (MercAngel) who’d figured out a patch to make this work, however it didn’t work on WinXP but it did work on Win98 – but it’s tiresome to have to load up my Win98 virtual machine everytime I want to create actions under hero party members so I thought I’d look into this myself and see if I could get it to work under WinXP.

After an hour or two of poking around in OllyDbg I’d come up with something that appears to work! It resembles MercAngel’s patch in quite a few ways (so credit to him).

For ease of installation I’ve created a patch program using PatchWise which you can download from here: dk2heropartyactionfix.zip.

Note: YOU USE THIS PATCH ENTIRELY AT YOUR OWN RISK.

It seems to work, and personally, I’d use it but it’s for you to decide if you want to use it. All I will say is that if it crashes while trying to do something different then you could use the patched DK2 Editor to add/edit hero party actions and the original unpatched one to¬† do everything else.

For those who are curious about what it patches, here’s the output of a binary file comparison using fc:-

C:\km\dk2edit>fc /b "DK2 Editor.exe.old" "DK2 Editor.exe"
Comparing files DK2 Editor.exe.old and DK2 EDITOR.EXE
0001B4E3: C3 83
0001B4E4: 90 F8
0001B4E5: 90 00
0001B4E6: 90 75
0001B4E7: 90 03
0001B4E8: 90 8D
0001B4E9: 90 41
0001B4EA: 90 0C
0001B4EB: 90 C3

And the difference in the assembly:-

OLD:
:0041B4E0 8B410C                 mov eax, dword[ecx+0C]
:0041B4E3 C3                     ret

:0041B4E4 90 90 90 90 90 90 90 90 90 90 90 90               ............

NEW:
:0041B4E0 8B410C                 mov eax, dword[ecx+0C]
:0041B4E3 83F800                 cmp eax, 000
:0041B4E6 7503                   jne 0041B4EB
:0041B4E8 8D410C                 lea eax, dword[ecx+0C]
:0041B4EB C3                     ret
:0041B4EC 90 90 90 90                                       ....

Gaming, Tech , , ,