Spew - KonradHeinser/EBSGFramework GitHub Wiki
This ability comp allows you to create abilities that create a cone of damage similar to fire spew, but with your own choice of things like damage, filth, and fire chance. The basic comp stuff looks like this:
<comps>
<li Class="EBSGFramework.CompProperties_AbilitySpew">
</li>
</comps>
The options available:
- damage : The DamageDef to use. This is required
- range : The maximum range of the cone. Players and AI's may choose to make smaller cones by aiming for a closer target point. This is also required
- angle : How wide to make the cone. Values under 40 often end up chopping out some points that are too close to the pawn when not going in a cardinal direction. Test out various angles to find what works best for your ability
- filthDef : The filth to create
- amount : Default (1) : The amount of filth to make on each tile
- effecterDef : The EffecterDef to use, with the pawn as the origin
- fireChance : Default (0) : Chance of creating fire
These examples are from Expanded Biotech Style Abilities, and create cones of firefoam and acid respectively. Firefoam damage is being handled by the DamageDef itself instead of a static amount:
<AbilityDef>
<defName>EBSA_FoamSpew</defName>
<label>foam spew</label>
<description>.</description>
<iconPath>UI/Icons/Genes/Gene_FoamSpray</iconPath>
<cooldownTicksRange>30000</cooldownTicksRange>
<charges>2</charges>
<aiCanUse>False</aiCanUse>
<casterMustBeCapableOfViolence>False</casterMustBeCapableOfViolence>
<sendMessageOnCooldownComplete>True</sendMessageOnCooldownComplete>
<warmupStartSound>FoamSpray_Warmup</warmupStartSound>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>7.9</range>
<warmupTime>1</warmupTime>
<soundCast>FoamSpray_Resolve</soundCast>
<targetParams>
<canTargetLocations>True</canTargetLocations>
</targetParams>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilitySpew">
<range>7.9</range>
<damage>Extinguish</damage>
<filthDef>Filth_FireFoam</filthDef>
<effecterDef>EBSA_Foam_Spew</effecterDef>
<angle>45</angle> <!--Angles under 40 tend to start skipping some tiles close to the pawn occasionally-->
</li>
</comps>
</AbilityDef>
<AbilityDef>
<defName>EBSA_AcidSpew</defName>
<label>acid spew</label>
<description>.</description>
<iconPath>UI/Icons/Genes/Gene_AcidSpray</iconPath>
<cooldownTicksRange>30000</cooldownTicksRange>
<aiCanUse>True</aiCanUse>
<sendMessageOnCooldownComplete>True</sendMessageOnCooldownComplete>
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>7.9</range>
<warmupTime>1</warmupTime>
<soundCast>AcidSpray_Resolve</soundCast>
<targetParams>
<canTargetLocations>True</canTargetLocations>
</targetParams>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilitySpew">
<range>7.9</range>
<damage>AcidBurn</damage>
<filthDef>Filth_SpentAcid</filthDef>
<amount>25</amount>
<effecterDef>EBSA_AcidSpew</effecterDef>
<angle>45</angle> <!--Angles under 40 tend to start skipping some tiles close to the pawn occasionally-->
</li>
</comps>
</AbilityDef>