Fixed several issues with resolving identifiers of map objects when
banning or overriding rmg properties of map objects.
Syntax should now be way simple and more readable, e.g:
```json
"bannedObjects" : {
"randomArtifactRelic" : true,
"hota.mapobjects:townGate" : true,
"cartographer" : {
"cartographerLand" : true
}
}
```
Objects with customized rmg properties are not implicitly banned - to
prevent default rmg properties from having an effect.
In addition, it is now possible to ban or customize objects even without
explicit mod dependency, similar to how object bans work in 1.7. If
corresponding mod is not active, object ban/customization will be
ignored.
See changes in docs in this PR for docs.
Resolved issues:
- Fixes#5554
- Fixes#5556
NOTE: old (1.6) rmg templates will work as before, however changed
format will be reported by validation - please update mods either before
or after 1.7 release
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.
- Split massive `parseLimiter` method in smaller chunks
- Added alternative format for limiters with named parameters instead of
unclear `parameters` entry that often leads to bugs in mods. Old format
is still available.
- Added detailed validation for limiter format
- Converted vcmi json's to use new format
- Removed parameter-less `CREATURE_FACTION` and `SAME_FACTION` limiter.
They are unused in mods and have unclear use-case that can be replaced
by other limiters
- Expanded documentation on limiter types
All mods that were supported before should still be supported