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

Carlberg

Lead Environment Artist - CKIII
Paradox Staff
40 Badges
Oct 17, 2014
221
2.286
  • Crusader Kings II
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Paradox Order
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Magicka
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Cities in Motion 2
  • Dungeonland
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Art of War
  • Shadowrun: Dragonfall
  • Magicka 2: Ice, Death and Fury
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris Sign-up
  • Shadowrun Returns
  • Magicka 2
  • Shadowrun: Hong Kong
  • Prison Architect
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • The Showdown Effect
  • Europa Universalis IV
Hello! Art Lead reporting in with some quick answers to the new Map Editor. We're looking into creating some more comprehensive guides in the future, but for starters I'm here to start off with a few instructions on how to start using the map editor for those of you starting out with map mods.

Known Issues
- Files in the common/defines folder cannot be modded right now, as they're overwritten by the game. (We're looking into enabling this in a future patch.)

Editor Basics

Starting the Map Editor
If in-game you can write the console command
Code:
map_editor

However we recommend starting the game straight into the editor, since this leads to less issues as less unused game components are loaded.
  • If running via Steam, start the game with -mapeditor as launch option.
  • Otherwise, create a shortcut to the .exe with -mapeditor added in the target. Rename the shortcut to Mapeditor for ease of use.

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.
  • Note that the map can act weird at first when creating a new one from scratch. Put in your own heightmap in heightmap.bmp, then do an export, restart the editor, that should create a new set of files and align everything.
  • \game\gfx\map contains most texture and detail maps related to the map.
    • There are a lot of mask files that are used to tell textures and props where they are to exist. These files must have the same dimensions as the heightmap
    • If you're starting out from scratch I recommend you mod your masks to be entirely black, thus not giving any data to your blank map.

Clearing the height map data for a clean start
  1. Open game/map_data/heightmap.bmp
  2. Fill the bmp with a block of #292929 grey if you want it flat just above water level, #000000 if you want everything at the bottom of the ocean as a base.
  3. Start game with launch option -mapeditor, as the previous change might be too volatile to do from the games console.
  4. Things are probably looking really weird, go toheightmap resolution (shortcut 4) and then press the repack button on the top-bar. Choose your desired resolution tile size (33x33 is the standard)
  5. Done! Remember to press ctrl+s to save this blank state. Then press the export button to make it create the optimized files used by the game. (indirection and packed heightmap, game never uses the heightmap.bmp alone)
  6. As you work and give the world more geometry, or replace it with an external heightmap, remember to repack again to keep each square optimized for its amount of details.
You could load a pre-made heightmap right away, but it'll look chaotic until you do a repack.

How to change the location, width etc. of rivers.
A couple of rules about rivers.bmp:
  • White represents land, pink represents the ocean. Mostly a guide to allow ease of identifying coastlines and dont affect rivers themselves.
  • Rivers uses a gradient of blue and green colors to denote the width of the river. Green colors are wider, blue are thinner, brighter variants are wider, darker thinner out of those.
  • Use the only the width colors already in the river file.
  • Rivers start at a green dot (0, 255, 0)
  • Rivers connects to other rivers as a tributary at a red dot (255, 0, 0)
  • River can diverge at a yellow dot (255, 252, 0)
  • Diverged rivers cannot rejoin with red dot, this causes errors.
  • In a river system only the main unbroken river should have a green starting dot.
  • Every pixel in a river needs to connect to another to form an unbroken line.
  • No pixel can have more than 2 connecting pixels. Except when a river connects or diverges. Doing so will cause an error or crash.

Saving your map
There are two save commands in the editor, found in the top right.
The regular save button saves the editor changes to the data files and mesh object locations.
The export button pushes the changes to the more compressed data files that the game uses. A successful export means that this button will turn white and disable until new changes are made.

Sometimes a regular save will trigger an export too, we are maybe looking at merging the two into one in the future. If you cant export, try making a minor change in the world and try again.

Turning off the editor
There is no exit button, you're here forever!

Just kidding, on a serious note though we dont have an exit button, just press Alt+F4. But don't worry though, if you have unsaved changes it will tell you and give you an opportunity to save before losing the changes.

Edit: There is an exit button now.


Adding new content

I want to add my own texture materials
New terrain textures can be added in \game\gfx\map\terrain
We're using the Metalness-Roughness PBR workflow.
  • You will need 3 .DDS textures, a diffuse texture, a normal texture, a properties texture and a mask that you add to the above mentioned folder.
  • Material.settings is the file where you add new terrain layers with script, link in your new textures here.
  • Settings.terrain controls data for how all materials act globally, like how they blend, tile and such.
  • The mask.bmp file needs to be the same size as the heightmap.bmp
