-
Notifications
You must be signed in to change notification settings - Fork 3
Bomb Hediff Comp
SmArtKar edited this page Feb 8, 2023
·
2 revisions
You can add a comp to your hediffs to create an explosion upon their removal(including when the body part that the hediff is attached to is destroyed) or pawn's death. Due to Ludeon's EULA ToxGas will require user to have Biotech DLC installed.
public class HediffCompProperties_Bomb : HediffCompProperties
{
// Radius of the explosion
public float radius;
// Whenever the bomb will explode upon removal
public bool explodeOnRemoval = true;
// Whenever the bomb will explode upon owner's death
public bool explodeOnDeath = true;
// Damage type of the bomb
public DamageDef damageDef = DamageDefOf.Flame;
// When set to true,
public bool gasExplosion = false;
// You can set this to whatever type of gas you want. ToxGas will require user to have biotech installed.
public GasType gasType;
// Amount of damage dealt by the explosion
public int damageAmount = -1;
// Armor penetration of the explosion
public float armorPenetration = -1f;
}Here's an example of a hediff that will create a cloud of tox gas upon attached body part being destroyed or owner's death
<HediffDef>
<defName>ToxBomb</defName>
<label>toxic bomb</label>
<description>This hediff will create a cloud of tox gas upon owner's death of attached part's destruction.</description>
<hediffClass>HediffWithComps</hediffClass>
<comps>
<li Class="AthenaFramework.HediffCompProperties_Bomb">
<radius>1.9</radius>
<explodeOnRemoval>true</explodeOnRemoval>
<explodeOnDeath>true</explodeOnDeath>
<damageDef>ToxGas</damageDef>
<gasExplosion>true</gasExplosion>
<gasType>ToxGas</gasType>
</li>
</comps>
</HediffDef>- Stats
- Gene Templates
- Pawn Group Utility
- Under Group Combat Pressure Think Node
- Min Prey Body Size
- Modular Things
- Gene Locked Recipes and Buildings
- Additional Gene Drops
- Angle Based Shotguns
- Following ("Running") Beams
- Pawn Turret Extensions
- Damage Modification
- Advanced Tools
- Shockwave Attacks
- Miniguns
- Elite Shot
- AOE Hediff Explosion Projectiles
- Frag Grenades
- Cooldown Graphics
- Scatter Things Ability
- Abilities on Equipment
- Burst Projectile Abilities
- Reloadable Abilities
- Shockwave Ability
- Projectile Comps
- Projectile Impact Effects
- Projectile Trails
- Bouncy Projectiles
- Spawner Projectiles
- Roof Collapse Projectiles
- Scattershot Projectiles
- Custom Body Graphic For Apparel
- Multi Layered Apparel Graphics
- Advanced Equipment Shields
- Equipment with Prerequisites
- Advanced Armor
- Gene-based Apparel Textures
- Gene Locked Equipment
- Additional Apparel Graphics Comps
- Hediff Giver Extension
- Bomb Hediff Comp
- Remove On Severity Comp
- Renderable Hediffs
- Shield Hediffs
- Armored Hediffs
- Disableable Hediffs
- Modular Hediffs
- Hediffs with Prerequisites
- Singular Hediff Abilities
- Hediff On Damage
- Additional Hediff Graphics Comps
- Caching
- IArmored
- IDamageResponse
- IRenderable
- IStageOverride
- IStatModifier
- IProjectile
- IPreventEquip
- IHediffGraphicGiver and IEquippableGraphicGiver
- IDamageModifier
- IColorSelector
- IBodyModifier