PDA

View Full Version : Setting up the KoH mapeditor for worldmaps


Angryminer
07-10-2006, 22:34
Hello.

Due to request I wrote up a small guide for setting up KoH so you can create a worldmap.

We start out with a unmodified KoH installation, version 1.03 (that is the patched european version or the unpatched US version). If you already extracted or modified parts of KoH that isn't bad. I'm just starting from the smallest common denominator. In my case that looks like this (http://forum.sunflowers.de/attachment.php?attachmentid=3280) (german version of Windows 2000 SP4).
The editor can be accessed by entering KoH's menu, holding the shift-key and rightclicking the "Credits" text. If we create a worldmap of any size and try to place a province the game crashes without any indication of an error. If we try to save the game the game crashes with the error "FileOpen failed: map/textures.dt".

Chapter 1:
The first task will be to fix the latter error.
Using the tool "Filemon" we can see (or you just believe me you will see :wink: ) that KoH tries to access various files in the KoH directory but fails to find them because they are packed up in the .pak files. Thus we extract them using Pakman (http://forum.sunflowers.de/showthread.php?t=3255). You can get around extracting some of them, but they come in handy later anyway when you want to compare your files to KoH's original files, so it's best to extract them all. But danger, extracting all consumes 1.18 GB of disk space (at least it did so for me).
Extracting does take a while. If I were you I'd start with sounds.pak so you can access KoH's music files and open them in a media player (they're in /sounds/music/battle and .../world) so you have something to listen to while your computer is working. :smile:
In multiplayer.pak there's a file that can't be extracted ("|>H80.lock"). Avoid it by manually selecting all other files and using "extract selected files". For referance, I also extracted also all pk1-files (I don't know wether the US version has those, but if it doesn't they are already included in the *.pak files).
After extracting my KoH folder looks like this (http://forum.sunflowers.de/attachment.php?attachmentid=3281).
Trying to save a worldmap still doesn't work yet. That's because the KoH editor assumes the existance of a specific folder that doesn't yet exist. So we'll have to create the folder manually. We have to create the folder Knights of Honor/maps/Temps/. Here (http://forum.sunflowers.de/attachment.php?attachmentid=3282) is a screenshot of that folder in my case.
Now the first problem is solved:
We can start the editor, mess around a bit and save our work and load it later.
But when we place a province the game inevitably crashes. Also the game reports some (non-fatal) errors when saving and loading a map because there are some files still missing. That is because the f.e. the file rivers.dt is missing as there are no rivers in the map yet. Thus KoH will complain and create the message "Zero bytes requested" but you can safely ignore that.

Chapter 2:
In the patched version the editor seems to have the flaw that placing a province crashes the application. Through a note by Taros (thanks :go: ) I got the idea that this might have to do something with the game's version. And indeed, the european unpatched version (1.02) is able to place provinces nicely.
Reversing your copy of Knights of Honor to 1.02 can be done in three ways. If you have the european version you can reinstall KoH (which doesn't work well with the patched version unless you edit the windows registry) and save the KoH.exe from 1.02 under a different name before patching to 1.03 (1.03 fixes some errors in the game, so I advice sticking with that version as long as possible). If you don't have the european version, which means the version on your CD is already 1.03, you will have to obtain the 1.02-.exe in a different way. Either you ask someone with the european version to send it to you via mail or you use 'other' channels to obtain it.
Using 1.02 you can now start the editor, place provinces, assign kingdoms to them, edit the landscape and save the map. At least it worked that well in my case.
You'll have to edit some things through the *.ini files in the map's folder (Knights of Honor/maps/Temps/*Chosen mapname*/) like cultures, townlevels and some other things, but basically you're now able to create a new WorldMap for KoH. (If you aren't, tell me :wink: .)

If anyone wants to link this in the paradoxforums I'd appreciate it, but please don't copy it over. I'm sure this text will need the one or the other update, so please only refer to this thread via a link. :go:

Angryminer