Toggle Hediff - KonradHeinser/EBSGFramework GitHub Wiki

This ability comp allows you to specify a hediff that will be added if the target doesn't have it, or removed if they do:

        <comps>
            <li Class="EBSGFramework.CompProperties_AbilityToggleHediff">
                <toggle>
                </toggle>
            </li>
        </comps>

toggle has following options available:

  • hediff : The HediffDef to add. This is required
  • bodyParts : The list of BodyPartDefs to add the hediff to. If left blank, then it will add to the full body
  • severity : Default (0.5) : The severity to apply/add to the hediff
  • chance : Default (1) : The chances of the hediff actually being added
  • removeOnRemove : Default (True) : If set to false, then this specific hediff will be not be removed when the gene is removed by anything. It is recommended to leave this as True unless you are really sure

This example gives/removes the stoneskin implant from the caster:

    <AbilityDef>
        <defName>StoneSkin</defName>
        <label>stoneskin</label>
        <description>Armor up</description>
        <targetRequired>False</targetRequired>
        <iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
        <casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
        <cooldownTicksRange>60</cooldownTicksRange>
        <hostile>false</hostile>
        <verbProperties>
            <verbClass>Verb_CastAbility</verbClass>
            <warmupTime>0.5</warmupTime>
            <requireLineOfSight>False</requireLineOfSight>
            <range>0.9</range>
            <targetParams>
                <canTargetSelf>True</canTargetSelf>
            </targetParams>
        </verbProperties>
        <comps>
            <li Class="EBSGFramework.CompProperties_AbilityToggleHediff">
                <toggle>
                    <hediff>StoneskinGland</hediff>
                    <bodyParts>
                        <li>Torso</li>
                    </bodyParts>
                </toggle>
            </li>
        </comps>
    </AbilityDef>
⚠️ **GitHub.com Fallback** ⚠️