mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Support for banned game entities in random map templates
The following entities can now be banned in a random map template definition: - Hero - Artifact - Spell - Secondary skill The ban follows the same rules as banning via the map settings in the map editor. It is also now possible to bypass dependencies and access identifiers from mods that are not dependencies when defining: - Banned entities in random map templates - the chance of a hero class appearing in a tavern of a specific faction - the chance of a spell appearing in a mage guild of a specific faction - the chance of a hero class receiving a secondary skill For this to work, the identifier must be specified in full, e.g. `modName:objectName`. If the specified mod is not active, the game will silently ignore this entry. This behaviour is not affected by mod load order. It is possible to use this format to access a mod that has not yet been loaded.
This commit is contained in:
@@ -228,19 +228,26 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
||||
|
||||
// Chance of specific hero class to appear in this town
|
||||
// Mirrored version of field "tavern" from hero class format
|
||||
/// Identifier without modID specifier MUST exist in base game or in one of dependencies
|
||||
/// Identifier with explicit modID specifier will be silently skipped if corresponding mod is not loaded
|
||||
"tavern" :
|
||||
{
|
||||
"knight" : 5,
|
||||
"druid" : 6
|
||||
"druid" : 6,
|
||||
"modID:classFromMod" : 4
|
||||
},
|
||||
|
||||
// Chance of specific spell to appear in mages guild of this town
|
||||
// If spell is missing or set to 0 it will not appear unless set as "always present" in editor
|
||||
// Spells from unavailable levels are not required to be in this list
|
||||
/// Identifier without modID specifier MUST exist in base game or in one of dependencies
|
||||
/// Identifier with explicit modID specifier will be silently skipped if corresponding mod is not loaded
|
||||
|
||||
"guildSpells" :
|
||||
{
|
||||
"magicArrow" : 30,
|
||||
"bless" : 10
|
||||
"bless" : 10,
|
||||
"modID:spellFromMod" : 20
|
||||
},
|
||||
|
||||
// Which tiers in this town have creature hordes. Set to -1 to disable horde(s)
|
||||
|
||||
@@ -81,13 +81,16 @@ In order to make functional hero class you also need:
|
||||
|
||||
// Chance to get specific secondary skill on level-up
|
||||
// All missing skills are considered to be banned, including universities
|
||||
/// Identifier without modID specifier MUST exist in base game or in one of dependencies
|
||||
/// Identifier with explicit modID specifier will be silently skipped if corresponding mod is not loaded
|
||||
"secondarySkills" :
|
||||
{
|
||||
"pathfinding" : 3.
|
||||
"archery" : 6.
|
||||
...
|
||||
"resistance" : 5,
|
||||
"firstAid" : 4
|
||||
"firstAid" : 4,
|
||||
"modName:skillName" : 9
|
||||
},
|
||||
|
||||
// Chance for a this hero class to appear in a town, creates pair with same field in town format
|
||||
@@ -99,11 +102,14 @@ In order to make functional hero class you also need:
|
||||
// Reversed version of field "tavern" from town format
|
||||
// If faction-class pair is not listed in any of them
|
||||
// chance set to 0 and the class won't appear in tavern of this town
|
||||
/// Identifier without modID specifier MUST exist in base game or in one of dependencies
|
||||
/// Identifier with explicit modID specifier will be silently skipped if corresponding mod is not loaded
|
||||
"tavern" :
|
||||
{
|
||||
"castle" : 4,
|
||||
...
|
||||
"conflux" : 6
|
||||
"conflux" : 6,
|
||||
"modID:factionFromMod" : 5
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
],
|
||||
|
||||
// Chance for the skill to be offered on level-up (heroClass may override)
|
||||
/// Identifier without modID specifier MUST exist in base game or in one of dependencies
|
||||
/// Identifier with explicit modID specifier will be silently skipped if corresponding mod is not loaded
|
||||
"gainChance" : {
|
||||
// Chance for hero classes with might affinity
|
||||
"might" : 4,
|
||||
@@ -41,6 +43,7 @@
|
||||
"knight" : 2,
|
||||
"cleric" : 8,
|
||||
...
|
||||
"modName:heroClassName" : 5
|
||||
},
|
||||
|
||||
// This skill is major obligatory (like H3 Wisdom) and is guaranteed to be offered once per specific number of levels
|
||||
|
||||
@@ -39,9 +39,12 @@
|
||||
|
||||
// Chance for this spell to appear in Mage Guild of a specific faction
|
||||
// Symmetric property of "guildSpells" property in towns
|
||||
/// Identifier without modID specifier MUST exist in base game or in one of dependencies
|
||||
/// Identifier with explicit modID specifier will be silently skipped if corresponding mod is not loaded
|
||||
"gainChance":
|
||||
{
|
||||
"factionName" : 3
|
||||
"factionName" : 3,
|
||||
"modID:anotherFactionName" : 5
|
||||
},
|
||||
|
||||
"animation":{<Animation format>},
|
||||
|
||||
Reference in New Issue
Block a user