To download: Navigate to "Releases" on the right, and click on .7z file
showcase/guide video - https://youtu.be/edFPnLBjc3E
- Platform: Windows only
Usage Instructions:
- Change settings inside of
config.ini
. - Open
run.bat
. - If the console displays "SUCCESS, took x.xxx seconds," the program has worked.
- If the console repeatedly shows "starting," try increasing
optimizationFactor
or setting it to100000
inconfig.ini
.- Increasing this setting will slow down the program but may reduce crashes.
Testing the Mod:
- Open HOI4 and add "Generated Map Mod" to your current playset.
- Play the game.
- If the game crashes, follow "Usage Instructions".
Post-Execution:
- If successful, a folder named
src
should appear. This folder is your mod folder. If the mod is not showing up in the launcher then change hoi4ModsLocation or follow these steps in the launcher:
- All installed mods > upload mod > create a mod
- After creation select the mod you have created in the list > "..." > show in folder
- Then copy all files from
src
folder and paste them in the folder that the launcher has showed you - Go to the folder that the launcher directed you to.
- Move up one level in the directory.
- Look for a file with the same name as the one you entered in the launcher for the mod, ending with ".mod".
- Add the specified lines to this file.
- replace_path="history/states"
- replace_path="history/units"
- replace_path="map/strategicregions"
Editing the Map:
- Open image
input.bmp
. - Choose any HOI4-supported resolution for your image (must be a multiple of 256):
- Examples: 512x512, 768x512, 512x768, 768x768, ..., 5632x2048.
- If choosing a large resolution, increase
provinceSize
(default is 6) to not go over HOI4 province limit(~23000).
- Draw the map(use pencil tool):
- White color represents water.
- Black color is filled in with nearby pixels.
- Any other color represents a separate country.
- If your image has blurry border you can set removeFuzzyBorder to
yes
to remove it - Export as 24 bit bmp image and name it
input.bmp
. - Run the program to generate a new mod.
Example Mod:
Compilation flag if you want to compile source file yourself
g++ -std=c++2a -O3 -o C:\master.exe C:\master.cpp --static