Melee Damage Def Override - KonradHeinser/EBSGFramework GitHub Wiki

Back to the main Weapon Trait Extension page


meleeDamageDefOverride is the melee equivalent of damageDefOverride, and will replace the DamageDef attached to all of the weapon's tools to the DamageDef provided


This example replaces all of the primary melee damage to the AcidBurn def. This does not have any effect on extra melee damage, but does impact all tools of the weapon:

    <WeaponTraitDef>
        <defName>AcidWeapon</defName>
        <label>acid weapon</label>
        <description>This melee weapon puts targets on acid or something.</description>
        <commonality>1</commonality>
        <weaponCategory>Melee</weaponCategory>
        <exclusionTags>
            <li>MeleeType</li>
        </exclusionTags>
        <statOffsets>
            <MarketValue>80</MarketValue>
        </statOffsets>
        <traitAdjectives>
            <li>melting</li>
            <li>acidic</li>
            <li>burning</li>
        </traitAdjectives>
        <modExtensions>
            <li Class="EBSGFramework.WeaponTraitExtension">
                <meleeDamageDefOverride>AcidBurn</meleeDamageDefOverride>
            </li>
        </modExtensions>
    </WeaponTraitDef>
⚠️ **GitHub.com Fallback** ⚠️