• 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.
Since I tried some map modding again today, and I got frustrated by all the crashes and what not it generated, let me collect the crashes and issue's I've run into. It might help other people trouble shoot, as well as Paradox fix some of the issues:

Loading freezes briefly at 5-9% and crashes later
Issue: There is a province which has not been assigned an area/region
Fix: Make sure all provinces are assigned to an area/region

Loading freezes briefly at 15-19% and crashes later
Issue: setup/main/00_setup.txt file is bugged, probably an illegal trade route.
Fix: Make sure all trade routes originate in a colonised province and have a valid trade good. It may also be necessary that there is a tradable surplus of the trade good.

Loading freezes briefly at 25-29% and crashes later (40-50%)
Issue: A province is missing a history file/entry in the setup/provinces/ folder. Uncolonisable/wasteland provinces also require a history file. If that is not it, it is likely a stray pixel somewhere.
Fix: Good luck finding it. Best solution is probably to re-add all new provinces one by one until you hit a crash. Alternatively you could define some additional provinces and see what pops up. Sometimes the /documents/paradox interactive/imperator/crashes/ folder will tell you what pixel is undefined. Sometimes it wont.

Loading freezes briedly around 30% and crashes later (40-50%)
Issue: an invalid entry in the history file.
Fix: See above. My latest one was because I had copied the template of a colonised province for an uncolonised province. An uncolonisable province requires a real barebones history entry or it will result in a crash. Like so:
Code:
8091={ #Dirphys Mons
    terrain=""
    culture="euboean"
    religion="roman_pantheon"
    trade_goods=""
    civilization_value=6
    barbarian_power=0
    province_rank=""
}

The game finishes 'generating the world from history', but does not progress beyond 100% into 'loading savegame'
Issue: There is an issue reading a setupfile. In my case always either missing a " somewhere, or using an invalid argument such as:
Code:
    tribesmen={
        slaves=1
    }
Fix: Re-add the history files one by on until you hit the offending file. If it concerns newly added provinces, create a generic history (one which you know works) for the new provinces as placeholders until you overwrite them.

Unable to generate a new roads.roads file.
Issue: The game gets stuck on generating debug output (or generating ui?)
Fix: Revert to 1.3 and generate the roads.roads file there. Copy it over to your mod.

Unable to edit the heightmap.
Issue: The game loads both the modded as well as the vanilla heightmap, making terrain modding difficult if not impossible.
Fix: I have none. And it sucks.

These are all based on my own experiences. Your own experiences may vary.
 
  • 6Like
Reactions:
hi, i'm getting a crash and need help:

what i've done.
1. created an empty mod and added my heighmap.bmp in the map_data folder
2. repacked in the editor and exported so i have my packed_heightmap.
3. added a custom definitions.csv and provinces.bmp files

now when i launch i get a crash and this error:
[22:07:16][mapgenerator.cpp:362]: The map contains colors not present in the province definitons file. This will cause the game to go out of sync in multiplayer.
[22:07:16][mapgenerator.cpp:363]: Undefined colors: (0 0 0)

anything i could try to resolve this?
 
  • 1Like
Reactions:
Well the provinces file needs to be in the .png format (just like the heightmap and rivers files).

Secondly every province needs to have a history file in the game/setup/provinces directory. Make sure your new provinces are accounted for there.
 
  • 2Like
Reactions:
I'm having trouble importing a heightmap. Every heightmap I try to import comes in solid black and the importer doesn't detect any differences for me to be able to select. I've tried with several different files, including the game's original heightmap file. I've only seen one other person comment about this and somehow it was resolved magically for them. Any direction would be greatly appreciated.

[Edit]
FYI, for anyone coming back to this with the same problem. My issues was the png bit encoding. My preferred software was automatically setting the bit encoding to 32 bit. The heightmap must be in 16 bit encoding. I was able to find the encoding by going to the file's properties and going to the Details tab and looking for Bit Depth. I use Clip Studio because it has a similar set of functionality and interface to Photoshop, but isn't a recurring fee. However, it doesn't include the ability to set different encodings for .pngs. I was downloaded GIMP just for the encoding change feature.
 
Last edited:
Hello, I would like to know if there is a way to regenerate the road.road file in present version. (1.5.*)
I tried to generate the road as described in this thread, but it doesn't seem to work, because the console shows "unknown command" for the commands I wrote (Roads.GenerateAssets).

Then I tried to use the mapeditor's spline tool, but once I clicked on "rebuild NavMesh", the editor would get stuck and would not generate a new file. I also tried to generate roads without any mods, which means it's totally vanilla game, but the result was the same.

I've tried reverting to 1.3, which generates the original map's roads.roads file normally as this post says, but my mod doesn't work on 1.3 for some reason.
 
Unfortunately I have the exact same problem. Even down to trying to revert back to 1.3 being problematic (I guess I know why, but it is so much work to make the mod compatible with 1.3).

Lets just hope Paradox manages to fix this in 2.0.
 
  • 1Like
Reactions:
Map Editor crashes without an error.
So what happened - I made some changes to the provinces.png file. Mostly changed province borders. Due to that I have some forts and rally points out of place. Last time I used it, the day before, I changed some out of place fortressed and troops bounding boxes via Editor. This is the last log before the crash happened. It is a game crash report, not an editor crash report:

