Difference between revisions of "Random map template"

From VCMI Project Wiki
Jump to: navigation, search
(Imported info from RMG.json. Please add proper descriptions in zone format)
(Replaced content with "{{Template:MovedToWebpage|https://vcmi.eu/modders/Random_Map_Template/}}")
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Ideally, template format should be 100% compatible with OH3 format and bring additional improvements.
+
{{Template:MovedToWebpage|https://vcmi.eu/modders/Random_Map_Template/}}
==List of currently available templates==
 
* Analogy
 
* Upgrade
 
* Golden Ring
 
* Unfair Game
 
* Jebus Cross
 
==Template format==
 
== Object group format ==
 
<syntaxhighlight lang="javascript">
 
/// Unique template name
 
"Triangle" :  
 
{
 
/// 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" : "4",
 
 
 
/// Number of AI-only players
 
"cpu" : "2",
 
 
 
/// List of named zones, see below for format description
 
"zones" :
 
{
 
"zoneA" : { ... },
 
"zoneB" : { ... },
 
"zoneC" : { ... }
 
},
 
"connections" :
 
[
 
{ "a" : "zoneA", "b" : "zoneB", "guard" : 5000 },
 
{ "a" : "zoneA", "b" : "zoneC", "guard" : 5000 },
 
{ "a" : "zoneB", "b" : "zoneC", "guard" : 5000 }
 
]
 
}
 
</syntaxhighlight>
 
== Zone format ==
 
<syntaxhighlight lang="javascript">
 
{
 
"type" : "playerStart", //"cpuStart" "treasure"
 
"size" : 2,
 
"owner" : 1,
 
"playerTowns" : {
 
"castles" : 1
 
},
 
"neutralTowns" : {
 
"towns" : 1
 
},
 
"townsAreSameType" : true,
 
"monsters" : "normal",
 
 
 
"terrainTypes" : [ "sand" ],
 
"matchTerrainToTown" : false,
 
 
 
"minesLikeZone" : 1,
 
"treasureLikeZone" : 1
 
"terrainTypeLikeZone" : 3
 
 
 
"mines" : {
 
"wood" : 1,
 
"ore" : 1,
 
},
 
 
 
"treasure" : [
 
{
 
"min" : 2100,
 
"max": 3000,
 
"density" : 5
 
}
 
  ...
 
]
 
}
 
</syntaxhighlight>
 

Latest revision as of 16:20, 16 July 2024

Logo256.png    Page moved to VCMI-Homepage