Skip to main content
forge-items owns immutable item definitions and the helpers to create and reason about item instances. It has no opinion on where items live; inventory, equipment, loot, crafting, and economy all consume definitions and pass instances around.

Concepts

  • Definition. A stable item:<name> with type, label, weight, rarity, stack size, tags, and optional open blocks (equip, weapon, use). Immutable, shared on server and client.
  • Instance. A value object: { instanceId, defId, quantity, durability?, meta }. The holder (inventory, drop, equipment) persists it; there is no separate items table.
  • Open blocks. Definitions are open tables. Consumer packages read their own blocks; unknown blocks ride along untouched.

Exports

Definitions

Instances

Definition shape

See add an item for the full walk, including equippable items.

Configuration

Ships a small neutral starter set (bandage, bread, water, cloth, simple dagger, coin) in editable shared/data/items.lua (ForgeItems.DefaultItems), gated by Config.ShipDefaults. Rarities are creator-configurable in Config.Rarities.
forge-items depends on forge-core only. It has no character_id and no per-character state. Everything above it in the stack depends on forge-items.