dosbox-pure icon indicating copy to clipboard operation
dosbox-pure copied to clipboard

Access to other games' save files

Open Dahak66 opened this issue 5 years ago • 6 comments

Would there be a way to support accessing the save files of another game? This would be useful if the game is a sequel and allows importing characters from an earlier title. For example, if a game called Death Knights of Krynn.dosz could access both its own save (Death Knights of Krynn.save.zip) and that of a previous game in the series (Champions of Krynn.save.zip), it would be able to import characters from the latter file, which would have been a normal function if both games were installed on the same real DOS machine.

Dahak66 avatar Jan 10 '21 08:01 Dahak66

Over the 6 month development period this case once crossed my mind and I just couldn't think of a nice solution.

The core doesn't know "Death Knights of Krynn" is a sequel to "Champions of Krynn", and even if it did, it would have a somewhat hard time to find the save of the first game if were named "Champions of Krynn v1.2 (Installer) [a2] (1990)(Strategic Simulations, Inc.) [Role-Playing (RPG)].save.zip".

I guess there could be a menu somewhere (where?) that allows the user to select and mount another save file? Would it be enough to just mount the .save.zip of the first game as drive S: or does it need the game data as well? Or does it need to be on the C: drive? And what about other games that have such a feature, it would make sense to come up with a solution that works in as many (or all) cases as possible.

Currently the Disc Control menu allows loading of a ZIP file as D: drive as long as it's named .dosz (due to a bug in RetroArch that makes it unable to use a .ZIP as an additional disc), so a bit unusable for this exactly. Also browsing into the frontend save directory would be a bit of a nuisance.

schellingb avatar Jan 10 '21 09:01 schellingb

I think what I had in my head (which in no way necessarily matches the reality of how DosBox Pure works), was that the initial menu could have a "Mount external save" feature that pulls a browser of the same directory/folder that the initial game and save file was in, and listed save.zip files within. If selected, it would mount that "external" zip as E: This would still require some work on the users case (so in my example, the DKK.CFG file from Death Knights would require the save directory for Champions to be assigned to "E;\SAVE" or "E:\KRYNN\SAVE" or what have you.

The only other alternate approach I could think of is some kind of "alias" approach, where there might be a "Advanced Dungeons & Dragons Collectors Edition.dosz" game file, that creates its save as the installed file of all the games within, but could be called from an external "Champions of Krynn.dosx" shortcut that autoruns "C:\KRYNN\START.EXE" from the initial game. Then all games that are part of the collection could access each other's "sandbox" as needed. This would probably work for things like running both Monkey Island games from the Monkey Island Madness compilation disc, too.

Dahak66 avatar Jan 10 '21 16:01 Dahak66

How about something like this: https://www.youtube.com/watch?v=PDSXaV-YzkM I never actually understood what the "subsystem" system in LibRetro is about, but maybe it can be used to just load another game as E: So, you start up "Death Knights of Krynn.zip", it will mount it as C: with all file system modifications saved to "Death Knights of Krynn.save.zip". Then you select something like "Load another game with shared save data" in the RetroArch menu and load "Champions of Krynn.zip", it will mount it as E: with all file system modifications of that drive saved to "Champions of Krynn.save.zip". Maybe one can even load a third as F: and so on. I'll have to see how that subsystem stuff actually works.

DOSBox Pure is actually perfectly prepared to handle that. I'm glad I did the file system abstraction in such a flexible way :-)

schellingb avatar Jan 10 '21 17:01 schellingb

hmm, it's not as convenient as I hoped. The subsystem can't be loaded anytime after some content has been launched, but instead the core needs to be started through the subsystem menu. Additionally the subsystem menu file selection doesn't support playlists, so one needs to browse through the filesystem - twice - to find the two games. Also as of now RetroArch refuses to load a .zip file through that menu, in the same fashion it refuses to load a .zip through the Disc Control menu. That could certainly be fixed but even then it's not that great.

I'm hesitant to add a "Mount external save" menu entry because it would be so rarely used. It could be it's own commandline program but that would make it a bit too cryptic (limited to people who read the documentation). Maybe we can come up with even more features for the start menu so we can have an "Additional Options" menu item :-)

schellingb avatar Jan 10 '21 18:01 schellingb

This feature has recently been implemented with e69a36a: If there are two (or more) games, for example "Game A.zip" and "Game B.zip", and they all contain an empty file named "Game Series.savename", the core will then use "Game Series.pure.zip" as the save file name instead of separate "Game A.pure.zip" and "Game B.pure.zip". Of course if these separate files already exist, a user would need to manually combine them, otherwise the save would just start as empty again once the ".savename" file has been added. This is not yet included in the latest released version 1.0-preview1 but will be in the next release.

schellingb avatar Feb 18 '25 16:02 schellingb

Amazing! Thank you for doing that. I’ll prep my files ahead of time.

Dahak66 avatar Feb 18 '25 17:02 Dahak66

This is now fully released in 1.0-preview2 so I'm closing this issue.

schellingb avatar Jul 29 '25 18:07 schellingb

In #638 it was mentioned how with a shared save things like the auto start settings are also shared.

To make auto start work with two different games that share their save file, it's easiest to add a batch file "START.BAT" to all games which then contain the command to launch each game. Then one can set that START.BAT as auto start and it will work nicely with multiple games sharing their save.

schellingb avatar Jul 31 '25 05:07 schellingb