Inactive at Age - KonradHeinser/EBSGFramework GitHub Wiki
This gene class will cause the gene to become inactive if the pawn's age becomes too high. All gene classes in this framework can use this by default, though it's recommended to use the hediff adder if you aren't using any other as that is the most advanced gene class that can be used without any errors related to missing tags.
Enabling this only requires one tag added to the extension, as shown in this example gene that becomes inactive at the age of 30:
<GeneDef>
<defName>MaxAgeGene</defName>
<label>max age gene</label>
<description>.</description>
<iconPath>UI/Icons/Genes/Gene_HairColor</iconPath>
<displayCategory>Miscellaneous</displayCategory>
<geneClass>EBSGFramework.HediffAdder</geneClass>
<modExtensions>
<li Class="EBSGFramework.EBSGExtension">
<maxAgeActive>30</maxAgeActive>
</li>
</modExtensions>
</GeneDef>