• 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.
How many provinces do you have?
What do you have max_provinces set to in default.map?

Currently I have 88 provinces. max_provinces is set to 89, and the province count is 88.

max_provinces = 89
# stats: 88 provinces

I added in some black wasteland area in the hope that the game was looking for that as province 0 somehow, but this didn't work. I have no seas, oceans or rivers, but I had the same issue when I did.

Other than the different province map, terrain map and river map I have done as the tutorial specified. The terrain and river map both work if there are only a black zone, a single province, and the two seas.

Edit: Okay, so it would seem that I was wrong. Province 0 has an invalid origin when booting the vanilla game, as well as other total conversion mods. It's a logged error, but it's not what's causing my crashes.

Using a single land province plus two ocean provinces, identically to in the guide, works. When I add in additional provinces, any number of them, it fails. The game either crashes as soon as the big paradox logo goes, or holds on "loading databases" before crashing.

The only thing of any pertinence in the error logs is "[map.cpp:745]: Strait First Parameter Not Valid! Line: 2", which means nothing to me. I can only find one other instance of this happening anywhere on the internet, and it's in this thread, where it went unanswered.

Despite only modifying the map files, the graphics log is now completely clear when it crashes. The setup log (which the wiki says to check in the case of crash on loading databases) is 6.5k lines long, as opposed to the vanilla setup log which is 11.5k lines long.

I have absolutely no idea what could be wrong.
 
