XCOM 2
Not enough ratings
Liberators Specialization System Documentation
By Chris The Thin Mint
Information for creating content mods for the Liberators Specialization System.
   
Award
Favorite
Favorited
Unfavorite
Basics
This is documentation for my Specialization System.

See more info on creating a mod here https://www.reddit.com/r/xcom2mods/wiki/index

Further info will be added whenever the mod is updated.
Adding a specialization
To do so, add a XComSpecializationSystem.ini config file to your mod.

This entry registers a specialization. I recommend adding a prefix (e.g. LW2_) to your name, as specialization names are unique and can't be added twice.
[LiberatorsSpecializationSystem.X2Specializations] +Specializations=YourSpecName

To remove the original example specializations included in the mod you can also add these lines:
-Specializations=STCO_Unique_Skirmisher -Specializations=STCO_Unique_Reaper -Specializations=STCO_Unique_Templar -Specializations=STCO_Sharpshooter -Specializations=STCO_Recon -Specializations=STCO_Gunslinger -Specializations=STCO_Shinobi -Specializations=STCO_Kenshi -Specializations=STCO_Ranger -Specializations=STCO_Outlaw -Specializations=STCO_Assault -Specializations=STCO_StunGunner -Specializations=STCO_Gunner -Specializations=STCO_Grenadier -Specializations=STCO_Specialist -Specializations=STCO_Technical

There are two parts to a specialization, the first is defining the basics:
[YourSpecName X2SpecializationTemplate] +IconImage="img:///UILibrary_Common.class_sharpshooter**" +DisplayName="Title of your specialization" +Summary="Shown as basic information for all specializations in the selection screen, and is used as the class summary on the abilities screen when selected as primary specialization" +Abilities=(AbilityName="***", ApplyToWeaponSlot=eInvSlot_Unknown) +Abilities=(AbilityName="***", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) +Abilities=(AbilityName="***", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) +Abilities=(AbilityName="***", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) +Abilities=(AbilityName="***", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) +Abilities=(AbilityName="***", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) +Abilities=(AbilityName="***", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) +Abilities=(AbilityName="***", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)

Unlike RPGO, specialization titles and summary are also set here for easier crossreferencing (localization for different languages will be supported at some point, but is non-vital considering the lack of it in many other mods).

** the address of the class icon can be found in the XComClassData.ini of the original class mod.

You then set the list of abilities that will fill one row of perks in the perk tree, regardless of how the specialization is acquired.

*** is a placeholder for whatever abilities you want to give the specialization from the original class. Note also adjust ApplyToWeaponSlot=... entries here, certain perks need to be assigned to certain slots to work. If you want further control over which weapon abilities are assigned to i recommend using Ability To Slot Reassignment.

The second part is the advanced definition. For certain universal classes, the default one included, the first specialization selected has to be a primary specialization, which grants access to additional perks.
CanBeCoreSpec = true .CoreAbilities=(AbilityName="", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) .CoreAbilities=(AbilityName="", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) .CoreAbilities=(AbilityName="", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) .CoreAbilities=(AbilityName="", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) .CoreAbilities=(AbilityName="", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) .CoreAbilities=(AbilityName="", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) .CoreAbilities=(AbilityName="", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) .CoreAbilities=(AbilityName="", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) +CoreSummary="Shown as additional information for a primary specialization, and added to the full class summary on the abilities screen"
For the new specialization to support this we enable CanBeCoreSpec, and then set a second list of abilities that will only be available when the specialization is acquired as a primary specialization. We can also add a second description that only shows up in that case.

Universal classes
Universal classes are preexisting or new class templates that are registered to interact with the specialization system.

The specialization system can interact with units in three ways:
- The unit has a universal class already, and it persists.
- The unit does not have a universal class, and is assigned the default one (UniversalSoldier).
- The unit does not have a universal class, but its current class or its character type is excluded, which means it is not changed in any way and continues to select perks from its original perk tree.

To exclude class or character templates, add them to these lists in a XComSpecializationSystem.ini config file:
[LiberatorsSpecializationSystem.SpecializationUtilities] +ExcludedCharacters=CharacterTemplateHere +ExcludedClasses=ClassTemplateHere

You should register a new universal class if:
- There are certain mechanics that only work with the class in question, but you also want to be able to choose specializations with them.
- The class is acquired in a specific way (e.g. heroes) and you want to reward that with different
specialization mechanics.
- You want certain units to have different rules about how and which specializations can be selected.

You should NOT register a universal class if:
- You expect their original abilities to persist. Normal perk trees and the specialization system are incompatible. To allow a class to coexist use ExcludedClasses or ExcludedCharacters.

To add a universal class, add this in a XComSpecializationSystem.ini config file and change it as required:
[LiberatorsSpecializationSystem.SpecializationUtilities] +UniversalClasses = (ClassName = YourClassNameHere, HasCoreSpec = true, MaxSpecializations = 4, UniqueSpec = '', CanReplaceOwnedSpecs = false)

The properties are as follows:
  • HasCoreSpec - Determines whether the class uses primary specializations, as described one section above. A class without this will never be able to acquire advanced perks and will retain its basic class icon, title and description.
  • MaxSpecializations - The number of specializations the class can acquire. Primary specializations count twice for this!
  • UniqueSpec - If you want your class to have a unique specialization that they always start with, set it here. If HasCoreSpec is true the unique specialization will count as a primary specialization, even if it doesnt have advanced perks defined. To make specializations fully unique, aka only available when added this way and not removable, then set IsUnique to true in their definition.
  • CanReplaceOwnedSpecs - If this is true, then the class is able to remove previously confirmed (non-unique) specializations at any time.