• 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.

Fiftypence

Debased coinage
35 Badges
Aug 19, 2004
3.374
167
  • Hearts of Iron IV: Cadet
  • Rome: Vae Victis
  • 200k Club
  • 500k Club
  • Cities: Skylines
  • Europa Universalis: Rome Collectors Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • For The Glory
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron II: Armageddon
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Victoria 2
Making maps for Crusader Kings - A guide

Warning: this guide is mainly focussed on editing via Photoshop. It is doable in GIMP so I'm led to believe, so I will try and put info for GIMP where I can.

The purpose of this thread is to explain the process of editing the CK map in simple, easy-to-understand terms. Many people like the idea of creating their own mapmods, but are no doubt daunted by the enormity of the task and the lack of clear instructions. The information you need to understand map editing is out there, but it's in several different threads that are buried deep in the forum. Hopefully this guide will be of some use, but I'm sure there will be some things I haven't explained adequately, so tell me if so. Bear in mind this is just how I do it; there may be simpler ways of doing some things that I'm not aware of.

PS sorry about the inconsistency of the screenshots, it's just that I didn't actually want to edit my files! :p

Some resources: HannibalBarca2's guide to map making - This is good if you're making a HoI2 map, but includes a lot of stuff that's irrelevant to CK which can lead to confusion. It also uses GIMP, which isn't useful for those of us with Photoshop. Still, there's some essential info in there, and so it has helped me learn how to mod the map.

Jamie500's MapUtility thread - A few bits of info, + the download thread. I'd advise using the 1.25 beta, it's very good.

So anyway, on with the guide....

1 - Setting up the MapUtility

First, download the MapUtility and place it somewhere accesible. Now, select the "CK" subfolder in the MapUtility folder and copy-paste the settings.txt, and place it in the main MapUtility folder (overwriting the existing one). Open the settings.txt, and find the line that reads:

Gamepath=

Write the location of your CK .exe file after this, so that it looks something like

GamePath=C:/Program Files/Paradox Interactive/Crusader Kings

Save and close. Next, in the MapUtility main folder, click on the MapExtractor, and assuming you've specified the gamepath correctly it should automatically start extracting the map. Wait for it to finish, and when it has you should find 64 image files + images.txt in the 'Exported Maps' folder. This is the base CK map extracted into .png file, so it's editable. Next we will look at these files, and explain exactly what they are.

2 - The map files

In the Exported Maps, there will be 64 files, of four different types. First are the map_x_x_borders.png (starting with map_0_0_borders.png). These files are exactly what they say, the overlay for the borders between realms on the CK map. These are not mandatory for a working map, so I will return to them later.

Next is the map_x_x_Colorscales.png. This is where you will draw your map, and is the first thing you will edit. What you draw here will appear on all the mapmodes except the terrain map.

Then we have the map_x_x_ProvID.png, which initially looks like a mess of coloured blobs. Look closer and you will see that each of these colours represents a province. It's important to bear in mind that when adding a new province, there are certain preset colours you can use which correspond with specific province IDs. The exact RGB values can be found in the ids.txt, in the main MapUtility folder. The presence of any colour on the ProvID map which does not correspond with a province ID will cause an error, so you need to be careful when editing this.

Finally there is the map_x_x_tiles.png, which is the file for the terrain map. This is not mandatory, so it's up to you whether you edit these files.

3 - Beginning the process of drawing.

First, open Photoshop (or other image editing program as long as it's not Paint), and open the colorscales.png file which corresponds to the portion of the map you wish to edit. It's worth remembering that you will have to navigate to the MapUtility thread a lot, so put it somewhere that's easily accesible such as the desktop.

Now that the colorscales.png is open, it's time to start editing...only you can't just yet. First, select Image from the toolbar at the top, and select the following: image>mode>rgb color. This will allow you to freely edit the colorscales.

pg1-1.jpg


Find the area of the map you wish to edit, and erase anything that's already there. To do this use the eyedropper tool from the sidebar and select a seazone (alternately, type in the rgb colors R123;G123;B123.)

pg2-1.jpg

Eyedropper tool

Next select the brush tool, and use it to erase over the part of the map you wish to edit. Once that's done, it's time to start drawing. You can do this freehand if you wish, or you can prepare an outline beforehand. If the latter, paste it over your colorscales.png, and set opacity to 50%. This will create a new layer, so make sure to select the correct layer when you begin drawing!

pg3-1.jpg

Erase like so

Select the brush tool, and in the colors tab on the right select black (or type in r0;g0;b0.) It's up to you what size brush to use, anything between 3 and 7 should be alright for coastlines, and 2 or 3 for province boundaries. It really depends on how you want your map to look. Another thing to consider is using a fuzzy brush on your province outlines first (I'd suggest size 9), though it's a matter of choice.

pg4-1.jpg


Once the province outlines are drawn, it's time to write the names on. Select the 'Horizontal type tool' (the T on the lefthand toolbar) and drag across where you want the text to go. Select a font and type the province name in the box. You can move it by clicking and dragging outside of the box, and can rotate it by hovering the mouse over the corner of the text box and clicking and dragging when you see the rotation arrows.

