[WOTC] Additional Soldier Console Commands

If you liked this mod, please rate it up on Steam Workshop page.
Author: shiremct
Last revision: 30 Jul at 06:29 UTC


[WOTC] Additional Soldier Console Commands

Currently adds three new console commands that can be used from the armory. Though the commands may be used to do cheaty things, the primary purpose of these commands are to help modders test and players integrate/update mod changes in their on-going campaigns:

LevelUpSelectedSoldier Ranks[INT]

Levels up just the currently selected soldier in the armory screen. The optional Ranks parameter lets you specify how many ranks to increase (defaults to 1 if unspecified).

Example – Level up the selected unit by 2 ranks:

LevelUpSelectedSoldier 2
RebuildSelectedSoldiersClass OPTIONAL_ChangeClassTo[FName] OPTIONAL_SetRankTo[INT]

Refreshes the ability tree and rerolls the XCOM abilities for the currently selected soldier in the armory screen. Used to update a class ability tree on an existing soldier that has been changed due to new mods or mod updates. Can use the optional parameters to change the soldier’s class and set their rank (up or down). Refreshing a Soldier’s Class will also reroll randomized stats from Point-Based NCE, Hidden Potential, etc. – unfortunately, this can’t really be avoided without causing issues with all sources of stat-gains (Covert Ops, RPGO stat purchases, etc.).

Use this instead of the vanillia MakeSoldierAClass command to change classes. The vanillia command does not properly support things like Beta Strike, NCE, XCOM/AWC Abilities, etc. Also supports classes that use the Highlander’s ClassesExcludedFromAWCRoll functionality.

Example – Change the currently selected unit to a rank 1 (squaddie) Ranger:

RebuildSelectedSoldiersClass Ranger 1
SetSelectedSoldiersComInt eComInt_CombatIntelligence[BYTE]

Sets the currently selected soldier’s Combat Intelligence level – use a value between 0 (standard) and 4 (savant). This will try to adjust the soldier’s AP accordingly and WILL adjust it into the negative if you drop Combat Intelligence and have already spent the AP (meaning the next ability you purchase with AP on that unit will take extra XCOM AP to cover the difference). Be careful of the resistance cards that boost AP gain – it will calculate expected AP values based on the current value.

Modified from code initially provided by PZ.

Example – Change the currently selected soldier’s Combat Intelligence to Gifted [2]:

SetSelectedSoldiersComInt 2

Thanks and Credits
  • PZ for providing the initial code for the command to set Combat Intelligence.

Version History

(See Change Notes for full history)


    • Added the SetSelectedSoldiersComInt command (thanks to PZ).
    • Added Console feedback messages indicating errors and successful command completions.
    • Updated the RebuildSelectedSoldiersClass command to reapply stat modifiers (like Beta Strike HP, NCE stats, etc.) to the unit. Note that randomized stats (NCE, Hidden Potential, etc.) will be rerolled.
    • Updated the RebuildSelectedSoldiersClass command to enforce a class’ required character templates (ex: you cant make a skirmisher character into a templar class).


    • Initial Release!.

If you think there is a need for additional commands, leave a suggestion.