This is a community maintained wiki. If you spot a mistake, please help with fixing it.
This page lists the codes which may be input into the Console Window, a special debugging window which may be accessed on non-ironman games by hitting ^ , ° or tilde (~) (key varies based on keyboard layout). Press the up or down arrow keys to traverse through previously executed commands. Many codes can be turned off by repeating the command, but sometimes reloading the save or exiting the game is necessary. Please note that many of these commands come in and out with each DLC making some of them not work. Mods may introduce commands and more commonly, tags into the game to enhance their gameplay.
Also of note, commands may not work in ironman games by design.
Press Shift+2, §, ~, \, `, ", ^ or ALT+2+1, or Shift+3 to access the console (key varies based on keyboard layout)
Console commands use internal IDs, which may be obtained in a variety of different ways.
An easy way to tell internal IDs is debug mode. debug
as a console command will turn on debug mode which can provide information about certain database entries, such as focuses, national spirits (and other ideas such as laws or designers), or technologies when hovering over them, as well as obtaining information when hovering over a province of IDs of the state and the province, as well as the 3-letter country tag of the country it belongs to. Note that while modding, the console command does not do everything that the launch option does and cannot serve as a substitute.
If that is impossible, using localisation is an alternative. To do that, navigate to the folder where the game is contained, then to the /Hearts of Iron IV/localisation/english/ folder. Each file in there contains localisation keys with values that actually appear in-game assigned to them. Using a non-default text editor can also allow using the 'Search in files' function (Such as in Notepad++, Sublime Text, or Visual Studio Code) in order to search through every single localisation file at the same time to find a specified value.
trigger = { ... }
block, it says which triggers were met and which weren't.Note To make it work with new, generic created Admirals:
1. Open 'Documents\Paradox Interactive\Hearts of Iron IV\settings.txt' with a text editor and change "save_as_binary=yes" to "save_as_binary=no".
2. Start game, load savegame and save as new file, exit game.
3. Open 'Documents\Paradox Interactive\Hearts of iron IV\Save Games' , open the newly created savegame file, search (CTRL-F) for the name of your generic created Admiral
4. Go a few lines below to max_traits=0.000 and add the following code block behind it
in_progress={seawolf=0.000superior_tactician=0.000spotter=0.000fly_swatter=0.000ironside=0.000air_controller=0.000}
5. Make sure to save the file with ANSI encoding format.
6. Start game, load save game, use gain_xp command, enjoy.
(Optional turn back on binarization in settings.txt)
To add modified equipment, you have to address it by given name. Example: You create a variant of 'Matilda LP'-tank with better Armor and Main Gun and name it 'Matilda LP Mk. IV'.Now use 'add_equipment 1000 Matilda LP Mk. IV'.
Now use 'add_latest_equipment 1000 Matilda LP Mk. IV'.
To add task capacity to only a specific MIO, you will need to find the MIO id in \Hearts of Iron IV\common\military_industrial_organization\organizations\<your country's tag>.txtThen you use addTaskCapacity [<MIO id>] [number]
To add trait points to only a specific MIO, you will need to find the MIO id in \Hearts of Iron IV\common\military_industrial_organization\organizations\<your country's tag>.txtThen you use addSize [<MIO id>] [number]
Other Valid ideologies "communism" "democratic" "neutrality"
add_intel [<Target Country tag>] [civilian,army,navy,airforce]=[number]
ex (sets army intel Germany has against USA to 20%): add_intel GER USA army=20
ex (sets airforce and civilian intel Player has against Japan to 90% and 76% respectively): add_intel JAP airforce=90 civilian=76
ex: acclimization hot_climate 20Note that it resets the opposite climate type to 0%
Several other commands previously mentioned, such as event, are useful in modding too.
e POL_remove_danzig_effect
on a state will execute that effect on the state.- reload loc (reloads localisation files)
- reload focus (reloads focuses)
- reload landcombat.gui (reloads land combat interface)
imgui show
to list the available subcommands. These UIs cover a wide variety of useful modding tools, such as script profiling, AI debugging, and listing characters.available
and visible
triggers of ideas, but not the allowed
triggerYou can use this to generate a more favourable outcome to any ai action you dislike (e.g. you want to ally with country)