Hi fellow CK2 modders.
A few months back I posted a thread with these tools, but I seem to have misplaced it. I have been working on this project on and off since then and I feel it is ready for a new release.
Download
http://lvisse.free.fr/CK2MapTools/CK2MapTools-V2.0.5.zip
Older Version
http://lvisse.free.fr/CK2MapTools/CK2MapTools-v1.1.0.zip
In-game Screenshots
What is this ?
A few bits of java code I have made to automate some parts of the map modding process. It is primarily intended for people who want to start a new map from scratch, as this can be quite a soul-crushing experience, with seemingly random, unexplainable CTDs, and lots of menial, repetitive or redundant work.
This is not a random map generator, the idea is you put in the work and draw the map yourself, but don't have to worry about image format, adhering to strict color palettes, and hand writing a thousand text files. Well, you still need to follow some color codes and write some text, but I think it's much easier this way.
How does it work ?
First you need a Java Runtime Environment installed on your machine. The code was compiled using version 1.8.0.121, so you need at least that.
You also need an image editing tool and a text editor, but you probably already have that. I like GIMP and notepad++ myself, though mspaint and notepad would work too. I find it very useful to be able to use layers and transparency when working on map files.
Supplied are a handful of batch files. These are shortcuts to launch the various bits of code with some preset parameters in some cases, so you don't have to type command lines. There is no graphic UI here.
In the same folder as the batch fles, there is an input folder, this is where you will place all the files needed by the tools to generate the map and associated files. Some of these you will have to make yourself from scratch. Others, you will get a basic template generated that you can then fill in. The tools will also create an output folder in the same directory, the content of this output folder can then be entirely copied straight into a mod folder to run into CK2.
How does it work, in-depth
1.Generating Terrain
2.Generating Rivers
3.Generating Provinces and First look in-game
4.Assigning Cultures and Religions
5.Assigning DeJure / DeFacto titles
6.Assigning Governments, Technology and more
7.Naming things
8.Making Trade Routes
Features
Currently supports generating the following files :
map/adjacencies.csv (automatically creates straits and major river crossings)
map/climate.txt (assigns winter severity based on user-defined climate map and terrain height)
map/default.map
map/definition.csv (matches province colors from provinces.bmp)
map/geographical_region.txt (generates one region for each dejure empire)
map/island_region.txt (detects regions that are isolated from each other, and which one is the mainland)
map/positions.txt (automatically positions ports, shields, armies, etc... it's not perfect but it mostly works)
map/provinces.bmp (draws province borders and sea zones, ensures colors are unique. Some manual work still required to fix sea zones, make wastelands and impassable mountains)
map/rivers.bmp (most of the work still needs to be handmade, but it gives you some lenciency and a few shortcuts)
map/terrain.bmp (auto-assigned based on various factors and your own input, smoothes transitions and adds random noise to make it look more natural)
map/topology.bmp (auto-assigned, smoothed, with random noise to get convincing-looking terrain as much as possible)
map/trees.bmp (auto-assigned based on user-defined terrain and climate)
map/world_normal_height.bmp (derived from topology. Please don't look up the source code for this)
map/terrain/colormap.dds (derived from terrain and climate, with some random noise)
map/terrain/colormap_water.dds
localisation/ (associates titles and provinces with names supplied by you. You can name places precisely, or put a list of names to randomly assign, and you can mix both methods at the same time)
history/characters/ (generates count-tier rulers of local culture and religion for every province, as well as a small 10-character dynasty for all the playable ones.)
history/provinces/ (auto-assigns culture, religion, title, number of holding slots, existing holdings...)
history/technology (based on your own input, rudimentary, but a good starting point)
history/titles (assigns a ruler and his/her ancestors to every county, also creates duchies, kingdoms and empires if you will it. Generates patrician houses for merchant republics if applicable)
common/dynasties (done as part of character history, but the dynasties can also used by courtiers or by the ruler designer)
common/landed_titles (generates the main file with all dejure titles, also generates some mercenary band titles : 1 for each dejure kingdom)
common/province_setup
common/trade_routes (a recent addition, lets you draw trade routes on a map and generates text files based on that)
Changelog
Known Issues
Nomads are currently not supported. Mostly because I don't understand how to automatically turn tribals into nomads, and also because I didn't like them enough to bother. This doesn't mean your map can't have nomads, but it won't be automatic.
All seas are currently always considered as part of one big ocean. This could cause issues if it is not the case on your map with some seas being unreachable from other seas, such as the red sea and mediterranean in vanilla CK2.
A few months back I posted a thread with these tools, but I seem to have misplaced it. I have been working on this project on and off since then and I feel it is ready for a new release.
Download
http://lvisse.free.fr/CK2MapTools/CK2MapTools-V2.0.5.zip
Older Version
http://lvisse.free.fr/CK2MapTools/CK2MapTools-v1.1.0.zip
In-game Screenshots










What is this ?
A few bits of java code I have made to automate some parts of the map modding process. It is primarily intended for people who want to start a new map from scratch, as this can be quite a soul-crushing experience, with seemingly random, unexplainable CTDs, and lots of menial, repetitive or redundant work.
This is not a random map generator, the idea is you put in the work and draw the map yourself, but don't have to worry about image format, adhering to strict color palettes, and hand writing a thousand text files. Well, you still need to follow some color codes and write some text, but I think it's much easier this way.
How does it work ?
First you need a Java Runtime Environment installed on your machine. The code was compiled using version 1.8.0.121, so you need at least that.
You also need an image editing tool and a text editor, but you probably already have that. I like GIMP and notepad++ myself, though mspaint and notepad would work too. I find it very useful to be able to use layers and transparency when working on map files.
Supplied are a handful of batch files. These are shortcuts to launch the various bits of code with some preset parameters in some cases, so you don't have to type command lines. There is no graphic UI here.
In the same folder as the batch fles, there is an input folder, this is where you will place all the files needed by the tools to generate the map and associated files. Some of these you will have to make yourself from scratch. Others, you will get a basic template generated that you can then fill in. The tools will also create an output folder in the same directory, the content of this output folder can then be entirely copied straight into a mod folder to run into CK2.
How does it work, in-depth
1.Generating Terrain
2.Generating Rivers
3.Generating Provinces and First look in-game
4.Assigning Cultures and Religions
5.Assigning DeJure / DeFacto titles
6.Assigning Governments, Technology and more
7.Naming things
8.Making Trade Routes
Features
Currently supports generating the following files :
map/adjacencies.csv (automatically creates straits and major river crossings)
map/climate.txt (assigns winter severity based on user-defined climate map and terrain height)
map/default.map
map/definition.csv (matches province colors from provinces.bmp)
map/geographical_region.txt (generates one region for each dejure empire)
map/island_region.txt (detects regions that are isolated from each other, and which one is the mainland)
map/positions.txt (automatically positions ports, shields, armies, etc... it's not perfect but it mostly works)
map/provinces.bmp (draws province borders and sea zones, ensures colors are unique. Some manual work still required to fix sea zones, make wastelands and impassable mountains)
map/rivers.bmp (most of the work still needs to be handmade, but it gives you some lenciency and a few shortcuts)
map/terrain.bmp (auto-assigned based on various factors and your own input, smoothes transitions and adds random noise to make it look more natural)
map/topology.bmp (auto-assigned, smoothed, with random noise to get convincing-looking terrain as much as possible)
map/trees.bmp (auto-assigned based on user-defined terrain and climate)
map/world_normal_height.bmp (derived from topology. Please don't look up the source code for this)
map/terrain/colormap.dds (derived from terrain and climate, with some random noise)
map/terrain/colormap_water.dds
localisation/ (associates titles and provinces with names supplied by you. You can name places precisely, or put a list of names to randomly assign, and you can mix both methods at the same time)
history/characters/ (generates count-tier rulers of local culture and religion for every province, as well as a small 10-character dynasty for all the playable ones.)
history/provinces/ (auto-assigns culture, religion, title, number of holding slots, existing holdings...)
history/technology (based on your own input, rudimentary, but a good starting point)
history/titles (assigns a ruler and his/her ancestors to every county, also creates duchies, kingdoms and empires if you will it. Generates patrician houses for merchant republics if applicable)
common/dynasties (done as part of character history, but the dynasties can also used by courtiers or by the ruler designer)
common/landed_titles (generates the main file with all dejure titles, also generates some mercenary band titles : 1 for each dejure kingdom)
common/province_setup
common/trade_routes (a recent addition, lets you draw trade routes on a map and generates text files based on that)
Changelog
V1.1
- All files used in the "tutorial" are included in this release.
- Wastelands are no longer color-based, instead they require a new type of "settlement" to be identified as wastelands : a pure green dot.
- info.csv has been divided into 3 different files : config.csv contains the generic properties, which have been greatly expanded. cultures.csv and religions.csv contain the color definitions for cultures and religions. For those 2 files, the first column has been dropped.
- It is no longer necessary to have a culture map before you can launch make province setup.
- You can now define the following properties in config.csv : hills_height, mountains_height, snow_height, peak_height, input_map_scale, tree_map_scale, noise_patch_size, noise_factor_max, noise_baseline, smooth_radius.
- Added a new input terrain : forested hills. It combines the height of the plateau type and the trees of the forest type. Color 0;64;64.
- Added support for the 2 unused terrain types in vanilla. Added properties in config.csv to customize them.
- Added a reverse engineering batch : takes the terrain.bmp, topology.bmp and provinces.bmp and tries to create an input.bmp, climate.bmp and settlements.bmp in a new folder. The input and climate don't work very well, but the settlements should be mostly usable as is. As it is it can only distinguish btween land provinces and sea provinces, not rivers and wastelands.
- Fixed straits not appearing in-game. Unfortunately this just shows the tools generate far too many, so some manual editting is required to make it look good.
- Merchant republics start with a trade post in the capital province, owned by the doge.
Known Issues
Nomads are currently not supported. Mostly because I don't understand how to automatically turn tribals into nomads, and also because I didn't like them enough to bother. This doesn't mean your map can't have nomads, but it won't be automatic.
All seas are currently always considered as part of one big ocean. This could cause issues if it is not the case on your map with some seas being unreachable from other seas, such as the red sea and mediterranean in vanilla CK2.
Last edited: