Skip to content

autosave: new tool to save the game on a real-time schedule - #1613

Open
Alistair-Afton wants to merge 3 commits into
DFHack:masterfrom
Alistair-Afton:autosave
Open

Alistair-Afton wants to merge 3 commits into
DFHack:masterfrom
Alistair-Afton:autosave

Conversation

@Alistair-Afton

@Alistair-Afton Alistair-Afton commented Sep 15, 2026

Copy link
Copy Markdown

Summary

New autosave tool that quicksaves on a configurable real-time interval (DFHack/dfhack#3130).

  • autosave now performs an immediate save; autosave status reports the schedule and time remaining
  • Detects in-flight saves from engine state so it won't double-save, and a stale save_requested_ms guard is reset on enable so disable/re-enable cycles can't suppress future saves
  • Registered in gui/control-panel (automation group) with docs, changelog entry, and in-engine tests

Testing

  • test/autosave.lua passes in-game
  • Live fortress-mode save verified (real quicksave written on schedule)
  • ci/lint.py clean

Track the save in progress via plotinfo autosave_request and
save_progress.substage instead of a request timestamp. A stale
timestamp could suppress saves for up to ten minutes after a
disable/enable cycle, and could restart an in-progress save.

Also add fortress-mode tests that exercise a real save.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant