Skip to main content
forge-equipment models the character’s equipped set as an inventory container (equip:<character_id>) with named slots. Equipping is a normal inventory move; the package adds fit rules and consequences: the attribute modifiers and granted effects an item applies while it occupies a slot.

Concepts

  • Slots. Named slots (slot:mainhand, slot:helm, …). Ships a generic 12-slot paper-doll set.
  • Fit. An item fits a slot if its equipSlot matches, or its type/tags are in the slot’s accepts. Enforced by a placement validator, so a client drag cannot bypass it.
  • Consequences. On equip, the item’s equip.modifiers are applied to forge-attributes and any equip.grantEffect is applied via forge-effects, scoped to the instance. On unequip, both are removed. They are re-applied on character activation.

Exports

The equip block (on the item definition)

The equip block uses attribute; forge-effects modifiers use attribute_id. Both are intentional; just match the right one to the right system.

Events

Consequences are re-applied on forge-characters:server:activated, because attributes clears its modifiers on deactivate and inventory load does not re-fire itemAdded for persisted slots.

Configuration

The 12 slots ship in editable shared/data/slots.lua (ForgeEquipment.DefaultSlots), gated by Config.ShipDefaults. Durability, two-handed blocking, requirements, and cosmetic visuals are roadmap items beyond v0.1.