243 lines
7.2 KiB
JSON
243 lines
7.2 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
"$id": "blockception.minecraft.behaviour.trading",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"Item": {
|
|
"title": "Item",
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item": {
|
|
"type": "string",
|
|
"title": "Item identifier"
|
|
},
|
|
"price_multiplier": {
|
|
"type": "number",
|
|
"title": "Price multiplier"
|
|
},
|
|
"quantity": {
|
|
"title": "Quantity",
|
|
"oneOf": [
|
|
{
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"title": "Amount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["min", "max"],
|
|
"properties": {
|
|
"min": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"title": "Minimum"
|
|
},
|
|
"max": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"title": "Maximum"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"functions": {
|
|
"$ref": "#/definitions/Functions"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Functions": {
|
|
"title": "Functions",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["function"],
|
|
"$ref": "../loot_tables/functions.json"
|
|
}
|
|
},
|
|
"TradeArray": {
|
|
"type": "array",
|
|
"title": "Trades",
|
|
"items": {
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"title": "Trade",
|
|
"required": ["wants", "gives"],
|
|
"properties": {
|
|
"gives": {
|
|
"type": "array",
|
|
"title": "Gives",
|
|
"items": {
|
|
"title": "Give",
|
|
"oneOf": [
|
|
{ "type": "string" },
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item": { "type": "string", "title": "Item identifier" },
|
|
"quantity": {
|
|
"title": "Quantity",
|
|
"oneOf": [
|
|
{ "type": "integer", "minimum": 1, "title": "Amount" },
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["min", "max"],
|
|
"properties": {
|
|
"min": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"title": "Minimum"
|
|
},
|
|
"max": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"title": "Maximum"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"functions": {
|
|
"$ref": "#/definitions/Functions"
|
|
},
|
|
"choice": {
|
|
"title": "Choice",
|
|
"description": "TODO",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Item"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"wants": {
|
|
"type": "array",
|
|
"title": "Wants",
|
|
"items": {
|
|
"title": "Want",
|
|
"oneOf": [
|
|
{ "type": "string" },
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item": { "type": "string", "title": "Item identifier" },
|
|
"quantity": {
|
|
"title": "Quantity",
|
|
"oneOf": [
|
|
{ "type": "integer", "minimum": 1, "title": "Amount" },
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["min", "max"],
|
|
"properties": {
|
|
"min": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"title": "Minimum"
|
|
},
|
|
"max": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"title": "Maximum"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"price_multiplier": {
|
|
"title": "Price multiplier",
|
|
"description": "TODO",
|
|
"type": "number"
|
|
},
|
|
"functions": {
|
|
"$ref": "#/definitions/Functions"
|
|
},
|
|
"choice": {
|
|
"title": "Choice",
|
|
"description": "TODO",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Item"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"trader_exp": {
|
|
"type": "integer",
|
|
"title": "Trader experience"
|
|
},
|
|
"max_uses": {
|
|
"type": "integer",
|
|
"title": "Maximum uses"
|
|
},
|
|
"reward_exp": {
|
|
"type": "boolean",
|
|
"title": "Reward experience"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"properties": {
|
|
"tiers": {
|
|
"type": "array",
|
|
"title": "Tiers",
|
|
"description": "A collection of tiers",
|
|
"items": {
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"title": "Tier",
|
|
"properties": {
|
|
"trades": {
|
|
"$ref": "#/definitions/TradeArray"
|
|
},
|
|
"total_exp_required": {
|
|
"title": "Total experience required",
|
|
"type": "integer"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"title": "Groups",
|
|
"description": "A collection of groups",
|
|
"items": {
|
|
"type": "object",
|
|
"title": "Group",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"num_to_select": {
|
|
"title": "Number to select",
|
|
"type": "integer"
|
|
},
|
|
"trades": {
|
|
"$ref": "#/definitions/TradeArray"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "TODO description",
|
|
"title": "TODO title"
|
|
}
|