Skip to main content
forge-inventory owns containers and the moves between them. Equipment, loot, crafting, and economy all move items through this package rather than holding their own storage.

Concepts

  • Container id. A string key. The player bag is inv:<character_id>; the equip container is equip:<character_id>; stashes use their own ids.
  • Container types. player, drop, stash (creators can register more), each with slot and weight caps and a placement policy. Containers lazy-load from the database on first access.
  • Slots. Grid containers have indexed slots; equip-style containers have named slots. Placement validators (registered by other packages) gate what may go where.

Exports

Items in containers

Use, drops, stashes

Container setup

Events

itemAdded/itemRemoved on the equip container are how forge-equipment learns to apply or remove consequences.

Status notes

GiveItem (direct player-to-player give) is deferred to a later version. UseItem, drops, stashes, and the combined inventory screen are implemented.