PDA

View Full Version : KoH Mapeditor - quotes from Sunflowers-board


Mephistopheles
28 Jul 2007, 16:09
Just a couple of posts quoted to store the knowledge:
So, here is how to run the editor:

1. Create a shortcut to KoH.exe
2. Open properties dialog for the shortcut (Alt+Enter)
3. In the edit line "Target" add after the location of the .exe file -debug
4. You should have at the end something like this in it:

"C:\Program Files\Black Sea Studios\Knights Of Honor\KoH.exe" -debug

5. Apply the change and double click the shortcut
6. While you are in title screen, do Shift+Left mouse button click on "Credits" button
7. You should be into the editor now :)

---

BUT, please have in mind that this tool was never ever meant to be shown so it is buggy (will crash sometimes) interface is ugly, the "internal" names of objects are pretty much weird, etc.

ALSO, to succesfuly modify Europe map is a hard and long task. You can not do it only from the editor. You also need to touch the text files, to be sure there are no land left outside realms, etc, etc. There are a lof of "hidden" functions of the editor accesible via strange hot keys which I will try to send you if I have some more free time some day.

BUT, once and IF you master this tool, you can completely change the game and even make "China map" :)

Yours,I tried working with the editor. But adding a realm to a world map inevitable crashes the application. Any pointers?
Especially, how do the kingdoms and realms work together? Or is that done in the object properties-screen?
I found that the a-key is propably used to demolish objects. At least that's what the animation indicates - I haven't successfully placed any object yet.

Placing a province crashes the application, saving the map (in order to modify it manually, or at least look at it) results in several "zero bytes requested"-messages which are propably caused by the incomplete map (kingdoms have no realms assigned, etc.).

[Edit]
This is getting fun... Learned how to place rivers using the F8 key I think. I just press them wildly until I am in river-edit-mode. But I still have to find out how to remove rivers... And the province problem isn't solved yet. Still some work ahead I guess.

Angryminermaybe this might helpful:
http://www.sysinternals.com/Utilities/Filemon.html

so you can see, which files are accessed by win32 processes.About saving:
I did produce a saved world map, though it's rather pointless (as it is empty, no provinces).
When I click "save" the game minimized, shows "Zero bytes requested" several times and is then back in a runnable-stage (yet still minimized). The saved map was placed in *koH-Folder*/maps
(Some strange things, I will investigate using filemon now.)

AngryminerSaving needs some help.

First: Be sure to extract most of your pak-files. The editor accesses some files that the game doesn't get from the pak-files. europe, defs, images, screens (both of them) are the ones I extracted right now. More will propably follow as I find them with FileMon (great tool!).

Second: To be able to save you need to manually create a folger in the KoH directory called "Knights of Honor\maps\Temps\Intended Mapname"
Notice how the folder is called maps, plural. This isn't the map folder.
If that directory exists you can save worldmaps and load them.
At least I'm not aware of anything different that is needed. I suggest everyone to use filemon.

AngryminerWe treated that [The message "FileOpen failed: map/textures.dt"] above. Copy a random *.bmp file from KoH to the map-directory and call it "textures.dt" - seems to work nicely.

About provinces: It looks like the editor can't create provinces. You have to create provinces yourself with notepad (copy them from the europe-map) and then place them in the editor. At least I think so, investigating...

[Edit] I'm stuck. Created a province in notepad. Upon placing a realm the editor accesses "C:", succedes and dies. I believe it is going to access C:/temp/castlepos.bmp to place the castle of the realm...
Strangely it doesn't do that anymore. Will have to check later.

AngryminerIts done and its work. You see a picture with my testmap inside from KOH. The original Program take my new maps. Thats great. Now i can begin to create new maps.:cheers:

The best is the program use snow maps in provinces with snow!


[climate]

Marakesh = desert
West Sahara = desert
East Sahara = desert
Tangiers = palms
Oran = desert
Al Djazair = desert
Tunisia = desert
Tripoli = desert
Cyrenaica = desert
Benghazi = snow
Al Alamein = desert
Alexandria = palms
Cairo = palms
Sinai = desert
Lebanon = palms
Antioch = palms
Cyprus = palms
Kilikia = palms
Rum = desert
Cappadocia = desert
Antalya = palms
Nicaea = snow
Anatolia = desert
Fez = palms
Granada = palms
Valencia = palms
Andalucia = palms
Tago = palms
Lisbon = palms
Sicily = palms
Appulia = palms
Hellas = palms
Crete = palms
Arkhangelsk = snow
Karelia = snow
Nyland = snow
Finland = snow
Norrland = snow
Gotland = snow
Trondelag = snow
Arabia = desert
Palestina = desert
Jordan = desert
Syria = desert
Kurdistan = desert
Bavaria = snow
Franconia = snow
Helvetia = snow
Frieseland = snow
Austria = snow
Flanders = snow
Brandenburg = snow
Tyrolia = snow
Salzburg = snow
Istria = snow

Thx Frujin for this Editor!!wow Laudan! looking great! =D

