Aging Hediff - KonradHeinser/EBSGFramework GitHub Wiki
This hediff comp causes the pawn's age to constantly change. The basic comp looks like this:
<comps>
<li Class="EBSGFramework.HediffCompProperties_Aging">
</li>
</comps>
These are the tags available:
- ageChangePerHour : Years per hour. Technically can work alongside ageChangePerYear. A value of around 0.0006944 would double aging rate
- ageChangePerDay : Years per day. Technically can work alongside ageChangePerHour. A value of around 0.0166667 would double aging rate
- lowestAgeWhenNegative : Default (18) : Set to this to avoid any weird child system bugs popping up, but can technically be altered as desired
The reason for the lowestAgeWhenNegative being 18 is due to some weird interactions that happen when the pawn's age drops below that point, which may occur anyway if you make the negative value for an ageChange too high. Rather than attempting instant effects, it's usually better to make it a gradual shift over a really long time.
Example from SHG - Just the Radiomancer which involved an ability that would make a pawn one year younger over the span of an hour, to a minimum age of 18
<HediffDef>
<defName>SHG_Radiomancer_ReverseAging</defName>
<label>reverse aging</label>
<description>This pawn is gradually becoming younger.</description>
<everCurableByItem>false</everCurableByItem>
<initialSeverity>1</initialSeverity>
<hediffClass>HediffWithComps</hediffClass>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<stages />
<comps>
<li Class="EBSGFramework.HediffCompProperties_Aging">
<ageChangePerHour>-1</ageChangePerHour>
</li>
<li Class="HediffCompProperties_Disappears">
<disappearsAfterTicks>2500</disappearsAfterTicks>
<showRemainingTime>true</showRemainingTime>
</li>
<li Class="HediffCompProperties_DisappearsOnDeath"/>
</comps>
</HediffDef>