Skip to main content

Socket Inventory

Socket inventories are item stacks that can also contain items. This is common in many APRG games, or in shooter games for weapon attachments, ammo, etc.

Properties

  • Each item occupies a single slot
  • Slots can have item requirements
  • Slots have gameplay tags
  • Slots have configurable capacities

Usage

Any item stack derived from BLSocketInventoryItem can contain item slots. Each slot is known as a socket (for this inventory, the two terms are interchangeable).

To be deposited into a socket inventory, items must implement IBLSocketable. This interface contains four methods:

  • Can Socket: Asked before an item is about to be deposited into a socket inventory. Items which return failure won't be depositable.
  • Socket: Called after an item is deposited into a socket inventory.
  • Can Unsocket: Asked before an item is withdrawn from a socket inventory. Items which return failure won't be withdrawable.
  • Unsocket Called before an item is withdrawn from a socket inventory.

Gameplay Tags

  • Bolt.SocketInventory.IsSocketed: The slot's contents are socketed.

Saving and Loading

When loading socket inventories, items will have Socket called in the same order as when they were saved.

Advanced

info

Socket inventories can never be deposited into each other, even if they implement IBLSocketable.