Saved Games

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

Saved Games

Post by Zini » 15 Nov 2013, 12:18

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 » 15 Nov 2013, 12:29

Am I missing anything?
Current cell name.

User avatar
Zini
Posts: 5537
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini » 15 Nov 2013, 12:34

Added. Thanks.

User avatar
Zini
Posts: 5537
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini » 16 Nov 2013, 11:40

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: 5537
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini » 16 Nov 2013, 12:10

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 » 16 Nov 2013, 18:56

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?
I am a bigger fan of tons of control rather than taking the "user-friendly" approach.
-Okulo

User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Saved Games

Post by sirherrbatka » 16 Nov 2013, 20:37

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 » 19 Nov 2013, 04:46

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: 1436
Joined: 26 Aug 2011, 02:04

Re: Saved Games

Post by Greendogo » 19 Nov 2013, 09:25

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: 5537
Joined: 06 Aug 2011, 15:16

Re: Saved Games

Post by Zini » 19 Nov 2013, 09:28

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

Post Reply