Flip Gender Periodically - KonradHeinser/EBSGFramework GitHub Wiki

This hediff comp causes the pawn's gender to change between Male and Female every time the interval is passed:

        <comps>
            <li Class="EBSGFramework.HediffCompProperties_FlipGenderPeriodically">
            </li>
        </comps>

These are the options available:

  • interval : Default (600) : The number of ticks between flips. This can be a range of numbers
  • revertPostRemove : Default (False) : Causes the pawn's gender to revert to what it was originally, assuming it was changed, as soon as the hediff is removed
  • saveBeard : Default (False) : If the pawn had a beard when the hediff was first added and their gender is changed by this hediff, this will make the hediff attempt to make sure that beard returns if something removed it (i.e. turning into a female). This will also revert beard changes the player may have made at a styling bench
  • flipPostAdd : Default (True) : Causes the first flip to happen immediately after the hediff is added

This example just makes the pawn change genders every 10 seconds because I was too lazy to change the interval:

    <HediffDef>
        <defName>FlipFlopper</defName>
        <label>flip flopper</label>
        <description>.</description>
        <everCurableByItem>false</everCurableByItem>
        <initialSeverity>0.001</initialSeverity>
        <stages />
        <hediffClass>HediffWithComps</hediffClass>
        <scenarioCanAdd>false</scenarioCanAdd>
        <comps>
            <li Class="EBSGFramework.HediffCompProperties_FlipGenderPeriodically">
                <saveBeard>True</saveBeard>
            </li>
        </comps>
    </HediffDef>
⚠️ **GitHub.com Fallback** ⚠️