Extra Melee Damages - KonradHeinser/EBSGFramework GitHub Wiki
Back to the main Weapon Trait Extension page
extraMeleeDamages adds additional damage types to melee attacks. The way it is set up is the same as extraDamages and its namesake, a list of items with the following options in each li:
- def : The DamageDef to deal
- amount : The amount of damage to deal
- armorPenetration : Default (-1) : The armor penetration of the extra damage
- chance : Default (1) : The chance of the extra damage actually triggering
This example creates a blade type trait that can stun mechanoids briefly using additional EMP damage:
<WeaponTraitDef>
<defName>EMPBlade</defName>
<label>EMP blade</label>
<description>This blade embedded EMP capacitors, which will temporarily disable electronics and mechanoids.</description>
<commonality>1</commonality>
<weaponCategory>Blade</weaponCategory>
<exclusionTags>
<li>BladeType</li>
<li>Color</li>
</exclusionTags>
<forcedColor>UniqueWeapon_EMP</forcedColor>
<statOffsets>
<MarketValue>75</MarketValue>
</statOffsets>
<traitAdjectives>
<li>EMP</li>
<li>electric</li>
<li>shocking</li>
<li>sparky</li>
<li>zapping</li>
</traitAdjectives>
<modExtensions>
<li Class="EBSGFramework.WeaponTraitExtension">
<extraMeleeDamages>
<li>
<def>EMP</def>
<amount>4</amount>
</li>
</extraMeleeDamages>
</li>
</modExtensions>
</WeaponTraitDef>