1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00
vcmi/config/schemas/template.json
2023-07-06 17:39:09 +02:00

98 lines
2.4 KiB
JSON

{
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI random map template format",
"description" : "Format used to define random map templates in VCMI",
"definitions" :
{
"zone" : {
"type" : "object",
"required" : ["type", "monsters", "size"],
"properties" : {
"type" : {"$ref" : "#/definitions/type"},
"size" : {"$ref" : "#/definitions/size"},
"playerTowns" : {"$ref" : "#/definitions/playerTowns"},
"neuralTowns" : {"$ref" : "#/definitions/neuralTowns"},
"townsAreSameType" : {"$ref" : "#/definitions/townsAreSameType"},
"terrainTypes": {"$ref" : "#/definitions/terrains"},
"bannedTerrains": {"$ref" : "#/definitions/terrains"},
"monsters" : {"$ref" : "#/definitions/monsters"},
"bannedMonsters" : {"$ref" : "#/definitions/monsters"},
"mines" : {"$ref" : "#/definitions/mines"},
"treasure" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"min" : {"type" : "number", "minimum" : 0},
"max" : {"type" : "number", "minimum" : 0},
"density" : {"type" : "number", "minimum" : 1}
},
"additionalProperties" : false
}
}
}
},
"type" : {
"type" : "string",
"additionalProperties" : false,
"enum" : ["playerStart", "cpuStart", "treasure", "junction"]
},
"size" : {
"type" : "number",
"minimum" : 1,
"additionalProperties" : false
},
"connection" :
{
"required" : ["a", "b"],
"additionalProperties" : true,
"properties" : {
"a" : {
"type" : "string"
},
"b" : {
"type" : "string"
},
"guard" :
{
"type" : "number",
"minimum" : 0
},
"type":
{
"type" : "string",
"additionalProperties" : false,
"enum" : ["wide", "fictive", "repulsive"]
}
}
},
"waterContent" :
{
"enum" : ["none", "normal", "islands"],
"additionalProperties" : false,
"type" : "string"
}
},
"properties" :
{
"required" : ["zones", "connections"],
"additionalProperties" : false,
"description" : {
"type": "string"
},
"zones" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#/definitions/zone" }
},
"connections" : {
"type" : "array",
"items" : {"$ref" : "#/definitions/connection"}
},
"allowedWaterContent" : {
"type" : "array",
"items" : {"$ref" : "#/definitions/waterContent"}
}
}
}