feat(cli): Add -saveatframe and -saveto options - #3135
Draft
bobtista wants to merge 1 commit into
Draft
Conversation
bobtista
force-pushed
the
bobtista/feat/saveatframe-cli
branch
2 times, most recently
from
August 14, 2026 01:28
6933dd3 to
351db69
Compare
bobtista
force-pushed
the
bobtista/feat/saveatframe-cli
branch
from
August 16, 2026 23:02
351db69 to
c89d8fc
Compare
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.
-filestarts a map from the command line and #3001 loads a save from it, but there is no way to write one, so a save/load round trip cannot be run unattended and an xfer change has to be checked manually through the in-game menu.-saveatframe <frame>now requests a save at the first player-saveable start-of-frame boundary at or after that logic frame. The hook runs before scripts, terrain, and object updates, matching the engine's normal save timing:TheGameClient->UPDATE()precedesTheGameLogic->UPDATE().If input is disabled eg during a cinematic, the save is deferred until input is enabled. This prevents the harness from creating a save that the in-game Save button would reject. (I tried loading a save made during a campaign mission intro, and it's bad)
-saveto <file>names the file, defaulting tocommandline.sav. Both options are registered alongside-filein the debug-only section ofparamsForEngineInit, so release builds are unaffected.The earlier draft placed the hook after logic-frame work had begun. Reloading that mid-frame snapshot repeated work already represented in the save, producing a permanent AI-group ID skew in continuous-vs-loaded CRC comparisons. Moving it to the start-of-frame boundary removes that harness artifact.
Verified on
MD_CHI01with the save/load determinism harness:Todo:
-loadsave