• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Hannibal Barca2

General
89 Badges
Sep 27, 2006
2.385
0
  • Crusader Kings II: Conclave
  • War of the Vikings
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Rome: Vae Victis
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Necroids
  • Europa Universalis IV
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Diplomacy
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Victoria 2
  • Victoria 2: A House Divided
Hannibal’s Guide for HoI2 Map Editor


As the concept of editing the original map is kind of new, and many people are curious about how to change the original HoI2 map, I’ve finally decided to put together a tutorial. The methods used here are all made up by me, and many of them might be considered ineffective and might perhaps have easier and better ways to be done in other programs like Photoshop. However, if there is you could notify me or make a tutorial of your own. Also mark yourself, I have no guarantee for the quality of this tutorial.



Part 1 – The preparations


1.1 GIMP - GNU Image Manipulation Program

If you do not already got GIMP, you should begin with installing it, as this is the program I use for the graphical part of editing map. Proceed with download and install GIMP fromhere.



1.2 .NET Framework 3.5

You need this in order to use Jamie’s Map Utility. Without this the program won’t be possible to launch. Download and install .NET Framework 3.5 from
here



1.3 Jamie’s Map Utility

a) Another program you must have is Jamie’s Map Utility. Basically it helps you with converting the game’s tbl map-files to editable png files. Proceed with download Jamie’s Map Utility here, and unzip it somewhere easy accessible


b) You should now open your unzipped folder, in which you will see some new files and five other folders. Of these you should open the folder named “HoI”, and copy all files in it to the folder above, so that you get adj-mod.txt, objects.txt and settings.txt in the same folder as MapExtractor.exe and MapMaker.exe


c) The next step would be to open the settings.txt-file, in which you on line 5 must enter the path to your Armageddon’s exe file. Example: C:\Program Files\Paradox Interactive\Armageddon.


1.4 Trixieplain

These are the letters you should use to type above the in game provinces. They can be downloaded here [url]http://www.mediafire.com/?jc63n38h1jd1ics[/B]]here[/URL]

To make it useable simply put the font file in: C:\Windows\Fonts


Part 2 – Using Jamie’s Map Utility

With Jamie’s Map Utility this is a very simple procedure. Ensuring you have done all the above mentioned preparations, you can just launch the MapExtractor.exe. This will make a copy of your game’s map-files, in png-format!

After this you should move all the extracted map files in the same folder as the MapMaker.exe.

Note: As a security procedure it would be wise to make copies of the png-files you intends to change.



Part 3 – Implementing your changes

In this tutorial I am going to explain to you how to add a new province. In this case I will add Monaco, as it will give me opportunity to explain connections between sea-land as well.

As you can see, there are four different types of png files: colorscales, provID, borders and tiles. In game these are layers placed above one another in the same order as mentioned above.

What you will have to do is primarily make you changes in all these files as you wants them.


Part 4 – Editing the Colorscale.png

For Monaco we will begin with modifying “map_468_90.colorscales.png”. As we will be using GIMP, start it up and open this file.


a) First of all you should switch to RGB colours, as the original indexed grayscale is impossible to use for editing. (sorry for Norwegian language… path should be like picture/mode/RGB)


b) Secondly you should switch to the brush tool, and in its setting scale it’s size to 1,40.


c) Thirdly, you should switch your brush to the biggest shady one.


d) Fourthly you should choose what colour you wants to use. I suggest you use the colour “156,156,156”.


Now that you have made all settings for your tool, you can freely paint the shady gray you see surrounding the borders. If you wants to delete old one’s, just the eraser tool (shift + e), preferably with shady brush setting.
Note: Remember to zoom in before making borders.


The next thing you should do is painting those black strips. For this use the same brusher tools, but with the size 0,14 and the colour “0,0,0”.


Now the only thing that remains would be too put some trixieplain letters above this province. As GIMP seems to be useless (or at least I never really figured out of it) typing letters on a picture, I will use paint.

a) Open paint, and use the text tool to write “Monaco” with Trixiplain letters, size 20 (or whatever you wants).


b) Use the marker tool to drag a box around the letters, and press thereafter “ctrl + x”, which will cut out the letters and place them on your pasteboard.


