XCOM 2
[WotC] Gene Mods
 This topic has been pinned, so it's probably important
Iridar  [developer] Oct 19, 2019 @ 11:59pm
[GUIDE] How to add new Gene Mods
We have gone through a lot of trouble to make the process of adding new Gene Mods simple and flexible. It is done almost entirely by editing one configuration file:
..\steamapps\workshop\content\268500\1877861493\Config\Gene Mods\XComGameData.ini

Adding a new Gene Mod Template

First, make the mod create a Gene Mod Template for you by adding a new name to the list:
[WotC_Gameplay_GeneModding.X2StrategyElement_DefaultGeneMods] +GeneMods="Your_GeneMod_TemplateName"
This name can be anything, just make sure it is not already used by some other Gene Mod.

Configuring a Gene Mod Template

Second, configure your new Gene Mod Template. Start by adding a configuration header:
[Your_GeneMod_TemplateName X2GeneModTemplate]
Anything you type below the header will affect only this specific Gene Mod Template.

Here are the things you can configure:

Gene Mod Image
strImage="img:///UILibrary_StrategyImages.X2StrategyMap.DarkEvent_Avatar"
This image is used only in various popups that have to do with this Gene Mod.

Gene Mod Ability
Each Gene Mod must add an ability to the soldier. This is necessary, because the mod will use that ability to check if the soldier has this Gene Mod or not. Some ground rules:
  • You CAN specify an ability added by another XCOM mod.
  • You CANNOT specify an ability added by another Gene Mod.
  • If you don't specify an ability, the mod will create a dummy passive ability for you automatically and assign it to the Gene Mod. Its template name will be: Your_GeneMod_TemplateName_GMPassive This makes it possible to create Gene Mods that only apply passive stat changes.
  • The ability must be able to work without being assigned to a particular inventory slot. I.e. abilities that are normally attached to weapons, such as Rapid Fire or Chain Shot, will not work as Gene Mods.
  • Currently it is not possible to make one Gene Mod add several abilities at the same time. The only way to accomplish it is to add them as AdditionalAbilities in the gene mod's Ability Template.
AbilityName = YourAbilityTemplateName

Ability Image
The icon image of the ability added by the Gene Mod. It is used ONLY by automatically created passive abilities. If you don't specify your own icon image, the passive ability will use the default Gene Mod icon image.
strAbilityImage = "img:///IRI_GeneMods.UI.GeneMod_LizardReflex"

Time to completion
This is how long it takes to add the Gene Mod to the soldier, in days.
BaseTimeToCompletion = 6

Stat Changes
Each Gene Mod can add any number of permanent changes to soldier's stats. The only way to reverse these stat changes is to remove the Gene Mod from the soldier.
+StatChanges=(StatName= eStat_Will, StatModValue = -5)
Valid stats are:
eStat_HP eStat_Offense (Aim) eStat_Defense eStat_Mobility eStat_Will eStat_Hacking eStat_SightRadius eStat_Dodge eStat_ArmorMitigation (armor) eStat_ArmorPiercing eStat_PsiOffense eStat_DetectionModifier eStat_CritChance eStat_Strength (very rarely used by in-game stat checks) eStat_FlankingCritChance eStat_ShieldHP (ablative HP) eStat_FlankingAimBonus

This will reduce the detection range for the soldier by 20%.
+StatChanges=(StatName= eStat_DetectionModifier, StatModValue = -0.2f)

Gene Mod Category
Category affects which Gene Mods and Augmentations will be mutually exclusive with this Gene Mod.
GeneCategory = GMCat_chest
Valid categories are:
GMCat_brain GMCat_eyes ~ Head Augmentations GMCat_chest ~ Torso GMCat_arms ~ Arms GMCat_legs ~ Legs GMCat_skin ~ Any 3+ Augments GMCat_none
If you don't specify a category, the mod will default to "GMCat_none" - the "MISC" category. A soldier can have any number of Gene Mods in this category.

Costs
This specifies the resources that must be paid in order to add this Gene Mod to a soldier.
+Cost=(ResourceCosts[0]=(ItemTemplateName="Supplies", Quantity=40), ResourceCosts[1]=(ItemTemplateName="CorpseBerserker", Quantity=2))
Any item template can be used as a resource. You can find some examples of template names here[commands.gg] or here[consolecommand.org].

Requirements
These are strategic requirements that must be fulfilled before the Gene Mod becomes available in-game.
+Requirements=(RequiredTechs[0]=AlienBiotech, RequiredTechs[1]=AutopsyAdventOfficer, bVisibleIfTechsNotMet=false, RequiredUpgrades[0]="Infirmary_GeneModdingChamber", bVisibleIfUpgradesNotMet=false)
Some tips on setting up Requirements are already included in the Gene Mods' XComGameData.ini, so I will not copy them here.
Note that the RequiredItems array just specifies the items you need to have in order to unlock this Gene Mod, but these items will not be consumed unless you also specify them as ResourceCosts.

