Company of Heroes 2 Console Commands: Codes for PC

Published by

Resources

CheatCommandEffect
Set manpowerPCPlayer_SetResource(Game_GetLocalPlayer(), RT_Manpower, 9999)Sets your manpower to 9,999; change the number for a different amount
Set munitionsPCPlayer_SetResource(Game_GetLocalPlayer(), RT_Munition, 9999)Sets your munitions to 9,999; note the spelling RT_Munition
Set fuelPCPlayer_SetResource(Game_GetLocalPlayer(), RT_Fuel, 9999)Sets your fuel to 9,999
Command pointsPCPlayer_SetResource(Game_GetLocalPlayer(), RT_Command, 5)Gives 5 command points; set only as many as your abilities need
Raise population capPCPlayer_SetPopCapOverride(Game_GetLocalPlayer(), 1000)Raises your population cap to 1,000

Resource income

CheatCommandEffect
Double manpower incomePCModify_PlayerResourceRate(Game_GetLocalPlayer(), RT_Manpower, 2)Multiplies your manpower per minute by 2
Double munitions incomePCModify_PlayerResourceRate(Game_GetLocalPlayer(), RT_Munition, 2)Multiplies your munitions per minute by 2
Double fuel incomePCModify_PlayerResourceRate(Game_GetLocalPlayer(), RT_Fuel, 2)Multiplies your fuel per minute by 2

Map and vision

CheatCommandEffect
Reveal the mapPCFOW_RevealAllToggles the fog of war, showing the whole map and every unit

AI control

CheatCommandEffect
Switch off all AIPCAI_EnableAll(false)Disables every AI player
Switch AI back onPCAI_EnableAll(true)Enables every AI player again
Let the AI play for youPCMisc_AIControlLocalPlayer()Hands your side over to the AI

Developer mode

CheatCommandEffect
Enable the consolePC-devSteam launch option that turns on developer mode and the SCAR console

A code here did not work? Tell us and it gets rechecked. Report a code

How to enter cheats in Company of Heroes 2

PC

  1. In your Steam library, right-click Company of Heroes 2, open Properties and add -dev to the launch options.
  2. Start a campaign mission or a custom game against the AI.
  3. Once the map loads, press Ctrl + Shift + ~ to open the SCAR console; some guides use Alt + Shift + ~.
  4. Type or paste a command exactly and press Enter.

How to enable developer mode in Company of Heroes 2

  1. In your Steam library, right-click Company of Heroes 2 and choose Properties.
  2. Under General, set the launch options to -dev and close the window.
  3. Start the game and load a campaign mission or a custom game against the AI.
  4. Press Ctrl + Shift + ~ (or Alt + Shift + ~) to open the SCAR console.
  5. Delete -dev from the launch options when you want to play ranked again.

Steam Community Guide: COH2 console cheats and commands

Can you use these cheats in multiplayer?

No. Starting with -dev disables automatching, because only other players running -dev can join you, and a reply in the Steam thread says the commands cause a sync error in multiplayer. They are meant for the campaign and custom games against the AI. Steam Community: Company of Heroes 2 SCAR console resources discussion

Compatibility notes

Which releases these codes apply to, and where one behaves differently. Each note links to the source that documents it.

FAQ

How do you open the console in Company of Heroes 2?

Add -dev to the Steam launch options, start a match and press Ctrl + Shift + ~. Some guides give Alt + Shift + ~ instead.

Is there a resource cheat in Company of Heroes 2?

Yes. Player_SetResource(Game_GetLocalPlayer(), RT_Manpower, 9999) sets your manpower, and the same command with RT_Munition or RT_Fuel sets munitions and fuel.

Can you use console commands in Company of Heroes 2 multiplayer?

No. With -dev you cannot automatch, and the Steam guide says the commands either do not work online or cause a desync that ruins the match.

Part of

References: Steam Community Guide: COH2 console cheats and commands; Steam Community: Company of Heroes 2 SCAR console resources discussion; GamingPH: Company of Heroes 2 resources and population cap without a trainer.