Damage Over Time (Ability) - KonradHeinser/EBSGFramework GitHub Wiki

This ability comp deals damage to the target each interval while the ability is warming up. Due to how Ludeon has ability ticking coded, it's generally not recommended to attach this to abilities that a large number of pawns are likely to have at the same time. The way Ludeon coded them forces them to tick even when they are not being actively used.

If you want to apply a DoT after a successful cast, you can find the hediff version here. If you are set on using this comp, these are the options available:

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

These are the options available

  • tickInterval : Default (60) : How many ticks there should be between part damagings. There are 60 ticks per second
  • initialTick : Default (0) : The initial tick to set the damage to. If set equal to tickInterval, then the first damage will occur as soon as the pawn starts casting
  • damageAmount : Default (1) : How much damage to deal at the end of each interval. If set to -1, it should default to what the DamageDef lists
  • armorPenetration : Default (0) : How well it ignores armor. If set to -1, it should default to what the DamageDef lists
  • createFilth : Default (True) : Creates filth (i.e. blood) when the pawn is damaged if true
  • bodyParts : List of body parts that are randomly picked from for damaging purposes. If left empty, or none of the parts listed can be found, the comp will try to pick a random part

Interrupt on Damage

While I may have missed something in the job code, there doesn't appear to be a way to interrupt a player casting an ability by damaging the pawn. If the ability should be interrupted when the pawn takes damage and you find there are times when they aren't, try adding this comp to your ability:

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

This example has the user "strangle" the target, and the only way for the target to escape is to survive the 10 seconds or unless the strangler takes damage:

    <AbilityDef ParentName="AbilityTouchBase">
        <defName>Strangle</defName>
        <label>strangle</label>
        <description>Forcefully remodel them into a dead person.</description>
        <iconPath>UI/Icons/Genes/Gene_Coagulate</iconPath>
        <displayOrder>400</displayOrder>
        <verbProperties>
            <verbClass>Verb_CastAbilityTouch</verbClass>
            <drawAimPie>false</drawAimPie>
            <range>-1</range>
            <warmupTime>10</warmupTime>
            <targetParams>
                <canTargetAnimals>true</canTargetAnimals>
                <canTargetSelf>false</canTargetSelf>
                <canTargetBuildings>false</canTargetBuildings>
                <canTargetMechs>false</canTargetMechs>
                <canTargetBloodfeeders>true</canTargetBloodfeeders>
            </targetParams>
        </verbProperties>
        <comps>
            <li Class="EBSGFramework.CompProperties_AbilityInterruptOnDamaged" />
            <li Class="EBSGFramework.CompProperties_AbilityDamageOverTime">
                <damage>Blunt</damage>
                <damageAmount>5</damageAmount>
                <bodyParts>
                    <li>Neck</li>
                </bodyParts>
            </li>
            <li Class="CompProperties_AbilityRequiresCapacity">
                <capacity>Manipulation</capacity>
            </li>
        </comps>
    </AbilityDef>
⚠️ **GitHub.com Fallback** ⚠️