Overview
A basic guide on how to make a world-map in HoI4 by a novice looking to assist others, credit to Rebelsj21 on YT.
Mise En Place (Tools, Resources, Preparation)
|DOWNLOADS|
MapGen v2.2: Enabling sh*tty map designs since 2018 from hoi4modding
is what will allow you to make a custom map, its outdated, and its kind of unstable, but to my knowledge we have nothing better.
Notepad++[notepad-plus-plus.org]Clean, easy-to-use, and lightweight, NP++ is a great program for what you’re going to need to do.
WEBSITES
TextMechanic[textmechanic.com] will be used in a later step so you can launch the game and actually be able to look at your map via Nudger.
BMP-DDS Image Converter[www.aconvert.com] is what you’ll need to convert certain files to DDS in order for the game to recognize them.
Launch Options
1. Right click Hearts of Iron IV, go to properties.
2. Select launch options, and in the text box, put in -debug
This allows you to log errors, utilize the debug tools, and view your map without having to make a new save.
Reading The Matrix (Glossary & Notes)
File Types
HOI4 mods utilize file types everyone may not know about, these are:
DDS[en.wikipedia.org] (short for DirectDraw Surface) is an image format which compresses files using a unique S3 Texture Compression[en.wikipedia.org] algorithm. Allowing a GPU to decompress the textures while in-game. One very important map file uses .DDS.
BMP[en.wikipedia.org] (Bitmap) files are used to store 2D image files, this is used for things like flags and map files.
MOD files are used by Paradox Interactive games as a method of pointing the launcher to the specific mod folders as well as notifying the player if the mod is out of date or not. This can be opened using Notepad++
CSV files can be opened with Notepad++, they’re data files similar to TXTs where the information is usually separated via commas.
MapGen|Step 1 (LandInput.bmp)
LandInput.bmp is the basic shape of your world, it functions as a way for MapGen to differentiate between land, open-water, and closed-water regions. There are some requirements for this to function properly however.
It must be a 24-bit BMP file.
The resolution must be 5632×2048 in order to completely fill out the map (you can make a smaller map as long as it follows the aspect ratio (2.75) of the original.)
MapGen uses very specific hex color-codes. These are:
Land #9644c0
Ocean #051412
Lake #00ff00
Under no circ*mstances must there be any form of fade between the three colors, this causes errors with MapGen and makes things more difficult than they need to be. So keep the color-changing flat.
Now! Once you’re done making your map (be it through making it yourself, generating it via cloud generation in Photoshop/GIMP, or generating a heightmap,) export it as a BMP and drag/drop it into MapGen’s Land Input tab.
MapGen|Step 2 (TerrainInput.bmp)
TerrainInput.bmp is what controls what terrain types appear where, this too is controlled via a 24-bit depth 5632×2048 BMP file and uses colors to differentiate between biomes. These biomes have various different effects which can be seen here.[hoi4.paradoxwikis.com]
Desert #FF3F00 (Orange)
Forest #59C755 (Bright Green)
Hills #F8FF99 (Pale Yellow)
Jungle #7FBF00 (Green)
Lakes #00FFFF (Cyan/Light Blue)
Marsh #4C6023 (Deep Green)
Mountain #7C877D (Gray)
Ocean #0000FF (Deep Blue)
Plains #FF8142 (Pale Orange)
Feel Free to create your own TerrainInput file based off of your LandMap, for now though, we’ll just be using the “Generate Plains World” option within MapGen.
And here’s what all the biomes look like in-game, you’ll notice Lakes and Ocean aren’t visible, this is because of the fact that these are biomes exclusive to the ocean.
MapGen|Step 3 (ProvinceSizeInput.bmp)
ProvinceSizeInput.bmp dictates the distribution of your provinces[hoi4.paradoxwikis.com] across the map, white regions generate larger provinces while black regions generate far smaller, more dense provinces as well. This is simple, screw with the inputs until you’re satisfied.
MapGen|Step 4 (BoundaryInput.bmp)
BoundaryInput.bmp allows you to define the edges of provinces and what exactly the shape of specific states are, while you can make this yourself I have no experience in doing so and usually just rely upon the ProvinceMap tab in order to generate basic province shapes, then going into Nudger to shape them in-game.
MapGen|Step 5 (ProvinceMap.bmp)
ProvinceMap.bmp is what generates all the provinces on your map, nothing much else to say here.MapGen will also give you a .csv file you can name, title it whatever, then drop it in alongside your other mod files to use later. It’ll come in handy.
MapGen|Step 6 (StateOutput.bmp)
StateOutput is…Interesting.
Okay, let me make one thing EXTREMELY CLEAR HERE:
Provinces are the building blocks of States, states are incredibly complex, in turn, even though MapGen leaves the contents of each province (and therefore each state) blank (meaning they contain no resources or intrinsic value,) this one specific part of MapGen is the most unstable. It can and WILL crash if you ♥♥♥♥ things up, so its important to keep in mind how MapGen’s instability may cause it to crash when generating a smaller states.
Why is it so unstable you ask? Because each state consists of its own 0-2KB txt file, which means thousands (potentially tens of thousands, as my first attempts at making a map with a screwed up image created over 9000 files.) of files will be created unless you do this. Setting the sliders to shrink the amount of provinces will keep it much lower than that (I can’t even give a general range, islands will count as their own state no matter how small, oceans are divided into regions of their own, and landmasses are roughly cut into 3rds/4ths/5ths usually, so it could be as low as 200-300 or as high as 900-1200.)
Once you generate something to your liking, make sure you assign an EMPTY FOLDER for it to dump the state files into.
Are the state files dumped? Good. Now delete all of them but the 1st one. I’ll explain why to do this later, so if you’re hesitant, feel free to wait, I’ll reiterate at that point.
MapGen|Step 7 (HeightMap.bmp)
HeightMap.bmp controls…Well, the height, it also affects how the map looks visually alongside NormalMap.bmp and is affected by your TerrainInput.bmp.
MapGen|Step 8 (WorldNormal.bmp)
WorldNormal.bmp, dunno much about this and doesn’t really change much to my knowledge, just generate and save it.
MapGen|Step 9 (ColorMap.dds)
ColorMap.dds affects how the map terrain looks cosmetically, applying the textures you specified back during your creation of TerrainInput.bmp (I also think its affected by HeightMap.bmp? I’m not sure.) However because its used to calculate where to apply textures, it must be converted as a DDS. Thankfully MapGen will pop-up a window once you save the file asking if you want to convert it to a DDS (which you should because its mandatory ya dingus.) Since I opted to generate a Plains world however, all you’re gonna see is mossy green with some occasional farms.
MapGen|Step 10 (RiverMap.bmp)
RiverMap.bmp is simple, it allows you to generate rivers leading to/from lakes and shorelines. Also affected by TerrainInput.bmp (Maybe affected by HeightMap?)
MapGen|Step 11 (TerrainMap.bmp)
TerrainMap.bmp does a similar job as ColorMap.dds, applying terrain textures for things like cities, towns, and mountains. It is affected by TerrainInput much like ColorMap.dds is.
MapGen|Step 12 (Export to Game)
Export to Game exports your map with all the .bmp & .dds files you’ve created, packaging/organizing them and making it into a mod that gets dropped in your /Documents/Paradox Interactive/Hearts Of Iron IV/mod/ folder. Here you’ll give your map a name and direct MapGen to your ColorMap.dds file. And boom! You’re done…
Nah, you thought it was that easy? There’s always a caveat with this kind of thing.
Here’s The Thing…
MapGen is out of date.
As of me writing this very sentence, it is Sunday, July 26th, 2020. It is 2:35 A.M here in my Florida home. The reddit post says its only a year out of date, so it can’t be THAT bad ri-
Oh.
MapGen 2.2 was released during the 1.5.* era. At the time of writing, HoI4 is on 1.9.3. So some edits are going to have to be made.
So What Now?
Its simple! Just requires the usage of Notepad++ And some basic copy-pasting of files from your base-game to the mod.
File Explorer|Step 13 (The Future Is Now, Old Patch!)
Step 1|Go to your DocumentsParadox InteractiveHearts of Iron IVmodTestcommoncountries directory as well as your HoI4 countries directory (C:Program Files (x86)SteamsteamappscommonHearts of Iron IVcommoncountries.)
Step 2|Copy-paste all the country files from your HoI4 base directory to the mod’s country directory.
Step 3|Navigate to the National Focus directory in both your HoI4 AND mod directory (commonnational_focus.)
Step 4|Copy-paste the generic.txt file in your HoI4 directory to your mod directory.
Notepad++|Step 14 (I Know Kung-Fu.)
Step 1|Go to your .mod file, right click on it, click “Open In…” and select Notepad++
Step 2|Change the Supported Version from 1.5.* to 1.9.*
Step 3|Copy paste all these lines from the guide and put them at the bottom of your .mod file.
replace_path=”common/ai_peace”
replace_path=”common/ai_strategy”
replace_path=”common/ai_strategy_plans”
replace_path=”common/ai_equipment”
replace_path=”common/bookmarks”
replace_path=”common/decisions”
replace_path=”common/decisions/categories”
#replace_path=”common/technologies”
#replace_path=”common/autonomous_states”
replace_path=”common/ideas”
replace_path=”common/national_focus”
replace_path=”common/on_actions”
replace_path=”common/scripted_effects”
replace_path=”common/scripted_localisation”
#replace_path=”common/scripted_triggers”
replace_path=”common/units/names_divisions”
replace_path=”common/units/names_ships”
replace_path=”history/countries”
replace_path=”history/states”
replace_path=”map/strategicregions”
replace_path=”map/supplyareas”
#replace_path=”music”
replace_path=”events”
replace_path=”portraits”
replace_path=”country_leader”
Step 4|Navigate to your states folder, then delete all but the first states file.
Step 5|Open 1-State_1.txt and set manpower to any number (110 is preferable,) then delete any numbers on Line 5.
Step 6|Ctrl-S to save the file as it is, then minimize it. Navigate to the .CSV file you saved way back when making your states.
Step 7|Scroll all the way to the bottom of the file and look at the second-to-last line, the first number you see before it gets separated by a semi-colon? That’s the number ID for the last province in the map. Copy that, and close out your CSV file.
Step 8|Open up TextMechanic, then copy-paste that final number in the “Ending at” box and click Generate. Click inside the output box, press CTRL+A to highlight every number that was just generated, then hit CTRL+C to copy.
Step 9|Navigate back to your 1-State_1.txt, and in the blank space on Line 5, paste all the numbers you just copied, hit CTRL+S to save, then navigate to your DocumentsParadox InteractiveHearts of Iron IVmodTestmapstrategicregions directory, click on Test Strategic Region, open it in Notepad++, and replace the numbers on line 5 with the TextMechanics list.
Step 15|Endsieg!
Navigate to your mods, disable ALL OTHER MODS you have installed currently, and look for what you named your world as. Enable that and launch the game. The game will take a while to load up and pop-up with a warning about how likely the game is to crash if you were to try and play a normal campaign, this is normal.
Now click on Nudge! And there ya go, it should work now.
Parting Notes
Map modding for HoI4 is trial and error, you’re going to need to make heavy use of the logs folder in your Documents/Paradox Interactive/HoI4 directory, while I would give troubleshooting here, I’ve spent 5 hours making this guide, use Google, https://www.reddit.com/r/hoi4modding/ and discuss your issues and ideas with other modders. I’d also HIGHLY recommend reading up on the HoI4 wiki’s Map Modding[hoi4.paradoxwikis.com] section.
Credit goes to Kingfish#3448 for his assistance in proofreading this guide as well as troubleshooting when my instructions didn’t provide a functioning map.
It’s 3:20 AM here in good ol’ Murica. I’ll see you guys around, good luck in your fellow modding adventures, and stay safe out there.