Greetings, fellow Paradoxians !
What I present you today is by no mean a mod, but a tool that will certainly help map-makers for Darkest hour. You might know it is pretty painful, when creating a new map, to go to each and every province to place icons, adjust several values and triple-check whether you really placed a river at the right place or that you did not inadvertedly pop a mountain in the middle of Poland. Well, rejoice !
This tool is being crash-tested by Eginhard for his World in Flames III : Origins mod. Let me tell you, he suffered quite a lot during development process but major bugs were squashed thanks to him.
DL link : https://www.dropbox.com/s/9k1t9wksf2btj1a/adjacency_maker.rar?dl=0
Summary
I. What does this tool do ?
II. What this tool DOES NOT do
III. How to use AM
IV. Known bugs
V. Quick Q&A
VI. Pics ?
VII. Notes
I. What does this tool do ?
AM loads your darkest hour map (which you have previously extracted, with Jamie's Map Maker for instance), allows you to place icons, set adjacencies and some provinces variables like resources, infra or IC. It then saves Province.csv and ajd-def.csv in a (theoretically) DH-friendly format.
II. What this tool DOES NOT do
- AM won't check the validity of your map (e.g. no search for stray pixels)
- AM does not allow to alter the map (use Paint.net instead)
- AM does not extract or compile the map (use Map Utility instead)
- AM does not guarantee that your map is DH-compatible (pray the Great Platypus of Sweden instead)
III. How to use AM
1. Copy you map
Before even launching the tool, you must copy your map files in the "maps" folder. There are some constraints :
- you need only ProvID files, where each province is one unique color. Granted, that's not much of a contraint
- your map name must have a specific format : map_X_Y where X and Y are two numbers (coordinates).
- your map files must have a path using this format : /maps/[map_name]/[map_name].ProvID.png
"map_0_45" is a valid map name, "crimea_river", "mega_city_1", "megacity_1", "map_1" "map_0_45_v1" are not
You should check that your map coordinates increment in a regular way, following settings.txt values. Default values are compatible with Map Utility and are :
- index_x = 117
- index_y = 45
With these values, your map names must be : "map_0_0", "map_0_45", "map_0_90"... "map_117_0", "map_117_45"... "map_234_0".
If you used Map Utility, you should be able to skip this step.
2. Recommendations
It is strongly advised to follow these steps :
a. Generate Global Map first. You won't go anywhere without that. It may take a few minutes to generate your map. Be patient.
b. Load your map. Choosing a map in the list will center the view on the top-left corner of that map. You'll be able to move out of this map without any problem. You don't have to load another map to work on another part of your map, just pan the view
c. Place City Locations first. Select "Set City Location" on the right and click on the map to set a province's city location. Do it for all provinces, including sea provinces. You can "mass click" on the map, you don't need to select "Set City Location" everytime. Also, the icon is automatically linked to the province you clicked on. When you're finished, click "No Tool".
City Location is used as a province's center to display terrain and climate icons, selection and hover icons as well as adjacencies between provinces. If this icon is not set, you won't see anything.
From there, you're free to place anything you want in the order you prefer.
Province.csv and ajd-def.csv are generated in the global_map folder.
3. Quick interface overview
A red star on a province means that province is selected, and its informations displayed on the left panel. A blue star designate the province the mouse is over. They are visible only when City Location is set.
a. Toolbox (right panel)
Each and every tool work like City Location : you can mass-click them and the value they set is automatically attributed to the province under your mouse pointer. "No tool" allow you to select a province without modifying any value.
Ports and beach icon appear in grayscale if the corresponding province does not have "Allow beach" and "Allow ports" ticked (left panel, see below)
b. Province parameters (left panel)
This panel allows a review of all province parameters. You can also adjust some of them ;
- area, region, continent, climate, terrain are pretty similar to their Toolbox counterpart, but changes only affect the selected province.
- "allow beach" enables amphibious landing on the province, and "allow port" give the possibility for ships to anchor in that province.
- "Set Sea Zone" : allows you to set in which zone ships leave the province. Just click on the sea zone you want. The zone ID, if it exists, is reminded next to the button.
- Resources, IP, MP, Infra
You'll also find province's Locations (city, AA etc.) at the bottom of the panel, but you won't be able to change them here. Use the appropriate tool instead.
4. Commands
- left click : apply current tool to the province under the mouse pointer or select tool.
- right click : open a list of adjacencies for this province. Click on an adjacency to delete it.
- center click : keep the button down and move the mouse to pan the map around.
IV. Known bugs
- none ATM, but they are somewhere in the dark, I'm sure-
Sill, save often and be ready for possible work-breaking bug. There are built-in backup features but I recommend to regularily save a copy of your global_map folder, just to be sure.
V. Quick Q&A
Q : I have a bug/crash/terrible error message of doom !
A : By all mean report it here but, please, provide informations, especially how to reproduce the bug when applicable. Screen of the bug may also help if stricly visual.
Q : There is a weird adjacency in the list, "regional box". What is it ?
A : It's a special adjacency, which is saved in adj-def-general.csv and not in DH's adj-def.csv. It is used by another program I'm developping, which draws borders for you. This second program is not ready yet.
Q : Ugh, those icons... Can't you do anything about that ?
A : As you can see I'm a terrible artist. If you have a set of better icons though, you should be able to mod the tool. Icons are in the eponymous "icons" folder and can be changed, as long as you keep ".png" format and don't change the name. You should be able to use bigger icons without breaking the program, too.
Q : This is weird, one of my adjacency points towards the north pole and not the province I've targeted.
A : The province you tergeted has no City Location set.
Q : I can't see any adjacency but I see them in the right-click menu !
A : Set City Location for both provinces
VI. Pics ?
Pics !
VII. Notes
My schedule is currently extremely tight, so I have no intention to develop new functionalities for AM. Bugfixing is of course another story, but it might be a tad slow.
There is a second program in development, which I intend to finish and release just like AM, that will allow you to generate your map's colorscale, tiles and border files from your ProvID files and adj-def provided by AM.
No ETA.
Have fun !
What I present you today is by no mean a mod, but a tool that will certainly help map-makers for Darkest hour. You might know it is pretty painful, when creating a new map, to go to each and every province to place icons, adjust several values and triple-check whether you really placed a river at the right place or that you did not inadvertedly pop a mountain in the middle of Poland. Well, rejoice !
This tool is being crash-tested by Eginhard for his World in Flames III : Origins mod. Let me tell you, he suffered quite a lot during development process but major bugs were squashed thanks to him.
DL link : https://www.dropbox.com/s/9k1t9wksf2btj1a/adjacency_maker.rar?dl=0
Summary
I. What does this tool do ?
II. What this tool DOES NOT do
III. How to use AM
IV. Known bugs
V. Quick Q&A
VI. Pics ?
VII. Notes
I. What does this tool do ?
AM loads your darkest hour map (which you have previously extracted, with Jamie's Map Maker for instance), allows you to place icons, set adjacencies and some provinces variables like resources, infra or IC. It then saves Province.csv and ajd-def.csv in a (theoretically) DH-friendly format.
II. What this tool DOES NOT do
- AM won't check the validity of your map (e.g. no search for stray pixels)
- AM does not allow to alter the map (use Paint.net instead)
- AM does not extract or compile the map (use Map Utility instead)
- AM does not guarantee that your map is DH-compatible (pray the Great Platypus of Sweden instead)
III. How to use AM
1. Copy you map
Before even launching the tool, you must copy your map files in the "maps" folder. There are some constraints :
- you need only ProvID files, where each province is one unique color. Granted, that's not much of a contraint
- your map name must have a specific format : map_X_Y where X and Y are two numbers (coordinates).
- your map files must have a path using this format : /maps/[map_name]/[map_name].ProvID.png
"map_0_45" is a valid map name, "crimea_river", "mega_city_1", "megacity_1", "map_1" "map_0_45_v1" are not
You should check that your map coordinates increment in a regular way, following settings.txt values. Default values are compatible with Map Utility and are :
- index_x = 117
- index_y = 45
With these values, your map names must be : "map_0_0", "map_0_45", "map_0_90"... "map_117_0", "map_117_45"... "map_234_0".
If you used Map Utility, you should be able to skip this step.
2. Recommendations
It is strongly advised to follow these steps :
a. Generate Global Map first. You won't go anywhere without that. It may take a few minutes to generate your map. Be patient.
b. Load your map. Choosing a map in the list will center the view on the top-left corner of that map. You'll be able to move out of this map without any problem. You don't have to load another map to work on another part of your map, just pan the view
c. Place City Locations first. Select "Set City Location" on the right and click on the map to set a province's city location. Do it for all provinces, including sea provinces. You can "mass click" on the map, you don't need to select "Set City Location" everytime. Also, the icon is automatically linked to the province you clicked on. When you're finished, click "No Tool".
City Location is used as a province's center to display terrain and climate icons, selection and hover icons as well as adjacencies between provinces. If this icon is not set, you won't see anything.
From there, you're free to place anything you want in the order you prefer.
Province.csv and ajd-def.csv are generated in the global_map folder.
3. Quick interface overview
A red star on a province means that province is selected, and its informations displayed on the left panel. A blue star designate the province the mouse is over. They are visible only when City Location is set.
a. Toolbox (right panel)
Each and every tool work like City Location : you can mass-click them and the value they set is automatically attributed to the province under your mouse pointer. "No tool" allow you to select a province without modifying any value.
Ports and beach icon appear in grayscale if the corresponding province does not have "Allow beach" and "Allow ports" ticked (left panel, see below)
b. Province parameters (left panel)
This panel allows a review of all province parameters. You can also adjust some of them ;
- area, region, continent, climate, terrain are pretty similar to their Toolbox counterpart, but changes only affect the selected province.
- "allow beach" enables amphibious landing on the province, and "allow port" give the possibility for ships to anchor in that province.
- "Set Sea Zone" : allows you to set in which zone ships leave the province. Just click on the sea zone you want. The zone ID, if it exists, is reminded next to the button.
- Resources, IP, MP, Infra
You'll also find province's Locations (city, AA etc.) at the bottom of the panel, but you won't be able to change them here. Use the appropriate tool instead.
4. Commands
- left click : apply current tool to the province under the mouse pointer or select tool.
- right click : open a list of adjacencies for this province. Click on an adjacency to delete it.
- center click : keep the button down and move the mouse to pan the map around.
IV. Known bugs
- none ATM, but they are somewhere in the dark, I'm sure-
Sill, save often and be ready for possible work-breaking bug. There are built-in backup features but I recommend to regularily save a copy of your global_map folder, just to be sure.
V. Quick Q&A
Q : I have a bug/crash/terrible error message of doom !
A : By all mean report it here but, please, provide informations, especially how to reproduce the bug when applicable. Screen of the bug may also help if stricly visual.
Q : There is a weird adjacency in the list, "regional box". What is it ?
A : It's a special adjacency, which is saved in adj-def-general.csv and not in DH's adj-def.csv. It is used by another program I'm developping, which draws borders for you. This second program is not ready yet.
Q : Ugh, those icons... Can't you do anything about that ?
A : As you can see I'm a terrible artist. If you have a set of better icons though, you should be able to mod the tool. Icons are in the eponymous "icons" folder and can be changed, as long as you keep ".png" format and don't change the name. You should be able to use bigger icons without breaking the program, too.
Q : This is weird, one of my adjacency points towards the north pole and not the province I've targeted.
A : The province you tergeted has no City Location set.
Q : I can't see any adjacency but I see them in the right-click menu !
A : Set City Location for both provinces
VI. Pics ?
Pics !

VII. Notes
My schedule is currently extremely tight, so I have no intention to develop new functionalities for AM. Bugfixing is of course another story, but it might be a tad slow.
There is a second program in development, which I intend to finish and release just like AM, that will allow you to generate your map's colorscale, tiles and border files from your ProvID files and adj-def provided by AM.
No ETA.
Have fun !
Last edited: