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

JonStryker

ɹǝʞʎɹʇSuoſ
68 Badges
Mar 20, 2012
5.294
379
  • Crusader Kings II: Horse Lords
  • Age of Wonders III
  • Europa Universalis III Complete
  • Stellaris
  • Crusader Kings II: Holy Fury
  • Europa Universalis III Complete
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Conclave
  • The Showdown Effect
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Warlock: Master of the Arcane
  • War of the Roses
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Humble Paradox Bundle
  • Stellaris: Galaxy Edition
  • Crusader Kings Complete
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Victoria 3 Sign Up
  • Europa Universalis 4: Emperor
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Ancient Relics
  • Stellaris: Apocalypse
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Leviathan: Warships
  • Magicka
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Knights of Pen and Paper +1 Edition
  • Stellaris: Galaxy Edition
  • Europa Universalis III
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Res Publica
This is a tool that can be used to generate various text files needed for a map mod. A step by step tutorial will follow.

The basic process is:
  • According to the spreadsheet provinceDef.xls files are generated for the
  • provinces defined in province.png

This is the continuation of my similar tool for Crusader Kings 2. A lot of the information in the old thread still applies: Map Filler CK2

Software you'll need: Java 13 installed and a tool with which you can edit XLS files (e.g. Windows Excel in any version or a free equivalent)

Download: CK3Tools-1.3.1A
Older versions:
CK3Tools-1.0.3A
CK3Tools-1.2.2A



Example provinceDef.xls

Comments and questions are welcome!
IF YOU LIKE THIS PLEASE GIVE IT SOME REP!
 
Last edited:
  • 31Like
  • 3Love
  • 2
Reactions:
1) You should have your map ready
At least provinces.png is needed.

2) Fix up your mod folder
- If you haven't already, create this folder: [DocumentsPath]\Paradox Interactive\Crusader Kings II\mod\[modname]
- Same with the .mod file: [modname].mod has to exist in the mod folder. It should contain something like this:
Code:
name = "[modname]"
path = "mod/[modname]"
...
- create the map_data folder inside your mod folder and put in the files of the map you drew before
- put provinceDef.xls in a new folder _mapFiller (also inside your mod folder)

3) Download the Tool this thread is all about

- Install Java 13 if your system isn't running it already
- Extract the archive to a directory of your choice
- Open config.properties with a text-editor and put the directory of your mod folder right of the 'moddirectory='. Make sure that either "/" or "\\" are used in the directories.
- Also edit "installdir" in a similar fashion -> point it to where Crusader Kings 3 is installed

4) Open up provinceDef.xls you copied in 2)
- every line corresponds to a single province
- column A is a comment; I use it to give every kingdom its heading
- column B is an index starting at 1
- columns C - E is the RGB value of the province in the provinces.bmp
- column F is the name of the province
- column G is for the type of province. Blank is land, 'R' is for rivers, 'L' for lakes 'O' for oceans, 'W' is wasteland and Impassable Seas is 'IS'. Impassable mountains 'IM' also exists but it is the same as Wasteland - vanilla doesn't distinguish the two.
- column H is for cultural renamings
- columns I - L are for the de jure structure (empire, kingdom, duchy, county); only I can be left empty
- column M: culture
- column N: religion
- column O: province terrain - choose from plains, forest, wetlands, hills, mountains, farmlands, steppe, drylands, desert, floodplains, taiga, jungle
- column P: currently unused
- column Q: Type of holding - choose from 'B' (castle), 'C' (city), 'T' (temple), 'U' ("uncivilized" = tribal) and '' (none yet built)

- Culture and de jure information can only be omitted for wasteland and ocean/river/lake provinces


Edit in your own holdings
- Firstly delete all my example content and start from scratch
- Fill in all the provinces you have on your map
- The map filler tool has a .bat to extract colors from a bmp file: colors.bat; This can be used to extract all colors
of provinces.bmp at once or small batches of it
- Make blocks as I did: Wasteland on top, then each kingdom after each other, then rivers, oceans and lakes.
- Name your provinces, put in culture and religion and assign de jure duchy, kingdom and if you want empire.
- Decide upon a number of holdings
- Either put in all the holdings you want to have or leave those columns empty for now (you can add that later on as well)

5) config.properties settings
- For geographical_regions it is necessary to group the titles. Syntax is "world_<regionName>". As an example the config provided with the tool has world_north, world_center and world_south. To have geographical_regions re-generated delete the file.

