1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

SaveUtils.lua 2016-10-05


  1. Whys
    Version 2


    To use this file, place the following line of code in your modded file's
    global scope and set your mod name.

    include( "SaveUtils" ); MY_MOD_NAME= "myMod";

    This file allows for itemized data storage across mods and caching of deserialized data. Caching functionality can be set to one of three states per mod: 0 = no cache, 1 = serialize on save(), 2 = serialize on sync(). Default = 1.

    Now, the load() function will return the entire save table when the third parameter is false, or return the specific mod table when the second parameter is nil.

    Many thanks to killmeplease for the serialize(), deserialize() functions, and the idea of spanning mods.