For a tutorial on how to implement this system into your game, look here.
For a more basic tutorial on how saving works, look here
Notably, this system allows you to specify variables that are not marked tmp, const, or global that will never be saved per-object.
The system is easy to use, and incredibly intuitive.
To specify files that shouldn't be saved, the system adds a single function to datums:
- L a list passed from child to parent to specify what variables won't save.
- A list of values that are not to be saved
NeverSave() is called internally by the saving system. When you define a type that has variables that aren't temp, const, or global that you want to save anyway, you call the parent proc, then add your items to the list, or remove items from the list, then return it.
list/foo = list()
L = ..(L)
The above example defines a list foo, and adds it to the NeverSave list, which is called internally when objects are saved. Essentially, foo is effectively a temporary variable, which would be better achieved by setting foo to tmp anyway.
What this system was made to do, however, is make it so that several non-temporary internal variables are not saved to make setting up player saving behaviors a snap.
By default, this disables saving for:
The removal of default saving of this system is to achieve one-line object saving, a more compact savefile on the hard drive, and in general, a more flexible saving and loading system without the pain of specifying each and every variable that needs to be saved.
Just tell the game what NOT to save, and it'll take care of everything else.
(This is not a substitution for marking variables as temporary!)