EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

item

An inventory item with a localized name, stack limit and optional script-driven use.

Signature

{ description: (TextKey)?, equip: (ItemEquipment)?, icon: (TextureAssetId)?, id: ContentId, kind: "item", max_stack: PositiveCount, name: TextKey, place: (Placement)?, spell: (ItemSpell)?, tags: {TagId}, use: (ItemUse)? }

Fields

NameTypeMeaning
descriptionTextKeyLocalized 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
equipItemEquipmentPresence makes this item equippable; at least tool or light is required.
iconTextureAssetIdInventory 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
idContentIdUnique 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}$
kind"item"Discriminant
max_stackPositiveCountMaximum units in one stack.
Range: 1…2147483647; Unit: count
nameTextKeyLocalized 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
placePlacementHow the item enters the world when placed; absent items cannot be placed.
spellItemSpellPresence 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
useItemUseExplicit item use contract; absent for items without a use action.

Validated example

{
  "icon": "core:apple_icon",
  "id": "core:apple",
  "kind": "item",
  "max_stack": 999,
  "name": "core:apple_name",
  "tags": [],
  "use": {
    "cooldown_ticks": 1,
    "parameters": {
      "amount": 15,
      "stamina": 10
    },
    "reach_mm": 0,
    "script": "core:eat",
    "snapshot": {
      "anchors": [],
      "definitions_from": [
        "core"
      ],
      "radius_mm": 0,
      "variables": []
    },
    "target_scope": "self"
  }
}