Mutating Genes - KonradHeinser/EBSGFramework GitHub Wiki
This addition to the EBSG extension allows you to create genes that can change the carrier's genes. This requires the gene be using any gene class within this framework. It's recommended to use the Hediff Adder one if the gene won't be using any others because that's the most advanced one that can be used without any side effects or errors:
<geneClass>EBSGFramework.HediffAdder</geneClass>
<modExtensions>
<li Class="EBSGFramework.EBSGExtension">
</li>
</modExtensions>
These are all the options within the extension:
- removeGenesFromOtherLists : Default (True) : While True, when a random set is selected it will remove the genes from all the other sets that are on the pawn. Individual sets can choose to ignore this by forcing their removal. If you want to create a True mutating gene, it's recommended to keep this True so this gene is removed if another set is chosen
- inheritable : Default (True) : Dictates if the genes created are inherited. Individual sets can override this
- mutationGeneSets : This is the list that contains items that determine what the gene will do when the timer runs out
- geneSet : The list of genes. To make this gene act as a True mutation, this gene should be included in the set where nothing changes so that removeGenesFromOtherLists or alwaysRemoveGenes will remove it later if a different set is chosen
- weightOfGeneSet : Default (1) : Alters how likely it is that this item will be chosen using a weighted average
- reverseInheritence : Default (False) : This set does the reverse of what the inheritable tag says
- alwaysRemoveGenes : Default (False) : If True, the geneSet will be removed even if removeGenesFromOtherLists is False
This gene combines both the mutating effect described here with the Spawn Age Limiter gene class to create a gene that has a 4% chance to replace itself with an archite gene or two, while also ensuring that the pawn's age when spawning doesn't pass 30 just as a bonus
<GeneDef>
<defName>EBSG_ArchiteMutation</defName>
<label>archite mutation</label>
<description>.</description>
<geneClass>EBSGFramework.SpawnAgeLimiter</geneClass>
<displayCategory>Miscellaneous</displayCategory>
<modExtensions>
<li Class="EBSGFramework.EBSGExtension">
<mutationGeneSets>
<li>
<geneSet><li>EBSG_ArchiteMutation</li></geneSet>
<weightOfGeneSet>96</weightOfGeneSet>
</li>
<li><geneSet><li>EBSGA_LuciferiumBlood</li></geneSet></li>
<li><geneSet><li>EBSG_ExtremeArchiteSenses</li></geneSet></li>
<li>
<geneSet>
<li>EBSGA_MajorArchiteEatingSpeed</li>
<li>EBSG_ArchiteDigestion</li>
</geneSet>
</li>
<li>
<geneSet>
<li>EBSG_ElementalImmunity</li>
<li>EBSG_ArchitePsychicInfluencer</li>
</geneSet>
</li>
</mutationGeneSets>
<expectedAges>0~30</expectedAges>
<ageRange>18~30</ageRange>
</li>
</modExtensions>
</GeneDef>