neon-sprawl/content/schemas/item-def.schema.json

59 lines
2.1 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://neon-sprawl.local/schemas/item-def.json",
"title": "ItemDef",
"description": "Single item row for catalogs (e.g. content/items/*_items.json). IDs are stable forever—rename display in displayName only. See docs/decomposition/modules/E3_M3_ItemizationAndInventorySchema.md.",
"type": "object",
"additionalProperties": false,
"required": ["id", "displayName", "prototypeRole", "stackMax", "inventorySlotKind"],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$",
"description": "Immutable item key for saves, recipes, quests, telemetry, and inventory grants. Never change after content ships; add a new id if the item splits."
},
"displayName": {
"type": "string",
"minLength": 1,
"description": "Player-facing label; safe to change without migrating character data."
},
"prototypeRole": {
"type": "string",
"description": "Prototype Slice 1 archetype (material through equip_stub). CI requires exactly one row per role.",
"enum": [
"material",
"intermediate",
"consumable",
"utility",
"quest_token",
"equip_stub"
]
},
"stackMax": {
"type": "integer",
"minimum": 1,
"description": "Maximum stack size per inventory slot for this item def."
},
"inventorySlotKind": {
"type": "string",
"description": "Where the item may be stored: general bag vs equipment slot (prototype equip stub).",
"enum": ["bag", "equipment"]
},
"rarity": {
"type": "string",
"description": "Optional rarity band (unused in prototype Slice 1 rows).",
"enum": ["common", "uncommon", "rare", "epic"]
},
"bindPolicy": {
"type": "string",
"description": "Optional bind rule stub (unused in prototype Slice 1 rows).",
"enum": ["none", "bind_on_acquire", "bind_on_equip"]
},
"durabilityMax": {
"type": "integer",
"minimum": 0,
"description": "Optional durability ceiling stub (unused in prototype Slice 1; no durability mutation in v1)."
}
}
}