[WOTC] XpanD’s Console Commands

If you liked this item, please rate it up on Steam Workshop page.

Author: XpanD

Last revision: 28 Aug, 2025 at 13:47 UTC (4)

File size: 1.32 MB

On Steam Workshop

Description:

Adds several new console commands to the game. Part utility, part developer stuff, part blatant cheating. (I won’t judge)

Usage:

Angle bracket arguments ("<" and ">") are required, square bracket ones ("[" and "]") are optional. Arguments with a question mark are boolean — they accept either "true" or "false". Debug commands are rough drafts for testing purposes.

Brackets are only used to show whether an argument is required or not. Do not include them!

This will work: SetUnitCombatStat Offense 50
This does not: SetUnitCombatStat <Offense> <50>

DropSoldier and SetUnitCombatStat are still experimental. Proceed with caution, and report any issues! (see the Change Notes page for the latest details)

Tactical commands:

EndBattleForceWin
Attempts to force-complete all objectives, and then ends the mission. See special thanks.

HealSoldier [target non-allies instead?]
Fully heals the closest unit, wakes them up if unconscious and removes bleed-outs.

FixSoldier [target non-allies instead?]
Refreshes the closest unit’s will, restores AP and removes negative statuses.

RepairSoldierArmor [target non-allies instead?]
Repairs shredded armor on the closest unit, and refreshes ablative shielding.

SetUnitCombatStat <stat type to adjust> <new value>
Changes the selected stat on the closest unit to the given max value. Reverts on battle end.

KillClosestEnemy [target neutral units?] [target allies instead of enemies?]
Kills the closest enemy to the cursor. Handles stuff like mind control and regeneration properly.

KillAllEnemies [target neutral units?] [target allies instead of enemies?]
Kills all enemies on the field. Save first, potentially very dangerous! (if using arguments)

ToggleShowCorpses
Draws markers on the map to indicate actual corpse locations for looting, can’t trust the game. Updated every second, use again to disable. Made to be paired with Extract Corpses.

ToggleShowPCPs [draw boxes at real size?]
Draws boxes and text on the map to show the boundaries of all plot cover parcels. By default, extends boxes by 50UU vertically for visibility. Best used with ToggleFreeView.

DropSoldier <full name of unit, no nickname>
Drops undeployed units into combat at the cursor, using whatever gear they had equipped last. Note that the game randomly unequips soldiers sometimes, check beforehand if possible!

Debug: DropRandomSoldiers

Strategy commands:

HealSoldier
Fully heals the selected soldier or SPARK.

FixSoldier
Restores the selected soldier’s will, and removes status effects like Tired/Shaken.

BondSoldier <full name of second unit, no nickname>
Increases the bond between the selected soldier and the targeted one by one level.

UnbondSoldier
Breaks all of the selected soldier’s current bonds. (yes, they can have multiple!)

SetSoldierAP <amount>
Sets the selected soldier’s number of personal (non-XCOM) ability points.

ForceShakeSoldier
Forces the selected soldier into a shaken state, and sets their will to zero.

ForceSoldierWeapon <weapon template name> [replace unique weapons?]
Force-spawns a weapon onto the selected soldier, even if they can’t equip it otherwise.

RandomizeSoldierNickname
Randomizes the selected soldier’s nickname, picked from nicknames normally available to them.

SetSoldierNickname <nickname>
Sets the selected soldier’s nickname, even if they’re not eligible for one yet. Allows illegal characters and >11-character nicknames, apply at your own risk! (very stable in tests, but yeah)

SetSoldierFirstName/LastName <name>
Sets the selected soldier’s first or last name. Also allows illegal characters and long names.

Debug: HideUIFlags, GiveRandomRookies <number of rookies>

Universal commands:

RollDie <highest number> [number of numbers to roll]
Rolls one or more random numbers between 1 and the given highest number. (inclusive)

SearchAbilityDescriptions <part of description>
Searches for abilities by their descriptions.

ListSoldiers [show unavailable units?]
Lists all available/deployed units. Passing "true" also lets it show infiltrating units.

PrintDifficultyInfo
Shows a bunch of info on the current campaign, including difficulty and when it was started.

PrintLevelInfo
Shows level/world info such as the current map name and any parcels.

ToggleFreeView
Toggles Fog of War, UI visibility, unit outlines and, if available, the Better Debug Camera.

Debug: DumpHelpTextOnlyAbilities, DumpDataNameOnlyUnits, DebugSetFixedTimeMult

FindX commands:

If a template name is provided, these show any available names/description, the parent class, and any other info. Otherwise, they’ll show a list of things matching the provided arguments.

FindAbility: Abilities.
FindWeapon: Weapons. Also counts heavy-slot weapons.
FindEquipment: Non-weapon equipment. (as determined by the game)
FindMiscItem or FindResource: Other items, such as resources and certain in-mission rewards.
FindHackReward: Hack rewards, and intel unlocks for "special" missions.
FindTech: Research, Proving Ground and Shadow Chamber projects.
FindUnit: Units. (nice for DropUnitImproved).
FindCommand: Console commands. Best-effort, may miss stuff. Partial matches only.

Compatibility:

No overrides and no hard requirements, should be compatible with just about anything!

(may end up requiring Highlander in the future, but that should be about it)

Other console mods:

Additional Soldier Console Commands: The de-facto mod for changing soldier classes/stats.
Xylth Debugging Tools: Allows granting abilities/kills. Check description for overrides! (dev mod)
Bstars Scope: Dumps LOTS of info to the log for the selected unit. Nice for dev/troubleshooting.
Improved Friendly Reinforcement Mechanics: Adds a nicer DropUnit, fixes AICallReinforcements.
MEME Give Soldier Command: Lets you add new rookies, either random or by name.
Amalgamation Console Helper: Adds lots of new commands for the Amalgamation overhaul.

Special thanks:
  • shiremct for Additional Soldier Console Commands. Big inspiration and a solid reference.
  • Iridar, RustyDios, Zelfana, Tedster, SwfDelicious and others for their extensive help.
  • BlackDog for contributing the EndBattleForceWin command. Finally a thing now!
  • The helpful people of the XCOM 2 Modding Discord in general.
Download
Required DLC:

These DLC should be installed in order to use this item.


XCOM 2: War of the Chosen
Revisions:

Old revisions of this mod are available below. Click the link to download.