it'll be great to finally fight some good ol' snow battles (btw, is there snowy weather in it too? like in the grass areas it rains, but snow wasnt really used in the game much so i'm thinking no, but just want to make sure =) )I haven't seen in anomation for snow in all my modding-life, so no snow I guess.

About the editor: I'm making very slow progress on the world-map-editing.
I successfully modified the europe-map, but that isn't hard.
1. The "Edit Realms" feature is rather a kind of "brush" that is used to drag the boarders of realms around. The features of a realm are removed using the object details-dialogue.
2. Villages (zones) and pretty much all objects (even mountains!) are bound to the realm where you place them. That means they can not be placed outside of a realm.
3. The create realm-tool seems very strange. If I activate that tool, point the outlined realm somewhere and then press alt+e the game exports an unfinished map of realms with that outlined realm on it. It does so twice, once colored using the name realmexp.bmp and once in white with realmexpid.bmp.
If you save the map while outlining the shape (point, alt+e, F2) then he kingdomless realm is created. I can now place objects in this realm and modify it's shape using the edit realm tool. But the realm is not saved to realms.ini and I can't place a castle. I'll compare this to the europe map now.

Angryminer
--
News:
1. The realmsexpid.bmp file is a greyscale image. Realm 1 recieves white. the last realm recieved the darkest gray right before black. The sea is black. That way the game denotes the id of the realms.
2. castlepos.bmp is a bmp with black background and white dots for castle-positions. Don't know how these are added. Perhaps via ini-editing?
3. I need to figure out how to manually create a correct realm, place a castle and create a brand new kingdom including all necessary data (whatever that is...) Lot's of stuff to learn.

Angryminer

Mephistopheles
28 Jul 2007, 16:10
Continued:
[...]Btw, Angry have you already realized how to delete rivers?1. No, I don't know how to delete rivers.
2. Loading a map always leads to 6 "Zero bytes requested" error messages when no valid vasalls.ini is existing. Does it get to that stage?
I'll elaborate: When i start to load a map the load-screen appears, runs near the end, the game minimizes to the taskbar, i click the task-icon and I have to press "Okay" on 6 messages that say "Zero bytes requested". After that I can click KoH's taskbar icon and KoH opens and the map is loaded.
3. My advances seem to hang at the creation of a correct realm.
I can place a border with the method described above and it seems to recognize the border as a kingdomless realm, as objects that are always relative to a realm, such as villages, can be placed. But the realm doesn't appear in realms.ini and I can't place a castle within the new realm. Due to the lack of a correct realm I can't assign realms to any kingdoms and thus I can't have any kingdoms.
(At least I believe that all kingdoms I create are illegal until I assign provinces to them. Just like England doesn't show up as a selectable kingdom in an era where no realms are assigned to England.)
4. KoH does not use the CD to run the editor. All accessed files are from the KoH-folder. The CD is only needed for the copy-protection.

AngryminerI uninstalled and re-installed Koh and then followed all steps described in this thread and nothing has changed. I still can't do anything with the editor

So good luck to you :go:

I resignIn general, if you edit .BMP files that are used in KoH you need to rotate the file (after editing) for 180 degrees and then flip it horizontally.
I like this map editor. Here [attachment not included] you see one of my ten new maps for the winter region. Its summer in the region.

My work with the editor goes better. I like it to create new maps.Experience with the editor

After i finished 12 maps i want see : Use the original program my new Maps?

I have two saves with a playtime about seven hours. In all two save points the program use my new maps for the region with snow.

Ok, i think now i can start a new game. But in this time the program use only old maps, not my new maps. Thats terrible, all my work useless. First i think so, but then i thought, perhaps i must play longer. And, thats right, after one hour playtime the program use my new maps in the region with snow. Great! I think, i create 10 maps with snow and 10 maps without snow for the winter region. And four maps winter harbors.

Some people want perhaps see a manuel. The editor is very easy to use.
Perhaps i write a manuel in the german forum and one person can translate that in english.I was able to place castles, no problem, just crashed when trying to save it.
it's generally really easy to use, i'll se if i can pull something together as an example map.

you CAN place castles, it's easy.



/cheers
Taros.Alright. Before I only had the files extracted I saw as necessary (i.e. KoH tried to access them). Now I extracted everything, even voice-files etc.
Still no avail.

How it goes wrong:
Start KoH in debugmode, access editor, create world-map, click "Realms", "Create Realm", select a province size (any), click somewhere on the map, KoH shuts off without an error message.
(It closes all files neatly.)

Any hints?

[Edit]
I reversed back to KoH version 1.02 (without patch) and now I can place provinces. Yay!

AngryminerHm, the editor was never meant to be published and made accessible. So, it was more like internal tool. There are a lot of weird key combinations used for this and that. I know it can be irritating a lot.

Well, I will try asking our programmers to create some kind of sumarry (or FAQ, or How-To) document for what steps are needed for succesfuly creating a map. To be honest, I do not know how long it might take, so ... please do not expect it tomorrow. :(

As far as I remeber, new realm is created automatically when you place a castle on the world-type map. So, you can start editing the realm borders with that special brush.

Also, the game will not work if there are even a single "tile" that is not included in at least one of the realms. There only pieces that are allowed to be realm-less are those water type.

I will try to dig more into it ..Ok,so it's pretty easy.
First you must make a new folder called "map" in the game directory ( like in my case D:\games\koh\map ) . Than coppy the file textures.dt in the folder map you have just made (the file textures.dt you can find in \europe\map ) .
So,the preparations are over.Now open the editor thingy.There are some textures,trees,and other fancy things.To place viliges and stuff you must make a new province.It's easy to do : just go to the "realm" menu,than click on "Create Realm" and select the size of you'r realm (to edit the borders,click on the "Edit Realm" in the realm sub-menu).
Now you'r ready to place viliges and other life-objects.
You totally must select a owner of the province.There is a flag-like button in the menu,and in it's sub-menu you may find the button for the realm properties.
How to save you ask?Simply click on the "Save Map" and select a name.
The load is a bit harder.You will NOT see the map name,but if you click "Load" it will apear.You may NOT make more than one maps in the same time :(
So that's all you must know.Good luck on "Eurovision" (you have not expected this,right :P ).I tried to name the provinces but nothing worked yet. Anyone has good experience?

Also Frujin, how to work with the political map? If I use any map will it work? I will try, but I'd like to avoid major crashes if possible. I made a map of middle east (from Constantinople to Iran, from Georgia to Mecca) but I never found a way how to name provinces.
I'd like to make effective political map, can I draw any map? how was the KoH politmap made?

Though I made a nice map which works nicely,but the provinces are all caller "realm":
Screenshot (http://img201.imageshack.us/img201/4377/landeriaog1.jpg)

PS: anothr question: anyone could edi realms after the map was once changed? I'm curious if I could edit the europe map and extand it to Asia a little, that would be the ultimate version of Holy Rome mod, to extend the map to Baghdad and edit the realms... but the way seems to be long, though it's fun to play with the editor :wink:Name the provinces the same way you rename them on the europe-map.

It's best to use the editor only for the most basic things. Create the map, place provinces, and do everything else manually. Create your own kingdoms manually, assign units manually, name provinces manually, assign cultures manually, etc.
That way you avoid all possible bugs that could destroy your work.

And no, you can't change the format height, width) of the map after it was created.

AngryminerI wanted to use the editor.But why many options are blank? Like river tool.Mountain tool(?) .Why?
--
noooooo wayyyyyyyyyyyyyyyyyyyyyyyyy>it can"t save!!! NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOhave you done what is said here?

only thing you need is to make Knights of Honor/map/ folder and put there textures.dt (copy from maps/europe/map)
then you can save maps (they will be in maps/Temp/MAPNAME)

it should work if you have patch 1.05

Mephistopheles
28 Jul 2007, 16:11
Continued:
HOW TO MAKE POLITICAL MAP
1) when testing the map from editor, make a screenshot with minimap and save the minimap separately. (also when the map is finnished delete all castles and make another screenshot without castles on the minimap)

2) stretch the minimap to 1400x1400 pixels

3) while testing the map from editor move knights on borderlines and draw provincial borders according to net of castles and other physical diferences on the map

4) when all provinces have borders, use colours from original realms.bmp and use one colour on one province only (so this way you can have only 168 provinces)

5) THE MOST IMPORTANT!! - this is the key to have normaly looking political map
when the image is finnished save it with absolutely same properties as the original realms.bmp has (1400x1400 pixels, horizontal and vertical resolution both 25dpi, bite depth: 8 - everything except bite depth can be done in photoshop, if you know easy way to decrease bite depth down to 8, let me know), of course the colours should be same as in the original realms.bmp - if the colours have changed during setting the right properties, copy the right colours back

6) could also be before you start to draw province borders
- use the minimap without castles and make it be di-chromatic with land and seas holding each one diferent colour. Save it as base.bmp (and possibly use black sea as sea-frame for realms.bmp)
- again the properties should match to original base.bmp (everything the same like realms.bmp, except bite depth which is 32!!! )
(this is the key why changes in base.bmp were making everything screwed up because I wasn't able to save it with same properties)

- note: when saving the images make sure they are flipped verticaly (upside down) so the game reads them correctly

- this is truly complicated way to make political map, I believe some of you will be able to shorten the process of making it. If you do, please let us all know.

Once this all is finnished have fun with all that editing name positions of kingdoms, realms and everything ;)
I hope it helps at least a little

PS: big thanks to Cool-Toxic from Paradox and EU2 forums (who taught me how to set up the properties necessary to make the political map running properly) :go:

That should be all the information we gathered in that thread.

IWM
29 Jul 2007, 05:04
:o Hey Mephistopheles
Why you include my post? I thought my post has no special meaning
The question has been answered in top of that page(I was just too lazy to look at that:o )