• 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.
So, I'm trying to figure out what in provinces.bmp can cause the game to crash.

If I try to make a 'blank' map, or a one-province map, the game crashes. If I edit provinces.bmp too heavily, it crashes. I'm not entirely sure what I'm missing or if there is a mask file I am glossing over somewhere.
 
So I have been using the editor but having trouble with it, and am wondering if there is a way to deal with this?

http://prntscr.com/nl28qb As you can see the terrain itself is flat. But old province lines are raised where... the land was raised... this is basically how the map looks whenever I save and export the map then leave and come back. Did use a height map I made before to have a base to work from but this is quite odd. I don't even know where this stuff is exported if anywhere.

I wonder if this is just an issue because of my documents folder not being in C and paradox still not fixing that.
 
Last edited:
Short Answer: Theoretically yes

The way texture masks work may differ, but for the heightmap.bmp you certainly should be able to. Map polygon resolution may differ though.



It should be handled by the game itself, uncolonized provinces you need to rightclick to show all locators in map object mode.

If you changed the province layout you need to reset those instances.
  • Go to game/gfx/map/mapobjects/city_locators.txt and remove the relevant instances from the document. Leave any code not related to the instances be.
  • On next start the game will generate new ones in the provinces that are missing city instances.
  • Go to documents/paradoxinteractive/imperator/generated
  • In that folder there should be a new file containing the new regenerated data, with cities in the center of their provinces.
Been trying to get the City location working but failing. If I dont change the city_locator I get cities showing up all over the map, so they can appear. But when I try to add them manually one by one on at the center they don't appear where I put them according to Eye Dropper tool that shows some coordinates. Also tried the coordinates from the province.bmp.

Also they dont generate, I don't get any folder inside documents/imperator. Any idea what could be wrong?
 
So, I'm trying to figure out what in provinces.bmp can cause the game to crash.

If I try to make a 'blank' map, or a one-province map, the game crashes. If I edit provinces.bmp too heavily, it crashes. I'm not entirely sure what I'm missing or if there is a mask file I am glossing over somewhere.
Do you get any errors in documents/paradoxinteractive/imperator/logs/error.log?

So I have been using the editor but having trouble with it, and am wondering if there is a way to deal with this?

http://prntscr.com/nl28qb As you can see the terrain itself is flat. But old province lines are raised where... the land was raised... this is basically how the map looks whenever I save and export the map then leave and come back. Did use a height map I made before to have a base to work from but this is quite odd. I don't even know where this stuff is exported if anywhere.

I wonder if this is just an issue because of my documents folder not being in C and paradox still not fixing that.
Ah yeah, some of those changes you need to save and export, then restart for the editor to realize the changes. We've already fixed this in a newer build, that it updates in realtime instead, so it'll roll out in the future with a patch.

Been trying to get the City location working but failing. If I dont change the city_locator I get cities showing up all over the map, so they can appear. But when I try to add them manually one by one on at the center they don't appear where I put them according to Eye Dropper tool that shows some coordinates. Also tried the coordinates from the province.bmp.

Also they dont generate, I don't get any folder inside documents/imperator. Any idea what could be wrong?
Did you try this while running with
Code:
-develop
as a startup option?
 
Do you get any errors in documents/paradoxinteractive/imperator/logs/error.log?

Yes, but they're the same whether it runs or not:

Code:
[14:23:40][mapgenerator.cpp:295]: The map contains colors not present in the province definitons file. This will cause the game to go out of sync in multiplayer.
[14:23:40][mapgenerator.cpp:296]: Undefined colors: (0 0 0) ...
[14:23:40][pdx_packedheightmap.cpp:777]: Failed loading indirection map 'map_data/indirection_exalted_heightmap.bmp'

Then a thousand or so errors from decisions and events because I only have the null province defined (is there a replace_path equivalent?)

Code:
[14:23:50][jomini_effect.cpp:322]: Variable 'tutorial_enabled' is set but is never used
[14:23:50][jomini_effect.cpp:322]: Variable 'invention_purchased' is set but is never used
[14:23:50][jomini_effect.cpp:322]: Variable 'ach_alexanders_empire_var' is set but is never used
[14:23:50][jomini_effect.cpp:322]: Variable 'ach_new_kingdom_var' is set but is never used
[14:24:00][gameobjectlocators.cpp:139]: map object locator "city" is incomplete!
[14:24:00][gameobjectlocators.cpp:139]: map object locator "port" is incomplete!
[14:24:00][gameobjectlocators.cpp:139]: map object locator "fort" is incomplete!
[14:24:00][gameobjectlocators.cpp:139]: map object locator "unit_stack" is incomplete!
[14:24:00][gameobjectlocators.cpp:139]: map object locator "combat" is incomplete!

Then:

Code:
[14:24:01][province.cpp:619]: prov 1 has no default culture
[14:24:01][province.cpp:624]: prov 1 has no default religion
[14:24:01][province.cpp:619]: prov 2 has no default culture
[14:24:01][province.cpp:624]: prov 2 has no default religion
[14:24:01][province.cpp:619]: prov 3 has no default culture
[14:24:01][province.cpp:624]: prov 3 has no default religion

