XCOM 2
Musashis RPG Overhaul
 This topic has been pinned, so it's probably important
Musashi  [developer] Jul 24, 2018 @ 12:12pm
Create a specialization from a class mod (tutorial)
How to make a plugin mod that converts any class mod to a rpgo specialization

IMPORTANT BEFORE YOU START: Disable the "RPG Overhaul - The New Perk Order" mod
it wipes all specs and only readds the ones in its config. So if you have that mod active
your new spec wont show up.

Basically all you need to create a mod with two ini files and one localization file.
- XComClassData.ini
- XComRPG.ini
- XCOM2RPGOverhaul.int

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

the files and their contents in detail

Disable the original class

Add a XComClassData.ini and disable the original class like

(replace CustomClassName with whatever class name you are working with)

[CustomClassName X2SoldierClassTemplate] -NumInForcedDeck=1 -NumInDeck=4 +NumInForcedDeck=0 +NumInDeck=0

Add the RPGO specialization config

Add a XComRPG.ini and add the following entries

[XCOM2RPGOverhaul.X2TemplateHelper_RPGOverhaul] +Specializations=(Order=1000*, TemplateName=CustomClassName) [CustomClassName X2UniversalSoldierClassInfo] ClassSpecializationIcon = "img:///path_to_the_class_icon**" +AbilitySlots=(AbilityType=(AbilityName="CorporalAbility***")) +AbilitySlots=(AbilityType=(AbilityName="SergeantAbility***")) +AbilitySlots=(AbilityType=(AbilityName="LieutenantAbility***")) +AbilitySlots=(AbilityType=(AbilityName="CaptainAbility***")) +AbilitySlots=(AbilityType=(AbilityName="MajorAbility***")) +AbilitySlots=(AbilityType=(AbilityName="ColonelAbility***")) +AbilitySlots=(AbilityType=(AbilityName="BrigadierAbility***")) ;Uncomment below to add meta informations for the random classes and weapon restriction swo ;See the paragraph about SpecializationMetaInfo below for more information ;SpecializationMetaInfo = ... ; Uncomment below if you want to add abilities to the traits pool ;+AdditionalRandomTraits=(AbilityName="AdditionalTrait1") ;+AdditionalRandomTraits=(AbilityName="AdditionalTrait2") ; Uncomment below if you want to add abilities to the aptitudes pool ;+AdditionalRandomAptitudes=(AbilityName="AdditionalAptitude1") ;+AdditionalRandomAptitudes=(AbilityName="AdditionalAptitude2") ; when you want specs to come in forced "packages" in commanders choice or spec roulette ;+ForceComplementarySpecializations=NameOfAnotherSpec ; soldier needs on of these abilities to unlock the specialization ; this works only for the commanders choice and spec roulette swo ; in default rpgo mode you still have all enabled specs available +RequiredAbilities=AbilityThatUnlocksSpec [XCOM2RPGOverhaul.X2DownloadableContentInfo_XCOM2RPGOverhaul] +RequiredMods="****DLCNameOriginalClassMod"

* choose an order above 1000
** can be found in the XComClassData.ini of the original class mod
*** placeholder for whatever abilities you want to give the specialization from the original class. Note also add ApplyToWeaponSlot=... entries here if the original ability has them.

You can also make additional configs for mutuallly exclusive abilities, prerequesite abilities or ability-weaponcategory restrictions here. See rpgo or the specops/samurai plugin mods for examples.

Add the RPGO specialization localization

Add a XCOM2RPGOverhaul.int file with the following entries

[CustomClassName X2UniversalSoldierClassInfo] ClassSpecializationTitle="MyCustomSpecializationTitle" ClassSpecializationSummary="MyCustomSpecializationDescription"

Real mod example from the samurai class plugin:

XComClassData.ini
[Samurai X2UniversalSoldierClassInfo] -NumInForcedDeck=1 -NumInDeck=4 +NumInForcedDeck=0 +NumInDeck=0

