2015-05-26 18:19:41 +02:00
|
|
|
{
|
2023-05-19 20:14:01 +02:00
|
|
|
"type" : "object",
|
|
|
|
"$schema" : "http://json-schema.org/draft-04/schema",
|
2015-05-26 18:19:41 +02:00
|
|
|
"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",
|
2015-05-27 11:30:46 +02:00
|
|
|
"required" : ["type", "monsters", "size"],
|
2023-09-17 23:30:42 +02:00
|
|
|
"additionalProperties" : false,
|
2023-05-19 20:14:01 +02:00
|
|
|
"properties" : {
|
2023-09-17 23:30:42 +02:00
|
|
|
"type" : {
|
|
|
|
"type" : "string",
|
2024-11-23 13:19:25 +02:00
|
|
|
"enum" : ["playerStart", "cpuStart", "treasure", "junction", "sealed"]
|
2023-09-17 23:30:42 +02:00
|
|
|
},
|
|
|
|
"size" : { "type" : "number", "minimum" : 1 },
|
|
|
|
"owner" : {},
|
|
|
|
"playerTowns" : {"$ref" : "#/definitions/towns"},
|
|
|
|
"neutralTowns" : {"$ref" : "#/definitions/towns"},
|
|
|
|
"matchTerrainToTown" : { "type" : "boolean"},
|
|
|
|
"minesLikeZone" : { "type" : "number" },
|
|
|
|
"terrainTypeLikeZone" : { "type" : "number" },
|
|
|
|
"treasureLikeZone" : { "type" : "number" },
|
2024-08-24 20:18:36 +02:00
|
|
|
"customObjectsLikeZone" : { "type" : "number" },
|
2023-09-17 23:30:42 +02:00
|
|
|
|
|
|
|
"terrainTypes": {"$ref" : "#/definitions/stringArray"},
|
|
|
|
"bannedTerrains": {"$ref" : "#/definitions/stringArray"},
|
|
|
|
|
|
|
|
"townsAreSameType" : { "type" : "boolean"},
|
|
|
|
"allowedMonsters" : {"$ref" : "#/definitions/stringArray"},
|
|
|
|
"bannedMonsters" : {"$ref" : "#/definitions/stringArray"},
|
|
|
|
"allowedTowns" : {"$ref" : "#/definitions/stringArray"},
|
|
|
|
"bannedTowns" : {"$ref" : "#/definitions/stringArray"},
|
|
|
|
|
|
|
|
"monsters" : {
|
|
|
|
"type" : "string",
|
|
|
|
"enum" : ["weak", "normal", "strong", "none"]
|
|
|
|
},
|
|
|
|
|
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}
|
2023-09-17 23:30:42 +02:00
|
|
|
},
|
|
|
|
"additionalProperties" : false
|
2015-05-26 18:19:41 +02:00
|
|
|
}
|
2024-08-24 15:12:22 +02:00
|
|
|
},
|
|
|
|
"customObjects" : {
|
2024-09-21 13:52:25 +02:00
|
|
|
"type" : "object",
|
|
|
|
"properties": {
|
|
|
|
"bannedCategories": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": ["all", "dwelling", "creatureBank", "randomArtifact", "bonus", "resource", "resourceGenerator", "spellScroll", "pandorasBox", "questArtifact", "seerHut"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"bannedObjects": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"commonObjects": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"rmg": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"value": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"rarity": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"zoneLimit": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": ["value", "rarity"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": ["id", "rmg"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-09-17 23:30:42 +02:00
|
|
|
}
|
|
|
|
}
|
2015-05-26 18:19:41 +02:00
|
|
|
},
|
2023-09-17 23:30:42 +02:00
|
|
|
|
|
|
|
"towns" : {
|
|
|
|
"type" : "object",
|
2015-05-27 11:30:46 +02:00
|
|
|
"additionalProperties" : false,
|
2023-09-17 23:30:42 +02:00
|
|
|
"properties" : {
|
|
|
|
"towns" : { "type" : "number" },
|
|
|
|
"castles" : { "type" : "number" },
|
|
|
|
"townDensity" : { "type" : "number" },
|
|
|
|
"castleDensity" : { "type" : "number" }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"stringArray" : {
|
|
|
|
"type" : "array",
|
|
|
|
"items" : { "type" : "string" }
|
2015-05-26 18:19:41 +02:00
|
|
|
},
|
2023-09-17 23:30:42 +02:00
|
|
|
"mines" : {
|
|
|
|
"type" : "object",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties" : {
|
|
|
|
"gold" : { "type" : "number"},
|
|
|
|
"wood" : { "type" : "number"},
|
|
|
|
"ore" : { "type" : "number"},
|
|
|
|
"mercury" : { "type" : "number"},
|
|
|
|
"sulfur" : { "type" : "number"},
|
|
|
|
"crystal" : { "type" : "number"},
|
|
|
|
"gems" : { "type" : "number"}
|
|
|
|
}
|
2015-06-02 16:40:32 +02:00
|
|
|
},
|
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",
|
2024-07-29 20:36:23 +02:00
|
|
|
"enum" : ["wide", "fictive", "repulsive", "forcePortal"]
|
2015-06-02 15:26:33 +02:00
|
|
|
}
|
|
|
|
}
|
2022-06-05 08:02:58 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"waterContent" :
|
2022-06-05 08:02:58 +02:00
|
|
|
{
|
2023-05-19 20:14:01 +02:00
|
|
|
"enum" : ["none", "normal", "islands"],
|
|
|
|
"type" : "string"
|
2015-06-02 15:26:33 +02:00
|
|
|
}
|
2015-05-26 18:19:41 +02:00
|
|
|
},
|
2023-09-17 23:30:42 +02:00
|
|
|
|
|
|
|
"additionalProperties" : false,
|
2023-05-19 20:14:01 +02:00
|
|
|
"properties" :
|
2015-05-26 18:19:41 +02:00
|
|
|
{
|
2023-09-17 23:30:42 +02:00
|
|
|
"required" : ["zones", "connections", "minSize", "maxSize", "players"],
|
|
|
|
|
|
|
|
"players" : {
|
2023-09-18 14:36:35 +02:00
|
|
|
"description" : "Number of players that will be present on map (human or AI)",
|
2023-09-17 23:30:42 +02:00
|
|
|
"type": "string"
|
|
|
|
},
|
2023-10-30 18:21:03 +02:00
|
|
|
"humans" : {
|
2023-09-18 14:36:35 +02:00
|
|
|
"description" : "Optional, number of AI-only players",
|
2023-09-17 23:30:42 +02:00
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"minSize" : {
|
2023-09-18 14:36:35 +02:00
|
|
|
"description" : "Minimal size of the map, e.g. 'm+u' or '120x120x1",
|
2023-09-17 23:30:42 +02:00
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"maxSize" : {
|
2023-09-18 14:36:35 +02:00
|
|
|
"description" : "Maximal size of the map, e.g. 'm+u' or '120x120x1",
|
2023-09-17 23:30:42 +02:00
|
|
|
"type": "string"
|
|
|
|
},
|
2024-09-04 20:18:10 +02:00
|
|
|
"settings" : {
|
|
|
|
"description" : "List of changed game settings by template",
|
|
|
|
"type" : "object",
|
2024-09-21 17:34:33 +02:00
|
|
|
"$ref" : "gameSettings.json"
|
2024-09-04 20:18:10 +02:00
|
|
|
},
|
2023-09-18 14:36:35 +02:00
|
|
|
"name" : {
|
|
|
|
"description" : "Optional name - useful to have several template variations with same name",
|
2023-07-06 17:39:09 +02:00
|
|
|
"type": "string"
|
|
|
|
},
|
2024-02-03 17:23:56 +02:00
|
|
|
"description" : {
|
|
|
|
"description" : "Optional info about template, author or special rules",
|
|
|
|
"type": "string"
|
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"zones" : {
|
2023-09-18 14:36:35 +02:00
|
|
|
"description" : "List of named zones",
|
2023-05-19 20:14:01 +02:00
|
|
|
"type" : "object",
|
2023-09-17 23:30:42 +02:00
|
|
|
"additionalProperties" : {"$ref" : "#/definitions/zone" }
|
2015-05-26 18:19:41 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"connections" : {
|
2023-09-18 14:36:35 +02:00
|
|
|
"description" : "List of connections between zones",
|
2023-05-19 20:14:01 +02:00
|
|
|
"type" : "array",
|
|
|
|
"items" : {"$ref" : "#/definitions/connection"}
|
2015-05-27 11:30:46 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"allowedWaterContent" : {
|
2023-09-18 14:36:35 +02:00
|
|
|
"description" : "Optional parameter allowing to prohibit some water modes. All modes are allowed if parameter is not specified",
|
2023-05-19 20:14:01 +02:00
|
|
|
"type" : "array",
|
|
|
|
"items" : {"$ref" : "#/definitions/waterContent"}
|
2023-05-19 20:04:31 +02:00
|
|
|
}
|
2015-05-26 18:19:41 +02:00
|
|
|
}
|
|
|
|
}
|