...so it seems to be making a province for every color.

Code:
[14:24:02][pdx_gui_shortcut_manager.cpp:208]: Failed finding shortcutname 'map_editor'
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/oak_tree_2_generator.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/pine_tree_areas.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/rock_generator.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/rock_red_generator.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/tree_africa_generator.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/tree_cypress_generator.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/tree_india_generator.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/tree_olive_generator.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/tree_palm_generator.txt' should be in utf8-bom encoding (will try to use it anyways)
[14:24:06][lexer.cpp:302]: File 'content_source/map_objects/generators/tree_persia_generator.txt' should be in utf8-bom encoding (will try to use it anyways)

And this triggers even in vanilla.

If I make a purely black province map, it is much the same, except instead of making several thousand provinces out of the void, I get:

Code:
[14:45:49][province.cpp:619]: prov 1 has no default culture
[14:45:49][province.cpp:624]: prov 1 has no default religion
[14:45:49][gfx_dx11_base_buffer.cpp:64]: D3D error (D:\jenkins\workspace\Sulla-Live-R-Steam-Windows\clausewitz\pdx_gfx2\DX11\gfx_dx11_base_buffer.cpp:64): hr returned: The parameter is incorrect.

[14:45:49][gfx_dx11_master_context.cpp:403]: Failed creating vertex buffer

I am fairly certain I am missing a mask somewhere, or that something isn't getting overwritten: figured this out, at least.

So far, I've been able to blank (in terms of images)

- Rivers, Terrain (it wants to load this but is it actually used?), and Heightmap in map_data
- gfx/map/water/foam_map.dds
- gfx/map/water/watercolor_rgb_waterspec_a.dds
- gfx/map/textures/flatmap.dds
- gfx/map/textures/colormap.dds (though leaving it as default for now)
- gfx/map/terrain/detail_intensity.tga (not sure what this does)
- gfx/map/terrain/detail_index.tga (ditto)

...essentially it seems to crash if it loses too many provinces (though they aren't defined in the first place. I haven't been able to find any rhyme or reason to it.
 

Attachments

  • 2019_05_06_1.png
    2019_05_06_1.png
    4,4 MB · Views: 45
Last edited:
Amusingly, it still loads if I rotate the map by 180 degrees... the original continent mask is still visible in the right orientation, so me missing whatever mask is causing that outline isn't what is causing editing the provinces file to crash.

2019_05_06_2.png

Edit, found the mask I was missing - foam_map.dds. It was hiding in low res.

Sweet blankness.

2019_05_06_3.png

Now to figure out why provinces.bmp is so picky.
 
Last edited:
[pdx_packedheightmap.cpp:777]: Failed loading indirection map 'map_data/indirection_heightmap.bmp'

My heightmap won't load in mod form, I used the editor to import and repack my heightmap but when I try to run it just shows ocean whenever I try to put the game folder files in a mod folder form.
 
[pdx_packedheightmap.cpp:777]: Failed loading indirection map 'map_data/indirection_heightmap.bmp'

My heightmap won't load in mod form, I used the editor to import and repack my heightmap but when I try to run it just shows ocean whenever I try to put the game folder files in a mod folder form.
Did you copy the indirection and packed heightmap to your mod as well, after saving and exporting in the editor?
 

Editing map data outside the editor


  • \game\map_data contains most data maps, like heightmap.bmp.
    • heightmap.bmp - The file that is used by the editor, black and white height data
    • heightmap.heightmap - Data file for heightmap
    • indirection_heightmap.bmp - Optimized file created by the editor on export, do not edit this manually.
    • packed_heightmap.bmp - Same as indirection file above.

Is there any way to create the indirection_heightmap.bmp and packed_heightmap.bmp outside the editor? The editor crashes for me when using dimensions larger than 8k x 4k (I understand it's not supported) and I'm wondering if there's a workaround I can use.
 
Is there any way to create the indirection_heightmap.bmp and packed_heightmap.bmp outside the editor? The editor crashes for me when using dimensions larger than 8k x 4k (I understand it's not supported) and I'm wondering if there's a workaround I can use.
None that i'm aware of, the two files are calculated in conjunction by the engine itself.
 
Right so I'm a bit of a noob when it comes to modding, and I can't figure out how to get this to work.
I'm trying to change the size of the map, so that it's taller than it is wide.
- I have changed the dimensions in the defines file.
- I have a heightmap of the correct size and I've replaced the provinces file with one of the correct size and completly black.
- I have changed all the mask files to be the correct size, and they're all black. Rivers and terrain files are also blank.
- I have changed the size of the surround_mask to be the correct size.

When I start the game however, it keeps crashing while loading at Init Map Graphics.
Am I missing something? Perhaps there some files I've forgotten to change, or is changing the map size not possible yet?
 
Right so I'm a bit of a noob when it comes to modding, and I can't figure out how to get this to work.
I'm trying to change the size of the map, so that it's taller than it is wide.
- I have changed the dimensions in the defines file.
- I have a heightmap of the correct size and I've replaced the provinces file with one of the correct size and completly black.
- I have changed all the mask files to be the correct size, and they're all black. Rivers and terrain files are also blank.
- I have changed the size of the surround_mask to be the correct size.

When I start the game however, it keeps crashing while loading at Init Map Graphics.
Am I missing something? Perhaps there some files I've forgotten to change, or is changing the map size not possible yet?
It's currently not possible to mod define files as they get overruled by the game. By the look of things this will be solved when our next major patch comes out.
 
None that i'm aware of, the two files are calculated in conjunction by the engine itself.

A few quick questions then if you don't mind:
1) How important are these two files? Will I get the same effect if I create a smaller version and then scale up to a larger version outside of Imperator? For example, would exporting a packed heightmap for an 8k x 4k map, then scaling it up in GIMP and resaving create the same effect?
2) What function do these two files play? I'm guessing the packed heightmap makes it load faster, but what does the indirection map do?
3) On a separate note, how/when are map locations generated? If I scale the map up later, will the entire coordinate system need to be redone automatically or will the coordinates not change if, say, the lower left corner is fixed?
 
