Inventory (slots), Equipment (named slots), and Gold —
plus a global ItemRegistry that item definitions live in. The economy is the Gold component: you
spawn a unit with gold, and gold-on-kill systems pay out GoldBounty to killers; there is no separate
balance endpoint. This page outfits a unit end to end; every command is real and runnable against a
local server, and the outputs below are captured from one.
The buy/sell shop (
/shop/buy, /shop/sell, /shop/list) was a MOBA-only layer and has been
removed — those routes 404. The generic inventory below is what remains: define items, give/equip them,
and let the Gold economy run. A purchasing shop, if you want one, is a game-side system built on these
primitives (as in the MOBA example game).Outfit a unit
1. Spawn a unit with gold.gold is a first-class component, returned by /observe and
/entities/{id}; spawning with gold also adds a Level(1).
id, a name, and a properties map of named numbers. Items live
in one global registry, so you define them once.
/item/give drops it into the unit’s inventory (auto-creating an
inventory if it has none); /item/equip moves it into a named slot.
/item/list/{entity_id} returns the inventory, equipment, and an
aggregated stat_modifiers map. Equipment moves on the call; the equipped item now sits in the weapon
slot.
Behavior and gotchas
The things you only find out by running it:- The shop is gone; inventory is the generic layer.
/shop/buy,/shop/sell, and/shop/listreturn 404. There is no route to list the global registry either (that was/shop/list) — you list a unit’s items with/item/list/{entity_id}, not the catalogue. /item/giveauto-creates the inventory. A unit with noInventorycomponent gets one on the first give; you don’t pre-create it.- Equipment moves immediately;
stat_modifiersmay stay empty./item/equipplaces the item in the slot on the call, butstat_modifiersis filled by a separate stat-aggregation system. In our run on the MOBA headless host,stat_modifiersremained{}even after stepping — readequipmentto confirm the item moved, and treat the aggregated-stat read as a game-side behavior that the host you run may or may not schedule. - The economy is the
Goldcomponent, not a balance API. Spawn withgold, awardgold_bountyon kill (adeathrule pays the killer), and read the current value off/entities/{id}or/observe. There is no deposit/withdraw endpoint.
Endpoints
Currency rides on the
Gold component — spawn with --gold and pay out GoldBounty on kill; see
Units & roles and Gameplay & combat. A purchasing
shop with recipes lives in the MOBA example game as a game-side system.
Status
- Shipped — item definitions, slotted inventory (auto-created on give), equipment into named slots,
and the
Goldeconomy with kill bounties. All headless. - Game-side — the buy/sell shop and recipe combining are systems a game owns, built on these inventory primitives; stat aggregation from equipped items is similarly a game-scheduled behavior (it did not populate on the MOBA headless host in our run).
Item & inventory endpoints
Every item, inventory, and equipment endpoint, with request and response schemas.