A WW2 cipher machine with glowing keys casting light onto a war-room operations map for an HoI4 console commands guide.
Console commands turn any campaign into a test range.

The console is not just a cheat box. Used well, it is the fastest way to test a strategy, repair a broken save, build a custom scenario, inspect hidden IDs, or learn why a mechanic behaves the way it does. Used carelessly, it turns the whole world into noise because many commands are global toggles, not private bonuses.

The Console Mental Model

Do not try to memorize every command first. Learn the model and the list becomes much easier to use.

Most HoI4 console work follows the same four-step loop:

  1. Pick the problem you are isolating. If you are testing a division, add XP and equipment. If you are testing a focus path, use focus commands. If you are repairing borders, use state and province tools. Do not unlock everything unless your goal is a chaos save.
  2. Discover the argument. The console wants exact inputs: country tags, state IDs, province IDs, ideology keys, equipment names, idea names, and event IDs. tdebug, help, Tab autocomplete, and the command history keys are the real power tools.
  3. Run one command and let the game update. Some changes appear immediately. Others, especially territory ownership and equipment stockpiles, may need the daily tick before the interface catches up.
  4. Switch the tool off. Commands like instantconstruction, research_on_icon_click, yesman, allowdiplo, fow, weather toggles, and focus cheats stay active until you run them again. Several of them affect AI countries too.

That is the difference between useful testing and wrecking a campaign. A clean console session changes the one variable you meant to test. A messy one changes construction, focuses, diplomacy, AI behavior, and technology at the same time, then teaches you nothing.

Rule of thumb: pause, make a separate save, run the smallest command that proves the point, unpause only when the game needs a day to process, then turn every toggle back off.

Open and Read Commands

The console works in non-Ironman games. Ironman achievement runs are the wrong place for it: if you want achievements, leave the console out; if you want a sandbox, start a normal save. In multiplayer, treat the console as a host/admin tool. A regular client cannot rely on console access.

