User:Ivan/Randomized Objects
From VCMI Project Wiki
Current draft, still WiP.
Contents
Randomizable objects
Note: it is possible to use choose value directly without use of randomization, e.g.:
"gold" : 1000,
"creature" : "troglodites"
Instead of:
"gold" : { "amount" : 1000}
"creature" : { "type" : "troglodites" }
Amount
{
// Fixed value, overrides min/max test
"amount" : 15,
// Selected value will be between min and max, including these values
"min" : 10,
"max" : 20
}
Resources
Probably needs two versions
Resource set
{
"wood" : 10,
"gold" : { "min" : 1000, "max" : 2000 }
}
Resource list
[
{
"type" : [ "wood", "ore" ],
"amount" : 10
},
{
"type" : "gold",
"min" : 1000,
"max" : 2000
}
]
Primary skills
TODO?
Secondary skills
TODO?
Artifacts
Amount fields can also be used for artifact cost check
{
// Fixed value, overrides any further checks
"type" : "grail",
"slot" : "HEAD",
"slot" : [ "RIGHT_HAND", "LEFT_HAND" ],
"class" : "MINOR",
"class" : [ "MINOR", "MAJOR" ]
}
TODO: filter out creature/commander/hero arts. What else?
Spells
{
// Fixed value, overrides any further checks
"type" : "inferno",
// Spell of specific level
"level" : 5,
// Spell must belong to one of listed schools. Entry may be either string or list
"school" : "air",
"school" : [ "air", "water" ],
}
TODO: select "type" of spell? Adventure map, battle, attacking/defending spells, etc
Creatures/armies
Amount fields can also be used to select stack size
{
// Fixed value, overrides any further checks
"type" : "angel",
"level" : 5,
"faction" : "castle",
"upgradeChance" : 50
}
TODO: check for presence of bonuses? For example to select shooters.
Bonuses
Not implemented