Add manual-save script (closes DFHack/dfhack#5792)#1583
Open
sizzlins wants to merge 2 commits intoDFHack:masterfrom
Open
Add manual-save script (closes DFHack/dfhack#5792)#1583sizzlins wants to merge 2 commits intoDFHack:masterfrom
sizzlins wants to merge 2 commits intoDFHack:masterfrom
Conversation
…ss autosaves Adds a new 'manual-save' command that creates persistent, named save snapshots by triggering a native autosave and then safely duplicating the result into a timestamped folder. This bypasses the 3-slot autosave restriction in DF v50+. Features: - Automatic fortress-name + timestamp naming - Custom name support via positional argument - --cleanup N flag to prune old snapshots (only touches -Manual- folders) - Safe 4MB chunked file copy to avoid memory spikes - Handles both AppData (Premium) and portable save locations - Compatible with the 'repeat' command for rolling saves Closes DFHack/dfhack#5792
Contributor
|
It may be better to use |
Addresses feedback from Bumber64 to use simulateInput. Bypasses file system entirely by injecting the save name directly into df.global.game.main_interface.options and simulating the 'SELECT' key to execute a native named save sequence.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds a
manual-savecommand that creates persistent, named save snapshots that won't be overwritten by autosaves. Works by triggering a native autosave and then duplicating the result into a timestamped folder. Includes a--cleanupflag to prune old snapshots. Compatible with therepeatcommand for rolling saves.