Page 1 of 1

Last loaded file ?

Posted: Mon Jul 11, 2016 10:08 am
by binbinhfr
I don't know what is the logic when you are in game and you open the "load menu" : how is determined the file that is proposed by default ?

Because when I load a game with the command line --load-game , if I try to load another file, the file proposed by default is not the one I loaded from the command line. It would be great to have the last loaded file proposed (because we often want to reload it if we made a mistake).

Re: Last loaded file ?

Posted: Mon Jul 11, 2016 10:16 am
by Rseding91
The file selection logic goes off the last created file - not the last loaded one.

Re: Last loaded file ?

Posted: Mon Jul 11, 2016 11:15 am
by binbinhfr
Rseding91 wrote:The file selection logic goes off the last created file - not the last loaded one.
Well, why not, but I do not see the benefit for the user.
I often change from map to map and when I want to reload the last one, it is never the last opened file which is proposed.

You could proposed the last opened file (either loaded or created, by menu or by command line).

Or if, for some good reasons, you want to keep the old behaviour, you could add a "reload" item in the main menu when a map is already playing (with a confirmation on "are you sure you want to reload last saved file ?" to avoid errors).

Re: Last loaded file ?

Posted: Mon Jul 11, 2016 12:03 pm
by ssilk
This is current logic:
- LOAD "currentgame"
- PLAY
- SAVE "currentgame"
- LOAD "currentgame"

So when you change your filename before save:
- LOAD "currentgame"
- PLAY
- SAVE "currentgameVersion2"
- LOAD "currentgameVersion2"

Makes much sense.


This is your logic:
- LOAD "lastloaded"
- PLAY
- SAVE "lastloaded"
- LOAD "lastloaded"

When saved with new filename:
- LOAD "lastloaded"
- PLAY
- SAVE "lastloadedVersion2"
- LOAD "lastloaded"

So if you give the file a new name before SAVE (which many do) it will open the old file.

Re: Last loaded file ?

Posted: Mon Jul 11, 2016 1:24 pm
by binbinhfr
Why not keeping track of a currentfile ?

if you load a file, currentfile points to the file.
if you reload, currentfile is proposed.
whenever you save a file, currentfile is proposed as a savename, and currentfile points to the file (and also if you change the name).

if you close the game currentfile is memorized.

if you reopen, at first load, currentfile is proposed.

----
So you are always proposed to load the last saved or last loaded.

The rule of assignation of currentfile is simple :
- currentfile get the name of any loaded file
- currentfile get the name of any saved file
- whenever you need to load or save, currentfile is proposed as a name.

Re: Last loaded file ?

Posted: Mon Jul 11, 2016 2:13 pm
by ssilk
Ok. Added to viewtopic.php?f=80&t=21367 Game Save File Related Suggestions

Re: Last loaded file ?

Posted: Thu Jul 21, 2016 2:13 pm
by binbinhfr
Infact for the moment, it seems quite simple : you are proposed to load the most recent file in the save directory. If you delete it, the previous one will be used.