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
equipSlotmatches, or itstype/tags are in the slot’saccepts. Enforced by a placement validator, so a client drag cannot bypass it. - Consequences. On equip, the item’s
equip.modifiersare applied toforge-attributesand anyequip.grantEffectis applied viaforge-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)
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 editableshared/data/slots.lua (ForgeEquipment.DefaultSlots), gated by
Config.ShipDefaults. Durability, two-handed blocking, requirements, and cosmetic visuals are
roadmap items beyond v0.1.