Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 24

Thread: Creating maps with HERO PORTALS

  
  1. #1
    Your Majesty Hapuga's Avatar
    Join Date
    Aug 2009
    Location
    Austin, USA
    Posts
    1,444

    Default Creating maps with HERO PORTALS

    Okay, finally after 10 years of silence this one is beaten. Well, at least partly.

    I want to warn you immediately that you will not be able to change one thing:

    Globals.

    You will also need a Hex editor for this process. I suggest Hex Workshop as a very convenient and reliable program.

    Changing all the other things is fine. Now, how is it done:

    Step One

    Download the map I provided. Extract it wherever you want, you will only really need one file from it:

    SampleHeroPMap.kwd

    You can delete the rest. The names are a bit weird and long, this is done on purpose, so you would know the approximate length of an allowed map name. You will need it later.

    You also need the map HeroPool provided by DragonsLover below. Extract it into your DK2 Maps folder. You will need for the next step.

    Step Two

    Open the HeroPool map you just extracted and, now it's important: leave it open in the editor. Then, open an existing map or create a map you want. Do whatever you want with it. You will notice that in the Keeper's properties window, you will now be able to add heroes into the Creature Pool of the Keepers, a thing that would be normally impossible to do without the presence of the HeroPool map. Also note that Hero Portal is only supported by 4 Keepers maximum. You can make a 5 Keepers map, but you'll have to give him a normal creature portal, because DK2 does not support Hero Portal for 5th Keeper or more.

    Save the map to your maps folder.

    Step Three

    Now, take the provided .KWD file, rename it to your map name and replace the existing .KWD file of your map. Here is when you'll need a Hex Editor. With the HE, open the renamed SampleHeroPMap.kwd file and scroll to the very bottom of it. You will see some lines starting with Data\Editor\Terrain and going to the very end to Data\Editor\Maps\SampleHeroPMapThings.kld.

    Now, we will only need the lines that have the SampleHeroPMap name in them. Those start from Data\Editor\Maps\SampleHeroPMapPlayers.kld. Put the cursor behind the first letter (S) in the map name. Now, OVERWRITE the map name with your own map name, and add the suffix at the end. So, if it was Data\Editor\Maps\SampleHeroPMapPlayers.kld, and your map name is Goody, it will be GoodyPlayers.kld (no spaces, and don't forget the extension at the end).

    Continue with the other 4 lines. Do not touch Data/editor/globalvariables.kwd.

    Take note, these are case sensitive! If you have them in capital, keep them all in capital! You can't have one "Goody" and second "goody".

    Now, if the name of your map is shorter than the original:
    Put the cursor on the Hex column, so that it would be right after the last letter of your map name. For example, GoodyPlayers.kld is shorter than SampleHeroPMapPlayers.kld, so when rewriting you will get GoodyPlayers.kldayers.kld.

    Now, keep adding zeros (0) till you cover all the unnecessary letters. It will appear as dots or squares on the right column.

    DO NOT delete the letters! You will change the CHECKSUM of the file and it will not be recognized any more.

    Save the modifications.

    Step Four

    Finally, delete the GoodyGlobals.kld file (in our example). You don't need that file anymore. Also, keep a copy of your new .KWD file if the editor would change it back after you save the map again.

    You are done! Congratulations!


    Post edited by DragonsLover
    Attached Files Attached Files
    Last edited by DragonsLover; June 16th, 2010 at 03:37.
    http://img192.imageshack.us/img192/6659/c2warlocki.gif

  2. #2
    Dragon DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: Creating maps with HERO PORTALS

    There's just a little problem: it becomes impossible to edit the level anymore.

    Anyway, for now, I have found how to add the amount of heroes into the pool in the level editor by doing some hex editing, but the problem is that they come out from the normal creature portal instead of the mercenary one, even with "Available Via H. Portal" activated. How to specify which creature should get out from the normal portal and which one should get out from the mercenary one?
    I like dragons! They're the center of my life! I'll never forget them...



  3. #3

    Default Re: Creating maps with HERO PORTALS

    So what was wrong with setting attractions for heroes in the variables and then giving the keepers a hero portal?

  4. #4
    Your Majesty Hapuga's Avatar
    Join Date
    Aug 2009
    Location
    Austin, USA
    Posts
    1,444

    Default Re: Creating maps with HERO PORTALS

    Quote Originally Posted by DragonsLover View Post
    There's just a little problem: it becomes impossible to edit the level anymore.

    Anyway, for now, I have found how to add the amount of heroes into the pool in the level editor by doing some hex editing, but the problem is that they come out from the normal creature portal instead of the mercenary one, even with "Available Via H. Portal" activated. How to specify which creature should get out from the normal portal and which one should get out from the mercenary one?
    This is very weird. I can edit every map I create with such method.

    And with your question, I am sorry, I do not know. We have to study the variables file because it has all the answers. variables.kwd I mean, the one in the editor folder. All map variables are made based on this file.

    We should also try to find out why globals override variables. When you have a map with globals, hero portals will be disabled.
    http://img192.imageshack.us/img192/6659/c2warlocki.gif

  5. #5
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,689

    Default Re: Creating maps with HERO PORTALS

    Quote Originally Posted by DragonsLover View Post
    Anyway, for now, I have found how to add the amount of heroes into the pool in the level editor by doing some hex editing, but the problem is that they come out from the normal creature portal instead of the mercenary one, even with "Available Via H. Portal" activated. How to specify which creature should get out from the normal portal and which one should get out from the mercenary one?
    I found out how to do that without Hex Editing. I have an old map that has some really weird data and basically I load it up, and create a new map from it. Then when I go to the Creature Pool of the New Map, I have access to all creatures AND Heroes, even Uniques. I can make the Imp available.

    Then I close out the old (Making sure I accidentally don't screw up its data) and tell the editor to return to DK2 defaults (No matter how crappy they are) and then I go into the Creature Data and tell it so that the Heroes are available via Portal.

    One trick I will try (I don't know if it works) is going into the Pro Editor and messing with the rooms to see if I can make the Evil Portal look like the Mercenary Portal. Could work. :P

    ---

    Only thing is it works with perticularly that map, I have no idea why. I can give it to you if you want.
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

  6. #6
    Dragon DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: Creating maps with HERO PORTALS

    Madkill : heroes come from the evil portal instead of the mercenary one.

    Quote Originally Posted by Hapuga
    When you have a map with globals, hero portals will be disabled.
    Here, XXX is the name of the map.

    "XXXGlobals.kld" file stores all the .KWD files from the Editor folder into one, excepted for "GlobalVariables.kwd" where its contain is read first then modified by reading the data from "XXXVariables.kld" file.

    When we do what you have written below, we ask the level to take the data straight from the .KWD files that are inside the Editor folder instead of the "XXXGlobals.kld" file while the rest is similar ("GlobalVariables.kwd" is read then modified by "XXXVariables.kld"), excepted that this time, heroes have been added into the pool from the modified "XXXVariables.kld" file.

    I tested to tell the level to take the data from the "XXXGlobals.kld" file by changing the "XXX.kwd" file, leaving to tell the level to take the modified "XXXVariables.kld" file. The result: no mercenaries. This means that the problem doesn't come from the variables, but from the "XXXGlobals.kld" file or the "XXX.kwd" file.

    Quote Originally Posted by Metal Gear Rex
    I found out how to do that without Hex Editing. I have an old map that has some really weird data and basically I load it up, and create a new map from it. Then when I go to the Creature Pool of the New Map, I have access to all creatures AND Heroes, even Uniques. I can make the Imp available.
    I can do the same for every level without having to load a particular level, just with hex editing. But it would avoid the heroes to go through the Mercenary Portal if I do so. So I guess it'd be better to use an alternative map to allow to add heroes into the pool. Don't send it, I'd be able to do that on my own.
    Last edited by DragonsLover; January 7th, 2010 at 05:57.
    I like dragons! They're the center of my life! I'll never forget them...



  7. #7
    Your Majesty Hapuga's Avatar
    Join Date
    Aug 2009
    Location
    Austin, USA
    Posts
    1,444

    Default Re: Creating maps with HERO PORTALS

    The problem comes from both Variables and Globals.

    What you have written is correct, I just want to repeat that the Editor creates a different Variables file. You can create a simple map and include no Globals, change variables and xxx.kwd and portals will work, or you can create the same map in editor, change only xxx.kwd and it won't work.

    The problem is in how editor interprets and builds these two files.
    http://img192.imageshack.us/img192/6659/c2warlocki.gif

  8. #8
    Dragon DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: Creating maps with HERO PORTALS

    Globals, yes. But Variables, no.

    It doesn't work with Variables because there's no heroes into the pool. That's all.

    As for Globals, it seems that the level requires the global .KWD files from the Editor folder in order to make the Mercenary Portal to work. At the moment where we tell the level to use the Global.kld data file instead, it doesn't work anymore.

    That way, you aren't forced to use the Variables from the sample map you provided. I simply did a little trick similar to what Metal Gear Rex said to bypass that: use a map that allows to add heroes into the pool and create a new map from it. Then, once the level is done, just save it and do the Step Three like you mentioned above by either using the sample map you provided or any of the Frosty's levels. I guess you can even use any of the "official" levels. Then, once done, delete the useless Globals.kld file amongst the level files and voila!

    I did that level that allows to add all heroes to the pool with some hex editing, excepted for the Stone Knight, Lord of the Land, King Reginald and Princes because they don't require rooms to be attracted and are too much powerful. However, I did an exception for the Dwarf, but still, it's not recommended. My level also contain some slightly little modifications of the beginning of my unofficial patch, but if you use the map simply for the Mercenary Portal, then it's not really a problem.

    To add a hero into the pool, just do it as if you wanted to add an evil creature: Edit Keeper Properties... >>> Creature Pool.
    Attached Files Attached Files
    I like dragons! They're the center of my life! I'll never forget them...



  9. #9
    Your Majesty Hapuga's Avatar
    Join Date
    Aug 2009
    Location
    Austin, USA
    Posts
    1,444

    Default Re: Creating maps with HERO PORTALS

    Ah, I understand.

    Well, good trick, I tried it and it, indeed, works.

    BTW, you can choose not to save GLOBALS, so you won't have to delete anything.

    However, You've missed the point of my post a bit. My main concern is why does Editor screw up the whole map by crashing kwd, variables and disabled globals? I wish there could be a possible fix for this.
    http://img192.imageshack.us/img192/6659/c2warlocki.gif

  10. #10
    Dragon DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: Creating maps with HERO PORTALS

    Quote Originally Posted by Hapuga
    BTW, you can choose not to save GLOBALS, so you won't have to delete anything.

    However, You've missed the point of my post a bit. My main concern is why does Editor screw up the whole map by crashing kwd, variables and disabled globals? I wish there could be a possible fix for this.
    The reason why the level crashes when we don't include the Globals is because, inside the level .KWD file, even if we answer no to include the Globals, the editor saves the level and still tell it to seek for the Globals.kld file instead of specifying to use the different .KWD files from the Editor folder. Because we decided not to include Globals, the file isn't saved and thus, causes the game to crash for not getting the data properly as the file doesn't exist. I wish that a fix could be made as well, but I'm not highly qualified to modify the editor executable and solve that problem. But for now, it's preferable to always answer Yes.

    As for why does the Editor do that, I have no idea. Perhaps Bullfrog didn't wanted to allow us to do that to difference user-made levels from the official ones?
    I like dragons! They're the center of my life! I'll never forget them...



Similar Threads

  1. MeinCookie's Maps
    By MeinCookie in forum DK2 Maps
    Replies: 148
    Last Post: January 2nd, 2021, 16:54
  2. tring to make maps, No success
    By dk2player in forum DK1 Mapmaking
    Replies: 8
    Last Post: October 22nd, 2010, 08:14
  3. Hero Party actions
    By GamingAddict15 in forum DK2 Troubleshooting
    Replies: 2
    Last Post: November 16th, 2009, 11:32
  4. Hero portals
    By Hapuga in forum DK2 Mapmaking
    Replies: 1
    Last Post: October 24th, 2009, 12:48
  5. Hero Portals...???
    By Dark_Omega MK2 in forum DK2 Mapmaking
    Replies: 7
    Last Post: September 11th, 2009, 18:37

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •