inventory

What it carries: a character's pockets, a chest, a shop's shelf, a stove. Items are the project's Assets/Items/.item.json; slots hold stacks up to each item's stack size; items tagged currency go in a wallet, not a slot. give/take (keys, pickups, scripts) go through it. Scripts: self.inventory (add, remove, count, has, slots, move, split, sort), game.items, game.loot, game.crafting, game.shops. A shop or a station opens its screen when the player uses it.

In scene text

inventory { slots 1  weight 1  contents "…" }

Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.

Fields 7

FieldTypeUnit / rangeWhat it does
slotsnumber0 … 1000Slots (0: as many as needed).
weightnumberkg, 0 … 100Most kilograms it carries (0: no limit).
contentstext—What it starts with: "coin 20, turnip_seeds 10".
loottext—A loot table rolled into it when play starts (seeded by its name: the same every time).
shoptext—The shop it runs (Assets/Items/<id>.shop.json); using it opens the shop screen.
stationlist of text—Station tags for recipes (a stove: ["kitchen"]); using it opens crafting.
containertrue / false—Others can open it, take from it and put in it (a chest, a crate).
Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us
Download Arcwright free