Remove Things From Inventory - KonradHeinser/EBSGFramework GitHub Wiki

This ability comp allows you to remove an item from the inventory of the caster and/or the target. Due to various limitations, this doesn't allow you to dictate the stuffing (if removing something like equipment), but will instead remove the first match it finds. This is what the basic comp will look like:

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

These are the tags available:

  • targetThing : The ThingDef to remove from the target's inventory

  • targetCount : Default (1) : The amount of said thing to remove

  • targetBestEffort : Default (False) : When true, the ability will still cast if the target doesn't have enough of the item available. It will remove whatever amount it can, and not care about the rest

  • casterThing : The ThingDef to remove from the caster's inventory

  • casterCount : Default (1) : The amount of said thing to remove

  • casterBestEffort : Default (False) : When true, the ability will still cast if the caster doesn't have enough of the item available. It will remove whatever amount it can, and not care about the rest

  • disableGizmoIfCasterInvalid : Default (True) : If the caster doesn't have enough of the item in their inventory and casterBestEffort is false, then this would cause the gizmo to be disabled while true


This ability allows the caster to turn 100 steel in their inventory into a normal steel long sword by combining this comp with Add Things to Inventory

        <defName>MakeSteelSword</defName>
        <label>make steel sword</label>
        <description>Do as the name says</description>
        <comps>
            <li Class="EBSGFramework.CompProperties_RemoveItemFromInventory">
                <casterThing>Steel</casterThing>
                <casterCount>100</casterCount>
            </li>
            <li Class="EBSGFramework.CompProperties_AddItemToInventory">
                <casterThing>MeleeWeapon_LongSword</casterThing>
                <casterCount>1</casterCount>
                <casterStuffing>Steel</casterStuffing>
            </li>
        </comps>
    </AbilityDef>

⚠️ **GitHub.com Fallback** ⚠️