The console key depends on keyboard layout. Try ~, `, Shift+2, ALT+2+1, Shift+3, ^, or Shift+Alt+C. Press the same key again to close it. Inside the console, Up and Down cycle command history, and Tab autocompletes commands, ideas, equipment names, and other database keys.

A command is usually a verb plus arguments: the verb says what changes, the arguments say how much, where, or who.

PatternExampleWhat it means
command [amount]pp 500Add 500 political power to the country you currently control.
command [TAG]tag GERUse a country tag as the target. Tags are short country codes.
command [TAG] [TAG]whitepeace GER SOVUse two country tags when the command changes a relationship between countries.
command [state ID]add_core 158Use a state ID when the command changes core status for the country you control.
command [amount] [equipment]add_equipment 10000 infantry_equipment_1Use an exact equipment key, usually found with autocomplete or debug tools.
commandinstantconstructionNo argument means the command is often a toggle: run it once on, run it again off.

The three argument traps are country tags, map layers, and ideologies. Tags are short identifiers such as GER, FRA, USA, SOV, ENG, IRQ, and BUL; use tdebug or the HoI4 country tags guide when you do not know one. States are larger ownership units, provinces are individual tiles, and commands care which layer you mean. Party commands use f, d, n, and c, while civilwar uses full ideology words.

Use savegame before destructive tests. Country switching, annexations, nukes, occupation painting, and unit deletion are not things you want to discover on your only save file.

Debug Mode and IDs

tdebug is the command that makes other commands practical. It toggles debug tooltip information, so hovering over the map and interface reveals hidden identifiers: country tags, state IDs, province IDs, controller data, area IDs, and database keys. Run tdebug again when you are done.

help is the second discovery tool. Type help to list commands in the console, or help tag, help annex, help add_equipment, and so on to inspect one command's accepted arguments. helplog writes command help to the game log, which is useful when you want a searchable local reference while testing a mod or a long scenario setup.

You needUseWhy it works
Country tagtdebug, then hover the countryMost diplomacy, war, annexation, puppet, and tag-switch commands target countries by tag.
State IDtdebug, then hover the stateCores, ownership, compliance, resistance, and many map edits work at state level.
Province IDtdebug, then hover the provinceProvince-level commands control map tiles, not whole states.
Equipment nameStart typing after add_equipment, then press TabEquipment keys are exact strings; guessing wastes time.
Idea nameadd_ideas plus Tab autocompleteadd_ideas needs a valid idea key and errors if you leave the argument blank.
Command syntaxhelp [command]The game tells you the argument order before you run a risky command.

The mental model is target first, command second. If you know the country, state, province, or key you are changing, the command becomes boring. If you do not, you are just throwing strings at the console and hoping.

Best HoI4 Console Commands

These are the practical commands worth learning first. The goal is not to list every internal developer command; it is to give you the commands that solve real player problems.

CommandSyntaxUse it for
helphelp or help [command]Show command syntax before you risk a save.
tdebugtdebugReveal tags, state IDs, province IDs, controllers, and database keys.
savegamesavegameCheckpoint before destructive tests.
tagtag [TAG]Switch control to another country.
pppp [amount]Add political power for laws, advisors, and decisions.
xpxp [amount]Add army, navy, and air XP for designs.
manpowermanpower [amount]Add or remove manpower.
fuelfuel [amount]Fuel armor, navy, and air tests.
add_equipmentadd_equipment [amount] [equipment]Add one specific researched equipment type.
add_latest_equipmentadd_latest_equipment [amount] or ale [amount]Add the latest researched variants broadly.
researchresearch [slot] or research allComplete one slot, or unlock every technology.
research_on_icon_clickresearch_on_icon_clickClick exact technologies to research them instantly.
instantconstructioninstantconstruction or icToggle instant buildings; AI can benefit while it is active.
instanttraininginstanttraining or itToggle instant unit training; turn it off after setup.
focus.autocompletefocus.autocompleteComplete focuses instantly when selected.
allowdiploallowdiploTake diplomatic actions without normal restrictions.
yesmanyesmanMake AI countries accept diplomatic offers.
annexannex [TAG]Annex the target country.
puppetpuppet [overlord TAG] [target TAG]Make a country into another country's puppet.
whitepeacewhitepeace [TAG] [TAG]Force peace between two countries.
civilwarcivilwar [ideology] [TAG]Start a civil war; ideology is a full word.
threatthreat [amount]Add or remove world tension generated by the current tag.
setownersetowner [TAG]Give the selected state to a country.
add_coreadd_core [state ID]Add a core on a state for the country you control.
add_party_popularityadd_party_popularity [f/d/n/c] [amount]Change party support without changing the ruler by itself.
set_ruling_partyset_ruling_party [f/d/n/c]Set the ruling ideology.
nukenuke [amount]Add nuclear weapons to your stockpile.

Country, War, and Politics

Country commands make sense once you separate three ideas: who you control, who the command targets, and which game rule is blocking the action.

tag [TAG] changes who you control. It is not a target selector. If you type tag IRQ, you become Iraq; you did not transfer a state to Iraq, make Iraq your puppet, or select Iraq as a victim. That mistake is easy to make because many other commands also take country tags.

allowdiplo and yesman also solve different problems. allowdiplo removes the rule that stops you from taking a diplomatic action; yesman makes the AI accept an offer once you send it. Run the relevant toggle, make the diplomatic edit, then run it again.

Politics has the same split. add_party_popularity c 50 adds communist support, but it does not make communists rule; set_ruling_party c does that. Civil wars use full ideology words instead: civilwar democratic SOV.

World tension belongs to the current tag. If you run threat 30 while playing Japan, Japan gets the tension contribution. To make another country the source, tag over, run threat, then switch back.

The safest country-switching workflow is: save, run tdebug, identify the tag, run tag [TAG], make the change, then tag back. Do not unpause for long while controlling another country unless your goal is to let that country play out under your edits.

Industry, Research, and Army Testing

Use economic and research cheats to remove the bottleneck you are not testing. If you are testing whether a tank division can break infantry, you need army XP, equipment, fuel, and maybe a clean enemy line. You do not need every doctrine, every technology, instant focuses, instant construction, and disabled AI at the same time.

xp is the cleanest design command because it gives army, navy, and air experience at once. Use it to edit divisions, ships, aircraft, and tank designs, then judge the design on its actual stats. For division logic, pair this article with the HoI4 division templates guide; for supply failures, use the HoI4 supply guide before blaming the template.

For equipment, prefer the narrow command when the test is narrow. add_equipment 10000 infantry_equipment_1 is good for basic infantry kits. add_latest_equipment 5000 or ale 5000 is better when you want the latest researched version of everything. If the stockpile display looks stale, let the day tick.

research_on_icon_click is usually cleaner than research all. Clicking the exact technologies you need keeps the test realistic. research all is useful for a full sandbox, but it changes doctrines and combat behavior so much that it stops being a good test of normal timing.

The focus commands work the same way. focus.autocomplete speeds completion, focus.nochecks ignores requirements, and focus.ignoreprerequisites lets you jump around the tree. Combined, they can fire national content in strange orders, so they are better for debugging and scenario creation than for learning whether a real route is strong.

The console is excellent for learning when you isolate one cause. If an offensive fails, test one theory: equipment, supply, air, combat width, fuel, terrain, planning, or enemy strength. The air superiority and CAS guide and battle plans guide are better next steps than simply adding more manpower and declaring victory.

Territory, Cores, Occupation, and Nukes

Map-editing commands punish fuzzy thinking because HoI4's map has layers. Ownership, control, cores, occupation, states, and provinces are related, but they are not the same thing.

Ownership is who owns the state. Control is who currently holds a province or state during war. Cores are who treats a state as national territory. A country can have a core on land it does not own, own land it does not core, or control land during a war without owning it permanently.

Use setowner [TAG] for selected-state ownership, setcontroller [TAG] [province ID] for province control, and add_core [state ID] for cores on the country you currently control. If you need to core land for another country, tag into that country first. The clean workflow is to click or hover the relevant map area, run tdebug to verify the ID or owner, run the command, then let the game pass a day if the interface has not refreshed.

occupationpaint is a faster war-only map-paint tool. It does not belong in peacetime border cleanup. It belongs in scenario setup, capitulation tests, and war-state experiments where you deliberately want to paint control. If it appears to do nothing, first ask whether you are actually at war and whether the command is still active.

Nuclear commands are the clearest example of "stockpile" versus "delivery." nuke 50 gives you nuclear weapons, but delivery still has to work through the game's nuclear delivery path. If the bottleneck is research or project progress, use research and special projects console commands to accelerate that layer instead of pretending stockpiled nukes prove the delivery system.

Practical border repair: use tdebug to confirm the state, setowner [TAG] or add_core [state ID] for the intended layer, unpause through the daily tick, then recheck the tooltip before making the next edit.

Troubleshooting and Clean Testing

When a console command "does not work," the failure is usually one of a few boring causes. Fix those before searching for obscure alternatives.

  • You are in Ironman. Console commands are for non-Ironman saves. If the console will not open at all, this is the first thing to check.
  • Your keyboard shortcut is different. Try the common keys listed above before assuming the console is disabled.
  • You used the wrong target layer. States, provinces, countries, and selected leaders are different targets. gain_xp needs a selected leader. add_core needs a state. setcontroller is province-level.
  • You reversed the arguments. civilwar wants ideology first, country tag second. puppet wants overlord first, target second. whitepeace wants the two countries at war.
  • You used popularity when you meant government. add_party_popularity changes support. set_ruling_party changes who rules.
  • The command is a toggle and you left it on. If the AI is instantly building, researching, accepting deals, or behaving strangely, rerun the toggles you enabled.
  • The game has not ticked yet. Stockpiles, ownership, and some map edits may need a day before the UI fully catches up.
  • You expected unit deletion to remove everything. deleteallunits is broad and destructive, but air wings are a known exception in some setups. Use it as a blunt test tool, not a precision cleanup command.

For clean experiments, write down the one question you are answering before you cheat. "Can this 30-width tank break a supplied infantry line?" is a good question. "What if I add all tech, all equipment, instant construction, no AI, no weather, and nukes?" is a different activity. Both can be fun, but only the first one teaches you how to play better.

For a new player, the best console habit is restraint. Give yourself just enough to remove waiting, not enough to remove the mechanic. Add 300 XP to test templates. Add the equipment needed for one army. Turn on research_on_icon_click for the few technologies you need and turn it off. That keeps the lesson attached to the real game.

FAQ

Why will the HoI4 console not open?

You are probably in Ironman, using the wrong keyboard shortcut, or trying as a non-host client in multiplayer. Start a non-Ironman save and try ~, `, Shift+2, ALT+2+1, Shift+3, ^, or Shift+Alt+C.

What command should I use first?

Use tdebug. It reveals the tags and IDs that make the rest of the console useful. After that, use help [command] whenever you are unsure about argument order.

Does add_party_popularity change my government?

No. It changes party support. Use set_ruling_party f, set_ruling_party d, set_ruling_party n, or set_ruling_party c to change the ruling ideology directly.

Why did the AI suddenly build or research everything?

You left a global toggle on. instantconstruction, instanttraining, research_on_icon_click, and focus.autocomplete can affect AI countries while active. Run the same command again to turn it off.

How do I find state IDs and province IDs?

Run tdebug and hover the map. State IDs are for state-level commands like cores and ownership. Province IDs are for individual map tiles.

Can I use console commands in multiplayer?

The host can use the console; normal clients should not expect access. Treat it as a scenario setup or admin tool, and only use it when the group agrees.

Next Reads