Smaller, easier, safer savefiles. [More]
To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Ter13.CleanSave##version=2Emulator users, in the BYOND pager go to File | Open Location and enter this URL:
CleanSave is a simple, forward-oriented saving system. The design is intended to interleave with the default BYOND saving system, allowing it to do what it does best, and stopping it from what it doesn't do very well.
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:
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.
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!)
Copyright © 2019 BYOND Software. All rights reserved.