This should fix rather common problem with mods, where two unrelated mods
accidentally use same file name for a config file, leading to very unclear
conflict since this result in a file override.
Now all config files referenced in mod.json are loaded specifically from
filesystem of mod that referenced it. In other words, it is no longer
possible for one mod to override config from another mod.
As a side effect, this allows mods to use shorter directory layout, e.g.
`config/modName/xxx.json` can now be safely replaced with `config/
xxx.json` without fear of broken mod if there is another mod with same
path to config. Similarly, now all mods can use `config/translation/
language.json` scheme for translation files
Since this is no longer a problem, I've also simplified directory layout
of our built-in 'vcmi' mod, by moving all files from `config/vcmi`
directory directly to `config` directory.
- Overrides for miscellaneous configs like mainmenu.json should works as
before
- Images / animations (png's or def's) work as before (and may still
result in confict)
- Rebalance mods work as before and can modify another mod via standard
`modName:objectName` syntax
All save compatibility checks targeting 1.4 saves have now been removed.
Saves from 1.5 can still be loaded in 1.6
Implemeted few TODO's in serialization that were postponed to avoid
breaking save compatibility in MP for 1.5.X releases.
Fixed missed case for loading black market object from 1.5 saves
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes
Moved without changes:
Languages.h -> texts/Languages.h
MetaString.* -> texts/MetaString.*
TextOperations.* -> texts/TextOperations.*
Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
-> texts/CLegacyConfigParser.*
-> texts/TextLocalizationContainer.*
-> texts/TextIdentifier.h
In cases where the file name was not specified, the warning messages were not very useful.
Example:
```json
File <unknown> is not a valid JSON file!
At line 33, position 1 warning: Comma expected!
{
"name" : "New Old Heroes",
"description" : "New heroes based on old 3DO artwork and other game appearances. Requires Horn of the Abyss.",
"modType" : "Heroes",
"version" : "1.2.0",
"author" : "Aphra",
"contact" : "",
"heroes" :
[
"config/gwenneth.json",
"config/balindar.json",
"config/nicolas.json",
"config/kastore.json",
"config/kydoimos.json",
"config/athe.json",
"config/miseria.json",
"config/areshrak.json",
"config/pactal.json",
"config/zog.json"
],
"changelog" :
{
"1.0.0" : ["Initial release"],
"1.1.0" : ["Added Nicolas Gryphonheart and Kastore"],
"1.1.1" : ["Bug fixes"],
"1.2.0" : ["Added some HotA portrait-only campaign heroes"]
},
"depends" :
[ "hota.neutralCreatures" ]
"keepDisabled" : true
}
```
- Json validator will now list all possible enum values on enum
validation failure
- Added validation of bonus string values using json valudation
- Deprecated bonus values (e.g. UNITL_BEING_ATTACKED) are now reported
via json validation
- Removed array version of "propagator" key since code only loads it as
a single string