• 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.
java.lang.IndexOutOfBoundsException:Index: 139, Size: 137.
Hard to say without context, but probably an edge case I didn't think of. Do you have the full log ? At what step are you getting this error ?

Likewise for your provinces problem, I can't really tell you how to fix it if I don't know more about what errors you're getting. I wouldn't worry about dejure stuff until provinces are ok, but there is no easy way to do this.

Localisation files are not needed, shouldn't be a problem. If you can't see counties it's probably the same problem as wanna_grenade : bad image format on provinces.bmp.
 
Hard to say without context, but probably an edge case I didn't think of. Do you have the full log ? At what step are you getting this error ?

Likewise for your provinces problem, I can't really tell you how to fix it if I don't know more about what errors you're getting. I wouldn't worry about dejure stuff until provinces are ok, but there is no easy way to do this.

Localisation files are not needed, shouldn't be a problem. If you can't see counties it's probably the same problem as wanna_grenade : bad image format on provinces.bmp.

Yeah that’s what I was going to offer. Go to https://ck2.paradoxwikis.com/Map_modding

Double check all the map files fit the image requirements. Paint can’t do it and gimp will automatically save images with the wrong image data. So far the majority of my problems have actually been this; or for the plugin in, a mis overlap with provinces and settlements.
 
I'm trying to generate localization for map but I keep getting an error. The error is: ERROR: was expecting opening bracket but found none. I can't seem to find any other errors in the file so if anyone could tell me what I need to fix I'd really appreciate it. I'll include the log just in case it helps.
 

Attachments

  • CK2MakeProvinceSetup.log
    1,6 KB · Views: 3
This in an error when parsing the cultures file(s), in this case 99_animals.txt
It's possible Paradox added something here which I didn't account for. I'm thinking maybe character_modifier (pretty big oversight if true).
I'll test and see if I can reproduce the problem.

EDIT : I am getting the error but it is not supposed to block anything, it just stops parsing there.
EDIT2 : Yes that's it, the parser is mistaking the closing bracket in character_modifier for the end of that culture, and the following nomadic_in_alt_start as a new culture, then it breaks when it find "yes" after = instead of an opening bracket.
 
Last edited:
Seems like a good opportunity to release an update :
https://www.dropbox.com/s/o8lqhh7mxevjrlx/CK2MapTools-V2.0.2.zip?dl=0

This fixes the bug in culture parsing for cultures that have a character_modifier.

A few other things I made between the previous release and now :
  • Improved anti-aliasing on coastlines / major rivers, it should work for real this time and be closer to what you've drawn on input.bmp.
  • Fixed a bug where ports would not be placed on the coast for coastal provinces where the settlement was too far from the sea.
  • Fixed a bug where deserts were not growing vegetation from rivers.
  • Some tweaks to province holding slots calculations, where too much rounding was making some factors irrelevant. Added a percent-based bonus to de jure capitals of every tier instead of a flat bonus. The top 1% of provinces get 7 slots now.
  • Coastlines no longer get a coastal_desert terrain type. They get ocean terrain, which actually looks like a sandy beach without grass, just like in vanilla. These sandy beaches do not get generated for land that neighbours major_river on input.bmp, only for the deeper sea variants, so you can choose where you want them to show up or not, more or less. Various changes have been made to different tools so that the ocean terrain type no longer identifies water/land, instead terrain height is what matters.
  • (bonus) added an example map. It is not 100% complete but includes config, input, climate, settlements, rivers, provinces, and 3 trade routes.
 
Thanks for your update. I love your tools, so fun to play around with.
I'm having issues with assigning de jure territory to my map. I have manually filled the 3 de jure maps but i can't get them to be applied in game. Feels like i have tried everything and i cant see what i'm doing wrong. The automatic de jure maps get assigned and works in game if i use that option but my manually filled maps are not applied. Every province is just its own duchy/kingdom/empire.

Any idea what i am doing wrong?
 
It's either your image has a format that can't be read so it's ignored
I think i got my formats correct. No color space information and 24 bits bmp right? Other files i have used in the generator has worked fine.

or you're not using the exact same colors as on your provinces.bmp.
As i am not sure what you mean with that, that probably is my problem. Should every duchy/kingdom/empires color correspond to a counties color within in?
 
Can't say without context, need the log and probably the dimensions of your maps. Also why not use more the more recent version ? It might be something I've already fixed.
 
The log doesn't seem to say anything.
No you're right, it doesn't because there is no error in this one. What about the log of the one that crashes ?
Also 851968 is 832x1024 so that's that. Is your input.bmp not exactly half the size of your final map maybe ? I had accidentally left some hardcoded parts in earlier versions so it may well be that.
 
Getting this error now:

[2019-01-19.14-12-45-990]Loading ./input/cultures.bmp
[2019-01-19.14-12-46-002]Loading ./input/cultures.csv
[2019-01-19.14-12-46-002]Creating cultures...
[2019-01-19.14-12-46-002]Parsing 00_cultures.txt...
[2019-01-19.14-12-46-013]ERROR: was expecting opening bracket but found none

Something with the new CK2 patch or is it something i have done wrong again? I just get the feeling that it started happening after the latest patch
 
Something with the new CK2 patch
Yes, that seems to be the case. Looking into it...
EDIT: They added unit_graphical_cultures to the saxon cultures, which is new and not recognized. I'm looking into a more permanent solution than adding new tags to my program whenever they add one...
EDIT2: I almost have it but they've removed a space at line 1380 :
color = { 0.8 0.4 0.8}
This is correct for CK2 but my parser assumes there must be a space between 0.8 and }

EDIT3 : updated here : https://www.dropbox.com/s/zfshxf8k8wpsibi/CK2MapTools-V2.0.3.zip?dl=0
Fixes culture parsing again, and hopefully for future versions as well.
Added a tiny feature : it's now possible to use culture groups in localisations.csv, this will assign the given title name to a random culture in that group.
 
Last edited:
Thanks for the fast updates!

Do you know if there is any simple way to generate flags for counties/duchies/kingdoms? Titles generated have black flags as default, do i have to assign a flag manually to every county or is there any shortcut that i don't know about?
 
do i have to assign a flag manually to every county
That would be the proper way to do it, but you can generate random flags like for baronies.
This requires some modding : in religions, for every religious group, set has_coa_on_barony_only = no and the game will generate random coat of arms for all tiers of titles.
 
First of all, I have to say this is pretty amazing! Definitely the best tool I've seen for making an overhaul mod. Second, I was curious if there's any special way you build the tool? Mainly curious if I wanted to go ahead and make any changes/add-ons, how difficult would it be to get it to compile.
 
First of all, I have to say this is pretty amazing! Definitely the best tool I've seen for making an overhaul mod. Second, I was curious if there's any special way you build the tool? Mainly curious if I wanted to go ahead and make any changes/add-ons, how difficult would it be to get it to compile.
I'm using Eclipse, it's a java SE project, nothing fancy. I use a plugin for the UI editor but you should not need that to compile.