Remove Multiple Hediffs - KonradHeinser/EBSGFramework GitHub Wiki

The purpose of this comp is quite simple. It's just CompProperties_AbilityRemoveHediff on steroids. The most basic function of it is to receive a list of hediffs, as demonstrated below, and it will go through the list to delete all instances of those hediffs that it finds. These are all of the tags that can be used in this comp.


  • hediffs : The list of hediffs to look for. If you want to use this comp to only check for one specific hediff, you still need to have <li></li> around the hediff.
  • onlyFirstMatch : Default (false) : When set to true, it will end the list checking as soon as it finds any match for any item.
  • recursiveChecks : Default (1) : Its function depends on whether first match is true or false. If false, making this more than 1 is only good if you have some hediffs that pop up due to a hediff being removed that should also be removed. If true, this determins how many matches it will find. For example, if it's set to 10, first match becomes first 10 matches.
  • applyToBoth : Default (false) : If true, both the caster and the target are affected by the ability. Generally, you don't want the player to be able to target self in this case as that may have unexpected results.
  • applyToSelf : Default (false) : If this is true while apply both is false, then this will cause the hediff removal to happen to the caster instead of the target. This is mostly useful for abilities that are supposed to apply some benefit to the caster while applying a very different effect to the target.

Example of comp in an ability that removes most injuries with the most basic of sweeps.

        <comps>
            <li Class="EBSGFramework.CompProperties_AbilityRemoveMultipleHediffs">
                <compClass>EBSGFramework.CompAbilityEffect_RemoveMultipleHediffs</compClass>
                <hediffs> <!--List includes most mundane injuries, excluding lost parts-->
                    <li>Misc</li>
                    <li>Burn</li>
                    <li>ChemicalBurn</li>
                    <li>Crush</li>
                    <li>Crack</li>
                    <li>Crush</li>
                    <li>Cut</li>
                    <li>SurgicalCut</li>
                    <li>Scratch</li>
                    <li>Bite</li>
                    <li>Stab</li>
                    <li>Gunshot</li>
                    <li>Shredded</li>
                    <li>Bruise</li>
                    <li>Frostbite</li>
                    <li>BeamWound</li>
                    <li>AcidBurn</li>
                    <li>BloodLoss</li>
                </hediffs>
                <recursiveChecks>3</recursiveChecks> <!--No reason to have this, but maybe I'm paranoid-->
            </li>
        </comps>
⚠️ **GitHub.com Fallback** ⚠️