[18:02:18][map.cpp:691]: Port for [5288] is set to non-adjacent 652.
[18:02:27][gameobjectlocators.cpp:340]: Map object locator [fort:908] is too far outside of its province's bounding box
[18:02:27][gameobjectlocators.cpp:340]: Map object locator [fort:1433] is too far outside of its province's bounding box
[18:02:27][gameobjectlocators.cpp:340]: Map object locator [fort:1452] is too far outside of its province's bounding box
[18:02:27][gameobjectlocators.cpp:340]: Map object locator [unit_stack:1241] is too far outside of its province's bounding box
[18:02:27][gameobjectlocators.cpp:340]: Map object locator [unit_stack:1433] is too far outside of its province's bounding box
[18:02:27][gameobjectlocators.cpp:340]: Map object locator [vfx:5158] is too far outside of its province's bounding box
[18:02:27][gameobjectlocators.cpp:340]: Map object locator [vfx:5341] is too far outside of its province's bounding box

So now, when I start the editor it crashes without an error every time. I disabled all mods. Doesn't work. Now, what's really strange is that I completely emptied the Documents/Paradox/Imperator folder, I reinstalled the game, and it still crashed without an error. After I reinstalled, I loaded the game once, just to make sure everything is in place. Then I started the game with -mapeditor command from steam. Crashed without an error. Started with debug_mode and added the command in game. Same results every time - no error, error log is empty and I have no idea what to do.

Any ideas? If this persists what file need I edit to move things around manually (like the buildings.txt inside HOI4/map). I could try and add some X/Y coordinates manually inside there. but no idea where that is or what it's name is. Thanks!

Edit: Editor works again. No idea what makes it work now, but it does.

Edit2: How do I edit the VFX locators? It says two of them are out of place, outside the province box, but I can't seem to get to manipulate them inside the Editor.

Edit3: OK, I figured it out. I manually changed the X/Y coordinates in the vfx_locators file by using debug mode in game to get the right coordinates on the map. It worked.
 
Last edited:
I cannot, for the life of me, manage to navigate the process of getting a blank map set up in game without it being extremely cluttered or causing crashes. Would anyone familiar with this process be willing to help me set up a blank map so that I may get into detailing and setting up provinces? I have most of the image files ready and working but I'm not quite sure what to do beyond that until I get past setting up the physical terrain. This seems much different from HoI 4 map modding.
 
So I'm trying to learn how to map-mod, attempted to create a basic test map with a single province. It's stuck loading infinitely with no errors, I'm totally stumped.
I've got my:
  • provinces.png
  • definitions.csv
  • areas
  • regions
  • province setup
Am I missing anything? Double checked every piece of advice in this thread, still no dice. What do? (mod files attached)
 

Attachments

  • Maptest.7z
    93,1 KB · Views: 0
Oke, that is interesting. It seems to me that it then tries to load a file into memory, but fails to do so.

I noticed that the Maptest\setup\main\00_default.txt is empty. Have you tried putting some data in there? Maybe the game expects data there, and the lack off it causes issues?
 
Map objects are very tricky. While adding provinces I found the oddity of a province without one of the four objects. It had siege, combat, unit stack and... no "buildings". How odd, I say to myself. Let's fix it by auto-spawning it. No luck. What's worse, now I cannot save the map mod, a big red exclamation point besides each of the four locator files says "save failed".

"One or more files contain errors".

Damn. What can I do? I tried adding in a new object by pressing the button "add new object", but then this object did nothing and gave further errors... does anyone know a way out of here?
 
In my understanding you cannot save to the mod directory, and instead have to save the base game directory and then copy the modded files into the mod directory.

In regards to added the objects; the game automatically adds missing objects to the relevant provinces into a seperate file. You can copy the relevant entry from there into the locator file from your mod and then put the object in the correct position via the map editor.

Alternatively you can add your own entry into the locator file, guestimate where the object should be, and the properly place it using the map editor.

So far I haven't been able to get the spawn objects button from the editor to work.
 
In my understanding you cannot save to the mod directory, and instead have to save the base game directory and then copy the modded files into the mod directory.

In regards to added the objects; the game automatically adds missing objects to the relevant provinces into a seperate file. You can copy the relevant entry from there into the locator file from your mod and then put the object in the correct position via the map editor.

Alternatively you can add your own entry into the locator file, guestimate where the object should be, and the properly place it using the map editor.

So far I haven't been able to get the spawn objects button from the editor to work.

Thanks, I copied the locations file the game created and it worked.

If the "spawn objects" button doesn't work, how does one add new objects to a map?
 
By making use of the generated files, or by manually adding them to the locator files.

Yeah; it is a bit silly that the spawn objects button doesn't work (or at least; I haven't gotten it to work), but I guess we should be glad there is a decent map editor and some of the more annoying bugs (not being able to generate road files) did get fixed.
 
Can anyone further elaborate this?
Sure, excuse the Swedish OS text, but it should look similar in the English version of Windows

1649149461748.png


Alternatively I believe steam might also be able to do the same thing via the launch options if you do not wish to create a permanent map editor shortcut

1649149547033.png
 
  • 2Like
Reactions:
I'm trying to figure out an issue that causes me to crash. I changed the map, changed the masks, everything works properly on mapeditor en base game. Then I start implemanting my own provinces, my own countries, and I always get a crash with the same thing in the log

Code:
[01:35:56][gameapplication.cpp:138]: 1125 defines loaded
[01:35:59][pop_types.cpp:364]: First entry without promotion target: highest pop right set to: nobles

Found that other people had this issue on the IR mod coop discord, but no fix seems to be seen. I tried several time and just can't get the game to work with my own provinces and stuff because of that same issue. What is causing it ?
 
  • 1Like
Reactions: