Inventory parameters for an item: stack, weight, category, durability, binding.
inventory#
Defines how an item behaves in the player's inventory: weight, max stack, durability, category, binding (none/on-pickup/on-equip), volume, and shop visibility.
Why it matters#
Almost every RPG/RTS/survival engine needs this same information for every item — and almost all of them implement it by hand, item by item. Here you define it once through the UI, export to JSON, and the engine reads it. Bonus: fields like categoryLibraryRef let you reuse a central category taxonomy (Field Library) instead of typing "Sword" 50 times.
Where it usually lives#
- Pages of type
🎒 Itemsor⚔️ Items with Effect. Default. - Blank pages when you want to model exotic containers (wallets, fairy bags).
Singleton — 1 inventory per item page.
Schema#
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
idYes | string | Internal ID. | |
nameYes | string | Addon name (default: Inventory). | |
weightYes | number | Unit weight of the item (kg, lb, or whatever unit your engine uses). | |
stackableYes | boolean | True if multiple of the same item can share 1 slot. | |
maxStackYes | number | Limit per slot when stackable=true (e.g. 99). | |
inventoryCategoryYes | string | Free-form category (Sword, Potion, Crafting). Used for filtering/grouping. | |
categoryLibraryRef | { libraryAddonId, entryId } | When you want to link the category to a Field Library entry (central taxonomy) instead of a loose string. | |
slotSizeYes | number | Slots occupied (1 = normal; 2x1, 2x2 for Tetris-like inventories). | |
hasDurabilityConfig | boolean | Toggles durability fields on/off. | |
durabilityYes | number | Current durability (kept at 0 when hasDurabilityConfig=false). | |
maxDurability | number | Maximum durability (capacity). | |
hasVolumeConfig | boolean | Toggles volume field on/off. | |
volume | number | Volume occupied (liters, or arbitrary unit). | |
bindTypeYes | "none" | "onPickup" | "onEquip" | none: can be traded/sold. onPickup: binds on pickup (no trading). onEquip: binds on equip. | |
showInShopYes | boolean | Appears in engine shops? Useful for hiding exclusive loot. | |
consumableYes | boolean | Disappears on use? Potions = true, Sword = false. | |
discardableYes | boolean | Can the player discard it? False for quest items. | |
notes | string | Free-form notes for the team. |
Example#
Iron Sword — equippable, binds on equip, non-consumable:
{
"id": "inv-iron-sword",
"name": "Inventory",
"weight": 5.0,
"stackable": false,
"maxStack": 1,
"inventoryCategory": "Sword",
"slotSize": 1,
"hasDurabilityConfig": true,
"durability": 100,
"maxDurability": 100,
"bindType": "onEquip",
"showInShop": true,
"consumable": false,
"discardable": true
}
Health Potion — stackable, no durability, consumable:
{
"id": "inv-hp-potion",
"name": "Inventory",
"weight": 0.2,
"stackable": true,
"maxStack": 99,
"inventoryCategory": "Consumable",
"slotSize": 1,
"durability": 0,
"bindType": "none",
"showInShop": true,
"consumable": true,
"discardable": true
}
categoryLibraryRef vs string#
Use inventoryCategory (loose string) for prototypes. Once the game matures and you have 30+ items, migrate to categoryLibraryRef pointing to a fieldLibrary page — that way renaming "Sword" → "Blade" reflects across all items automatically.
Wizard#
No wizard of its own. Seeded by:
🎒 Items(together with economyLink)⚔️ Items with Effect(together with economyLink + attributeModifiers)
The wizard defaults are reasonable for a "generic item" — you just tweak the booleans (consumable, stackable, etc.) and you're good to go.
Who references inventory#
production.ingredients[].itemRefandproduction.outputs[].itemRef— recipes reference item pages.craftTable.unlock.item.itemRef— recipes that require a specific item to unlock.skills.unlock.item.itemRef— skills that require a catalyst item.economyLink.producedItemRef— a page that produces another item (chicken → egg).