Allowed Soldier Classes
Which soldier classes can use this Gene Mod. If not specified, this Gene Mod will be available to all soldier classes, except those blacklisted as DisallowedClasses in the mod's other XComGameData.ini.
+AllowedClasses="LWOTC_Gunner"

Required Gene Mod
Lets you specify the Gene Mod the soldier must already have before they can add this Gene Mod. Useful if you want to build multi-stage Gene Mods.
THIS FUNCTIONALITY IS CURRENTLY NOT IMPLEMENTED YET.
+RequiresExistingGeneMod = "Required_GeneMod_TemplateName"

Restrict this Gene Mod if another is installed
Lets you specify a list of Gene Mods. If the soldier already has any of the Gene Mods on the list, then they will not be able to add this Gene Mod.
+RestrictGeneModsIfInstalled = "GeneModTemplateName_1" +RestrictGeneModsIfInstalled = "GeneModTemplateName_2"

Difficulty Templates

You can potentially specify different configuration parameters for your Gene Mod for different difficulties.
[Your_GeneMod_TemplateName_Diff_0 X2GeneModTemplate] ; Configuration for Rookie Difficulty here [Your_GeneMod_TemplateName_Diff_1 X2GeneModTemplate] ; Configuration for Veteran Difficulty here [Your_GeneMod_TemplateName_Diff_2 X2GeneModTemplate] ; Configuration for Commander Difficulty here [Your_GeneMod_TemplateName_Diff_3 X2GeneModTemplate] ; Configuration for Legend Difficulty here
If the Gene Mod has no separate configuration for a particular difficulty, the game will default to the configuration below the [Your_GeneMod_TemplateName X2GeneModTemplate].
Normally you would only specify different Costs for different difficulties, but you're generally free to configure any aspect of it. For example, you could make your Gene Mod provide smaller Stat Bonuses on higher difficulties, or stronger stat penalties.

Localization
This refers to in-game description of your Gene Mod.
Some ground rules:
  • If you don't specify a separate localization for your Gene Mod, it will automatically use the in-game description of the ability added by this Gene Mod.
  • If you let the mod automatically create a passive ability for you, and you don't specify any separate localization for it, that ability will automatically use the Gene Mod's description.

Gene Mod Localization
It is done in this file:
..\steamapps\workshop\content\268500\1877861493\Localization\Gene Mods\WotC_Gameplay_GeneModding.int
Example:
[Your_GeneMod_TemplateName X2GeneModTemplate] DisplayName="Crab Genes" Summary="Infusion of crab genes makes soldier's skin super thick."

Gene Mod Passive Ability Localization
If you let the Gene Mod automatically create a passive ability for you, you can specify separate localization for it in this file:
..\steamapps\workshop\content\268500\1877861493\Localization\Abilities\XComGame.int
Example:
[Your_GeneMod_TemplateName_GMPassive X2AbilityTemplate] LocFriendlyName="Bonus Dodge" LocLongDescription="Soldier gains +20 Dodge." LocHelpText="Soldier gains +20 Dodge."
Last edited by Iridar; Jan 7, 2021 @ 1:22pm
< >
Showing 1-15 of 26 comments
@Iridar

In theory, is it possible to potentially limit certain Gene Mods to a specific class? I was planning to make some Gene Mods specifically for Psi Ops, that grant specific abilities they do not get such as the Codex's Psi Bomb, or the Avatar's Teleportation and Sectoid's Raise Dead, etc.