The texture files have some texture channels switched around, channels refering to Red, Green, Blue, Alpha.

Texture -> Data

Diffuse RGB - RGB
Diffuse A - Material heightmap, used for blending.

Normal R -> Normal R
Normal G -> Normal R
Normal B -> Emissive (fill black, unless you like self illumination)
Normal A -> Normal G

Properties R -> Unused
Properties G -> Specular intensity - Used sparingly on metallic surfaces.
Properties B -> Metalness
Properties A -> Roughness


Note! - After adding a new texture you will need to re-export the map for the optimized detail maps to be updated. Otherwise the games textures will offset and you'll get snow instead of grass or the like.


I want to change the dimensions of the map to another shape


Even though this doesnt work without changing the game defines manually, here's how to try it out:

00_defines.txt

Code:
NJominiMap = {
#Dimensions needs to be the chosen resolution, -1 unit
    WORLD_EXTENTS_X = 8191
    WORLD_EXTENTS_Y = 25.5
    WORLD_EXTENTS_Z = 4095
    WATERLEVEL = 3.9
}

00_graphics.txt

Code:
#The following data points control the extent of the surround map/clouds
    SURROUND_MAP_INNER_RECT = { 700.0 900.0 7700.0 3600.0 }             #x-start, y-start, x-end, y-end
    SURROUND_MAP_OUTER_RECT = { -10000.0 -10000.0 20000.0 20000.0 }        #x-start, y-start, x-end, y-end

I want to change the clouds surrounding the map
Open \game\gfx\map\surround_map
There will be a file there called surround_mask.dds
It controls the extent of the surround cloud and is rendered within a square, but has a central exclusion zone so it's not rendering for the whole center area at all times. Below there is a picture explaining the outer and inner squares.

Adjusting the size of these squares were handled in the post above on how to change the map dimensions.

index.php

I'll add more instructions here over time, but this should be the basics to map creation.

Also, if you have any specific actions you'd like more explanation on, quality of life improvements or feature suggestions, feel free to share those too. The Map editor will be evolving along with Imperator.
 
Last edited:
  • 3Like
  • 2
Reactions:
I'm thinking about editing the political map mode to be more EU4 alike. What I want to do is that the strategic map feels like a true map, I'm trying to replicate the same map and textures when it's zoom out to when it's zoomed in. Also altering the ocean texture to be more flat, again, in a similar way that appears when zoomed out and the mountain textures to be more Lord of the Rings(representing drawings).
Could I receive any guidance?
I'm just starting with modding paradox games so I appologise for being a bit boring with this questions.
 
I'm thinking about editing the political map mode to be more EU4 alike. What I want to do is that the strategic map feels like a true map, I'm trying to replicate the same map and textures when it's zoom out to when it's zoomed in. Also altering the ocean texture to be more flat, again, in a similar way that appears when zoomed out and the mountain textures to be more Lord of the Rings(representing drawings).
Could I receive any guidance?
I'm just starting with modding paradox games so I appologise for being a bit boring with this questions.
Hmm, well I would need to make sure that I'm understanding everything correctly.
We usually refer to the zoomed out map as the strategic map or the 'flatmap' (named so in \game\gfx\map\textures) and it takes over when you zoom far out enough.
Are you referring to changing this texture into another? Or to keep the visual of the world even when you've zoomed out further?
 
I'm thinking about adding the 'flatmap' texture when you also zoomed in (to the point where you can see the armies).
What I pretty much want to do is to simplify the map texture to be a bit less demanding when you're zoomed in.
In this link :
https://forum.paradoxplaza.com/forum/index.php?threads/perfomance-map-mode.1170592/
there's a post with a screenshot, for example you can notice that the ocean texture is not so detailed (when zoomed out) as it is when it's zoomed in with all the animation etc...
That's what I wish to make a better representation of a physical map when it's zoomed in
 
I'm thinking about adding the 'flatmap' texture when you also zoomed in (to the point where you can see the armies).
What I pretty much want to do is to simplify the map texture to be a bit less demanding when you're zoomed in.
In this link :
https://forum.paradoxplaza.com/forum/index.php?threads/perfomance-map-mode.1170592/
there's a post with a screenshot, for example you can notice that the ocean texture is not so detailed (when zoomed out) as it is when it's zoomed in with all the animation etc...
That's what I wish to make a better representation of a physical map when it's zoomed in
We'll continue this specific discussion in your thread :)
 
