XCOM 2
[WOTC] XpanD's Console Commands
Showing 1-7 of 7 entries
Update: 15 Sep, 2024 @ 12:20pm

Another big update!

New commands:

  • EndBattleForceWin: Ends a battle, force-completing all objectives! See text below.
  • FindTech: Lists info on a given research/PG project, or tries to find it if no exact match.
  • SearchAbilityDescriptions: Lists any abilities whose description matches the filter.
  • ForceShakeSoldier: Inflicts the Shaken status on a soldier, and sets will to zero. Strategy.
Fixes:
  • FindEquipment: Now correctly finds and displays weapon upgrades as well.
  • SetUnitCombatStat: No longer heals HP-modified units that are dead, reviving them. Oops.
  • ToggleShowCorpses: Blocked using the command in the photobooth. (TODO: mod menus)
Tweaks:
  • FindX commands now attempt to show the mod that created a given template as well.
  • Converted all FindX commands to 4-space indentation, like Amalgamation Console Helper.

EndBattleForceWin was contributed by BlackDog, and all credit for the command goes to him. The command was originally submitted as a Highlander addition, but they deemed it a better fit for a separate mod... and now it's in here!

Update: 13 Jun, 2024 @ 7:54am

Because three massive updates wasn't enough. Also, bugs.

New commands:

  • PrintDifficultyInfo: Prints current campaign difficulties, starting time and SW options.
Fixes:
  • Fixed a few commands editing history in risky ways. (thanks, Iridar)
  • BondSoldier: Fixed log spam. (pending states not always getting cleaned up properly)
  • UnbondSoldier: Fixed a regression causing it to never find any bonds. (thanks, Aucella)
  • SetSoldierAP: Fixed not being able to set AP to 0. (leftover from an old build)
  • HealSoldier/FixSoldier (strategy): Rewrote vague errors when used on healthy soldiers.
  • FindUnit: Removed some left-over debug messages. ("unit is tall!")
Tweaks:
  • Switched back to XCOM's own errors for missing arguments. Simpler, less likely to break.
  • Optional args now have a "OPTIONAL_" prefix. (like Additional Soldier Console Commands)
  • SetUnitCombatStat: Now ignores limits, restores after battle. See end note.
  • ToggleShowCorpses: Now stays active until toggled off, updating markers every second.
  • ToggleShowCorpses: Now also marks units that are carrying others, showing both names.
  • HealSoldier (combat): Made the unconscious/bleeding-out wake-up workaround safer.
  • SetSoldierNickname/FirstName/LastName: Now clears names when used with no args.
  • RollDie: Added an optional "number of rolls" argument to roll several numbers at once.
  • FindWeapon/Equipment: Now also prints schematics and what item things upgrade from.
  • FindUnit: Now prints stats, and takes an optional "difficulty variant" argument.

SetUnitCombatStat has been completely redone. The old version could only change the current value of stats, and could not exceed the stat's limits. The new one, however, directly sets the stat total, re-scaling limits as it goes. If you've ever wanted to fight (or befriend) a 500HP Sectopod, now's your chance!

Any changes should automatically be restored on battle end, even when units evac or are otherwise removed from play.

This was an absolute minefield to get set up, and while I've tested it extensively I would still recommend making a separate save before use, just in case. (especially if editing weird stats)

Update: 30 May, 2024 @ 2:48pm

Because two massive updates weren't enough.

New commands:

  • ToggleShowCorpses: Draws markers on the map to indicate corpse locations for looting.
  • ForceSoldierWeapon: Force-spawns a new weapon onto a soldier, even if not allowed.
  • SetUnitCombatStat: Changes the selected stat on the closest unit to the given value.
  • FindWeapon: Lists a weapon's info by template name, or tries to partial-match UI names.
  • FindEquipment: See above. Lists non-weapon equipment instead.
  • FindUnit (and DumpDataNameOnlyUnits): See above. Lists units. Useful for DropUnit!
Fixes:
  • Fixed a potential conflict with other mods that provide their own UnrealScript macros.
  • Fixed HealSoldier not being able to visually get unconscious/bleeding-out units back up.
Tweaks:
  • Added a quick and dirty semi-alphabetic sort to the Find commands. To be improved.

The HealSoldier fix is basically a hack, since the game doesn't seem to want to do this any other way. I've tested it extensively, but please save before reviving a downed soldier just in case!

(not expecting it to be an issue, but it MIGHT break on slow systems/setups)

Update: 9 May, 2024 @ 3:43pm

Because one massive update wasn't enough.

  • Added KillClosestEnemy, a safer and more reliable alternative to KillClosestUnitToCursor.
  • Also added KillAllEnemies as an alternative to KillAllAIs.
  • Added HideUIFlags, which hides UI message spam in strategy. (bottom left, useful if stuck)
  • Split off HealSoldier armor repairs into RepairSoldierArmor. (and fixed flaky repairs)
  • Fixed FixSoldier not being able to remove multi-turn stuns.
  • Fixed (?) some FixSoldier visualization weirdness when removing specific effects.
  • Fixed ListSoldiers occasionally miscounting in situations with one or more injured units.
  • Removed the extraneous "spawned a rookie" message from GiveRandomRookies.

KillClosestEnemy and KillAllEnemies should both handle things like mind-control and regeneration properly (unlike vanilla), and will print out what they're doing. They can also take an optional bool to target neutral units or even outright invert the selection, killing friendlies instead -- don't pass arguments unless you know what you're doing!

Note that with this update I've rewritten a good chunk of the mod, and split commands into their own class files based on campaign layer. I don't expect any significant changes in-game (other than some changed messages), but as always, let me know if anything breaks.

Update: 30 Apr, 2024 @ 9:57am

Biiiig update.

  • Added DropSoldier, letting you drop additional barracks units into combat!
  • Added ListSoldiers, which shows the full names of all deployed/available/injured units.
  • Added SetSoldierFirstName/LastName to complement SetSoldierNickname.
  • Added a few new debug commands: GiveRandomRookies, DropRandomSoldiers
  • FixSoldier and HealSoldier now work in combat as well! They'll target the nearest unit.
  • Fixed missing/incorrect errors on RollDie and FindAbility.
  • Changed most "soldier" mentions to "unit" and reworked many messages for consistency.

Note that DropSoldier is a bit experimental, as are the new in-combat uses for FixSoldier and HealSoldier.

Dropped soldiers should count as part of the squad (and come home in that way, too), but I haven't been able to check all mission types yet. Harehnoth did some preliminary testing in a CI campaign and that all looked good (thanks!), but LWOTC is untested and other mods could potentially interfere as well.

FixSoldier, when used in battle, both restores the unit's will and tries to clear any negative effects. This may occasionally have some funny effects on animations, but this should fix itself after moving or taking an action. ("fixing" Viper grabs is an exception here, need to think up a better way to handle that when I have more time -- expect visual jank)

HealSoldier's uses in battle are a bit more straight-forward, basically just healing a given unit back up to full health/armor and removing any newly-obtained wound timers. Its secondary feature (reviving soldiers that are unconscious or bleeding out) is a bit more experimental, though I don't think this will break.

Please save before using these in battle. I've tested everything pretty extensively, but I can't vouch for their reliability just yet. Let me know how it goes!

Update: 17 Dec, 2023 @ 8:18am

Added a bunch of new stuff! Check the main page to see what everything does.

  • New: BondSoldier, UnbondSoldier, SetSoldierNickname, RandomizeSoldierNickname
  • Fixed a few messages. (consistency, typos and missing "Error:" tags)

Update: 13 Dec, 2023 @ 8:38am

Initial release!