2024-07-16 20:29:20 +02:00
|
|
|
# Random Map Template
|
|
|
|
|
2023-08-12 23:17:38 +02:00
|
|
|
## Template format
|
|
|
|
|
2024-12-04 18:50:01 +02:00
|
|
|
```json
|
2023-08-12 23:17:38 +02:00
|
|
|
/// Unique template name
|
|
|
|
"Triangle" :
|
|
|
|
{
|
2023-09-18 14:36:35 +02:00
|
|
|
//Optional name - useful to have several template variations with same name
|
2023-08-12 23:17:38 +02:00
|
|
|
"name" : "Custom template name",
|
2024-02-03 17:23:56 +02:00
|
|
|
//Any info you want to be displayed in random map menu
|
|
|
|
"description" : "Detailed info and recommended rules",
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
/// Minimal and maximal size of the map. Possible formats:
|
|
|
|
/// Size code: s, m, l or xl for size with optional suffix "+u" for underground
|
|
|
|
/// Numeric size, e.g. 120x120x1 (width x height x depth). Note that right now depth can only be 0 or 1
|
|
|
|
"minSize" : "m",
|
|
|
|
"maxSize" : "xl+u",
|
|
|
|
|
|
|
|
/// Number of players that will be present on map (human or AI)
|
|
|
|
"players" : "2-4",
|
|
|
|
|
2023-10-30 22:03:12 +02:00
|
|
|
/// Since 1.4.0 - Optional, number of human-only players (as in original templates)
|
|
|
|
"humans" : "1-4",
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
///Optional parameter allowing to prohibit some water modes. All modes are allowed if parameter is not specified
|
|
|
|
"allowedWaterContent" : ["none", "normal", "islands"]
|
2024-09-04 20:18:10 +02:00
|
|
|
|
|
|
|
/// List of game settings that were overriden by this template. See config/gameConfig.json in vcmi install directory for possible values
|
|
|
|
/// Settings defined here will always override any settings from vcmi or from mods
|
2024-11-23 13:19:25 +02:00
|
|
|
"settings" :
|
|
|
|
{
|
|
|
|
"heroes" :
|
|
|
|
{
|
|
|
|
"perPlayerOnMapCap" : 1
|
2024-09-04 20:18:10 +02:00
|
|
|
}
|
|
|
|
},
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
/// List of named zones, see below for format description
|
|
|
|
"zones" :
|
|
|
|
{
|
|
|
|
"zoneA" : { ... },
|
|
|
|
"zoneB" : { ... },
|
|
|
|
"zoneC" : { ... }
|
|
|
|
},
|
|
|
|
"connections" :
|
|
|
|
[
|
|
|
|
{ "a" : "zoneA", "b" : "zoneB", "guard" : 5000, "road" : "false" },
|
|
|
|
{ "a" : "zoneA", "b" : "zoneC", "guard" : 5000, "road" : "random" },
|
|
|
|
{ "a" : "zoneB", "b" : "zoneC", "type" : "wide" }
|
2024-07-29 20:36:23 +02:00
|
|
|
//"type" can be "guarded" (default), "wide", "fictive", "repulsive" or "forcePortal"
|
2023-09-18 14:36:35 +02:00
|
|
|
//"wide" connections have no border, or guard. "fictive" and "repulsive" connections are virtual -
|
|
|
|
//they do not create actual path, but only attract or repulse zones, respectively
|
2023-08-12 23:17:38 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Zone format
|
|
|
|
|
2024-12-04 18:50:01 +02:00
|
|
|
```json
|
2023-08-12 23:17:38 +02:00
|
|
|
{
|
2023-09-18 14:36:35 +02:00
|
|
|
// Type of this zone. Possible values are:
|
2024-11-25 18:34:13 +02:00
|
|
|
// "playerStart" - Starting zone for a "human or CPU" players
|
|
|
|
// "cpuStart" - Starting zone for "CPU only" players
|
|
|
|
// "treasure" - Generic neutral zone
|
|
|
|
// "junction" - Neutral zone with narrow passages only. The rest of area is filled with obstacles.
|
|
|
|
// "sealed" - Decorative impassable zone completely filled with obstacles
|
2023-09-18 14:36:35 +02:00
|
|
|
"type" : "playerStart",
|
|
|
|
|
|
|
|
// relative size of zone
|
|
|
|
"size" : 2,
|
|
|
|
|
|
|
|
// index of player that owns this zone
|
|
|
|
"owner" : 1,
|
|
|
|
|
|
|
|
// castles and towns owned by player in this zone
|
2023-08-12 23:17:38 +02:00
|
|
|
"playerTowns" : {
|
|
|
|
"castles" : 1
|
2023-09-18 14:36:35 +02:00
|
|
|
"towns" : 1
|
2023-08-12 23:17:38 +02:00
|
|
|
},
|
2023-09-18 14:36:35 +02:00
|
|
|
|
|
|
|
// castles and towns that are neutral on game start in this zone
|
2023-08-12 23:17:38 +02:00
|
|
|
"neutralTowns" : {
|
|
|
|
//"castles" : 1
|
|
|
|
"towns" : 1
|
|
|
|
},
|
2023-09-18 14:36:35 +02:00
|
|
|
|
|
|
|
// if true, all towns generated in this zone will belong to the same faction
|
2023-08-12 23:17:38 +02:00
|
|
|
"townsAreSameType" : true,
|
2023-09-18 14:36:35 +02:00
|
|
|
|
|
|
|
//"weak" "strong", "none" - All treasures will be unguarded
|
|
|
|
"monsters" : "normal",
|
2023-08-12 23:17:38 +02:00
|
|
|
|
2023-09-18 14:36:35 +02:00
|
|
|
//possible terrain types. All terrains will be available if not specified
|
|
|
|
"terrainTypes" : [ "sand" ],
|
|
|
|
|
|
|
|
//optional, list of explicitly banned terrain types
|
|
|
|
"bannedTerrains" : ["lava", "asphalt"]
|
2023-08-12 23:17:38 +02:00
|
|
|
|
2023-09-18 14:36:35 +02:00
|
|
|
// if true, terrain for this zone will match native terrain of player faction. Used only in owned zones
|
|
|
|
"matchTerrainToTown" : false,
|
|
|
|
|
|
|
|
// Mines will have same configuration as in linked zone
|
2023-08-12 23:17:38 +02:00
|
|
|
"minesLikeZone" : 1,
|
2023-09-18 14:36:35 +02:00
|
|
|
|
|
|
|
// Treasures will have same configuration as in linked zone
|
2024-09-14 13:20:24 +02:00
|
|
|
"treasureLikeZone" : 1,
|
2023-09-18 14:36:35 +02:00
|
|
|
|
|
|
|
// Terrain type will have same configuration as in linked zone
|
2024-09-14 13:20:24 +02:00
|
|
|
"terrainTypeLikeZone" : 3,
|
|
|
|
|
|
|
|
// Custom objects will have same configuration as in linked zone
|
|
|
|
"customObjectsLikeZone" : 1,
|
2023-08-12 23:17:38 +02:00
|
|
|
|
2023-09-18 14:36:35 +02:00
|
|
|
// factions of monsters allowed on this zone
|
|
|
|
"allowedMonsters" : ["inferno", "necropolis"]
|
|
|
|
|
|
|
|
// These monsers will never appear in the zone
|
|
|
|
"bannedMonsters" : ["fortress", "stronghold", "conflux"]
|
|
|
|
|
|
|
|
// towns allowed on this terrain
|
|
|
|
"allowedTowns" : ["castle", "tower", "rampart"]
|
|
|
|
|
|
|
|
// towns will never spawn on this terrain
|
|
|
|
"bannedTowns" : ["necropolis"]
|
2023-08-12 23:17:38 +02:00
|
|
|
|
2023-09-18 14:36:35 +02:00
|
|
|
// List of mines that will be added to this zone
|
2023-08-12 23:17:38 +02:00
|
|
|
"mines" : {
|
|
|
|
"wood" : 1,
|
|
|
|
"ore" : 1,
|
|
|
|
},
|
|
|
|
|
2023-09-18 14:36:35 +02:00
|
|
|
// List of treasures that will be placed in this zone
|
2023-08-12 23:17:38 +02:00
|
|
|
"treasure" : [
|
|
|
|
{
|
|
|
|
"min" : 2100,
|
|
|
|
"max": 3000,
|
|
|
|
"density" : 5
|
|
|
|
}
|
|
|
|
...
|
2024-09-14 13:20:24 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
// Objects with different configuration than default / set by mods
|
|
|
|
"customObjects" :
|
|
|
|
{
|
|
|
|
// All of objects of this kind will be removed from zone
|
|
|
|
// Possible values: "all", "none", "creatureBank", "bonus", "dwelling", "resource", "resourceGenerator", "spellScroll", "randomArtifact", "pandorasBox", "questArtifact", "seerHut", "other
|
|
|
|
"bannedCategories" : ["all", "dwelling", "creatureBank", "other"],
|
|
|
|
// Specify object types and subtypes
|
|
|
|
"bannedObjects" :["core:object.randomArtifactRelic"],
|
|
|
|
// Configure individual common objects - overrides banned objects
|
|
|
|
"commonObjects":
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"id" : "core:object.creatureBank.dragonFlyHive",
|
|
|
|
"rmg" : {
|
|
|
|
"value" : 9000,
|
|
|
|
"rarity" : 500,
|
|
|
|
"zoneLimit" : 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2023-08-12 23:17:38 +02:00
|
|
|
}
|
2024-11-30 22:20:15 +02:00
|
|
|
```
|