c) Open a new GIMP-picture, with transparent background and size 200 x 200


d) In your new picture, press “ctrl + v”, so that you paste in the letters “Monaco”.

e) Use the colourpicker “shift + o” tool to select all the white colour around the Monaco letters, and press delete for adding transparent colour around it instead.


f) Use the marker tool to drag a box around the now clean “Monaco” letters and press “ctrl + x” to cut it out and get in on your pastboard.


g) Go back to your “map_468_90.colorscales.png” and press “ctrl + v”.

h) Press “shift + t” and set the letters size to “15 x 10”

i) press “shift + r” and set rotation to “-45” and drag the letters to wherever you wants them.

j) If they gets too unclear because of their small size, you can just use the brush tool to paint them darker (While you have selected them, because then it will only affect the letters)


As a last procedure with the colourscale-file you must convert you modified picture to have the correct indexed grayscale. For this you should press “ctrl + a” in order to select the whole picture, and then “ctrl + x” to put it on your pastboard. After this you should open the unmodified “map_468_90.colorscales.png” in paint, and press “ctrl + v” in order to paste the modified picture into it and by this get the correct indexed colours. After this you should save (ctrl + s) the picture.

Note: When you close down GIMP, remember to say you will not implement changes (This is because you’ve already implemented them using paint.)


Part 5 – Editing the ProvID.png

Open both “map_468_90.colorscales.png” (your modified one) and “map_468_90.ProvID.png”.

a) In “map_468_90.ProvID.png”, paint everything except you new border white. You must be sure everything get the exact same white colour, or it will cause your map being unusable.


b) Then press “ctrl + a” to mark the whole picture and “ctrl + x” to move it into your pasteboard.

c) Go into your “map_468_90.ProvID.png” and press “ctrl + v” in order to paste your Monaco border on the exact same spot as in the other picture. Then you tell paint to make the white colour transparent (by clicking the red marked button on picture below.)


Now that you can see Monaco’s borders, you need to find our what colour you wants to paint Monaco with. You will find a list of colour-values in Jamie’s Map Utility folder called ids.csv. In this list, we find that the unused province 2602 is “80,128,80”.

a) Double click any of the available colour to bring up a colour settings box
b) Press the button called “Define Colours”
c) Type in the RGB-values for province 2602 (Monaco)
d) Press button called “Add to custom Colours”
e) Press button called “OK


Now that you got the colour selected, you can just use the brush tool to paint Monaco in the area which you by the old border can see exactly where is. Remember to paint away all the gray colour, because any extra colour in this picture will cause the map being unusable.


After this you can save the finished ProvID.png picture.


Part 6 – Editing the Borders.png

Open both “map_468_90.colorscales.png” (your modified one) and “map_468_90.borders.png”.

a) In “map_468_90.colorscales.png”, do the same process as when you should edit the provID in order to paint everything except the border white.

b) Copy it and make it transparent above the “map_468_90.borders.png”-file. (If new borders should go across some old… Delete the old!)

c) Use the eyedropper tool to get the red colour you see surrounding the blue border dots.

d) Use the pencil tool to paint red line around your black strips.

e) Copy the whole picture into a GIMP picture without transparent background.

f) Use the colourpicker-tool (shift + O) to select everything that are NOT red nor white, and delete it in order to make it white.

g) Copy the whole picture above your old “map_468_90.borders.png”-file, and use the eyedropper tool to get blue colour that you should paint inside the red lines.

h) Eventually, if you are making mayor changes, colour everything in a random colour, and press “ctrl + x”. Make white transparent background colour, and paint everything in the blue you wants inside the dots, before pressing “ctrl + v”. Now you can change the random colour back to white, and everything should be as it should.

Now you will have to make the white colour “real” transparent, and for this you will need GIMP. Save your “map_468_90.borders.png”-file as it is, and open it in GIMP.

Use the colourpickertool to select everything that’s white, and press delete. If you’ve done everything right, all the white should turn into transparent.

Hint: In order to make process faster, zoom very much in and press “ctrl + a” before you save your finished picture.


Part 7 – Editing the adj-mod.txt

As we don’t need to add any new rivers in order to make Monaco (It isn’t that hard, just use your brain and what you’ve learned this far…) Im going straighten onwards to making our new map playable.

