Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save backup feature like Elona Extender #158

Open
Ruin0x11 opened this issue Mar 1, 2021 · 0 comments
Open

Save backup feature like Elona Extender #158

Ruin0x11 opened this issue Mar 1, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Ruin0x11
Copy link
Owner

Ruin0x11 commented Mar 1, 2021

OpenNefia needs an ironclad save backup feature, because things will break at some point or another. The best we can do is mitigate the damage.

At a bare minimum, every time a save is loaded from the title screen for the first time since engine startup, a save backup should be made. The contents of the save should not be modified in any way during this process. The title screen save menu could be optionally enhanced to support screenshots at the time of saving (dependent on #39) and browsing through all backups made so far, like Elona Extender. This would be a first-class feature with no need to install an external program. The number of times to backup and the maximum backups to keep could be configured also. Maybe we should have both frequent backups and backups that will be "snapshots" of a particular point in time that will always be preserved, so you can easily go back to a really old save state if you wanted to.

The save should contain at minimum:

  • OpenNefia commit hash and API version (when releasing we should make sure __COMMIT__.lua has been generated properly)
  • Version numbers of all mods and possibly Git commit hashes if they're under individual Git repos.

We should be constantly thinking about what's crucial to add to the save format. I'm fairly certain that enabling/disabling event hooks and advice won't play well with saving and loading at the moment, but I fairly certain that problem can be solved when it becomes more important to solve.

Backups will be exactly the same in structure as saves, but moved to a different location.

@Ruin0x11 Ruin0x11 added the enhancement New feature or request label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant