Home > Gaming, Tech > DK2 Editor – Adding Actions to Hero Party Members PATCH

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 , , ,

  1. VIRUS
    | #1

    DO NOT DOWNLOAD

    the file is a virus not a update

  2. | #2

    Well, despite the obvious lie I’m not going delete your comment as spam.

    I’d be curious to know how you deemed the file a virus when, infact, there have been no downloads of the dk2heropartyactionfix.zip from your IP address (or any other address today).

    That notwithstanding, running the file through Kaspersky’s online virus scanner gives it a clean bill of health.

    Finally there’s enough information above to patch the file manually using a hex editor like XVI32 if you don’t trust the patch program I’ve created.

  3. | #3

    Thanks! I followed the official editor docs several years ago and became stuck when the editor kept crashing. At the time I emailed David Amor (Bullfrog employee) who confirmed that the editor was identical to the one they were using and the same version. David contacted another team member to see if he could fix the bug but they were unable to do anything. I thought it was possible to fix the bug but I had no idea anyone actually managed to do it.

    I have just installed Dungeon Keeper 2 on Windows 7 x64 Beta Build 7000 and it runs flawlessly with Windows98/ME Compatibility mode selected, no problems at all. Still looks great at 1024 x 768 even on a 24″ display. Quite an amazing achievement, a 10 year old game running on 64-bit Beta operating system with hardware way beyond the original specs.

    Anyway, installed the editor which runs flawlessly on Windows 7 x64, downloaded your patch which also ran fine and it patched the editor no problem. It all works fine now, I can edit actions on hero party members now.

    I can confirm that there is no virus in the file and I can also understand why it would have been flagged as one. Most virus checkers use heuristics to identify common patterns in viruses and this patch is modifying the code of an executable (which would normally be suspicious). It’s just a false positive so ignore any warnings.

  4. Kent Carroll
    | #4

    @Rob

    Hi

    I’m running an XP machine, and when I attempt to launch the editor, I get the classic “DK2 Editor has encountered a problem…..” message.

    Can this program be run under XP???

    Thanks in advance!

    Kent

  5. | #5

    @Kent

    I run the program perfectly well under Windows XP. It’s odd you get the error, have you tried re-downloading the editor? I know it’s a long shot…

  6. Hangman
    | #6

    Hey!
    Thanks for the patch,it helps a lot! Dungeon Keeper 2 is still a great game.^^
    Are you still making maps? Because I do and have some problems. Perhaps you can help me?
    I have two questions.
    1. How can I make my Mercenary Portals work? The manual says,that I have to check a box,but it isn’t there.
    2. How can I display info messages during the game? Because without them,it’s hard to understand the level and even more so the plot.

    I really hope that you can help me,there are not many guys around who are still playing the game or make maps.^^

    Hangman

  7. Keeper Shadow
    | #7

    Yeah. Hi there. I had a query much along the lines of Hangman’s. I can’t seem to get the Mercenary Portals to work either. In direct addressal to Hangman’s comment, I enjoy building maps myself, so if there’s anything I can help with, do poke.

    Going to log this in my favourites & check back.

  8. DungeonMaster
    | #8

    Thanks so much for this, ever since i used this, i had made over 15 single player maps for me and other members of my family, who enjoy this game, challenges and pure fun maps against the ever restless Lord and his faithful, yet death-wished minion, or “goodly heroes” as they like to be called.
    I only have one query, might not be related but could be party related, is it possible in any form to make a big party and to split them up in 2 and divide them in a big area?
    for example, a keep that starts from a hero gate, any keeper minion tresspasses and a party of 10 comes in, minions flee, and the party splits into 5 and goes either side and then divides (small group of 2 and 3 each side… not too mention perhaps 16 party, lord included, cept the 6 stay behind and the 10 scout and secure).
    That was the idea
    just wanted to know if it was possible in any.
    If so, probably takes alot of time to script.

  9. DungeonMaster
    | #9

    To the comments about mercenary portals, it looks like they were painted and not select and place with an action point around it on certain maps like Frosty’s Castle, not sure if you guys can figuring it out because im having a tough time aswell.

  10. Neil Mackie
    | #10

    Sorry if it is a stupid question but I am new to this. How do I load maps into DK2? I have copied some downloaded files into the maps folder but how do I run them?

  11. | #11

    Hello there!

    I just thought about getting back into making some levels (and I can’t believe it, this game is still fun today!), and I’ve noticed there’s another, simmilar bug in the editor.

    When you try to create a “Display Text String” message for the player, and “Edit Text Messages”, whenever I press “OK”, the editor crashes. I’m trying to get a cinematic camera zoomaround while showing some text, and I think this will do it, but since it crashes I have no way to test it!

    Or, would you know how to do this another way?

    Thanks, Joshua.

  1. No trackbacks yet.