Normalize quoted local relative include directives to remove redundant
path segments while preserving relative includes.
This applies the normalizer across the tree and updates 108 includes in
64 files, including cases where paths inside lib/* redundantly used
../../lib/... and now correctly use ../... .
These paths compiled before because include resolution normalized them,
but they were longer and harder to audit.
Now `compatibilityIdentifers` field is supported for all game entities.
As result it is now possible for mods to provide compatibility support
for loading mods and saves made with older version of the mod.
Also, added docs to specify what exactly breaks saves with mods updates
and ways to avoid that
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
- Implemented validation for `targetCondition` in spells
- Implemented validation for `mapObject` in towns/heroes
- Fixed validation of zone connections in RMG
- Added workarounds to prevent assertions triggering on invalid mods
- Erase 'base' entries from json before validation (but after applying
them to derived keys)
Should have no effect on mod behavior/support, but may cause new
detections for mods that were broken in either 1.6 or 1.7
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.
- CClient now inherits directly from CPrivilegedInfoCallback, like
IGameCallback did before. However CClient no longer needs dummy
implementation of IGameEventCallback
- CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for
callback. Actual events can only be emitted in calls that receive
IGameEventCallback pointer, e.g. heroVisit
- CGameHandler now inherits directly from both CPrivilegedInfoCallback
and IGameEventCallback as it did before via IGameCallback
- Marked large version of H3 Unicorn's Glade as not usable for random
dwelling replacement
- Shifted oversized dwellings - that have at most 2x2 as blocked tile,
but have non-blocked tile column will now be placed correctly
- This fixes incorrect random dwelling replacement of the only oversized
H3 dwelling - Portal of Glory
- Game will now detect & report invalid dwelling templates from mods
- Updated docs to clarify dwellings format
- CStackInstance::count is now private with accessor methods
- CStackInstance::experience renamed to totalExperience and now stores
total stack experience (multiplied by stack size) to reduce rounding
errors
- CStackInstance::totalExperience is now private with accessors methods
- stack experience is now automatically reallocated on stack management
- Removed buggy BulkSmartRebalanceStacks pack, that mostly duplicates
BulkRebalanceStacks
- Renamed BulkSmartSplitStack to BulkSplitAndRebalanceStack to drop
unclear "smart" in name
- Reworked split-and-rebalance logic to correctly reallocate stack
experience