pg5-1.jpg


Once that's done, it's time to save the colorscales.png. This bit is quite fiddly. First, open Paint and open the original version of the colorscales.png you've been editing. Go back to Photoshop and delete any extra layers you've added such as outlines (but keeping the text layers) Press Ctrl+A and then Shift+Ctrl+C (or select "Copy merged" from edit on the top toolbar), and then go back to Paint and press Ctrl+v to paste. Save (Ctrl+s) the Paint document, and then close the Colorscales.png in Photoshop without saving.

4 - The ProvID.png

Next, it's the turn of the ProvID.png to be edited. Close any open windows in Photoshop without saving, and open the ProvID.png that corresponds with the colorscales.png you've just been editing. Then, open the colorscales.png again, and press Ctrl+A and Ctrl+X to put it on the clipboard. Go back to the window with your ProvID and paste. Set the opacity to 50%.



Now, you need to edit the ProvID so that it matches up with the colorscales. Open the MapUtility folder, and select the ids.csv file. This will give you a list of province ids and their RGB values. If adding a new province, for example, you need to use a colour from this list. CK supports up to 1004 provinces, of which 1-999 are useable as land provinces. 998 and 999 are free, so these are good to use first of all. In the ids.csv, find the entry for province 998. It should read:

Code:
998;48;160;224

998 being the province id, and 48;160;224 being the RGB values. Type in these values in the 'colors' tab, and use the pencil tool (note, not the brush. On the sidebar, right click on the brush icon and select pencil tool). This is important, as using the brush will mess up your ProvID image.

pg10-1.jpg


Use the pencil to draw in the colour inside the province boundaries, using the semi-transparent colorscales.png overlay as a guide. Once this is done, zoom in and check for stray pixels, and make sure that the entire area is completely filled in with the correct colour. Repeat for each province, making sure you get the absolute correct RGBs.

To save, do the same as you did with the colorscales.png. Delete the colorscales layer and press Ctrl+A and Ctrl+X. In Paint open the original ProvID, and paste your edited version over this. Bear in mind, not doing this will lead to the mapmaker utility crashing when it comes to making your map, so it's important.

With that done, you can theoretically use the mapmaker utility and begin making your edited map. But first, I'll explain the borders.png.

5 - Borders.png

When opening the borders.png, you should note two things; a) the borders are drawn using a pure blue line (R0;G0;B255) outlined by two pure red lines (R255;G0;B0), and b) that the background is transparent. To edit the borders you'll need some guidance, so open your colorscales.png and change the mode to RGB colours (remember, image>mode>rgb colors). Next open the relevant borders.png and press Ctrl+A and Ctrl+X, and then paste over the colourscales.png with Ctrl+V. First, use the eraser tool to erase any outdated borders.

pg7-1.jpg


Then, zoom in sufficiently and select the pencil tool size 1, with pure blue colour, and use it to trace the line of your new borders. Then use pure red colour and draw lines on either side of this blue line.

pg8-1.jpg

Like so

I should warn you that this is incredibly fiddly and time consuming, but it looks good in the end.

Once your done, delete the colorscales.png layer and save. You don't have to do anything with Paint for the borders.

6 - tiles.png

Finally we come to the tiles.png. Ultimately, unless you only use the terrain map, this can be done at your leisure, or not at all if you don't want to. It's up to you what you do with these.

7 - Making your new map

With that done, it's time to use the mapmaker.exe utility. It's pretty straightforward, so credit where it's due to Jamie500, who made it. First, move all your map files + the images.txt from the 'exported map' folder into the main MapUtility folder, if they're not already there. Double click on the icon, and you will get a list from 1 to 8. Simply go through each step from 1-6, and hopefully it will all go without a hitch. Some possible errors...

Crash on step 1 - have you saved the files in the right format? Make sure to do the thing with paint to get them into the correct format, otherwise you won't get very far at all.

Message stating an unknown RGB value - This means somewhere you've added a colour that isn't recognised by the game to the ProvID.png. Make a note of the RGB value displayed and use this to try and hunt down the error by typing the value into the 'color' tab and comparing with the ids on the ProvID. You can do this in Paint as well, by going to Colors>Edit Colors>Define Custom Colors and adding the RGB into the boxes.

Crash on step 2 - I got this when I accidently changed the size of one of the tiles.png, so be wary.

Crash anywhere else - Look in the log.txt in the MapUtilities file and see what it says.

8 - Editing your new map into the game


If you've got through steps 1-6 without a problem, it's time to see how your map looks in the game. Go to the 'map' folder in the MapUtility folder, and copy all the contents. Navigate to your CK folder, open the map folder and paste. Overwrite all the files that your copy pasting over. Note: it's important to back up anything you edit. Best thing to do would be to make another copy of your CK folder so that you can edit freely without worrying about irreparably messing up the game.

9 - Editing the db, config and scenario files, and using the mapviewer

