Skip to main content

Equipment Inventory

Equipment inventories are mostly the same as simple inventories, but they can equip items inside of their slots.

Properties​

  • Each item occupies a single slot
  • Slots can have item requirements
  • Slots have gameplay tags
  • Slots have configurable capacities
  • Items can be 'equipped'.
  • Equipping can be configured to happen after depositing or manually

Usage​

Items must implement IBLEquippable to be deposited into an equipment inventory. This interface contains four methods:

  • Can Equip: Asked before an item is about to be equipped.
  • Equip: Called after an item is equipped.
  • Can Unequip: Asked before an item is unequipped.
  • Unequip Called before an item is unequipped.

Gameplay Tags​

  • Bolt.EquipmentSlot.IsEquipped: The slot's contents are equipped.
  • Bolt.EquipmentSlot.DepositRequiresEquippable: Items must be equippable to be deposited into the item slot.
  • Bolt.EquipmentSlot.DepositRequiresUnequippable: Items must be unequippable to be deposited into the item slot.
  • Bolt.EquipmentSlot.AutoEquip: The inventory will try to automatically equip items deposited into the slot.

Saving And Loading​

When loading equipment inventories, items will be equipped in the same order as when they were saved. E.g.:

  1. Equip A
  2. Equip B
  3. Equip C
  4. Save ...
  5. Load: Try Equip A, then B, then C

This keeps equip side-effects from preventing equip for loaded items. E.g., if item B has attribute requirements that are granted by item A, B wouldn't be equippable until A is equipped.

If any item(s) fail to be re-equipped on load (e.g., due to updates in your game), they will remain deposited but will be unequipped.