Console commands turn Hearts of Iron IV into a sandbox: hand yourself equipment, finish a focus tree in an afternoon, switch countries mid-war, or step back and watch the AI fight it out. This page lists the ones worth knowing, grouped by what you are trying to do, with the syntax the game actually expects.
Quick answer
| What | Answer |
|---|---|
| Open the console | Tilde, backtick, § , ^ or Shift+2 — the key follows your keyboard layout |
| Works in ironman | No — commands are disabled in ironman by design |
| Achievements | Ironman is required for them, so a console run earns none |
| Add political power | pp [amount] |
| Instant buildings | instantconstruction — a toggle, enter it again to turn it off |
| Play another country | tag [country tag] |
| Watch the AI play | observe |
| List every command in game | help |
Open the console
The console is a debug window, and the key that opens it depends on your keyboard layout rather than on any game setting. Work down this list:
- The most common binding.
- Faster than retyping a long tag.
Commands do not work in ironman games, by design — and Steam achievements only unlock with ironman enabled. A console run is a sandbox run, and nothing you do in it will reach your profile.
Many commands are toggles rather than one-shot effects. Entering the same command a second time usually turns it back off, though a few need a reload or a restart before the game lets go.
Give yourself resources
These are the commands most people open the console for. Each one adds to the country you are playing right now, so switch with tag first if you meant to hand something to somebody else.
| Command | What it does | Notes |
|---|---|---|
pp(fuhrer_mana,political_power) [PP amount] | Gives(or removes) political power to player | Defaults to 1000 if the amount is unset. |
manpower [amount] | Adds manpower to player | Defaults to 10 million if the number isn't specified. |
xp [<XP amount>] | Gives Army, navy and air experience to player | Can be used once per day |
fuel [<amount>] | Adds Fuel | fuel 100000 (capped at your deposits capacity, adding much more will result in decreasing fuel) |
cp [<amount>] | Adds Command Power | cp 100 (capped at 100) |
st [<amount>] | Adds Stability | st 100 (capped at 100) |
add_war_support(ws) [<amount>] | Adds War Support | ws 100 (capped at 100) |
nuke [number] | Adds nukes | Add 100 or 1000 |
add_equipment(ae) [<equipment amount>] [<equipment name>] | Adds equipment | Equipment uses the basic name so 'ae 1000 infantry_equipment_1'.You can only add researched equipment. Does not support Naval equipment. (with the exception of convoy: 'ae 1000 convoy_1') To add ships, consider using instantconstruction(ic) or instanttraining (it) ('ic' or 'it' also effects AI). 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'. |
add_latest_equipment(ale) [<equipment amount>] | Gives player amount of latest equipment variants | To add only a specific type of your latest equipment, you have to address it's 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_latest_equipment 1000 Matilda LP Mk. IV'. |
add_cic_bank [number] | Adds Economic Capacity Surplus for the player in the International Market | Defaults to 1 if no input given |
Skip the waiting
Toggles rather than one-off gifts. Most stay on until you enter the same command again, which is worth knowing before you wonder why your factories still finish in a day.
| Command | What it does | Notes |
|---|---|---|
instantconstruction (ic) | Toggles instant construction cheat. | Affects AI. Ships are also constructed instantly. |
instanttraining (it) | Instantly trains divisions and ships | Affects AI |
instant_prepare | Instantly prepares naval invasions | Only works in debug mode. |
research [<slot id> or "all"] | Researches a technology from research slot or all. | Research all will instant research all technologies |
research_on_icon_click (roic) | Research a technology when clicking on technology tree icon | Will Allow you to research an item without its prerequisite or two mutually exclusive items |
toggle_hidden_techs (tht) | Toggle show/hide all hidden techs. | — |
Focus.AutoComplete (fa) | Allows national focuses to be instantly finished | Affects AI |
Focus.NoChecks | Ignores focus requirements | Affects AI |
Focus.IgnorePrerequisites | Ignores focus prerequisites | Allows you to start a focus in the middle of the tree. Affects AI |
freefocuses (ff) | Enable freely activating any focuses | Combination of Focus.AutoComplete (fa), Focus.NoChecks and Focus.IgnorePrerequisites. |
Decision.FastRemove | Shortens decisions to 1 day | — |
Decision.NoChecks | Ignores decision requirements | Also disables cost, affects AI |
finish_decision [<decision id>] or "all" | Finish timed missions instantly. | — |
Change who you are and who owns what
The country-level tools. tag is the one that makes the rest of this list interesting: play a run as one nation, then switch and repair somebody else's front.
| Command | What it does | Notes |
|---|---|---|
tag [<Country tag>] | Changes the country that the player controls. | — |
annex [<Target Country Tag> or "all"] | Begin annex/annexes the specified tag | annex USA or annex d01 or annex all |
puppet [<Puppeteer Country Tag>] [<Puppet Target Country Tag>] | Turns the target country into a puppet of the puppeteer | puppet GER CZE (Czechoslovakia becomes a puppet of German Reich) |
whitepeace(wp) [<country tags>] | White peace with the specified countries. | — |
add_core <state_id> | Adds cores | — |
setowner [<country tag>] | Sets state owner | Select the state you would like to set owner as. Select a state by clicking it. You need to click the state as the state id no longer works. |
setcontroller [<country tag>] [province id] | Sets province controller | — |
add_autonomy [<Target Country Tag>] [num] | Changes a country's autonomy level | add_autonomy PHI -200 |
civilwar [<ideology>] [<target country tag>] | Spawns a civil war | civilwar fascism ENG : Other Valid ideologies "communism" "democratic" "neutrality" |
set_ruling_party <ideology group> | Sets ruling party | ideology group has shortcuts d f n c for vanilla HOI groups. |
add_party_popularity <ideology group> <value> | Adds party popularity | ideology group has shortcuts d f n c for vanilla HOI groups. |
add_legitimacy [<Country tag>] [<value>] | Adds legitimacy to specified tag. | Example: add_legitimacy POL 22 |
Bend diplomacy and opinion
For when you want a particular war to happen, or specifically not to happen.
| Command | What it does | Notes |
|---|---|---|
allowdiplo(adiplo,nocb) | Allows to use all diplomatic actions for no matter the rules. (Can declare war without justification) | This is likely the most effective way of wanting to start a war without needing to wait for the justification. If you only want instant justification and not the extra options it comes with, then use (instant_wargoal). |
ai_accept (yesman) | AI will accept all diplomatic offers | — |
add_opinion [<Country tag>] | Add opinion to/from tag | Adds 100 opinion (hardcoded number) to and from target country (add_opinion ENG for instance). A successfull call prints "<country> have 100 more opinion about you" and it appears as "cheat_opinion_modified_good" in the diplomacy screen |
reduce_opinion [<country tag>] | Reduce opinion to/from tag. | — |
FI [amount | Adds to faction initiative | FI 5 adds 5 faction initiative |
Special projects and scientists
The special-projects family all share the sp_ prefix, which makes them easy to find with help. They run from speeding a project up to handing yourself a scientist who is already good at everything.
| Command | What it does | Notes |
|---|---|---|
sp_breakthrough [<number>] sp_breakthrough [<number> optional <specialisation>] (sp_br) | Adds special project breakthrough points for all facilities. | ex: sp_breakthrough 1 ex: sp_br 20 specialization_land Specialization are: specialization_land, specialization_air, specialization_naval, specialization_nuclear (For the one added by mod it's in Mod Path\common\special_projects\specialization) |
sp_fast | Skips the prototyping stage and progresses the iteration stage for special projects | — |
sp_instant | Autocompletes current special projects | — |
sp_available | Unlocks/Locks all special projects with unfufilled research prerequisites | E.g. Unlocks nuclear special projects without researching the "Atomic Research" technology |
sp_unlock_all | All Special Projects are always visible and available. Whether or not the triggers returns true, and whether the parents are completed. | — |
sp_research_all (sp_ra) | Research all special projects. If no scientist exist it will create one, otherwise it will pick an arbitrary one. | — |
sp_prototype_reward | Trigger a specified prototype reward during a project. | — |
sp_add_scientist sp_add_scientist [<level> (optional)] [<specialisation> (optional)] | Adds a generic scientist with no or specified specialisation/skill level | sp_add_scientist 3 nuclear sp_add_scientist 1 |
sp_add_mastermind | Adds a generic scientist with all specialisations and max skill level | — |
sp_set_selected_scientist_level [<level>] | Sets scientist's level | The facility view GUI with the assigned scientist must be opened |
sp_add_selected_scientist_trait [<trait>] | Adds the specified trait to the scientist | ex: sp_add_selected_scientist_trait scientist_trait_brilliant_theorist Adds the brilliant scientist trait to the selected scientist. The facility view GUI with the assigned scientist must be opened Traits are found in "Hearts of Iron IV\common\scientist_traits\00_traits.txt" |
Spies, operations and occupation
Intelligence work is slow by design, and this is the set that removes the waiting. The occupation pair acts on the selected province rather than the whole country.
| Command | What it does | Notes |
|---|---|---|
Agency.Instant | Makes everything regarding agencies instant. | Equivalent to a combination of Operation.Instant, IntelNetwork.Instant, Agency.InstantSlotUnlock, and Agency.Autocomplete |
Agency.InstantSlotUnlock | Removes wait time between agent recruits | — |
Agency.Autocomplete | Instantly completes agency upgrades | — |
Operation.instant | Instantly finishes all operations | Affects AI |
prevent_operative_detection | Your operatives/spies won't be detected anymore | — |
force_operative_detection | Your operatives/spies will be detected | — |
add_intel [<Country tag 1>] [Country Tag 2] [civilian,army,navy,airforce]=[number] add_intel [<Target Country tag>] [civilian,army,navy,airforce]=[number] | Sets the inputted intel the first tag has against the second tag. The set intel amount is a static value (will be permanent for the rest of the game). | ex (sets intel player has against France to max): add_intel FRA 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 |
resistance | Increases resistance in the selected province by set amount | ex: (selects one of the provinces in Berlin) resistance 100 |
compliance | Increases compliance in the selected province in game by set amount | ex: (selects one of the provinces in Danzig) compliance 100 |
occupationpaint(op) | Toggles occupation painting. If used with country tag occupies all of their owned, not controlled, land, | op JAP |
Military industrial organisations
Three commands, and each applies to every MIO you have rather than to a chosen one.
| Command | What it does | Notes |
|---|---|---|
addfunds | Adds funds to all MIOs | Adds 1000 funds to every MIO (military industrial organisation) |
addTaskCapacity [number] | Adds task capacity to all MIOs | Defaults to 1 if no input given. 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>.txt Then you use addTaskCapacity [`] [number] |
addSize [number] | Adds trait points to all MIOs | Defaults to 1 if no input given. 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>.txt Then you use addSize [`] [number] |
Generals, traits and experience
Select the commander on the map first — these act on whoever is selected, not on the country.
| Command | What it does | Notes |
|---|---|---|
gain_xp [<amount>] | Adds experience to selected Leader/General/Admiral | gain_xp 100000(level capped at 9) |
gain_xp [<trait>] | Adds gainable trait to selected Leader/General/Admiral | ie: gain_xp seawolf 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.000 superior_tactician=0.000 spotter=0.000 fly_swatter=0.000 ironside=0.000 air_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) |
allowtraits | Allows free assignment of general traits | — |
mastery [<mastery amount>], [track name] | Give doctrine mastery, globally or to a specific track. | — |
acclimization [<climate type>] [<number>] | Sets the selected division's acclimization to the specified climate type and its percentage (reduces penalties from cold/hot weather or temperature debuffs) | ex: acclimization cold_climate 75 ex: acclimization hot_climate 20 Note that it resets the opposite climate type to 0% |
Debug and map tools
The ones that change what you see rather than what you have. observe is the quiet favourite: it hands your country back to the AI and lets you watch the war you started.
| Command | What it does | Notes |
|---|---|---|
observe(spectator) | Switches to play no country at all, and no longer shows messages or pauses the game. However, it also interferes with AI performance and is not a good indication of what the AI will do if observe mode is not used. | — |
tdebug | Toggles Debug info | Helpful for finding nation tags and ID's |
teleport(tp) | Activates the Teleportation tool | Can teleport units where ever you tell them to go (right click a province with a selected unit) |
debug_smooth | Toggle framesmoothing | Can increase game speed significantly, depending on system typically between 10 and 35 percent |
deleteallunits(delall) [country] | Delete all armies and fleets of the specified countries. | deleteallunits SPR |
deleteallunitsbut(delallbut) [country] | Delete all countries' armies and fleets, with the exception of one country. | delallbut SPR |
add_mines | Maximises player owned naval mines in the selected regions | — |
energy_ratio (er) [<ratio>] | Set Energy Ratio from 0 to 1 for the factories without coal consumption. | — |
help [command name] | Print out all console commands or a specific command description. | — |
event [<event id>] [Target country tag] | Executes an event | Event pages can be used to tell the IDs of events. If the event has a trigger = { ... } block, it says which triggers were met and which weren't. |
add_ideas [<idea name>] | Adds ideas with <id> to the country. Can also replace laws. | — |
remove_ideas [<idea name>] | Removes national idea. | — |
Also worth knowing
- Commands come and go with each DLC. One that worked last patch can quietly stop existing, which is why
helpis the first thing to reach for when something does nothing at all. help [command name]describes a single command instead of printing the whole list, which is far easier to read in a small window.- Mods bring their own commands and country tags. If you are playing something like Kaiserreich, the mod's own documentation is the authority rather than this list.
- Some of these are developer tools. They are here because the game accepts them, not because they help a campaign —
debug_crashdoes exactly what its name says.
Source: Console commands and Ironman on the Hearts of Iron 4 Wiki.
Frequently asked
How do I open the console in Hearts of Iron IV?
Press the key to the left of 1 — tilde (~), backtick or § on most layouts. If that does nothing, try ^, the quote key, º or backslash; some layouts use Shift+2, Shift+3 or ALT+2+1. The console is a debug window and the binding follows your keyboard rather than the game's settings.
Do console commands disable achievements?
Effectively yes. Commands do not work in ironman games by design, and Steam achievements only unlock with ironman enabled, so a run where you use the console is a run that cannot earn any.
How do I play as a different country?
Use tag followed by the three-letter country tag: the game switches you to that country and leaves the old one to the AI. Use observe instead if you want to hand every country to the AI and simply watch.
Why did a command stop working?
Commands come and go with each DLC, so one that worked in an earlier patch may no longer exist. Type help to print the current list, or help followed by a command name for that one's description.
Read next
HOI4 Country Tags
Every Hearts of Iron IV country tag, the three-letter code console commands use instead of a country's name, with the ideology each nation starts under. Includes how tag, annex and puppet take them, and why a run that uses them earns no achievements.
HOI4 DLC Guide
Every Hearts of Iron IV expansion, country pack and theater pack, with what each one adds and when it was released. Explains the difference that decides a purchase — expansions rework systems for every country, packs add focus trees for specific nations — and which DLCs are already part of the base game.
HOI4 Achievements
Every Hearts of Iron IV achievement, grouped by the expansion that added it, with what each one asks for and the country that makes it manageable. Covers the three rules that decide whether an achievement can unlock at all — ironman, console commands and mods — and six worth clearing first.
HOI4 Intelligence Agency Guide
How the intelligence agency works in Hearts of Iron IV: what operatives are, what the five upgrade branches buy, how cryptology and the Spy Master fit in, and why an agency started late never pays for itself.