First of all, we need to define new connections. This are done in the “adj-mod.txt”-file, located in your map utility folder. When you open it you should see something like:

Code:
#This file modifies the creation of adjacent.tbl by MapMaker
#It overrides the default calculations of province adjancies
#To be used, this file must be placed in the same directory as MapMaker
#This default file may be needed for HoI, use it if not using it causes a milestone error
#The format is from;to;action
#From is the first province, to is the second, and the action is either Add or Delete

759;2573;Delete
2573;759;Delete

The next step will be to find out what connections we wants to add. This means we will need some ids. (Checks the Armageddon/config/province_names.csv)

Monaco: 2602
Nice: 366
Genoa: 368
Ligurian Sea: 2439

So, that would make something like:

Code:
759;2573;Delete
2573;759;Delete
2602;366;Add
366;2602;Add
2602;368;Add
368;2602;Add
2602;2439;Add
2439;2602;Add

But this means we suddenly got 6 more connections than the vanilla game! This cause milestone error….

Though you should not despair, for there are a solution. There is a file called armageddon/map/adj-defs.csv with values that overrides these one’s we set here. This means if we try to delete connections within this file, NOTHING WILL CHANGE =D

So then we get:

Code:
759;2573;Delete
2573;759;Delete
2602;366;Add
366;2602;Add
2602;368;Add
368;2602;Add
2602;2439;Add
2439;2602;Add
1306;1327;Delete
1327;1306;Delete
1306;1305;Delete
1305;1306;Delete
1328;1329;Delete
1329;1328;Delete

Note: You might quickly think: ”Why not do all my changes in the “adj-defs.csv” file?” Well… If you do you will be unable to connect provinces to the sea AND be unable to delete old connections between provinces.

Btw, if you get to many deletes, you can just add connections between offmap provinces ;)

Part 8 – Using Jamie’s MapMaker.exe

Now that you got all your files in the same folder as this exe, simply run through the steps 1 to 6. This should put your modified map into a folder called “map” =)

This you can just copy above your old map files in Armageddon/map.

NOTE: After doing step 3 the program will tell you if you got too many or to few connections. If the number is invalid, please fix this.


Part 9 – Cleanup work

You will now have to Armageddon/db/province.csv in order to set new co-ordinates, recources and facilities. In order to find co-ordinates, you can just use Jamie’s Map Wiewer.

You must also change the province’s name to “Monaco” in Armageddon/confic/province.names.csv.

If as this weren’t enough, you need to say who owns this province in your scenario-files.

Note: When adding a seazone to a province (Needed to have harbour and beach) there is a set number for this. So if you wants water access in Monaco, just delete it from some useless province like Höfn on Iceland (very unlikely to become a harbour and lacks beach).
 
Last edited:
M wishes have become true. :D :D :D

In before sticky.
 
This post deserves to be wikified and carved into a stone tablet. So future generations can marvell at it's beautifull pictures, combined with it's intricate sentences, that in all their remarkable complexities, but yet with simplicity, manages to clearly define and explain how to use the outstanding maputility, which so clearly is a true work of art.
 
Does this tool also change which provinces are accessible from the sea? If so I'll give it a try. I'd like to make Chicago accessible from the Atlantic Ocean via St. Lawrence river and the Great Lakes. Merely editing adj-defs to give connections doesn't do the job. Some sort of table edit is needed. I think naval-dist table has to be modded. Will this do the job?
 
nomonhan said:
Does this tool also change which provinces are accessible from the sea?

Yes, you just add a connection between a land and sea province. Also you must add a seazone in the armageddon/db/province.csv. But as the number of seazones adds are set, you must also deleat one.

Suggested are f.ex. deleting Höfn's sea access, as this will have no affection on the game.
 
I don't get it.. I still get a milestone error! :(
 
The milestone error is ALWAYS caused by too many or to few connections... The number must be excact.

When using Jamie's MapMaker, it will count your connections, so you should check what it tells you after going through point 3 (which will tell you how many you have too much or too little)

(Note: Look at part 7 of tutorial ;) )
 
I put delete on four of your provinces and it gave me a milestone error anyway.

Did you assume I didn't read the tutorial closely before making the map? :rolleyes: :)
 
