Hourly Autosaves

by Shados

Autosaves the game (using a configurable prefix) on every hour of game-time

Utilities
21 days ago
0.18 - 2.0
1.53K

i Suggested modification

4 years ago

Nice mod! Good for keeping a history of your base.
Here are a couple thoughts I had for suggested modifications:

1) Drop the "autosave-" prefix and just use the user specified prefix
2) Standardize the timestamp to something like hhh:mm rather than 2h, 2h30m, 12h, etc. Use fixed width fields w/ leading zeros
3) Besides the the timed automatic saves, have a button to do a save "now" w/ an additional event suffix supplied by the user at that time.

With these you can then get a history of saves over time, both auto-timed and event based and your save files will list as something like:

MyBase: 000:01 - In the Beginning
MyBase: 000:30 
MyBase: 001:00
MyBase: 001:26 - Got Electricity
MyBase: 001:30
MyBase: 002:00
MyBase: 002:18 - First Attack
MyBase: 002:30
MyBase: 002:38 - First Attack Aftermath
... etc ...

That way you have a continuous history of your base

4 years ago

Thanks for the feedback.

  1. Unfortunately, this is not possible. The Factorio API only provides a single method to save in singleplayer games, game.auto_save. This is what adds the autosave- prefix to the save names; the name parameter passed into the function consists only of the user-specified prefix, a hyphen, and the timestamp. In multiplayer, game.server_save is used instead, and I believe that doesn't add the autosave- prefix.
  2. This is really two suggestions: using a fixed-width timestamp, left-padded with zeros, and changing to an hh:mm format. The former suggestion does have at least one benefit (lexicographical order matches chronological order), so I'll probably do that. The latter suggestion I don't like, aesthetically speaking, and objectively speaking it's not entirely clear if 000:30 is hhh:mm, ddd:hhh, or some other measure of time.
  3. This sounds good. Sadly I don't think mods can add extra buttons to the menu, so I'd either need to add a button to the normal game GUI (probably with an option to turn said button off for those who prefer less clutter), or add a keybind for it. Or both. I'll probably get around to it at some point.
4 years ago

I've published a new version that features:
- Fixed-width, 0-padded timestamps
- The ability to manually trigger a timestamped save from a shortcut bar button or a hotkey (defaults to shift+F5), which prompts for an additional custom suffix

4 years ago

Very Nice! Thumbs Up!

New response