6) Run mapfiller.bat from the folder you put it in 3)

The tool will now generated from the information given:
  • common
    • landed_titles
    • province_terrain
  • history
    • provinces
    • titles
  • localization
    • english\custom_titles_l_english.yml
  • map_data
    • default.map
    • definition.csv
    • geographical_region.txt
Additionally a number of files in folders are blanked out in order to not have vanilla CK3 data present in the mod:
  • image files
    • pngs in the folder gfx/map/terrain are generated with the same dimensions as provinces.png
  • text files as configured in config.properties; by default all files in these folders IF THEY ARE NOT PRESENT IN THE MOD YET:
    • common/bookmarks
    • common/culture/cultures
    • common/dynasties
    • common/dynasty_houses
    • common/religion/religions
    • common/religion/holy_sites
    • history/characters
    • history/cultures
    • history/province_mapping
    • history/provinces
    • history/titles
    • history/wars
 
Last edited:
  • 6Like
  • 4Love
  • 1
Reactions:
Nice. This makes it a lot easier to do total conversions.

A small comment on column G. CK2 has distinguish between land and sea wastelands. One is called impassable_mountains in default.map the other is called impassable_seas. As far as I can tell you only have W for wastelands, which I guess classifies the province as an impassable_mountain. Having the sea option would be nice. :)
 
Last edited:
  • 1Like
Reactions:
Nice. This makes it a lot easier to do total conversions.

A small comment on column G. CK2 has distinguish between land and sea wastelands. One is called impassable_mountains in default.map the other is called impassable_seas. As far as I can tell you only have W for wastelands, which I guess classifies the province as an impassable_mountain. Havn't the sea option would be nice. :)
True, forgot to write that down. I've changed the OP now.
You'd have to use 'IS' for that.
 
  • 2Like
Reactions:
Great. A few more things. If I use a different order for my blocks will it work? When I made my map I started out with the sea zones, so I have those first in my province numbering. And my wastelands are sort of scattered all over. I could renumber all the provinces, but since I added the province numbers on my map renumbering would be a pain.

Do I have to manually add in capitals for kingdoms or duchies or are there a way to mark of capitals? I noticed the R column says "Capital". :)

Finally... culture specific names. I seem to remember I could add culture specific title names back when I used this for CK2. Can I still do so and how?
 
Great. A few more things. If I use a different order for my blocks will it work? When I made my map I started out with the sea zones, so I have those first in my province numbering. And my wastelands are sort of scattered all over. I could renumber all the provinces, but since I added the province numbers on my map renumbering would be a pain.

Do I have to manually add in capitals for kingdoms or duchies or are there a way to mark of capitals? I noticed the R column says "Capital". :)

Finally... culture specific names. I seem to remember I could add culture specific title names back when I used this for CK2. Can I still do so and how?
  1. You can scatter all over, no technical necessity to keep things ordered
  2. Top holding for each title is set as the capital.
  3. That's yet to be implemented, yeah. I am open for proposals of how to add it, though.
 
  • 1Like
Reactions:
That's yet to be implemented, yeah. I am open for proposals of how to add it, though.
In the CK2-version i had you used {culture = "culture_name"} following the holdning. I guess that could work here to. Though it might be more tricky with titles than it was with holdings.
 
In the CK2-version i had you used {culture = "culture_name"} following the holdning. I guess that could work here to. Though it might be more tricky with titles than it was with holdings.
There I had that notation that you could define cultural names on every province for all titles that are connected to it (county, duchy, kingdom, empire). Was a bit clunky since one cell in the spreadsheet got to hold a lot of text but it worked.
 
The best tool for total conversion mods, I already used it for CK2, I wasted some hours in the last few days trying to port a CK2 mod to CK3 but this tool makes it way faster
 