Currently mods cannot overwrite define files
Does this mean that the 00_defines.txt isn't read at all in mods? Testing to mod the START_DATE, fails (bug report).

00_graphics.txt
Code:
#The following data points control the extent of the surround map/clouds
    SURROUND_MAP_INNER_RECT = { 700.0 900.0 7700.0 3600.0 }             #x-start, y-start, x-end, y-end
    SURROUND_MAP_OUTER_RECT = { -10000.0 -10000.0 20000.0 20000.0 }        #x-start, y-start, x-end, y-end
Is it possible to not have any outer rectangle? For example if one want to create a round earth map, i.e where x-start is adjacent to x-end (like in eu4, vic2..), one would not like a surrounding rectangle.
 
Does this mean that the 00_defines.txt isn't read at all in mods? Testing to mod the START_DATE, fails (bug report).


Is it possible to not have any outer rectangle? For example if one want to create a round earth map, i.e where x-start is adjacent to x-end (like in eu4, vic2..), one would not like a surrounding rectangle.
Indeed, 00_defines.txt isn't read at all right now, we've got a ticket at fixing that, but currently our tech people are hard at work on release support. The surround map is also handled inside a define file, but i dont think you cannot leave the inner rectangle out. Currently we cannot have a world that connects east and west at the date-line, as that's a functionality we're currently missing in the Jomini part of clausewitz. Sadly not something we can flick on with a switch right now, but might come in the future (no promises on my end since it's another dept. working on things like that).

To just give a quick visualization to show how the cloud rectangles and mask works right now
upload_2019-4-26_17-23-52.png
 
Been struggling to get this working correctly unfortunately.

I've created a mod with a new hieghtmap.bmp in map_data and tried launching the editor. It appears it may be working as the map looks all blocky, wonky and weird. I make a tiny adjustment, save and export, then alt-f4. There's no new files in the mod folder, just the poor lonely heightmap.bmp file.

I thought that maybe it had exported over the vanilla game but all those files are the same too.

I then thought I may need the rest of the vanilla map files in the mod folder for it to overwrite properly so I copied them across to my map_data folder and did the same process but the same thing happens. I don't get any errors when saving or exporting, the export button goes white, but nothing changes in the compressed files at all.

Any idea where I'm messing up?


EDIT:

Okay I figured it out! It was quite simple in the end, I just had to enter the heightmap resolution tool and click on 'repack' at the top of the screen and choose a resolution, that makes the map appear as it should.

DD8CCA8C65640863B004F902153A4B104E985FA7


Only issue now is that it saves over the original game files rather than files in the mod. In this example I had black masks for all terrain textures in my mod folder. In the editor I painted the entire map with European Mountains texture. Once I saved, exported and quit, all the mask files in my mod folder were unchanged (including the mountain one), yet all the masks in my vanilla game folder were now black except the mountain one being completely white.

My next question is how do I force the editor to save over the mod rather than vanilla files?


EDIT 2:

One more problem to add to the list. After the vanilla game got all the changes to the map files that I wanted, I coped them to my mod and redownloaded the game to get it back to vanilla. When I try playing my mod the world shape is there but all of the vanilla texture masks are active. If I go into the editor though, it uses the modded files and the texture masks are how they should be.

So last question for now, is how do I get the actual game to read the modded texture masks and not just the editor?
 
Last edited:
Only issue now is that it saves over the original game files rather than files in the mod. In this example I had black masks for all terrain textures in my mod folder. In the editor I painted the entire map with European Mountains texture. Once I saved, exported and quit, all the mask files in my mod folder were unchanged (including the mountain one), yet all the masks in my vanilla game folder were now black except the mountain one being completely white.

My next question is how do I force the editor to save over the mod rather than vanilla files?


EDIT 2:
One more problem to add to the list. After the vanilla game got all the changes to the map files that I wanted, I coped them to my mod and redownloaded the game to get it back to vanilla. When I try playing my mod the world shape is there but all of the vanilla texture masks are active. If I go into the editor though, it uses the modded files and the texture masks are how they should be.

So last question for now, is how do I get the actual game to read the modded texture masks and not just the editor?

1. We're currently testing a way for the editor to export to the mod folders instead of the base game. It will probably come with a patch in the future once our tools programmers have finished it. For now the workaround is moving the created data from the game to the mod.
2. Did you also move the detail_index and detail_intensity to the mod folder?

so, what the map projection of IR map? It is obviously a conic map projection, while I wish to know more about it so I can make a good addition on this map....
The base is a mercator projected heightmap from Nasa, but it's been stretched and curved on it's eastern half to make Arabia, Persia and India less squished. Thusly, india points a but more eastward on the actual heightmap.
 
The base is a mercator projected heightmap from Nasa, but it's been stretched and curved on it's eastern half to make Arabia, Persia and India less squished. Thusly, india points a but more eastward on the actual heightmap.
Wait!!!!! soooo, IR doesnt have used a conic map projection like Lambert or Albers or an Equidistant ones, but just curves the Mercator ones....
I am going to mad, to be honest.

So, whether there could be any parameters about IR map that can be shown to us?

Wait ,if whether the height map is found from there? https://visibleearth.nasa.gov/view.php?id=73934.
This is not a map of mercartor map projection.
 
I have a feeling that the game camera constantly turning to face north (on default settings, which most players won't change) will cause issues with a lot of maps made by modders that dont account for the real shape of the planet. Is there any way to disable that on the mod-end?

EDIT:

I have found this in the Jomini directory, in defines, under the file "camera.txt"
NCamera = {
DEBUG_WIDTH = 400
DEBUG_HEIGHT = 800
DEBUG_TOP = 100
DEBUG_SHIFT_FROM_LEFT = 300
}

does DEBUG_SHIFT_FROM_LEFT control the amount of camera rotation as longitude changes?
 
Last edited:
1. We're currently testing a way for the editor to export to the mod folders instead of the base game. It will probably come with a patch in the future once our tools programmers have finished it. For now the workaround is moving the created data from the game to the mod.
2. Did you also move the detail_index and detail_intensity to the mod folder?


The base is a mercator projected heightmap from Nasa, but it's been stretched and curved on it's eastern half to make Arabia, Persia and India less squished. Thusly, india points a but more eastward on the actual heightmap.

I hadn't copied over the detail_index and detail_intensity files, that was most likely the problem then, thanks! I'll try it out when I'm home and let you know if I encounter any more issues.
 
I have a feeling that the game camera constantly turning to face north (on default settings, which most players won't change) will cause issues with a lot of maps made by modders that dont account for the real shape of the planet. Is there any way to disable that on the mod-end?

EDIT:

I have found this in the Jomini directory, in defines, under the file "camera.txt"


does DEBUG_SHIFT_FROM_LEFT control the amount of camera rotation as longitude changes?

What you're looking for is in .../game/common/defines/graphic/00_graphics.txt. Look for the NORTH_POLE keys - you set a western north pole, and an eastern north pole, and specify where the shift happens, if you want it to.
 
What you're looking for is in .../game/common/defines/graphic/00_graphics.txt. Look for the NORTH_POLE keys - you set a western north pole, and an eastern north pole, and specify where the shift happens, if you want it to.
NORTH_POLE_X = 1195.0
NORTH_POLE_Y_WEST = 8700 # european pole coordinate = ( X, Y_WEST )
NORTH_POLE_Y_EAST = 13920 # indean pole coordinate = ( X, Y_EAST )
NORTH_POLE_EAST_ANGLE = 0.64 #in radians. 0 when directly south of the european pole, roughly 0.65 in india. When the camera angle to the european pole is greater than this, the camera will face the indean pole
So, setting NORTH_POLE_EAST_ANGLE = 0.0 should make it not change direction at all. Hmm, I'll have to test it out once the defines weirdness gets fixed. Thank you!

EDIT: currently does nothing to camera rotation if base game files edited.
 
Last edited:
EDIT: currently does nothing to camera rotation if base game files edited.

I misread what you wrote - I didn't see that you wanted to disable it, not change it (setting that value to 0.0 would make the map always use Y_EAST I think - I've tested setting Y_EAST the same as Y_WEST, and EAST_ANGLE to 0.0 for a static north).
 
How do I edit the map w/o saving it to the game folder?

I'd like to run the map changes as a mod.
 
How do I edit the map w/o saving it to the game folder?

I'd like to run the map changes as a mod.
If you look up a few posts you'll see a dev responded to me about this, apparently they are working on enabling saving to mod rather than saving over the vanilla files. For now you just have to copy the files from the vanilla game to your mod folder once you've made the changes. Not a huge deal really.

Might be worth copying the whole game to another directory simply for modding purposes if that works
 
If you look up a few posts you'll see a dev responded to me about this, apparently they are working on enabling saving to mod rather than saving over the vanilla files. For now you just have to copy the files from the vanilla game to your mod folder once you've made the changes. Not a huge deal really.

Might be worth copying the whole game to another directory simply for modding purposes if that works

Okay, thanks. I missed the dev response.

Seems the easiest would be to just make a second copy of the game then as you said.