Last edited:
Okay, so I fixed my problems and I'm posting here in case anyone else has the same issues in the future.

  1. "Province 0 has invalid origin" is NOT an actual error. It's reported in the error log, but it's also reported in the error log in the base game (try it). It doesn't cause any problems and can be ignored.
  2. "Strait First Parameter Not Valid!" is caused by an error with your adjacencies.csv. As far as I can tell it's caused by an empty line issue in the file, which is NOT visible on excel. To fix it copy across the adjacencies.csv file from the vanilla game and deleted every line except for the first IN NOTEPAD++. Do not use excel for this purpose, as it might not work. Even if your excel file looks fine do this in notepad++ anyway. Do not leave any blank lines, delete the lines themselves as well as their contents.
  3. If you have an unreported crash at "loading maplogic" or "loading database" (these can be the same thing because the end of one is the start of another) it's likely because of a flaw with your terrain or river files. Rivers have to be 1 pixel wide, and cannot be any wider. Also bear in mind that a 1 pixel wide pencil in photoshop will leave unconnected diagonal pixels.
  4. Terrain files cannot have ANY pixels which are not the approved terrain colours on the wiki. One pixel which is out by one increment of an RGB value (say, 41/180/149 instead of 40/180/149) will cause the whole thing to fail while being invisible to the human eye. This is not reported in the graphics log, even though that is for logging map-related errors. To fix this use the magic wand selector tool on zero tolerance with contiguous turned off and delete all the steppe, grasslands etc until all correct terrain is gone. Then click on blank space and try to select inverse. If you get anything other than "no pixels were selected" then there are incorrect pixels on your terrain file.
  5. Due to the method of image storing you have to use to produce 8 bit images one of the mountain colours may try and force itself to be wrong, with 155/155/155 forcing itself to be 154/154/154. Check the colour after you add it with the bucket and after saving the image. If it keeps changing itself to 154/154/154 then just replace the whole thing with another approved colour, like 255/255/255 (the other type of snow-covered mountain).
  6. I have been told that ocean provinces have to be contiguous, meaning there are no isolated sections (unless you do some complex fiddling which, since you're looking at this thread, you certainly don't know how to do). This didn't cause any crashes for me but I was told it while making this and haven't seen it written ever, so I thought I'd mention it. Land provinces don't have to be contiguous however (eg the maldives in base game). Edit: I have since come across this, and it absolutely does cause the game to crash during startup. Ocean provinces must be one coherent whole, unlike islands.
  7. I think (I don't know, but I think) that the game can load if the terrain and river files are wrong but there is only one land province. I don't know why this is, but if your bmp files work for one land province but no for two do not assume your files are correct. Edit: After seeing another person have the exact same situation, this is definitely true. Although the game will quickly crash even with just one province it will not crash on start up.
  8. If provinces are on the province map but not defined in the files then the game will load just fine, although the provinces will be blank (ie bare terrain). I think the reverse is also true, that defined provinces don't actually have to be on the map, but I'm not 100%.
  9. If you want to do your province map by regions and make sure that your colours are all unique then three 0-255 numbers can be compared as one whole by doing (x+1)^3×(y+1)^2×(z+1).
  10. There might be 255^3 possible colours on an RGB colour system, you will still definitely click the same colour twice.
 
Last edited:
Okay, so I fixed my problems and I'm posting here in case anyone else has the same issues in the future.

  1. "Province 0 has invalid origin" is NOT an actual error. It's reported in the error log, but it's also reported in the error log in the base game (try it). It doesn't cause any problems and can be ignored.
  2. "Strait First Parameter Not Valid!" is caused by an error with your adjacencies.csv. As far as I can tell it's caused by an empty line issue in the file, which is NOT visible on excel. To fix it copy across the adjacencies.csv file from the vanilla game and deleted every line except for the first IN NOTEPAD++. Do not use excel for this purpose, as it might not work. Even if your excel file looks fine do this in notepad++ anyway.
  3. If you have an unreported crash at "loading maplogic" or "loading database" (these can be the same thing because the end of one is the start of another) it's likely because of a flaw with your terrain or river files. Rivers have to be 1 pixel wide, and cannot be any wider. Also bear in mind that a 1 pixel wide pencil in photoshop will leave unconnected diagonal pixels.
  4. Terrain files cannot have ANY pixels which are not the approved terrain colours on the wiki. One pixel which is out by one increment of an RGB value (say, 41/180/149 instead of 40/180/149) will cause the whole thing to fail while being invisible to the human eye. To fix this use the magic wand selector tool on zero tolerance with contiguous turned off and delete all the steppe, grasslands etc until all correct terrain is gone. Then click on blank space and try to select inverse. If you get anything other than "no pixels were selected" then there are incorrect pixels on your terrain file.
  5. Due to the method of image storing you have to use to produce 8 bit images one of the mountain colours may try and force itself to be wrong, with 155/155/155 forcing itself to be 154/154/154. Check the colour after you add it with the bucket and after saving the image. If it keeps changing itself to 154/154/154 then just replace the whole thing with another approved colour, like 255/255/255 (the other type of snow-covered mountain).
  6. I have been told that ocean provinces have to be contiguous, meaning there are no isolated sections (unless you do some complex fiddling which, since you're looking at this thread, you certainly don't know how to do). This didn't cause any crashes for me but I was told it while making this and haven't seen it written ever, so I thought I'd mention it. Land provinces don't have to be contiguous however (eg the maldives in base game).
  7. I think (I don't know, but I think) that the game can load if the terrain and river files are wrong but there is only one land province. I don't know why this is, but if your bmp files work for one land province but no for two do not assume your files are correct.
Regarding #2, if it's just an empty line, you can load the problem adjacencies.csv itself in notepadd++ and delete the line there.

Regarding #4/5, terrain.bmp & rivers.bmp are indexed files. You can generally spot bad colors by editing the palette. If there are more entries in the file's palette than on the relevant wiki page, then you likely have some bad pixels. If you set those extra entries to colors highly contrasting to the expected ones, you should be able to see them in the image. Technically, the game doesn't even look at the color values in those files, just the color index of the pixels. (By the way, what *are* you using to edit the 8-bit images? That could affect getting bad pixels.)
 
Regarding #2, if it's just an empty line, you can load the problem adjacencies.csv itself in notepadd++ and delete the line there.

Regarding #4/5, terrain.bmp & rivers.bmp are indexed files. You can generally spot bad colors by editing the palette. If there are more entries in the file's palette than on the relevant wiki page, then you likely have some bad pixels. If you set those extra entries to colors highly contrasting to the expected ones, you should be able to see them in the image. Technically, the game doesn't even look at the color values in those files, just the color index of the pixels. (By the way, what *are* you using to edit the 8-bit images? That could affect getting bad pixels.)

Yes, but you must open it in notepad++, there is no visible difference between a working and malfunctioning adjacencies.csv in excel.

I was editing my terrain and river files in adobe photoshop CS2, the free one. Bad pixels likely cropped up when I made a layer mistake or forgot to turn of antialias for a moment and thought I'd fixed them afterwards. I had 5 incorrect pixels scattered across the image, none of them near each other.

Color index would also work for identifying bad pixels. I don't know why my image didn't seem to like 155/155/155 however.
 
I was editing my terrain and river files in adobe photoshop CS2, the free one. Bad pixels likely cropped up when I made a layer mistake or forgot to turn of antialias for a moment and thought I'd fixed them afterwards. I had 5 incorrect pixels scattered across the image, none of them near each other.

Color index would also work for identifying bad pixels. I don't know why my image didn't seem to like 155/155/155 however.
I haven't used PS in years. But it may be that once an indexed image is loaded, PS treats it simply as 24 bit color while editing, and converts it back to indexed on save. I know of at least one other graphic editor that does that. Thus, if you accidentally make a bad pixel while editing, it may and it to the index palette on save.

I suppose bad pixels could be spotted using the histogram function, but they might be hard to see if there's only a handful.
 
I'm trying to make a total conversion mod, and everything works fine, characters, provinces and landed titles, but when the game loads, it crashes and this is in the error log. What causes this?


Code:
[character.cpp:27444]: Character ' of ---(0)' has invalid culture
[character.cpp:27448]: Character ' of ---(0)' has invalid religion
[character.cpp:10839]: Failed to generate first name for a male of the noculture"
[character.cpp:10839]: Failed to generate first name for a male of the noculture"
 
Ummm i have a problem. The game crashes upon creating rivers and the error.log says

[map.cpp:745]: Strait First Parameter Not Valid! Line: 2

and then bunch of stuff about lands like:

[bookmarks.cpp:253]: k_france is not a valid title.
file: dlc_metadata/dlc_characters/00_dlc_characters.txt line: 5
[bookmarks.cpp:253]: k_lotharingia is not a valid title.
file: dlc_metadata/dlc_characters/00_dlc_characters.txt line: 24
[bookmarks.cpp:253]: k_lombardy is not a valid title.
file: dlc_metadata/dlc_characters/00_dlc_characters.txt line: 43


which i think is irrelevant here.

What does that mean? The Strait line bothers me
 
Ummm i have a problem. The game crashes upon creating rivers and the error.log says

[map.cpp:745]: Strait First Parameter Not Valid! Line: 2

and then bunch of stuff about lands like:

[bookmarks.cpp:253]: k_france is not a valid title.
file: dlc_metadata/dlc_characters/00_dlc_characters.txt line: 5
[bookmarks.cpp:253]: k_lotharingia is not a valid title.
file: dlc_metadata/dlc_characters/00_dlc_characters.txt line: 24
[bookmarks.cpp:253]: k_lombardy is not a valid title.
file: dlc_metadata/dlc_characters/00_dlc_characters.txt line: 43


which i think is irrelevant here.

What does that mean? The Strait line bothers me

Your strait first parameter issue is caused by your adjacencies csv having unused lines. I talked about the exact details above, but basically it comes down to deleting empty lines in the csv using notepad++. Excel cannot or does not show these empty lines so even if it looks fine in excel it's still very possibly broken.

The other stuff is indeed probably irrelevant, invalid titles come up when you launch full vanilla. If it's still breaking after fixing the straits have a long look at your other map files (terrain etc) and set as many as possible to blank.

I'm trying to make a total conversion mod, and everything works fine, characters, provinces and landed titles, but when the game loads, it crashes and this is in the error log. What causes this?


Code:
[character.cpp:27444]: Character ' of ---(0)' has invalid culture
[character.cpp:27448]: Character ' of ---(0)' has invalid religion
[character.cpp:10839]: Failed to generate first name for a male of the noculture"
[character.cpp:10839]: Failed to generate first name for a male of the noculture"

It looks like your example character is wrong in some way. I'd say it's because you've cited a religion or culture incorrectly, but it looks more like they just don't exist. Copy the instructions in this thread exactly and see if that fixes it.

I'm not sure what you mean by "everything works fine, characters, provinces and landed titles" when the error report is quite explicitly saying that characters are broken and the mod as a whole clearly isn't working fine. Do you mean it boots cleanly? When does the crash occur?
 
Last edited:
  • 1
Reactions:
Hi,
So here is my problem. I generated a map with map generator and copy pasted all map files into the mod that I am working on.
Then I started to define my province with the color code in definition.csv, and created the history files for "titles, characters, and provinces." I am seeing the black two titles that I created on my map and there was no CTDs so I assumed that everything is fine.
Problem: But when I assigned a character to these provinces it remained black in-game and no matter what I do it remains black and shows no character.
Any idea what is causing this problem?

more information:

provinces.csv
province;red;green;blue;x;x
1;43;12;188;Ala;x
history/province
# 1 - Ilithin

# County Title
title = c_ilithin

# Settlements
max_settlements = 2
b_luthurin = temple
b_athanveth = city


# Misc
culture = norman
religion = catholic
history/titles
1066.9.15={
holder = 110638
}
landed_titles
k_ilithin = {
color={ 180 180 180 }
color2={ 255 255 255 }

d_ilithin = {
color={ 228 53 53 }
color2={ 216 216 84 }

capital = 1 # Trier

c_ilithin = {
color={ 255 80 80 }
color2={ 200 50 50 }

b_luthurin = {
}
b_athanveth = {
}
c_atur = {
color={ 255 80 80 }
color2={ 200 50 50 }
}
}
}
}

mod_path

name = "Asur: Asuria"
path = "mod/Asuria"

user_dir = "Asuria"

replace_path = "history/characters" #with or without, it doesn't work
replace_path = "history/provinces"
replace_path = "history/titles"
replace_path = "common/traits"
replace_path = "common/landed_titles"
 
Hi, my game fails to load up and always crashes at "Loading Graphics" I've guarenteed thst all my .bmps are uniform and correctly formatted, my error log ends with "[virtualfilesystem.cpp:753]: Could not open file: gfx/flags/flagfilescolor.txt, error: filename is illegal or insecure". And above that it is a mess of Duchies not found etc.. Any help would be immensely appreciated.
I'm running into this issue. Do you remember how you were able to fix it?
 
hello, I followed the steps and my game crash on loading database, this tutorial need a update? pls somebody help me
The tutorial is definitely still working. You need to go through it exactly, and then make changes for your own map. "Loading database" is not enough of an error report.

Edit: For posterity and to provide a point to this necro/reply to an old post, unless Paradox suddenly brings out a new ck2 update (unlikely at this point since I'm pretty sure active development is over) this tutorial should always work.
 
  • 1
Reactions:
does anyone know why is my provinces looking like this?
 

Attachments

  • Screenshot (6).png
    Screenshot (6).png
    3,4 MB · Views: 0
Hey !

I am currently trying to make a total conversion map mod for ck2, but when trying to launch the game to test my thing, it just crashes in the loading screen without error messages. Is someone able to tell me what might be wrong ?

I have attached a zip file containing the little i've done so far.

Thanks in advance !
 

Attachments

  • MytasMod.zip
    1,7 MB · Views: 0