Opened 3 years ago

Last modified 17 months ago

#12363 closed defect

MYST3: Manually overwriting Autosave file disables autosaving. — at Version 2

Reported by: macca8 Owned by:
Priority: normal Component: Engine: Myst3
Version: Keywords:
Cc: Game: Myst 3: Exile

Description (last modified by macca8)

The Myst3 save system, supported by its own save dialog and dedicated prompt-to-save feature, has always allowed the option of manually overwriting the Autosave file when prompted by the game, in addition to maintaining support for scheduled autosaving.

However, commit https://github.com/residualvm/residualvm/commit/b333691cc2 - Implement the new autosave system - changed the way in which the Autosave file was being monitored in Myst3, by adding an isAutosave flag to every save file’s metadata. Previously, the file’s identity was established exclusively by testing its name.

The value of this flag is implemented by adding an isAutosave parameter to the Myst3Engine’s saveGameState(), which is passed directly to GameState::Save() for updating the file’s metadata.

The issue here is that the Autosave file’s isAutosave flag is changed to false when the user initiates a manual overwrite of the file, because all manual saves (including to autosave) are passed an isAutosave parameter of false.

For scheduled autosaves, the autosave system determines the status of the file occupying the designated autosave slot by checking the value of its isAutosave flag (as _saveType), and only falls back to a name test if the flag hasn’t been set (refer SaveStateDescriptor::isAutosave() in /engines/savestate.cpp).

This test currently fails if the user has initiated a manual overwrite of the Autosave file, because the autosave system incorrectly assumes that the autosave slot is occupied by a user created save file, which prevents the scheduled autosave from occurring.

What’s needed is an appropriate name test to be included in /engines/myst3/myst3.cpp/Myst3Engine::saveGameState(desc, thumbnail, isAutosave) to reset the isAutosave variable to true, before it’s passed on to _state->save().

I’d suggest something similar to the following (it’s only needed if the parameter is false), placing it immediately after the removal of any extension from saveName (line 1594)...

if !isAutosave && saveName.equalsIgnoreCase(_(“Autosave”)) {

isAutosave = true;

}

With regard to the name test comparison, I’m not sure if case is an issue or not, because all save names (including AUTOSAVE) appear in uppercase in the Myst3 Save dialog, and all save file names (except Autosave.m3s) are also in uppercase. Alternatively, if case isn't considered an issue, then the name test could be simplified to: saveName == _("Autosave").

Current daily build: 2.3.0git14891-gb5804e1257 (Apr 3 2021)
Platform: macOS (10.6.8 & 10.11.6)
Game Version: 4-CD English

Change History (2)

comment:1 by macca8, 3 years ago

Description: modified (diff)

comment:2 by macca8, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.