Projectile Override - KonradHeinser/EBSGFramework GitHub Wiki

Back to the main Weapon Trait Extension page


projectileOverride replaces projectiles launched by the weapon with the ThingDef provided. Weapons which don't use Verb_LaunchProjectile may encounter issues, and CompChangeableProjectile will not function properly with this, so it should be made mutually exclusive with those weapons. This field should be able to accept anything that is considered a Projectile


This example replaces the launched projectile with an incendiary bolt:

    <WeaponTraitDef>
        <defName>IncendiaryLauncher</defName>
        <label>incendiary launcher</label>
        <description>This weapon has been modified to fire incendiary bolts instead of bullets, but requires more time to cooldown as the weapon clearly wasn't designed for the weighty alterations and attachments.</description>
        <commonality>1</commonality>
        <weaponCategory>BulletFiring</weaponCategory>
        <exclusionTags>
            <li>AmmoType</li>
            <li>Color</li>
        </exclusionTags>
        <forcedColor>UniqueWeapon_Fire</forcedColor>
        <statOffsets>
            <MarketValue>300</MarketValue>
        </statOffsets>
        <statFactors>
            <RangedWeapon_Cooldown>3</RangedWeapon_Cooldown>
        </statFactors>
        <traitAdjectives>
            <li>red</li>
            <li>fiery</li>
            <li>flaming</li>
            <li>burning</li>
            <li>hot</li>
            <li>igniting</li>
            <li>napalm</li>
        </traitAdjectives>
        <modExtensions>
            <li Class="EBSGFramework.WeaponTraitExtension">
                <projectileOverride>Bullet_IncendiaryLauncher</projectileOverride>
            </li>
        </modExtensions>
    </WeaponTraitDef>
⚠️ **GitHub.com Fallback** ⚠️