Tools

The following tools can help with modding HOI4 :

## Inside HOI4

**Debug Mode** : Go to properties -> set launch options in steam and add "-debug" to enable debug mode. Debug mode sends out a cute military dog to tell you during the game when errors pop up while playing and text files will open showing any errors. These errors could for example be that a keyword was unrecognized withing your files or that there were compile errors in some of your files. It also includes helpful "errors" to protect against faulty game design, such as when a state has multiple air zones. In Debug mode you get some extra information regarding focuses and ideas, and you can also CTRL+ALT over a province to get province IDs and state IDs.

**Nudge!** : If debug mode is enabled, then the title screen of HOI4 features a big button named "Nudge!" The Nudge tool is a very buggy tool that allows you to see the map in different nudgers and make minor modifications to it. Don't get too excited, this isn't a map editor. It's main use is to **fix 90% of all hard crashes** within modded HOI4: Any mod that changes states, provinces, factory amounts and building amounts at the start of the game, will not change the location for the 3d models written in the map/buildings.txt file.This will initially have no issues attached, but will seemingly at random cause crashes during the game when the building models are incorrect due to changed states and provinces. To fix this in Nudge, go to "Buildings", click on "Find Error" and then click "Validate in State". Repeat these last two steps until no more errors are found and click Save. The "save" button saves this to a remote file and will not use this file unless you manually drag it to your mod to replace the old map/buildings.txt file. Nudge will save it however within your documents folder:

```
Documents/Paradox Interactive/Hearts of Iron IV/map/buildings.txt

```

You may want to replace airports.txt and rocketsites.txt as well if states with those were changed by any of the mods.

**Console** : When not playing Ironman, you can open the console with the '~' key. In this console you can type various commands to cheat. For a list of commands, see here.

## Outside HOI4

**NVidia Texture Tools for Photoshop** : This plugin for Photoshop allows you to create and modify .DDS files in Photoshop, without having to resort to a rougher tool such as GIMP. Within the channels window, there is a specific channel for Alpha, which colors transparency red within the editor when viewed. When saving, you could use the 8.8.8.8 ARGB 32 bpp unsigned format to maintain a high quality render of the image.

**SageThumbs** : This plugin for windows allows you to see the thumbnails for many rarer image types within the folder explorer. Hearts of Iron IV uses .DDS images for most interface elements, but also uses .TGA images for flags. This is for example really handy to find an existing focus or idea icon that you wish to reuse, or to browse through all existing flags that are used in HOI4.

**Sublime** : Sublime is a minimalistic text editor that professional companies use for web development because of it's extensive amount of hidden features and plugins for compatibility. It's a more professional notepad or notepad++. In Windows, you can set the default program for .txt files to be sublime, and then within sublime change the syntax coloring for that file format on the fly. This way, you can have all .txt for example show .lua syntax. The most outstanding feature of Sublime however, is the ability to type at multiple cursors. There is a lot of repetitiveness in the HOI4 mod files, and just by pressing CTRL+D you can have multiple cursors running all over the file where the same word is found. This way for example, you could add a row to every focus within a file in mere seconds, without having to change that one line at a time.