I managed to design a Gene Mod that grants Fortress (as i'm using New Psi Abilities, Fortress is no longer apart of their ranking/levelling), but I wondered if it's possible for a Class-Restriction based line that permits only certain classes, such as doing this:

' +AllowedClasses = "PsiOp" '

Thanks for reading this, hope to get a reply soon!
Iridar  [developer] Nov 25, 2019 @ 9:58am 
Originally posted by Knight-16:
@Iridar

In theory, is it possible to potentially limit certain Gene Mods to a specific class? I was planning to make some Gene Mods specifically for Psi Ops, that grant specific abilities they do not get such as the Codex's Psi Bomb, or the Avatar's Teleportation and Sectoid's Raise Dead, etc.

I managed to design a Gene Mod that grants Fortress (as i'm using New Psi Abilities, Fortress is no longer apart of their ranking/levelling), but I wondered if it's possible for a Class-Restriction based line that permits only certain classes, such as doing this:

' +AllowedClasses = "PsiOp" '

Thanks for reading this, hope to get a reply soon!
Your question is answered by the documentation above.
Didn't see that, thanks!

Now my Psi Ops can use Psi Bombs, lol XD
Last edited by The Average Ivy Enjoyer; Nov 25, 2019 @ 11:23am
SuperDigga Dec 8, 2020 @ 1:14pm 
Hello Im about to attempt adding Muscle Fiber Density to the ini wish me luck
SuperDigga Dec 8, 2020 @ 1:20pm 
I think i must add the rm_biotictraversal from the biotic class but Im not sure how
ah64pilot5 Jan 7, 2021 @ 12:55pm 
I cannot get my mods so show the names when they are applied. I went to the appropriate directories but while my custom gene mod shows in the selection window correctly, apples and functions correctly, when the soldier comes out it says modification complete, but missing 'LocFriendlyMame' for ability "NoName' and missing 'LocLongDescription for ability None', also shows blank icon. Any help as to what I may have done wrong?
Iridar  [developer] Jan 7, 2021 @ 1:23pm 
Originally posted by ah64pilot5:
I cannot get my mods so show the names when they are applied. I went to the appropriate directories but while my custom gene mod shows in the selection window correctly, apples and functions correctly, when the soldier comes out it says modification complete, but missing 'LocFriendlyMame' for ability "NoName' and missing 'LocLongDescription for ability None', also shows blank icon. Any help as to what I may have done wrong?
Check the localization section of the instructions again.
ah64pilot5 Jan 7, 2021 @ 2:41pm 
HI and thanks for replying
I have looked at it, and in the same locations as the other mods, I put mine in, formatted the way you show above, after the others, but it won't show any descriptive information.


Originally posted by Iridar:
Originally posted by ah64pilot5:
I cannot get my mods so show the names when they are applied. I went to the appropriate directories but while my custom gene mod shows in the selection window correctly, apples and functions correctly, when the soldier comes out it says modification complete, but missing 'LocFriendlyMame' for ability "NoName' and missing 'LocLongDescription for ability None', also shows blank icon. Any help as to what I may have done wrong?
Check the localization section of the instructions again.
SuperDigga Jan 7, 2021 @ 5:23pm 
BTW i had a similar problem with ahpilot, i used biotic class perk biotic traversal to simulate EWs Muscle Fiber Density mod but i couldnt see where i can change name without messing up the gene

Here is my edit: +GeneMods="RM_BioticTraversal" (up on top with the others)

[RM_BioticTraversal X2GeneModTemplate]
; Image path
strImage="img:///UILibrary_StrategyImages.X2StrategyMap.DarkEvent_Avatar"

;Ability Name (Important, must exist in-game to work properly)
AbilityName = RM_BioticTraversal

+(AbilityType=(AbilityName="RM_BioticTraversal", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon))

BaseTimeToCompletion = 0

+GeneCategory = GMCat_none

+Cost=(ResourceCosts[0]=(ItemTemplateName="Supplies", Quantity=2))

+Requirements=( RequiredTechs[0]=AlienBiotech, bVisibleIfTechsNotMet=true, \\
RequiredUpgrades[0]="Infirmary_GeneModdingChamber", bVisibleIfUpgradesNotMet=true)
MILI Oct 23, 2021 @ 10:57pm 
Can the interface for selecting soldiers for genetic modification be changed to no drop-down lists? Otherwise, the soldiers in a row don't know what their occupation is and what kind of genetic modification they want.
ArtanisKAI Nov 20, 2021 @ 7:55pm 
question about the "restriction" with the weapon typed abilities. is it really impossible to add them? or is it just some sort of restriction? cuz with ability reasignment mod, it automatically detects if you have a pistol anyways, so fanfire would work. in theory. right?

additional question. is it possible to use another gene mod as a prerequisite for another gene mod? im using the misc slot as a sort of power up for an existing gene mods that ive made but at a cost of high will reduction and ludicris amount of resource. kinda like an end-game stuff.
Last edited by ArtanisKAI; Nov 20, 2021 @ 11:38pm
CyberNeo Mar 29, 2024 @ 12:37pm 
@Iridar

Is it possible to make it so if you use an Gene Mod to a Soldier that the Soldier changes its class?
Iridar  [developer] Mar 29, 2024 @ 12:59pm 
No.
CyberNeo Mar 29, 2024 @ 1:33pm 
@Iridar
It is actually possible to implement that or is it impossible?
Iridar  [developer] Mar 29, 2024 @ 3:01pm 
I'm not sure if changing soldier's class is absolutely impossible in principle, but it would definitely require writing custom script and will be much more difficult than just messing with configs.
< >
Showing 1-15 of 26 comments
Per page: 1530 50