DRG Burst and Blast Attacks - KonradHeinser/EBSGFramework GitHub Wiki

DRG Bursts and Blasts are a variant of Burst Attacks and Blast Attacks that can take a variable amount of the related resource to create different results based on how much is consumed. Most of the options in this are the same as other explosions available in this framework, with the exception that the radius and damage use a factor instead of being static values. The basic ability comps look like this:

        <comps>
            <li Class="EBSGFramework.CompProperties_EnergyBurst"> <!--Explosion centered on caster-->
                <mainResourceGene>InsertResourceGeneDefNameHere</mainResourceGene>
                <damageDef>InsertDamageDefDefNameHere</damageDef>
            </li>
        </comps>

The two listed within the ability comp above are the only ones without default values that need to be provided. This is the full list of tags available to the comp, which will just be listed here in a hopefully somewhat organized fashion. If a default has two values separated by a /, then the first one is the burst default, and the second is the blast default:

  • Resource Costs

    • resourceCost : Default (0) : A flat amount taken prior to everything else. Any amount taken this way won't influence the radius or damage
    • costFactorStat : Stat multiplier for the resourceCost. Does not impact other cost options
    • convertedResource : Default (0) : A flat amount used. Taken after percentage if applicable, but probably shouldn't be used in general as this acts the same as using a Cost and the normal ability comp, and resourceCost can create additional static costs without issue
    • convertPercentage : Default (0) : Percentage of remaining resource value to use. 1 is 100%
  • Core Explosion Stats

    • radiusFactor : Default (0.1) : Multiplier on converted resource that determines radius. For example, the default makes it so 100 resource would become a radius 10 explosion
    • radiusFactorStat : Additional stat multiplier on raidus
    • excludeRadius : Default (0) : Area around the center that should be ignored
    • damageFactor : Default (0.1) : Multiplier on converted resource that determines damage. For example, the default makes it so 100 resource would inflict a base of 10 damage
    • armorPenetration : Default (-1) : How well it ignores armor
  • How and Who to Hit

    • damageSelf : Default (False / True) : When false, adds caster to the ignore list
    • damageAllies : Default (True) : When false, adds pawns in the same faction to the ignore list
    • damageNonHostiles : Default (True) : When false, adds pawns Rimworld doesn't view as hostile to caster to the ignore list
    • damageFalloff : Default (True) : Less damage to pawns further from the center
    • applyDamageToExplosionCellsNeighbors : Default (False) : Should probably stay this way, just here to make all options available
  • What to Make

    • extraGasType : Default (None) : Creates a gas around the caster after casting. The options are None, Smoke, Tox, and Rot

    • explosionSound - The sound the explosion makes

    • postExplosionThingWater : Creates thing over water when the explosion overlaps with water

    • screenShakeFactor : Default (0) : Shake that screen

    • postExplosionThing : The ThingDef that is generated after explosion

    • postExplosionThingChance : Default (0) : The chances of the thing being created, with 1 being 100%

    • postExplosionSpawnThingCount : Default (1) : Number of things created

    • preExplosionThing : The ThingDef that is generated before the explosion

    • preExplosionThingChance : Default (0) : The chances of the thing being created, with 1 being 100%

    • preExplosionSpawnThingCount : Default (1) : Number of things created


Example from SHG - Just the Radiomancer. Detonate exploded on a specific target while consuming half of the stored energy, while I am Become Death created a burst around the caster that would kill pretty much everything around the caster if used while at maximum energy.

    <AbilityDef ParentName="SHG_JtR_PowerAbilitiesBase">
        <defName>SHG_Radiomancer_Detonation</defName>
        <label>detonation</label>
        <description>Create a blast of energy containing half of currently stored radiation. The more radiation stored, the larger and more damaging this blast is. Radius is equal to one quarter of the radiomancer's stored radiation, and damage is equal to half of the stored radiation amount at the center. This energy blast only damages buildings and hostile pawns.\n\nWith full radiation, this will kill many pawns that have no universal damage resistance (i.e. pawns with the superhero gene or the robust gene) or flame resistance. This can cause notable damage to walls and other buildings, though only fragile ones are likely to outright break.</description>
        <iconPath>Radiomancer/Emission/Gene_Radiomancer_Detonation</iconPath>
        <verbProperties>
            <range>40</range>
            <requireLineOfSight>False</requireLineOfSight>
            <targetParams>
                <canTargetLocations>true</canTargetLocations>
            </targetParams>
        </verbProperties>
        <comps>
            <li Class="EBSGFramework.CompProperties_EnergyBlast">
                <mainResourceGene>SHG_Archetypes_Radiomancer</mainResourceGene>
                <convertPercentage>0.5</convertPercentage>
                <radiusFactor>0.5</radiusFactor>
                <damageFactor>1</damageFactor>
                <damageDef>Flame</damageDef>
                <injureSelf>False</injureSelf>
                <injureAllies>False</injureAllies>
                <injureNonHostiles>False</injureNonHostiles>
            </li>
        </comps>
    </AbilityDef>

    <AbilityDef ParentName="SHG_JtR_SelfCastBase">
        <defName>SHG_Radiomancer_IAmBecomeDeath</defName>
        <label>i am become death</label>
        <description>There was a description here.</description>
        <iconPath>Radiomancer/Emission/Gene_Radiomancer_IAmBecomeDeath</iconPath>
        <verbProperties>
            <warmupTime>3</warmupTime>
        </verbProperties>
        <comps>
            <li Class="EBSGFramework.CompProperties_EnergyBurst">
                <mainResourceGene>SHG_Archetypes_Radiomancer</mainResourceGene>
                <convertPercentage>1</convertPercentage>
                <radiusFactor>0.5</radiusFactor>
                <damageFactor>10</damageFactor>
                <damageDef>BombSuper</damageDef>
            </li>
        </comps>
    </AbilityDef>
⚠️ **GitHub.com Fallback** ⚠️