Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Auto-Save Timer  (Read 2545 times)

NTJedi

  • Bay Watcher
    • View Profile
Auto-Save Timer
« on: August 27, 2018, 11:48:33 am »

Is there a tool or adjustment which will auto-save my game every hour?  Currently I have it setup to save every season and usually the game doesn't crash.... but when it does happen I have lost hours worth of time.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Auto-Save Timer
« Reply #1 on: August 27, 2018, 02:13:09 pm »

You could run DFHack's quicksave command whenever you want. I'm not aware of an existing way to get it to run every hour automatically, but it should be possible in theory.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

NTJedi

  • Bay Watcher
    • View Profile
Re: Auto-Save Timer
« Reply #2 on: August 27, 2018, 11:32:27 pm »

You could run DFHack's quicksave command whenever you want. I'm not aware of an existing way to get it to run every hour automatically, but it should be possible in theory.
Was hoping an auto-save tool existed because sometimes I'm so focused in the game hours might pass before I realize it.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Auto-Save Timer
« Reply #3 on: August 27, 2018, 11:47:42 pm »

Simplest would be adding into onMapLoad.init repeat -time # -timeUnits "frames" -command [ quicksave ] -name periodic_save, where # is the number of frames that passes in a hour with your fps.

Obviously, if your fps isn't capped, it's going to be different number when running unpaused and when running paused (not necessarily too different if you're mostly paused; a year unpaused at 100 FPS takes 67,2 minutes, but succession forts give typically about a week or two for a year); covering that would need a script that looks at actual clock.

lethosor

  • Bay Watcher
    • View Profile
Re: Auto-Save Timer
« Reply #4 on: August 28, 2018, 12:01:21 am »

You could run DFHack's quicksave command whenever you want. I'm not aware of an existing way to get it to run every hour automatically, but it should be possible in theory.
Was hoping an auto-save tool existed because sometimes I'm so focused in the game hours might pass before I realize it.
There's also a ctrl-alt-s binding for quicksave by default, if that helps.
DFHack doesn't have great support for clock-time-based timers (Fleeting Frames' suggestion is about as close as you could get easily). There are multiple ways to get the current time, though, so a more complex script could probably run quicksave reliably at certain clock-time intervals.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

billw

  • Bay Watcher
    • View Profile
Re: Auto-Save Timer
« Reply #5 on: August 28, 2018, 03:59:48 am »

Quick save doesn't give save backups correct? It just always saves over the current game?
Logged

Anandar

  • Bay Watcher
    • View Profile
Re: Auto-Save Timer
« Reply #6 on: August 28, 2018, 04:06:07 am »

Set a timer on you phone that goes off every hour when you play and quick save when it does...
Logged

NTJedi

  • Bay Watcher
    • View Profile
Re: Auto-Save Timer
« Reply #7 on: August 31, 2018, 06:50:58 pm »

Thanks everyone for the suggestions!  I will keep my eyes open if a user friendly mod for autosaving appears. 

Logged