1: No idea.
2: No idea.
3: Global Data is the file of any custom settings. And you have an option to save it.
4: I don't think so.

After a little...incident...today, I decided to edit the campaign levels of DK2 to drive me slightly less insane. Simply, I added a single trigger and a single action that disabled creature moods. Flaw: Upon saving the map using either the official map editor or the hacked pro version, the altered level became unloadable unless I also included the Global Types file. It appears that the .KWD file became slightly smaller than it was before after saving, and is currently the lynch pin of the problem.
Replacing this file with the old, official version allows the level to load with the changes I've made and there doesn't appear to be any side effects.
This brings up a few questions.
1: What does the .KWD file do in the first place?
2: Why does the editor shrink the .KWD file? It shrinks it even if no alterations are actually made before the map is saved.
3: What is the Global Types file and why does the level become dependent on it after the level is saved?
4: Does it cause any problems to replace the 'new' .KWD file with an 'old' version?
The reason this is even an issue is because I notice several official levels cease to function correctly after the level is won when the level has been altered and is using a Global Types file.
1: No idea.
2: No idea.
3: Global Data is the file of any custom settings. And you have an option to save it.
4: I don't think so.
Dungeon Keeper 1 Patch: Sexier Beetles and Reaper Control [Currently on Hold]
I like how HR is. Nearly Done with Quick Creature Revision. Playtesting through Deeper Dungeons - Thread/Level Revision on Hold
Batezek can go to hell. Never playtesting there again.
Dungeon Keeper 2 Patch: With More Balance and Pie [Updated: 5/18/12]
Playtesting while Remaking Official Campaign.
Screw the Change Log. Changes are so Drastic that it isn't relevant anymore.
The Awakening: GM Powers Activate!
Working on Secret Crystice x Emmra Story as Fanservice for Mothrayas
Fun DK1 Fact:
1 Armor = 0.390625% Damage Absorption
5 Armor = 1.953125% Damage Absorption
LOL, RAGEGUN, DRAGONFIST, LLW9, IMM0RAL, LQUIZ
It appears the issues with editing official levels goes deeper than just the obvious crashing issues. The variables file is made much larger and breaks Horny coming to pick up the Gem (Level 18). Altering the Triggers file accomplishes the same thing.
Adding creatures to the map, however, doesn't affect a thing.
It appears the shrunk .KWD file allows the Global Types file to work in the changed level. The altered .KWD file and Global Type file allow the level (Again, 18) to end properly when the Variables and Triggers files are their "official" counterparts. The Player file doesn't break the endgame, it seems, and I don't see a reason why changing the Map file would break Horny showing up.
So, overall, quite a bit can still be altered...but it's >very< obvious why the official editor did not allow changes to these levels.
Though, I used the hacked "Pro" version...could this version change more than the official editor does and thus cause the breaking?
1. First, you should understand, what KWD file is, and what it does.
a KWD file has the same function as EXE. It executes all the necessary files to load your map.
version 1.7 is very different from previous versions of the game. Version 1.7 Kwd writes paths to globals, players, triggers, things, variables and map files. It also stores map name and map description.
Unlike 1.7, 1.3, 1.5 and 1.6 KWD file stores additional paths to objects, rooms, spells and other files that are stored in "Editor" folder. I don't know why, but devs have left the structure of CAMPAIGN maps untouched. it means that even if you have 1.7 version of the game, you will still have 1.3 version campaign maps. Pretty weird, but that's how it works.
DK2 1.7 supports both 1.3 and 1.7 version maps. However, Editor makes only 1.7 version ones. That's why game crashes when you try to load an edited campaign map. Editor changes your 1.3 campaign map to 1.7 type and game does not recognize it any more.
2. It doesn't. it does not affect campaign maps if you do not press "save". You can open it up, play inside, and if you leave without saving, nothing will happen.
3. what MGR said is correct, however you should remember that again, like with KWD, GLOBALS for 1.3 and for 1.7 are totally different. They have some code differences. basically, due to new splls/creatures/traps added.
4. Yes. However, it DOES NOT cause any problems when replacing other map files, except GLOBALS.
Happy editing =)
Last edited by Hapuga; December 20th, 2009 at 09:14.
I see...
Enlightening. Thank you.
Is there a way to 'fix' official levels after they're saved to 1.7 standards? As in, I should ask, what changes are made to the files that break the triggers (Such as Horny not appearing) and is it possible, via the Editor, to reverse these changes?
1. No, unfortunately. When edited, you can no longer reverse the steps, the map is ruined. Let me teach you how to edit campaign levels properly.
Its very simple, really. All you need to do is to save your edited level in a different place, or, change it's name. like, if you are editing level 10, do not save it as level10.kwd, save it as level10a.kwd or something like that. then, simply delete all the original level 10 files EXCEPT level10.kwd, remember as I said, that file has to be untouched in order for game to recognize the level.
Now, change all triggers, map, players and etc to "level10" again. Delete two unneeded files "level10a.kwd". Congrads, you have just cheated the program =)
Now, if you want to change the level entirely, touching things that affect GLOBALS, you have to include GLOBALS file in your map. THat's all.
However, if you want to make your level compatible with 1.3 (one with good AI) version do this:
Get DK 1.3 form the forum. Install. copy the editor to Editor folder. Run it. Create map with name level10a. Include globals. Rename it to Level10. Now, you would wonder, why it s so complicated to get globals to work.
Editor takes all the necessary info from the kwd files that are in Editor folder. It compiles them and creates the map. Original map files do not have GLOBALS included in them. This means, that map files take information directly from the initial files in the Editor folder.
Because 1.3 files correspond to initial map structure, you are once again able to cheat the system.
Last, but not least important, do NOT add any elites, maiden of the nest, maiden spells or jack in the box in your level, if you plan it for 1.3. It will crash you. Your map will load normally, but as soon as you encounter any of these spells/traps/cratures, you will crash. Remember, that info about all this new things are held in version 1.7 globals, version 1.3 simply doesnt have those.
(dances in the flames)
Last edited by Hapuga; December 21st, 2009 at 09:12.
Now we are talking about modified campaign maps, anyone still interested if i edit the most maps with a better AI? I already worked on a level and i am quite impressed with the result, it is much harder![]()
Last edited by Stiekel; December 21st, 2009 at 22:08. Reason: Typo
sure thing, go for it =)
I also looked at some spells in DK2 using the Pro Editor. I might be able to get AI to cast Inferno or something similar, but not sure. Haven't tested, been lazy.![]()
Dungeon Keeper 1 Patch: Sexier Beetles and Reaper Control [Currently on Hold]
I like how HR is. Nearly Done with Quick Creature Revision. Playtesting through Deeper Dungeons - Thread/Level Revision on Hold
Batezek can go to hell. Never playtesting there again.
Dungeon Keeper 2 Patch: With More Balance and Pie [Updated: 5/18/12]
Playtesting while Remaking Official Campaign.
Screw the Change Log. Changes are so Drastic that it isn't relevant anymore.
The Awakening: GM Powers Activate!
Working on Secret Crystice x Emmra Story as Fanservice for Mothrayas
Fun DK1 Fact:
1 Armor = 0.390625% Damage Absorption
5 Armor = 1.953125% Damage Absorption
LOL, RAGEGUN, DRAGONFIST, LLW9, IMM0RAL, LQUIZ
Hapuga,
Doing some testing (Albeit, not particularly complete), I've found that official levels tolerate changes to every file to 1.7 standards (Including the .KWD and Globals File) but the Triggers and Variables files. Changing those break the functionality of ending the level when changed.
Thus what made me think it could somehow could be worked out. My thought is that the triggers and variables are organized differently than in 1.3, and thus when 1.7 changes them, the level doesn't properly detect some endgame triggers/variables. Furthermore, I've found this only affects levels with "unusual" ending sequences, such as Nemesis on level 18, the Princes on level 19, the Stone Knights on level 20...
The other levels with "Normal" ending sequences (Killing the Lord of the Land, defeat all Keepers) end correctly even when all files are following 1.7 standards.
Sadly, this is but a theory. Unless I had an editor that primarily functioned in 1.3, I can't prove a thing.

