Files
nana-story/contracts/schema/item-spec.schema.json
T

145 lines
2.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ItemSpec",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"header": {
"$ref": "#/$defs/ResourceHeader"
},
"hidden_facts": {
"type": "array",
"default": [],
"items": {
"type": "string"
}
},
"lore_refs": {
"type": "array",
"default": [],
"items": {
"type": "string"
}
},
"mechanics": {
"$ref": "#/$defs/ItemMechanics"
},
"name": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"header",
"name",
"description",
"tags",
"mechanics"
],
"$defs": {
"ItemMechanics": {
"type": "object",
"properties": {
"check_modifier": {
"type": [
"integer",
"null"
],
"format": "int8",
"maximum": 127,
"minimum": -128
},
"grants_tags": {
"type": "array",
"default": [],
"items": {
"type": "string"
}
},
"usable": {
"type": "boolean"
}
},
"required": [
"usable"
]
},
"ResourceHeader": {
"type": "object",
"properties": {
"content_hash": {
"type": "string"
},
"dependencies": {
"type": "array",
"default": [],
"items": {
"$ref": "#/$defs/ResourceRef"
}
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/$defs/ResourceKind"
},
"revision": {
"type": "string"
},
"schema_version": {
"type": "integer",
"format": "uint32",
"minimum": 0
}
},
"required": [
"id",
"kind",
"schema_version",
"revision",
"content_hash"
]
},
"ResourceKind": {
"type": "string",
"enum": [
"character",
"world_book",
"persona",
"plot_module",
"item_spec"
]
},
"ResourceRef": {
"type": "object",
"properties": {
"content_hash": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/$defs/ResourceKind"
},
"revision": {
"type": "string"
}
},
"required": [
"id",
"kind",
"revision",
"content_hash"
]
}
}
}