CONTENT CONTRACT · VERSION 1
ItemDefinition
An inventory item with a localized name, stack limit and optional script-driven use.
Signature
{ description: (TextKey)?, equip: (ItemEquipment)?, icon: (TextureAssetId)?, id: ContentId, max_stack: PositiveCount, name: TextKey, place: (Placement)?, spell: (ItemSpell)?, tags: {TagId}, use: (ItemUse)? }Fields
| Name | Type | Meaning |
|---|---|---|
description | TextKey | Localized one-line description shown with the item. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
equip | ItemEquipment | Presence makes this item equippable; at least tool or light is required. |
icon | TextureAssetId | Inventory and hand icon of the item. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: asset:texture |
id | ContentId | Unique definition ID in the declaring package namespace. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
max_stack | PositiveCount | Maximum units in one stack. Range: 1…2147483647; Unit: count |
name | TextKey | Localized item label, resolved in the package base locale. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
place | Placement | How the item enters the world when placed; absent items cannot be placed. |
spell | ItemSpell | Presence makes the item a spell: bound to its owner (never dropped, stored or traded), cast through its use for mana. |
tags | {TagId} | Unordered unique membership tags; registry sorts them. Items: 0…4096; Unique entries |
use | ItemUse | Explicit item use contract; absent for items without a use action. |