A few quick questions then if you don't mind:
1) How important are these two files? Will I get the same effect if I create a smaller version and then scale up to a larger version outside of Imperator? For example, would exporting a packed heightmap for an 8k x 4k map, then scaling it up in GIMP and resaving create the same effect?
2) What function do these two files play? I'm guessing the packed heightmap makes it load faster, but what does the indirection map do?
3) On a separate note, how/when are map locations generated? If I scale the map up later, will the entire coordinate system need to be redone automatically or will the coordinates not change if, say, the lower left corner is fixed?

1. & 2.) Very.
The heightmap.bmp is used by the editor, but the game never actually reads the heightmap.bmp in the game due to it's humongous size. When the exporter saves the new files, it looks at the area resolution in the editor, and then cuts the heightmap into a set of smaller squares, the size depending on how much detail it needs. This becomes the packed heightmap. The indirection I'm not entirely privy to the exact function, but I believe it acts as the coordinates and resolution setting for the map. Both are vital and I'd never recommend trying to replicate them manually, for your own sanity's sake, as it'd be a nigh impossible task. You can edit the heightmap.bmp in GIMP and then load that into the editor, but you shouldnt edit the indirection or packed one after.

3.) Map locations, i'm assuming for the city, unit and etc. locators.
These are supposed to generate when a new province lacking these have been added, but there's also a few commands one can use if you're in -develop mode.
Code:
mapobjects.generategamelocators fort
mapobjects.generategamelocators city
mapobjects.generategamelocators combat
mapobjects.generategamelocators port
mapobjects.generategamelocators unit_stack

These would then end up in documents/paradoxinteractive/imperator/generated

If you change the map, then yes the coordinates will most probably be off. Nudging cities and other map objects into place is usually the last step in the process. If they're in entirely wrong positions, you can open the map object files and delete their instances, and they'd be possible to regenerate like above, they'd then appear in the center of their province.
 
Wow thanks for the detailed help! Is there a list of commands somewhere when you're in -develop mode? I haven't been able to find one so I've been resorting to restarting the game every time I update a file.

If you change the map, then yes the coordinates will most probably be off. Nudging cities and other map objects into place is usually the last step in the process. If they're in entirely wrong positions, you can open the map object files and delete their instances, and they'd be possible to regenerate like above, they'd then appear in the center of their province.

Does this include ports if applicable? Or does the game know to place those at the boundary of water and land?
 
Sorry for being redundant, but just to confirm, does this mean that (probably) with the June patch we'll be able to have custom map sizes?

Not necessarily. You can make the map bigger now by changing the base game files. However, doing so can cause the game to crash when loading the map editor. This just means that we'll be able to change the defines in the mod files and see the changes happen in game. Right now they are overwritten by the vanilla files.
 
Wow thanks for the detailed help! Is there a list of commands somewhere when you're in -develop mode? I haven't been able to find one so I've been resorting to restarting the game every time I update a file.

Does this include ports if applicable? Or does the game know to place those at the boundary of water and land?
Sorry for being redundant, but just to confirm, does this mean that (probably) with the June patch we'll be able to have custom map sizes?

Emper - Ports end up in the center of the province, so you'll probably need to double check which sea it connects to.

Torneberge - Probably, our programmers have had a look at the defines loading issue, so as long as that fix comes along with the patch, then map dimensions should become viable to mod. (Within supported parameters).
 
Hello.

Question about the vanilla map.

I merged the grey and color flatmap by using an alpha mask on the grey parts . I then merged the calcs, recreated bitmaps,and saved as DDS using a compression factor that made the file the same size as the original "flatmap.dds".

The game however will not load a save not started with this mod. And a save started with this mod cannot be loaded without it.

Yet achievements works.

Is there a trick to making the game consider the color map as not different from the grey map, allowing seamless activation/deactivation of the mod, or is it unavoidable ?

Thanks.