Equippable Ability - KonradHeinser/EBSGFramework GitHub Wiki

This comp allows you to make equipment that gives an ability when equipped. The comp looks like this:

        <comps>
            <li Class="EBSGFramework.CompProperties_EquippableAbility">
            </li>
        </comps>

These are the options available within the comp:

  • ability : The AbilityDef of the ability to give
  • saveCooldown : Default (True) : While True, the comp will try to ensure that the cooldown of the ability is not reset when the equipment is put down and picked back up. You can set this to False if you do intend for the cooldown to reset each time
  • saveCharges : Default (True) : While True, the comp will try to ensure that the ability given to the pawn has the same number of charges as when it was dropped. This does NOT work with the charges in Reloadable Abilities, so if you're looking for refuelable charges in your equipment's ability, I recommend sticking with vanilla's CompProperties_EquippableAbilityReloadable

This example just adds the fire spew ability to a copy of the vanilla longsword:

    <ThingDef ParentName="BaseMeleeWeapon_Sharp_Quality">
        <defName>MeleeWeapon_FlamingLongSword</defName>
        <label>flaming longsword</label>
        <description>.</description>
        <possessionCount>1</possessionCount>
        <graphicData>
            <texPath>Things/Item/Equipment/WeaponMelee/LongSword</texPath>
            <graphicClass>Graphic_Single</graphicClass>
        </graphicData>
        <techLevel>Medieval</techLevel>
        <weaponTags>
            <li>MedievalMeleeAdvanced</li>
            <li>LongSword</li>
        </weaponTags>
        <costStuffCount>100</costStuffCount>
        <thingSetMakerTags><li>RewardStandardQualitySuper</li></thingSetMakerTags>
        <statBases>
            <WorkToMake>18000</WorkToMake>
            <Mass>2</Mass>
        </statBases>
        <relicChance>2</relicChance>
        <equippedAngleOffset>-65</equippedAngleOffset>
        <stuffCategories>
            <li>Metallic</li>
        </stuffCategories>
        <tools>
            <li>
                <label>handle</label>
                <capacities>
                    <li>Blunt</li>
                </capacities>
                <power>9</power>
                <cooldownTime>2</cooldownTime>
            </li>
            <li>
                <label>edge</label>
                <capacities>
                    <li>Cut</li>
                </capacities>
                <power>23</power>
                <cooldownTime>2.6</cooldownTime>
            </li>
        </tools>
        <recipeMaker>
            <researchPrerequisite>LongBlades</researchPrerequisite>
            <skillRequirements>
                <Crafting>5</Crafting>
            </skillRequirements>
            <displayPriority>420</displayPriority>
        </recipeMaker>
        <comps>
            <li Class="EBSGFramework.CompProperties_EquippableAbility">
                <ability>FireSpew</ability>
            </li>
        </comps>
    </ThingDef>
⚠️ **GitHub.com Fallback** ⚠️