1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-26 08:41:13 +02:00
vcmi/config/schemas/template.json

98 lines
2.4 KiB
JSON
Raw Normal View History

{
2023-05-19 20:14:01 +02:00
"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" :
{
2023-05-19 20:14:01 +02:00
"zone" : {
"type" : "object",
"required" : ["type", "monsters", "size"],
2023-05-19 20:14:01 +02:00
"properties" : {
"type" : {"$ref" : "#/definitions/type"},
"size" : {"$ref" : "#/definitions/size"},
"playerTowns" : {"$ref" : "#/definitions/playerTowns"},
"neuralTowns" : {"$ref" : "#/definitions/neuralTowns"},
"townsAreSameType" : {"$ref" : "#/definitions/townsAreSameType"},
2023-07-06 17:39:09 +02:00
"terrainTypes": {"$ref" : "#/definitions/terrains"},
"bannedTerrains": {"$ref" : "#/definitions/terrains"},
2023-05-19 20:14:01 +02:00
"monsters" : {"$ref" : "#/definitions/monsters"},
2023-07-06 17:39:09 +02:00
"bannedMonsters" : {"$ref" : "#/definitions/monsters"},
2023-05-19 20:14:01 +02:00
"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
}
}
}
},
2023-05-19 20:14:01 +02:00
"type" : {
"type" : "string",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"enum" : ["playerStart", "cpuStart", "treasure", "junction"]
},
2023-05-19 20:14:01 +02:00
"size" : {
"type" : "number",
"minimum" : 1,
"additionalProperties" : false
},
2023-05-19 20:14:01 +02:00
"connection" :
2015-06-02 15:26:33 +02:00
{
2023-07-06 17:39:09 +02:00
"required" : ["a", "b"],
"additionalProperties" : true,
2023-05-19 20:14:01 +02:00
"properties" : {
"a" : {
2015-06-02 15:26:33 +02:00
"type" : "string"
},
2023-05-19 20:14:01 +02:00
"b" : {
2015-06-02 15:26:33 +02:00
"type" : "string"
},
2023-05-19 20:14:01 +02:00
"guard" :
2015-06-02 15:26:33 +02:00
{
2023-05-19 20:14:01 +02:00
"type" : "number",
2015-06-02 15:26:33 +02:00
"minimum" : 0
2023-07-06 17:39:09 +02:00
},
"type":
{
"type" : "string",
"additionalProperties" : false,
"enum" : ["wide", "fictive", "repulsive"]
2015-06-02 15:26:33 +02:00
}
}
},
2023-05-19 20:14:01 +02:00
"waterContent" :
{
2023-05-19 20:14:01 +02:00
"enum" : ["none", "normal", "islands"],
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"type" : "string"
2015-06-02 15:26:33 +02:00
}
},
2023-05-19 20:14:01 +02:00
"properties" :
{
"required" : ["zones", "connections"],
"additionalProperties" : false,
2023-07-06 17:39:09 +02:00
"description" : {
"type": "string"
},
2023-05-19 20:14:01 +02:00
"zones" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#/definitions/zone" }
},
2023-05-19 20:14:01 +02:00
"connections" : {
"type" : "array",
"items" : {"$ref" : "#/definitions/connection"}
},
2023-05-19 20:14:01 +02:00
"allowedWaterContent" : {
"type" : "array",
"items" : {"$ref" : "#/definitions/waterContent"}
}
}
}