Blast Attacks - KonradHeinser/EBSGFramework GitHub Wiki

This ability comp allows you to create an explosion at a target location/pawn with as much customization as possible. Every single option for explosions that could logically be added to a blast ability has been included here as a node. Before getting into the various customization options, the basic blast will have a comp that starts like this:

        <comps>
            <li Class="EBSGFramework.CompProperties_EBSGBlast">
                <explosion>
                </explosion>
            </li>
        </comps>

This comp can use successChance, which is a special item that dictates the chance of successfully starting the explosion. If you don't add this to the comp, then it will always work. Due to the nature of explosions, successChance can only treat the clicked on object as the target, if any.

To minimize the risk of me missing a page whenever I update the explosion options, the information on what can go in explosion has its own page


Mutated example from SHG - Only the Hemomancer. The original ability would create a burst around the caster with a radius of 10 that combined this comp with the Blood Drain ability comp to create an "evaporating blood" effect. This version just changes it to be cast on a target that doesn't need to be the caster, though still could as the caster is immune:

    <AbilityDef>
        <defName>SHG_Hemomancer_BloodBoil</defName>
        <label>blood boil</label>
        <description>.</description>
        <iconPath>UI/Icons/Genes/Gene_Bloodfeeder</iconPath>
        <jobDef>CastAbilityOnThingWithoutWeapon</jobDef>
        <canUseAoeToGetTargets>True</canUseAoeToGetTargets>
        <ai_SearchAOEForTargets>true</ai_SearchAOEForTargets>
        <showCastingProgressBar>true</showCastingProgressBar>
        <aiCanUse>True</aiCanUse>
        <category>Sanguophage</category>
        <cooldownTicksRange>2500</cooldownTicksRange>
        <verbProperties>
            <verbClass>Verb_CastAbility</verbClass>
            <range>10</range>
            <drawAimPie>false</drawAimPie>
            <warmupTime>1</warmupTime>
            <requireLineOfSight>False</requireLineOfSight>
            <targetParams>
                <canTargetPawns>True</canTargetPawns>
                <canTargetSelf>True</canTargetSelf>
                <canTargetBuildings>False</canTargetBuildings>
                <canTargetLocations>False</canTargetLocations>
                <canTargetMechs>False</canTargetMechs>
                <canTargetPlants>False</canTargetPlants>
            </targetParams>
        </verbProperties>
        <comps>
            <li Class="EBSGFramework.CompProperties_EBSGBlast">
                <explosion>
                    <radius>10</radius>
                    <damageDef>Burn</damageDef>
                    <explosionSound>Foam_Impact</explosionSound>
                    <postExplosionThing>SHG_BloodMist</postExplosionThing>
                    <postExplosionThingChance>100</postExplosionThingChance>
                    <damageAmount>40</damageAmount>
                </explosion>
            </li>
            <li Class="EBSGFramework.CompProperties_AbilityBloodDrain">
                <hemogenGain>0.1</hemogenGain>
                <bloodFilthToSpawnRange>2</bloodFilthToSpawnRange>
                <resistanceGain>1</resistanceGain>
                <targetBloodLoss>0.3</targetBloodLoss>
            </li>
            <li Class="CompProperties_AbilityHemogenCost">
                <hemogenCost>0.2</hemogenCost>
            </li>
        </comps>
    </AbilityDef>

    <ThingDef>
        <defName>SHG_BloodMist</defName>
        <label>blood mist</label>
	<thingClass>Gas</thingClass>
	<category>Gas</category>
	<altitudeLayer>Gas</altitudeLayer>
	<useHitPoints>false</useHitPoints>
	<tickerType>Normal</tickerType>
	<graphicData>
	    <graphicClass>Graphic_Gas</graphicClass>
	    <shaderType>Transparent</shaderType>
            <texPath>Things/Gas/Puff</texPath>
            <drawSize>2.2</drawSize>
            <color>(0.8,0.2,0.2)</color>
	</graphicData>
        <gas>
            <rotationSpeed>10</rotationSpeed>
            <expireSeconds>
                <min>1</min>
                <max>1</max>
            </expireSeconds>
        </gas>
    </ThingDef>
⚠️ **GitHub.com Fallback** ⚠️