XComRPG.ini
[XCOM2RPGOverhaul.X2TemplateHelper_RPGOverhaul] +Specializations=(Order=800, TemplateName=Samurai) +AbilityWeaponCategoryRestrictions = (AbilityName=Shinigami, WeaponCategories=(sword, combatknife)) +AbilityWeaponCategoryRestrictions = (AbilityName=Unstoppable, WeaponCategories=(sword, combatknife)) +AbilityWeaponCategoryRestrictions = (AbilityName=SwordThrust, WeaponCategories=(sword, combatknife)) +AbilityWeaponCategoryRestrictions = (AbilityName=DragonStrike, WeaponCategories=(sword, combatknife)) +AbilityWeaponCategoryRestrictions = (AbilityName=WhirlwindStrike, WeaponCategories=(sword, combatknife)) +AbilityPrerequisites = (PrerequisiteTree=(Shinigami, SwordThrust)) +AbilityPrerequisites = (PrerequisiteTree=(Shinigami, DragonStrike)) +AbilityPrerequisites = (PrerequisiteTree=(Shinigami, WhirlwindStrike)) [Samurai X2UniversalSoldierClassInfo] ClassSpecializationIcon = "img:///SamuraiClassMod.SamuraiClassIcon" +AbilitySlots=(AbilityType=(AbilityName="Shinigami", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)) +AbilitySlots=(AbilityType=(AbilityName="Unstoppable", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)) +AbilitySlots=(AbilityType=(AbilityName="Yamabushi")) +AbilitySlots=(AbilityType=(AbilityName="SwordThrust", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)) +AbilitySlots=(AbilityType=(AbilityName="HawkEye")) +AbilitySlots=(AbilityType=(AbilityName="DragonStrike", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)) +AbilitySlots=(AbilityType=(AbilityName="WhirlwindStrike", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)) SpecializationMetaInfo = (bUseForRandomClasses=true, AllowedWeaponCategories=(sword, combatknife), InventorySlots=(eInvSlot_PrimaryWeapon, eInvSlot_SecondaryWeapon), bMelee=true, iWeightPrimary=1) +AdditionalRandomTraits=(AbilityName="SamuraiCoupDeGrace") +AdditionalRandomTraits=(AbilityName="SamuraiCutthroat") +AdditionalRandomTraits=(AbilityName="SamuraiFrenzy") +AdditionalRandomTraits=(AbilityName="DangerSense") +AdditionalRandomAptitudes=(AbilityName="WayOfTheSamurai") +AdditionalRandomAptitudes=(AbilityName="TrainingDiscipline") [XCOM2RPGOverhaul.X2DownloadableContentInfo_XCOM2RPGOverhaul] +RequiredMods="WotCSamuraiClass"

XCOM2RPGOverhaul.int
[Samurai X2UniversalSoldierClassInfo] ClassSpecializationTitle="Samurai" ClassSpecializationSummary="The way of the samurai is found in death. Meditation on inevitable death should be performed daily. Every day when one's body and mind are at peace, one should meditate upon being ripped apart by arrows, rifles, spears and swords, being carried away by surging waves, being thrown into the midst of a great fire, being struck by lightning, being shaken to death by a great earthquake, falling from thousand-foot cliffs, dying of disease or committing seppuku at the death of one's master. And every day without fail one should consider himself as dead. This is the substance of the way of the samurai."

SpecializationMetaInfo - Metadata for specializations
This is a new property of the X2UniversalSoldierClassInfo class to setup metadata for specs.
Currently its only for random classes and weapon restriction swo but there will probably be more use cases in the future.

The values and what they do:

bUseForRandomClasses - Enables the spec to participate in the Random Classes SWO

AllowedWeaponCategories - This are the weapon categories provided when the Weapon Restriction SWO is enabled

InventorySlots - The weapon categories are supplied to these inventory slots. This is also used by the Random Classes SWO algorithm. Valid values are eInvSlot_PrimaryWeapon and/or eInvSlot_SecondaryWeapon

MutuallyExclusiveSpecs - Define specs that should not be rolled together with this spec by the Random Classes SWO

bDualWield - This specialization can be rolled only as Primary one, and then will provide access to the same AllowedWeaponCategories for both weapon slots.
It can also be rolled as Secondary to a non-Dual Wield primary spec that uses same weapons in the same slots.
It can also be rolled as Complementary to a primary Dual Wield spec, even if bCantBeComplementary = true.

bUniversal - Use to determine whether this specialization is valid to complement other soldier's specializations.
It means this spec can complement any other spec in existence because it doesn't depend on equipment, e.g. Scout (phantom and stuff).

bShoot - this spec requires a firearm to function properly.

bMelee - requires a melee weapon (ripjack counts as one)

bGremlin - requires a Gremlin

bPsionic - requires Psi Amp.

bCantBeComplementary - this spec can be used only as primary or secondary, but cannot complement other specs. "Skirmisher" spec is a good example, as it pretty much requires a ripjack to function.

Weights used by the Random Classes SWO algorithm:
iWeightPrimary
iWeightSecondary
iWeightComplementary

Last edited by Musashi; Apr 13, 2020 @ 2:38pm
< >
Showing 1-7 of 7 comments
Musashi  [developer] Nov 7, 2018 @ 1:20pm 
If you are using RPG Overhaul - Even More Specializations you need to make the changes in the XComClassData of that mod because it overrides the RPGO one
Musashi  [developer] Nov 7, 2018 @ 1:22pm 
Also you probably should make your changes in a separate mod like this tutorial explains.
Zaeryn Carine Jul 4, 2019 @ 4:02pm 
How do I "...a mod with two ini files and one localization file."
Zaeryn Carine Jul 4, 2019 @ 8:24pm 
I've followed all those steps and loaded the Modded Default Template, altering the two existing config files into the ones listed in the guide and had to create a new text file that I changed to the .int in Modbuddy, built a solution and started debugging but the mod did not work.

I also deleted all files that were not the three listed in your guide from the Modbuddy app. Are there other files I need in the mod or could having created the .int from a text file have made the mod not work? I didn't have an option to create an .int file, only .ini, .txt and .uc.
Last edited by Zaeryn Carine; Jul 4, 2019 @ 8:26pm
Musashi  [developer] Jul 4, 2019 @ 9:11pm 
Please ask modding related questions on the x2 modding discord (linked on the subreddit)
CyberNeo Apr 20, 2024 @ 1:44pm 
What exactly is the difference between AdditionalRandomTraits and AdditionalRandomAptitudes?
< >
Showing 1-7 of 7 comments
Per page: 1530 50