Opened 2 years ago

Closed 2 years ago

#13218 closed defect (fixed)

SKY: Can Populate More Than One Save Slot At A Time

Reported by: alayGit Owned by: digitall
Priority: normal Component: Engine: Sky
Version: Keywords: saved games
Cc: Game: Beneath a Steel Sky

Description

ScummVM 2.6.0git2179-g25c63234e49 (Dec 27 2021 14:36:45)

Beneath A Steel Sky: v0.0372cd

OS: Windows

Steps To Reproduce:

  1. Start a fresh games with no saves yet
  2. Press F5 to open the menu
  3. Click the 'Save Game' button
  4. Click on slot 7 and type a save name. Do not push the save game button
  5. Click on slot 8 and type a save name. This time push save
  6. Press F5 to return to the save menu
  7. Click button 1 'Restore'.
  8. Note that there are saves in both 7 and 8.
  9. Attempt to restore slot 7. Nothing happens :(
  10. Attempt to restore slot 8. Game loads like expected

Expected: Slot 7 never should have been saved in the first place.
Actual: There are two saves, one in 7 and one in 8. Slot seven is not loadable.

Tried out in DOSBox and found that it clears slot 7 when I enter the data in 8.

Checked metadata file can see data for both slots.
However only a slot 8 file exists.

Metadata data file attached, as well as slot 7 save.
Picture uncompress MD file also attached.

Attachments (3)

SKY-VM.SAV (38 bytes ) - added by alayGit 2 years ago.
SKY-VM.008 (12.4 KB ) - added by alayGit 2 years ago.
image-20220114-001633.png (32.6 KB ) - added by alayGit 2 years ago.

Download all attachments as: .zip

Change History (11)

by alayGit, 2 years ago

Attachment: SKY-VM.SAV added

by alayGit, 2 years ago

Attachment: SKY-VM.008 added

by alayGit, 2 years ago

Attachment: image-20220114-001633.png added

comment:1 by digitall, 2 years ago

Replicated on latest Git master.

The SKY engine saves an extra file, SKY-VM.SAV which contains the save names. This file is gzip compressed by default, but once decompressed, it is just a bare array of the savegame names as per:
https://github.com/scummvm/scummvm/blob/master/engines/sky/metaengine.cpp#L159

It looks like the "original" dialog code has a bug where the names are saved even if the save is not selected. The save is not present i.e. SKY-VM.007 and thus can not be loaded.

comment:3 by digitall, 2 years ago

Hmm, to fix this, the method "uint16 Control::saveRestorePanel(bool allowSave)" would need some significant changes to do a loadDescriptions(saveGameTexts) when you change between save slots thus restoring the saved state of the game names. Will look at a patch.

comment:4 by digitall, 2 years ago

Hmm... Odd. loadDescriptions(saveGameTexts) does not seem to behave as expected here to reset the savegame name list displayed.

comment:5 by antoniou79, 2 years ago

Keywords: saved games added
Summary: Beneath A Steel Sky: Can Populate More Than One Save Slot At A TimeSKY: Can Populate More Than One Save Slot At A Time

comment:6 by antoniou79, 2 years ago

@digital I have a fix ready for the bug of saving the slot that is not selected.
I will submit a PR ASAP.
If that's fixed I don't think we need to worry about loading a non-existing saved game.

comment:8 by digitall, 2 years ago

Owner: set to digitall
Resolution: fixed
Status: newclosed

Fixed by merging PR 3666. Closing as fixed.

Note: See TracTickets for help on using tickets.