1
0
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:
Ivan Savenko
2025-07-14 00:18:11 +03:00
parent 0d9fd09a6d
commit f58d08e563
21 changed files with 226 additions and 78 deletions

View File

@@ -35,6 +35,38 @@
"perPlayerOnMapCap" : 1
}
},
/// List of spells that are banned on this map.
/// 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
"bannedSpells": [
"townPortal",
"modID:spellFromMod"
],
/// List of artifacts that are banned on this map.
/// 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
"bannedArtifacts": [
"armageddonsBlade",
"modID:artifactFromMod"
],
/// List of secondary skills that are banned on this map.
/// 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
"bannedSkills": [
"diplomacy",
"modID:secondarySkillFromMod"
],
/// List of heroes that are banned on this map.
/// 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
"bannedHeroes": [
"lordHaart",
"modID:heroFromMod"
]
/// List of named zones, see below for format description
"zones" :