Saved Games

Everything about development and the OpenMW source code.
Post Reply
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Saved Games

Post by Zini »

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?
Last edited by Zini on 15 Nov 2013, 12:34, edited 1 time in total.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Saved Games

Post by sirherrbatka »

Am I missing anything?
Current cell name.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini »

Added. Thanks.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini »

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.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini »

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.
Tarius
Posts: 574
Joined: 24 Oct 2011, 19:29

Re: Saved Games

Post by Tarius »

Zini wrote: having to wade through potentially hundreds of saved game files, which should spare us from some nasty performance bottlenecks.
One question, who has hundreds of saved game files and a life?
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Saved Games

Post by sirherrbatka »

One question, who has hundreds of saved game files and a life?
Life? What is it and why i need one?
User avatar
Rhys
Posts: 113
Joined: 06 Aug 2011, 01:51
Location: Australia

Re: Saved Games

Post by Rhys »

sirherrbatka wrote:
One question, who has hundreds of saved game files and a life?
Life? What is it and why i need one?
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.
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Saved Games

Post by Greendogo »

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?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini »

It's part of the TES3 header. Actually not the version of OpenMW, but that of the file format.
Post Reply