Insert records that were added with newer versions of MW
There are several records explicitly used by the engine that have been added by the two addons; mostly globals (e.g. dayspassed) and GMSTs (e.g. sCompanionShare). These need to be dealt with in the following way:
If the .omwgame (or the first esx file in the old system) is of a legacy format (MW or basic OpenMW 1.0) these records need to be inserted into the ESMStore after the load process has been completed. You can check for a legacy format by calling ESMReader::getFormat (the return value would be 0 in this case).
Further points to consider:
- do not overwrite existing records
- add the records to the static storage, not the dynamic (because the dynamic storage will be wiped on each new game/load game)
- Initialise the records with reasonable, but minimal default values. These should be enough to not make the engine fall over, but they do not need to do more.
- We currently have a workaround for dayspassed in apps/openmw/mwworld/globals. This workaround needs to be removed once the dayspassed record is properly supported by the mechanism described above.
(RM-741 from redmine: created on 2013-04-27 by Marc Zinnschlag, , closed on 2015-07-02 by nobody)
Edited by redmine