[WOTC] Reward Soldier Classes

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

Author: lordabizi

Last revision: 3 May at 05:59 UTC

File size: 765.09 KB

On Steam Workshop

Description:
Reward Soldier Classes

Abstract

This mod allows the player to turn certain classes into reward-only classes.


Overview

The goal of this mod, is to create a framework to allow the player to designate some classes as "reward-only" classes. Such classes will then no longer be available as random promotions, and the only way to obtain them is by mission rewards, scanning sites, or being availabl at the black market. This allows the player to diversify the class roster while retaining the unique character of certain classes.

The way this mod works is by an Event Listener for the "Reward Soldier Generated" event. Upon intercepting the event, the mod rolls a class from the deck defined within the configs, and changes the created soldier’s classs into the new class.

The class selection is done by emulating a deck: each reward class has a number of decks in a card, and each class rerolling uses one card in the deck. Once the deck is empty, the entire deck is reshuffled.

On its own this mod does nothing.


Configuration

XComRewardClasses – The only config file this mod has. The main tool is the RewardClasses array in which the player defines the new classes to be used as rewards. See the example provided within for reference.
DontChangeThoseClasses gives you a list of classes that should not be rerolled. By default this includes the rookie class (for rookie reward scanning sites). This can also be used if the player wants to preserve some of the "normal" classes to funciton as reward classes.
BannedCharacterTemplates is a list of character templates for which the mod will refuse to reroll a class. Should include custom character templates. If using for exmaple playable aliens, it’s probably wise to add them (otherwise it could be that Mutons would lose their class).


Compatibility

Compatibility with modded character templates like Playable Aliens is on the user’s responsibility, as explained above.
To make this mod compatible, with, e.g., TeslaRage’s "Resuce Resistance Leader" mod, add the classes eligible for the chain to the DontChangeThoseClasses array.
The mod should work on existing campaign, but will not change retroactively any existing rewards (for example if the Black Market currently has a soldier reward, its class will not be changed. Next month it should).


Required Mods

No.


Known Issues
  • This mod should prevent the reward classes from showing up on promotions, but it might fail to do so because reasons. The player can use Disable Any Class Redux to prevent those classes from being eligible. It will not hurt the function of this mod.

This mod has several console commands to monitor its behavior:
RewardClassDecks_Print – Prints the current status of the reward deck.
RewardClassDecks_Rebuild – Rebuilds the current status of the deck. Necessary if config changes are made during the campaign.
RewardClassDecks_ModifyCardCounts – Allows manual modification to the deck.


Acknowledgements

The author is extremely grateful to Zelfana and Iridar for useful discussions related to this work.
The author is also grateful to DiesIrae for useful discussions and beta testing this mod.
As usual, the author is grateful to the members of the MEME Discord server for useful discussions and continued emotional support.
Hamas is ISIS.