You only need to do this if you've added or rearranged provinces. In the db/province.csv, find the ids of the provinces you've added. Add a region, area and seazone (look at the entries for nearby provinces and copy them. Bear in mind in the seazone section, it should be 0 for inland provinces) and also a terrain type, one of:

a) plains, b)hills c)mountain d)forest or e)march (ie marsh...yes, you have to spell it like that).

You can also add a province income and define which duchy and kingdom the province is part of, but that's not essential right now. You can also define the coordinates for CoAs and armies. In order to do this, you should use the mapviewer utility in the MapUtility folder. Open the mapviewer and use the highest zoom to focus in on the area of the map you edited. Place the mouse on the province, and the coordinates will appear in the top right hand corner.

pg9-1.jpg


Make a note of these, and enter them in the province db. In italics are the CoA coordinates, and underlined are the army position coordinates.

Code:
1;PROV1;Vestisland;Scandinavia;Iceland;869;Hills;0;norwegian;1;ICEL;NORW;NONE;NONE;NONE;[I]176;117[/I];[U]258;158[/U];318;337;188;216;-100;-100;0;-100;-100;0;-100;-100;0;-100;-100;0;230;253;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1

Also, remember that the mapviewer uses the gamepath=xxx entry in the settings.txt in the MapUtility folder, so if you've copy pasted your CK folder, make sure you specify the path of the copy and not the original in the settings.txt.

Next, save and close the province.csv and go to Config/provincenames, and find the relevant ids for your new provinces and type in the new name where the old one currently is. Rinse and repeat for all other new provinces, save and close.

Next, go to the Scenario folder and open the 1066_countries.inc (you can do other scenarios if you want, but for this guide I'll use 1066). Decide who you want the liege to be - find the tag of the liege (the info will be in the config/worldnames.csv or the config/extratext.csv), and then use the edit>find and add the province number inside the controlledprovince section of the entry. Close and save, then open the 1066_scenario_provinces.inc file. Best thing to do here is to find a province with the same culture as your new one and copy paste the entry, remembering to change the province = { id = ??? to the correct province id. Once this is done, close save and open the 1066_scenario_titles.inc. First find the entry for your new provinces liege by using edit>find with the country tag, and make a note of the character id (ie the section that reads character = { type = 10 id = xxxxxx } ). Make a new entry for each new province, which should look something like this:

title = {
tag = Cxxx
tier = county
liege = xxxx
holder = { character = { type = 10 id = xxx} startdate = { year = 1066 month = january day = 0 } }
}

but obviously without the xs! Save and close. If you've done everything correctly, it's now time to open CK and look at your map. Hopefully it will look awesome and won't cause annoying unexplained crashes (which sometimes it will, so be warned).

10 - Profit!


Well, that went on a bit longer than I intended. If anything is unclear or you have any questions, or anything I've missed, ask away. Also, if anyone has any info or tips to add, please do!
 
Last edited:
This is great, thank you!

You should be more clear in the first paragraph, though, where it reads "go into the CK folder and copy XYZ". Make it clear that this is the CK folder within the map utility folder, not the actual CK game folder... ;)

Apart from that, this guide is very helpful! Many thanks!
 
i love u !!!!!!!!!!

Thanks :p

This is great, thank you!

You should be more clear in the first paragraph, though, where it reads "go into the CK folder and copy XYZ". Make it clear that this is the CK folder within the map utility folder, not the actual CK game folder... ;)

Apart from that, this guide is very helpful! Many thanks!

You're right, especially as there is a settings.txt file in the main CK folder as well. Done.
 
Hahaha you saucy devil! Well done!
 
Now what's missing:
- rivers
- textures

I have great difficulties adding rivers, as they seem to consist of one 15pt "brush" of light grey, surrounded by one 5pt brush of dark grey on each side and one 1pt "pencil" of black, also on each side... It's so tedious!!!

Textures are pretty easy by themselves (clone stamp tool), yet you should know in which order to do them (I did rivers first, which is a real bad idea) and probably also what to use its own layer for...
 
Now what's missing:
- rivers
- textures

I have great difficulties adding rivers, as they seem to consist of one 15pt "brush" of light grey, surrounded by one 5pt brush of dark grey on each side and one 1pt "pencil" of black, also on each side... It's so tedious!!!

Textures are pretty easy by themselves (clone stamp tool), yet you should know in which order to do them (I did rivers first, which is a real bad idea) and probably also what to use its own layer for...

I don't know how to do them. I personally think the map looks quite nice and clean without textures, and I see rivers as potential new land provinces so I've been steadfastly removing them rather than adding them. Other people may wish to add these though, but I can't really help. I myself would appreciate a good tutorial on how to do textures, as I want to use them when I get around to doing the terrain map.
 
I'm trying to make an entirely new map for CK and Photoshop CS4 is giving me no end of trouble. I use Lasso tool to select an area I want to be a province on one of my ProvID files. Now, whatever I try, fill or pencil, some pixels along the edge of the selection are painted in somewhat different colour than the others. The image is in RGB mode. Here's an example:
2qc1bp1.jpg


How can I fill the selection so that all the pixels are of exactly the same colour?