XCOM 2 has a developer console, but it is switched off by default. Add a launch option, load into a game and the same commands work in the base game and in War of the Chosen (WOTC). A few commands are WOTC only.
The list below is checked against two command references and the Long War 2 (LW2) reference at Ufopaedia. Item and resource IDs are copied from those pages.
How to enable and open the console in XCOM 2
- Steam: right-click XCOM 2, open Properties, General, and add -allowconsole to Launch Options.
- Non-Steam: add -allowconsole to the end of the shortcut's Target field. GOG users can do the same.
- Launch the game and load into a save. Commands do nothing on the main menu.
- Press ~ to open the console. Other keys that may work depending on layout are ' (UK) or \.
- Type enablecheats first, then your command, and press Enter.
This is PC only. No source covers commands on console versions.
How XCOM 2 commands work
- Replace # or [brackets] with a value. Do not type the brackets.
- Commands are not case sensitive in the lists, but item IDs are shown as written.
- You can chain several commands on one line with the | symbol (stated in the LW2 reference).
- Some commands need an existing item: giveresource only works if you already own at least one of that resource.
XCOM 2 commands list
Resources and items (Avenger)
| Command | What it does |
|---|---|
enablecheats |
Turns on command use. Run it first. |
giveresource Intel 100 |
Sets or adds a resource. You must already have one. |
giveresource supplies 500 |
Supplies. |
giveresource AlienAlloy 100 |
Alien Alloys. |
giveresource EleriumDust 100 |
Elerium Crystals. |
giveresource EleriumCore 5 |
Elerium Cores. |
additem lightpoweredarmor 1 |
Wraith Suit. |
additem heavypoweredarmor 1 |
W.A.R. Suit. |
additem EpicPCSAgility 1 |
PCS: Superior Agility. |
Research, staff and facilities
| Command | What it does |
|---|---|
givetech <tech id> |
Researches a technology instantly. |
givescientist 5 |
Gives a scientist of that level. Replaces your current one. |
giveengineer 5 |
Gives an engineer of that level. Replaces your current one. |
givefacility <facility id> <index> |
Places a facility. Nothing happens if the slot is occupied. |
removefortressdoom <amount> |
Removes doom from the Avatar Project. |
Soldiers
| Command | What it does |
|---|---|
levelupbarracks <amount> |
Levels up all barracks soldiers. |
healallsoldiers |
Heals all barracks soldiers fully. |
setsoldierstat <stat id> <value> <name> 1 |
Sets a soldier stat. The 0/1 argument is needed with WOTC. |
makesoldieraclass "<soldier name>" <class id> |
Changes class and demotes to squaddie. Save first. |
givefactionsoldiers |
WOTC only. Gives one soldier from each faction. |
bondsoldiers "<name>" "<name>" true |
WOTC only. Bonds two soldiers. |
Missions
| Command | What it does |
|---|---|
takenodamage |
Toggles invincibility for your soldiers. |
powerup |
Toggles god mode for your squad (not the AI). |
toggleunlimitedammo |
Toggles unlimited ammo for you and the AI. |
toggleunlimitedactions |
Toggles unlimited action points for you and the AI. |
forcecrithits |
Toggles 100% crit chance for you and the AI. |
togglefow |
Toggles Fog of War. |
ttc |
Teleports the selected unit to the cursor. |
tatc |
Teleports all units to the cursor. |
skipai |
Ends the AI's turn. |
endbattle 1 |
Ends the mission. 1 counts as a win only if all objectives are complete. |
slomo 0.5 |
Changes game speed. 2 is double speed, 0.5 is half. |
XCOM 2 WOTC and War of the Chosen console commands
The same console and the same enablecheats step apply to War of the Chosen. Differences found in sources: setsoldierstat needs an extra 0 or 1 argument, and bondsoldiers and givefactionsoldiers only exist with the expansion.
XCOM 2 console commands for LWOTC and Long War 2
Long War 2 adds its own commands, listed on the Ufopaedia reference. Examples: LWForceMission <mission> <WorldRegion_X>, LWSetAlertLevel <#> <WorldRegion_X>, LWAddRebel <is faceless 1/0> <#> <WorldRegion_X> and LWForceEvac. That page covers LW2, and it does not explain how to enable the console or confirm everything for LWOTC, so check commands in game. Some entries on it are marked as unverified.
XCOM 2 console commands not working
- Check -allowconsole is in the launch options, then fully restart the game.
- Load into a save before typing, since commands do nothing on the menu.
- Try another key: ~, ' or \ depending on layout.
- Run enablecheats first.
- Use mission commands only in a mission, and Avenger commands in the Avenger base.
- For giveresource, own at least one of that resource first.
Why XCOM 2 console commands are not working
- Console will not open: check the launch option and try ~, ' and \. One player reported the flag alone did not work for them, and no cause was identified.
- Command is ignored: run enablecheats, and make sure you are in the right mode (mission or Avenger).
- Resource command fails: you must already own some of that resource.
- WOTC command unknown: it may need the expansion installed.
XCOM 2 console commands FAQ
How do I use XCOM 2 console commands?
Add -allowconsole to the launch options, load a save, press ~, type enablecheats, then enter a command such as giveresource Intel 100.
Do XCOM 2 WOTC console commands work the same way?
Yes. The same launch option and enablecheats step apply. A few commands such as bondsoldiers and givefactionsoldiers need War of the Chosen.
Why are XCOM 2 console commands not working?
The most common causes are a missing -allowconsole launch option, not loading a save first, skipping enablecheats, or using a mission command in the Avenger.
Do XCOM 2 console commands work for LWOTC?
Long War 2 has its own command list on Ufopaedia, but how to enable the console for LWOTC was not confirmed. Try the same launch option and check commands in game.
Which key opens the XCOM 2 console?
Usually ~. Depending on keyboard layout, ' or \ may work instead.
How do I get free resources in XCOM 2?
Use giveresource <id> <amount>, for example giveresource supplies 500. You must already own at least one of that resource.
Can I make my soldiers invincible in XCOM 2?
Use takenodamage during a mission to toggle invincibility. powerup toggles god mode for your squad.
More cheat guides
- EU4 Console Commands: Money, Monarch Points, Tag, Events
- CK3 Console Commands: Debug Mode, Traits, AGOT
- Stellaris Console Commands: PC List and Xbox Answer
- HOI4 Console Commands: Equipment, Tension, Research, Tag
- All Strategy cheat codes
- All game cheat codes
Sources
- Commands.gg – XCOM 2 console commands
- Magic Game World – XCOM 2 War of the Chosen console commands
- Ufopaedia – Console Commands (LW2)
Leave a Reply