Still look at what MapMaker tells you on how many connections you've got... Sometimes it doesn't make sence, but if you got to many, just make extra deletes, if you got to few make extra adds.
 
Hannibal Barca2 said:
Still look at what MapMaker tells you on how many connections you've got... Sometimes it doesn't make sence, but if you got to many, just make extra deletes, if you got to few make extra adds.

Wow.. Strange. It told me that it already had a connection when making the map so I DIDN'T have to write it in the file. Now it worked Absolutely fine!
 
I have some questions Hannibal (i have done the previous steps)
Hannibal Barca2 said:
Part 5 – Editing the ProvID.png

Open both “map_468_90.colorscales.png” (your modified one) and “map_468_90.ProvID.png”.

First i have to open both files (colorscales and provid) in window's paint right?

Hannibal Barca2 said:
a) In “map_468_90.ProvID.png”, paint everything except you new border white. You must be sure everything get the exact same white colour, or it will cause your map being unusable.


I'm confused here, which one should i open?prov id or colorscales? because the screenshot shows colorscales, and more exactly what should i do, paint the whole file in white except the borders of the pic? :confused:

Hannibal Barca2 said:
b) Then press “ctrl + a” to mark the whole picture and “ctrl + x” to move it into your pasteboard.

Should i paste it into a new paint file or into provid.png? i suppose that it's in a new one. But then..... why it's there the step c)?

Hannibal Barca2 said:
c) Go into your “map_468_90.ProvID.png” and press “ctrl + v” in order to paste your Monaco border on the exact same spot as in the other picture. Then you tell paint to make the white colour transparent (by clicking the red marked button on picture below.)


Well, that's all i haven't reach until step c), your tutorial is great and i hope that my questions helps you to improve it.

BTW, here's a preview of what i'm trying to do:



Oh and how could i (safely) change the name of Guantánamo province into "Santiago de Cuba"?
 
Kretoxian said:
I have some questions Hannibal (i have done the previous steps)


First i have to open both files (colorscales and provid) in window's paint right?"?
Yes, that is what it says ;)

Kretoxian said:
I'm confused here, which one should i open?prov id or colorscales? because the screenshot shows colorscales, and more exactly what should i do, paint the whole file in white except the borders of the pic? :confused:
Yes, what you said. Paint everything except the NEW border white

Kretoxian said:
Should i paste it into a new paint file or into provid.png? i suppose that it's in a new one. But then..... why it's there the step c)?
You should past it into the ProvID. After this you should press the redmarked button on (which are marked on picture I think) so that all the white won't be visible.

Kretoxian said:
Well, that's all i haven't reach until step c), your tutorial is great and i hope that my questions helps you to improve it.

BTW, here's a preview of what i'm trying to do:

Kretoxian said:
Thanks :) And good luck with your mod

Oh and how could i (safely) change the name of Guantánamo province into "Santiago de Cuba"?

The Colorscale is just a picture, it's just to use the eraser tool (shift + e) to delete the old name and type in a new one ;)

Oh, and also remember to edit config/province_names.csv :rolleyes:
 
Object editor doesn't let you edit the Sprite position, only counter.
 
I have another problem. I extracted the map with mapextractor.exe and have mapmaker in the same folder of the .png files but when i start making the step 1 of the mapmaker it says that map_0_72.provid.png is missing.

It's rare because i have extracted the map two times and it never creates that file. Is there any way to solve this?
 
Kretoxian said:
I have another problem. I extracted the map with mapextractor.exe and have mapmaker in the same folder of the .png files but when i start making the step 1 of the mapmaker it says that map_0_72.provid.png is missing.

It's rare because i have extracted the map two times and it never creates that file. Is there any way to solve this?
It should not happen, but I've seen it happen...

First of all you should try close down all other programs and websites on your computer and leave it only to work with MapExtractor. If you do not do this it can jump over a picture or two :(
 
My MapExtractor doesn't want to fully extract all the maps. It crashes randomly and after a few dozen
of extraction attempts only once reached the "819_315" map ( I assume that one is the last ). However,
it crashed without extracting the "819_315" tiles and borders maps :[

I am wondering, could someone PM me and send me those two maps via email?