solarus icon indicating copy to clipboard operation
solarus copied to clipboard

Add autosave

Open alexgleason opened this issue 6 years ago • 1 comments

I'm a novice, so please bear with me if I've gotten anything wrong.

It seems that if I want to automatically save, you need to call game:save() after every event. For example, every item script may need to say game:save() within on_variant_changed so that each time I pick up an item the game saves.

I'm wondering if instead, Solarus can build this trigger into the relevant places and provide a configuration variable like game.set_autosave(boolean) which can be passed in to make the game automatically save any time the save data changes.

alexgleason avatar May 27 '18 00:05 alexgleason

I don't know if there will be such a variable, but i can give you a useful tip : using the metatable or the multi-event script, you can automate this operation in a one-time process. If you want help about how to implement, you can open a thread on the Solarus Forums

PhoenixII54 avatar May 27 '18 07:05 PhoenixII54