This is an add-on component to accompany mods which make use of Pazyryk's TableSaverLoader, to remedy an issue that may cause loss of data during game saves.
TableSaverLoader's Lua-only savegame interception system relies on setting an Input Handler to execute the TableSave() function, which would then run and save the mod's table data into the savegame database.
Unfortunately, only a single Input Handler can be active for any particular input / key, and as such, results in this system only saving the data from one particular mod. Any other mod which relies on TableSaverLoader to save its data will be left out until the next autosave.
This script remedies that through the use of new LuaEvents.
Once properly installed, it will replace the stock TableSaverLoader Lua hookups with an Input Handler which will instead invoke a LuaEvent which will signal all contexts to initiate a save immediately.
Please see the TSLSerializer Lua file, or my forum thread for additional details on how to properly install this component.
Ideally, every mod which makes use of TableSaverLoader should add this component. If the last mod to load TableSaverLoader does not have this component, all mods which rely on this system will revert to existing behavior -- possible data loss.
This script will be updated if changes are necessary, although it has been tested to be in working condition and free of errors in my tests.
Updates: (Check the forum thread for details and changelogs.)
March 28, 2015
- v3 released
TSL Serializer (v3) 2016-10-05
TSL Serializer (v3)