Severity Change per Attack - KonradHeinser/EBSGFramework GitHub Wiki

This hediff comp changes the severity of the hediff every time the pawn attacks, with options for specifying how much severity changes between ranged and melee attacks. The basic comp looks like this:

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

These are the options available:

  • changePerAttack : Severity change with anything Rimworld thinks is an attack
  • changePerMeleeAttack : Severity change with anything Rimworld thinks is a melee attack
  • changePerRangedAttack : Severity change with anything Rimworld thinks is a ranged attack

Example from SHG - Just the Radiomancer which used an ability that applied explosions to melee attacks, with each use of the ability adding one more charge. The charge display comp is explained here

    <HediffDef>
        <defName>SHG_Radiomancer_ExplosiveBlows</defName>
        <label>explosive blows</label>
        <description>Every time this pawn hits something with a melee attack, they deal additional damage to all hostiles nearby.</description>
        <initialSeverity>1</initialSeverity>
        <hediffClass>HediffWithComps</hediffClass>
        <comps>
            <li Class="EBSGFramework.HediffCompProperties_SeverityChangePerAttack">
                <changePerMeleeAttack>-1</changePerMeleeAttack>
            </li>
            <li Class="EBSGFramework.HediffCompProperties_ExplodingMeleeAttacks">
                <radius>2</radius>
                <damageDef>Burn</damageDef>
                <injureSelf>false</injureSelf>
                <injureAllies>false</injureAllies>
                <injureNonHostiles>false</injureNonHostiles>
                <explosionSound>Explosion_Flame</explosionSound>
                <extraGasType>None</extraGasType>
                <damageAmount>20</damageAmount>
            </li>
            <li Class="EBSGFramework.HediffCompProperties_DisplaySeverity">
                <appendString> charge(s) left</appendString>
                <roundDigits>0</roundDigits>
            </li>
        </comps>
    </HediffDef>
⚠️ **GitHub.com Fallback** ⚠️