Discussion thread for the implementation of saving and loading games in OpenMW:
We will have a new save format, because the old one isn't compatible with our data model and supporting it directly isn't necessary anyway (we may still write a saved game importer for the old format at some point).
The general idea for the new format is to re-use the existing esx format structure. The majority of our saved game data that does not consist of ordinary esx records, but there are cases where we do need to save these (e.g. user created potions). Re-using the existing framework will allow us to use the existing load/save code.
There are still some details about MW saving that I am not entirely clear about, but we will get to these in time (probably with some requests from me for more research).
For now I would like to focus on the meta data aspect.
I will add a new record that will always be places directly after the top TES3 header. This record will contain the meta-data and some general data like name, class and level. By duplicating them here we avoid the saved game management code having to wade through potentially hundreds of saved game files, which should spare us from some nasty performance bottlenecks.
So the question now is what kind of meta data (plus other stuff from the rest of the save file) we need. Here is my list:
- The content file list
- The name of the player character
- The level of the player character
- The class of the player character
- The in-game time
- The total time played (wall time)
- A screenshot
- The name of the cell the player is currently in
Am I missing anything?
Saved Games
Saved Games
Last edited by Zini on 15 Nov 2013, 12:34, edited 1 time in total.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Saved Games
Current cell name.Am I missing anything?
Re: Saved Games
As part as the preliminary cleanup for this task I am making a few changes to the command line switches. --name-game is gone. But we got --skip-menu now. With --skip-menu you get the same effect as before with no startup switches. Without --skip-menu you are starting in the main menu (still needs some more work to function properly).
I suspect most developers will want to add skip-menu=1 to their openmw.cfg file.
I suspect most developers will want to add skip-menu=1 to their openmw.cfg file.
Re: Saved Games
And while we are at it, the default value for --start is also gone now. If there is no start (or the string is empty), the player is placed into exterior cell 0, 0 (same as in MW).
If you want the old behaviour back, add start=Beshara to your openmw.cfg file.
If you want the old behaviour back, add start=Beshara to your openmw.cfg file.
Re: Saved Games
One question, who has hundreds of saved game files and a life?Zini wrote: having to wade through potentially hundreds of saved game files, which should spare us from some nasty performance bottlenecks.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Saved Games
Life? What is it and why i need one?One question, who has hundreds of saved game files and a life?
Re: Saved Games
Not only that but some people make a new save file every time they save or complete a quest, in case they screwed something up or decide not to be a vampire or something.sirherrbatka wrote:Life? What is it and why i need one?One question, who has hundreds of saved game files and a life?
Re: Saved Games
Would the version of OpenMW used to create the save file be a useful piece of metadata? Could be useful for diagnostics, especially when saving is a completed feature and people start to upload saved games as part of bug reports. Though, as I partially recall, that may already be under the TES3 header, right?
Re: Saved Games
It's part of the TES3 header. Actually not the version of OpenMW, but that of the file format.