What am I doing wrong here?
I've updated Java to the latest, and the mod is just the Blankmap mod renamed so I can test this out.
Code:
C:\Users\Administrator\Documents\Paradox Interactive\Crusader Kings III\mod\CK3T
ools-v1.03A>java -Xmx256m -jar CK3Tools.jar kld.ck3tools.mapfiller.ConvertXlsToP
rovinces
ProvincesPng{file=C:\Users\Administrator\Documents\Paradox Interactive\Crusader
Kings III\mod\test\map_data\provinces.png, width=8192, height=4096}
Exception in thread "main" java.lang.NullPointerException: Cannot read the array
 length because "<local5>" is null
        at kld.ck3tools.mapfiller.ConvertXlsToProvinces.generateMapFiles(Convert
XlsToProvinces.java:285)
        at kld.ck3tools.mapfiller.ConvertXlsToProvinces.start(ConvertXlsToProvin
ces.java:164)
        at kld.ck3tools.mapfiller.ConvertXlsToProvinces.main(ConvertXlsToProvinc
es.java:146)

C:\Users\Administrator\Documents\Paradox Interactive\Crusader Kings III\mod\CK3T
ools-v1.03A>pause
Press any key to continue . . .
 
What am I doing wrong here?
I've updated Java to the latest, and the mod is just the Blankmap mod renamed so I can test this out.
Code:
C:\Users\Administrator\Documents\Paradox Interactive\Crusader Kings III\mod\CK3T
ools-v1.03A>java -Xmx256m -jar CK3Tools.jar kld.ck3tools.mapfiller.ConvertXlsToP
rovinces
ProvincesPng{file=C:\Users\Administrator\Documents\Paradox Interactive\Crusader
Kings III\mod\test\map_data\provinces.png, width=8192, height=4096}
Exception in thread "main" java.lang.NullPointerException: Cannot read the array
length because "<local5>" is null
        at kld.ck3tools.mapfiller.ConvertXlsToProvinces.generateMapFiles(Convert
XlsToProvinces.java:285)
        at kld.ck3tools.mapfiller.ConvertXlsToProvinces.start(ConvertXlsToProvin
ces.java:164)
        at kld.ck3tools.mapfiller.ConvertXlsToProvinces.main(ConvertXlsToProvinc
es.java:146)

C:\Users\Administrator\Documents\Paradox Interactive\Crusader Kings III\mod\CK3T
ools-v1.03A>pause
Press any key to continue . . .
Did you configure installdir so that it points to the right directory?
 
That was it!
I have Steam in my F: drive too, so once I saw that F: I overlooked it and didn't realize it was wrong. I knew I was doing something stupid but I just couldn't figure it out
 
I'm having a ctd when starting the game in map editor mode after running this. Before running it my mod startup up fine. I've compared 00_defines.txt and default.map and they seem functionally identical. I'm suspecting that some of the overwritten vanilla files might be the culprit. I've attached the error.log.

Also a small suggestion. It would be nice to include the comment column from provinceDef in definition.csv. My suggestion is simply copying it into column G in definion.csv and placing a # in front of the comment. Also it would be nice to have the barony name copied into column E. That is how vanilla seems to be doing it.
 

Attachments

  • error.log
    1,6 MB · Views: 0
Last edited:
I'm having a ctd when starting the game in map editor mode after running this. Before running it my mod startup up fine. I've compared 00_defines.txt and default.map and they seem functionally identical. I'm suspecting that some of the overwritten vanilla files might be the culprit. I've attached the error.log.

Also a small suggestion. It would be nice to include the comment column from provinceDef in definition.csv. My suggestion is simply copying it into column G in definion.csv and placing a # in front of the comment. Also it would be nice to have the barony name copied into column E. That is how vanilla seems to be doing it.
Barony name not showing up in definitions.csv is a bug I already fixed locally. I'll look into what you proposed with the comment. The thing is that I usually use column A of provinceDef.xls for random shit that I don't necessarily need in the mod.
I'll look at the provided error log. Would be great if you could find out / investigate what causes your CTD. Maybe removing some of the generated files makes the mod load up again and then I have an easier time figuring this out.

The contents of the exception file can also be useful to trace CTDs, e-g. "E:\Documents\Paradox Interactive\Crusader Kings III\crashes\ck3_20200922_151719\exception.txt"
 
Last edited:
  • 1
Reactions:
There's an error when I launch the map filler

Code:
Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "<local5>" is null
at kld.ck3tools.mapfiller.ConvertXlsToProvinces.generateMapFiles(ConvertXlsToProvinces.java:285)
at kld.ck3tools.mapfiller.ConvertXlsToProvinces.start(ConvertXlsToProvinces.java:164)
at kld.ck3tools.mapfiller.ConvertXlsToProvinces.main(ConvertXlsToProvinces.java:146)