[WOTC] Training Roulette Second Wave Option

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

Author: shiremct

Last revision: 29 Sep, 2025 at 00:04 UTC

File size: 200.82 KB

On Steam Workshop

Description:

[WOTC] Training Roulette Second Wave Option

About the Mod

This mod adds a new Second Wave Advanced Option (Training Roulette) that, when enabled, will introduce configurable variety into the ability trees for supported classes inspired by the option in XCOM EU/EW.

This is primarily a tool for class modders or config tinkerers to utilize if they want to bring some randomization into their classes – though I have setup some illustrative support for the 4 base classes (Ranger, Sharpshooter, Grenadier, & Specialist) that mixes in abilities from Mitzruti’s Perk Pack, if installed.

Note: The included base game class configs are just to illustrate the functions and setup some content for release – if someone would like to put together some proper, amazing base-game class configs, I’ll happily disable these and link to yours instead!

How it Works

The configurable variety for a supported class is handled utilizing random decks from an alternate class config. Though RandomDeck support has of-course been available and in use for quite some time, those who have tried to utilize RandomDecks in soldier class configs in more advanced ways (or stitched ability trees like in Amalgamation) have likely run into issues and limitations with the current system that results in abilities being duplicated, unintended blank spaces in the tree, and a general lack of control over selection behavior.

To address these issues, the mod uses an event listener to trigger an alternative function to build the ability tree for supported soldier classes upon promotion that has the following features:

  • SW advanced option that can be turned on/off mid-campaign
    – (rebuilds and new reward units/rookie promotions will reflect option state at that time)
  • Allows optional config support for abilities from mods without hard dependencies
    – (if the rolled ability does not exist, remove it from deck and reroll)
  • Handling for duplicate abilities over multiple RandomDecks
    – (if the rolled ability has already been added to the tree, remove it from deck and reroll)
  • Mutual exclusion entries (OR statements) that will prevent one ability (A) when another (B) has already been added to the tree
    – (if excluding ability (B) is already in tree, remove rolled ability (A) from deck and reroll)
  • Pre-requisite entries (OR statements) that will skip an ability (A) if at least one pre-req (B, C, D, etc.) has not already been added to the tree
    – (if no pre-req abilities (B, C, D, etc.) are in tree, skip -not remove- ability (A) and reroll)
  • Rarity chance entries (OR statements) that will roll to skip an ability (A), either in general, or based on combo with another ability (B) already in the tree
    – (when ability (A) is rolled, do a %-chance check to skip -not remove- and reroll)
  • Forced injection entries to assign a specific ability to the tree at that spot if it has not been added previously, and roll normally if already present in the tree
    – (when these entries are present at a rank, they will be processed first, bypassing all rolls)
  • Control entries can be setup to apply only to specific classes (recommended) or applied universally to any class supporting the SWO (generally not recommended)
  • Method to assign placeholder RandomDeck to tell the function to use full CrossClassAbilities as deck, minus any ExcludedAbilities entries from original class
    – (placeholder deck is ‘XCOM_AWC_Deck’ & must be assigned to class, see examples)
  • Everything is config-setup in XComClassData.ini – any classes that do not have config support for the SWO will be unaffected and will simply build as normal
    – (option can be active and used without issues with unsupported classes)
  • Ability for classes to opt-in to the build features regardless if SW option is activated
    – (when a class in base form wants to utilize these random deck control features)

With these features, you can setup randomization/variation that is as open or as controlled as you want for your class; it can range from complete chaos (every slot just XCOM CrossClassAbilities) to guided, branching paths (all options in subsequent ranks tied to a previous rank’s selection).

Dependencies and Suggested Mods

The following mods are required for things to work properly:

Known Issues and Incompatibilities

I’ve tried to account for and catch all ways a soldier can be created or promoted, but there may be a few cases missed. Some known issues include the base-game console commands to rebuild soldiers and level up the barracks (if jumping more than 1 level) These commands promote units without submitting gamestates, which means event listeners can’t respond. Use RebuildSelectedSoldiersClass command from Additional Soldier Console Commands instead.

Thanks and Credits

Special thanks to Zelfana and Tedster for some help getting promotion logic working in console commands and Mitzruti’s perk pack for abilities used to setup starter content!

Version History

(See Change Notes for full history)

    1.1.0

    • Reworked linkage for classes and their variants that store the SWO ability tree:
    • Now uses an array to define what class to use when the Training Roulette option is active rather than a predefined variant with a fixed naming convention. You can now name a SWO class whatever you like and there can be multiple potential variants defined for a class by multiple mod authors.
    • When multiple variants exist, will randomly choose from valid options. Result is stored and reused with rebuild commands, and rerolled with reset commands.

    1.0.0

    • Initial Release!
Download
Required DLC:

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


XCOM 2: War of the Chosen
Required items:

Click the title to search on this site.


X2WOTCCommunityHighlander v1.29.0Steam Workshop