Hearts of Iron 4 console commands and how to use them

A list of all HOI4 cheats to use in game, with console commands to alter HOI4 equipment, puppeting, world tension, resource, and more.

HOI4 console commands Rommel standing on top of a tank in the desert

Hearts of Iron 4 console commands are basically cheats – manual code inputs that automatically change important stuff about the game, without having to play your way there – like resource or equipment cheats to give you an economic boost, or puppet cheats to help grow your empire faster. To help you out, this guide lists all the HOI4 cheats, and explains exactly how to use them in game.

Once you’ve found your feet, you should definitely check out our guides to the best Hearts of Iron 4 mods and Hearts of Iron 4 DLC, to expand the historical horizons of your HOI4 campaigns.

Alternatively, you could take a Hearts of Iron break and check out our broader guides to the best WW2 games, the best grand strategy games, and the best 4x games available.

For now, though, read on for the full list of codes, plus a no-nonsense beginner’s tutorial on how to use them in-game. 

HOI4 console commands infantry charge forwards through tank traps on a beach

Hearts of Iron 4 console commands list

  • manpower [amount] – Adds a specified amount of manpower to your reserves
  • nu [number] – Adds the specified amount of National Unity to your pool
  • xp [XP amount] – Add a specified amount of XP to your Army, Navy, and Air forces
  • pp [political power amount] – Add a specified amount of political power to your pool
  • instantconstruction – Completes all construction tasks instantly. Can be toggled on or off
  • focus.autocomplete – Instantly complete your National Focus
  • research_on_icon_click – Instantly research any technology you click on in the tech tree
  • research [slot ID | all] – Research a specified technology slot, or all technologies at once
  • allowdiplo – Removes all diplomacy rules, letting you freely use all diplomatic actions
  • ai_accept – Makes AI opponents accept all diplomatic offers
  • winwars – Gives you the maximum war score for every current war
    debug_nuking – Removes all nuke rules, letting you use nukes against any province
  • gain_xp [amount] – Add a specified amount of XP to a selected General, Admiral, or Leader
  • gain_xp [trait] – Add a specified trait to a selected General, Admiral, or Leader
  • cp [amount] – Increase your Command Power by a specified amount (capped to 100%)
  • st [amount] – Increase your Government’s stability by a specified amount (capped to 100%)
  • ws [amount] – Increase your nation’s War Support by a specified amount (capped to 100%)
  • instant_prepare – Naval invasion preparations are instantaneous. Requires debug mode to be activated by entering tdebug into the command console
  • fow – Removes fog of war. Toggle on or off
  • teleport [province ID] – Teleport all selected units to the target province.
  • tag [country tag] – Change the country you’re playing as
  • Allowtraits – Lets you freely assign traits to Generals and Admirals.
  • add_equipment [amount] [name] – Add a specified amount of a selected equipment type to your national supply.
  • add_latest_equipment [amount] – Add a specified amount of the latest equipment type used to your supply.
  • whitepeace(wp) [country tags] – Impose a White Peace between two specified countries.
  • event [event ID] [country tag] – Executes an event in the target country.
  • annex [country tag] – Begin annexing the target country
  • add_opinion [country tag] – Increase the specified country’s opinion of you by 100
  • observe – Makes you a spectator in the game
  • spawn [sub unit type] [province ID] [amount] – Spawns the specified unit in a target province Requires debug mode to be activated by entering tdebug into the command console
  • setowner [country tag] – Give ownership of a state to a specified country. Select the state with your cursor before entering the code
  • setcontroller [country tag] [province ID] – Give control of a province to a specified country
  • fuel [amount] – Add a specified amount of fuel to your deposits
  • civilwar [ideology] [target country tag] – Create a civil war in the target country, instigated by one of four ideologies: ‘communism’, ‘fascism’, ‘democratic,’ or ‘neutral’
  • add_party_popularity [ideology group] [value] – Add a specified amount of popularity to the chosen ideological group: ‘communism’, ‘fascism’, ‘democratic,’ or ‘neutral’.
  • set_ruling_party [ideology group] – Make the specified ideological group the ruling party, from ‘communism’, ‘fascism’, ‘democratic,’ or ‘neutral’
  • Focus.NoChecks – Lets you ignore National Focus requirements
  • Focus.IgnorePrerequisites – Lets you ignore National Focus prerequisites
  • Decision.NoChecks – Lets you ignore Decision requirements
  • instanttraining – Divisions and ships are instantaneously trained
  • nuke [number] – Adds the specified number of nukes to your reserves
  • add_core [state ID] [country tag] – Makes the specified state a ‘core’ of the target country
  • Prevent_operative_detection – Prevents your operatives from being detected
  • Nomapicons – Removes icons from the map. Toggle on or off.
  • Nopausetext – Removes text on the pause menu. Toggle on or off
  • Instant_wargoal – Lets you use any war goal without a justification

And that’s all of ’em!

Hopefully you find some to deploy in your next alternate history WW2 that’ll either turn the tide in your favor, or at the very least make something silly, ahistorical, and entertaining happen. 

HOI4 console commands a standing on top of tank as it drives onto a beach

How to use Hearts of Iron 4 cheats

To use Hearts of Iron 4 cheats, you’ll first have to open the game’s command console. Load up a save file and press the TAB key to bring up the panel (the key might differ between keyboards, so try ~, `, “, or ^ if nothing happens). After that, simply type in the relevant console command code, and slam the enter button. Hey presto, you’ve just activated a cheat!

Some codes will require a ‘country tag’ or ‘state ID’ to use. Finding these is super easy using our HOI4 country tags guide, which lists every country tag in the game. Or, if you want to create more work for yourself, open the command console, enter tdebug, and hover your cursor over the relevant country to reveal an info panel. The country tag will be a three-letter code (e.g. POL for Poland), and its other IDs will be listed.

As a final word of advice, it’s best to save your game before entering a console command. They’re unlikely to corrupt your save file, but it would be a shame if you entered the wrong code by mistake, and cheated any more than you had to.

If you’re on the lookout for codes, commands, and cheats for other PC games – hit up our sister site CodesDb for a massive database of the best free game codes.

Or, if you’re set on playing war, try our list of the best miniature wargames, our favorite WW2 board games and the best war board games in general.