View Issue Details

IDProjectCategoryView StatusLast Update
0004531The Dark ModFeature proposalpublic17.01.2019 15:14
Reporterstgatilov Assigned ToSTiFU  
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.08Fixed in VersionTDM 2.08 
Summary0004531: Warn player in GUI about loading incompatible savegame
DescriptionCurrently if player loads a savegame from previous version of TDM, it would load seemingly as usual, but at the end he would find himself at the beginning of the level without any items. This is very frustrating behavior.
Also, there is a cvar which tells to force load any save ignoring version check. It may work pretty often now, given that we rarely change savegame data.

The idea is to tell player that the savegame is incompatible before he starts loading it.
TagsNo tags attached.


parent of 0004964 resolvedSTiFU Version check fails 




11.05.2017 02:06

administrator   ~0008858

Note that revision of originating TDM is located at the very beginning of the file (see idSessionLocal::LoadGame). It should be easy to call idRestoreGame::ReadHeader to check version, and then reopen the file to really read it.

For the end user, this might look differently:
1. We can issue a graphical text message after loading, but this is not convenient.
2. We can open a confirmation dialog when trying to load old save game. It should tell that "the savegame was done in XXXX revision, but you have YYYY revision now" and some warnings that this is likely to not work in a terrible way. Then allow several buttons: "cancel", "force load" (perhaps developer only).
3. We can write the information about save and compatibility issue when player chooses the savegame (near preview image). But this does not cover quickloads, so it is not universal solution.

An important thing to clarify: is there really any sense in loading a savegame with putting player at the beginning of the level? It is very important to check how loading old save works in campaign, i.e. when you load "Mission End" save or when you load save from second/third mission of campaign.


25.07.2018 13:04

administrator   ~0010724

How can you avoid "Force Load" leading to a crash? The data's all out of order.


25.07.2018 16:58

administrator   ~0010725

Maybe I wrote something like this somewhere, but I cannot find it now.

Force loading will lead to crash (or some terrible data corruption in rare case) if savegame data turns out to be incompatible.


11.01.2019 06:42

developer   ~0011314

Last edited: 11.01.2019 06:43

View 2 revisions

We've had a lot of trouble with incompatible savegames. So, I would like to add the following:
-If the player tries to load an old savegame, he will get a messagebox saying "The savegame cannot be loaded as it was created with rev. X, but you're running rev. Y." He will then be returned to the main menu or the game, if he was already ingame (player pressed quickload on an old savegame).
-The only people who might be interested in loading up an old save are devs who are sure that the savegames are still compatible. For devs, a cvar should be added: tdm_skip_savegame_revision_check.
This is something easily done and should be added to 2.07 to avoid dealing with the same reports over and over again.

If you agree, just assign the task to me and I'll handle the rest.



11.01.2019 07:43

administrator   ~0011315

Last edited: 11.01.2019 07:45

View 2 revisions

There is already such a cvar: cv_force_savegame_load.
It is not set by default, and in such case it checks exe-embedded SVN revision against savegame-stored SVN revision. If they do not match, then loading game "fails".
Developers usually set it because they change revisions frequently. Then loading game proceeds even if SVN revisions do not match (usually leading to crash on format mismatch). One case when loading still fails with cvar on is when scripts checksum is different in the current game and in the savegame being loaded. This check is located in some other place.

Anyway, the problem is in what engine does if loading game "fails".
The current behavior (inherited from ID) is to load the map directly. In most cases it means having no tools, no shop, and other weird stuff (probably like when you type "map xxx" in console, although I'm not sure).

As for suggestions, just read my first post: it says almost the same as you propose.
I'm pretty sure now that we can forbid loading incompatible games even for campaigns.

One difference is that I suggested adding a button "Force load" to message box when player loads incompatible save.
This is helpful because players or beta testers occasionally want to load incompatible savegame. Right now they set cvar to achieve that, the cvar remains ON in their config file for years without them or anyone else knowing that.



11.01.2019 07:47

administrator   ~0011316

Well, If adding a button does not sound like a good idea, there is another option.
Leave only cvar, but whenever player loads a savegame with different SVN revision by using this cvar, post a warning message (similar to "aas96 out of date") on screen. And write about it into game console (if not yet done).
This way it would be hard to leave cvar on without realizing it.


11.01.2019 08:14

developer   ~0011317

You're saying, when a player tries to load an incompatible save, the game will just load the map wie "map" command instead of loading the save. So, why do we have people frequently reporting invisible weapons and such then? Is there a bug in the code?

However, since that's undesireable behavior anyway, we probably don't have to put too much effort into investigating that. Just post a message that saves are incompatible unless cv_force_savegame_load is set.

And regarding your last suggestion:
We could just not archive cv_force_savegame_load and we're good. Devs can still just set it in their autoexec or commandline param, if they need it for longer than the current instance.


11.01.2019 14:35

administrator   ~0011318

Using autoexec is not good for developers, because it is tracked.
Living with non-archiving cvar is painful for developer for obvious reason.
I guess we can leave it as is =(


11.01.2019 14:44

developer   ~0011319

Last edited: 11.01.2019 14:44

View 2 revisions

Ok, you seem to be quite fond of archiving. :-) No problem!

So let's do it then:
-cv_force_savegame_load == 0: Issue message box "Cannot load!", cancel to mainmenu.
-cv_force_savegame_load == 1: Issue message box "Warning: Old Savegame!", load anyways. Optionally also add a cancel button here. But seeing as this is only directed at devs, why make it unnecessarily complex?



13.01.2019 23:43

developer   ~0011351

I've decided to do it your way after all because the loading with putting player at beginning of level might be useful for campaigns, so now, the player will be able to decide what do to in case of conflict: cancel, initialized load or force load. The last option obviously only reserved for devs and accessible via cvar.


14.01.2019 19:16


ForceLoadEnabled.JPG (180,540 bytes)   
ForceLoadEnabled.JPG (180,540 bytes)   


14.01.2019 19:28

developer   ~0011353

I have attached a screenshot of how it looks now. When tdm_force_savegame_load is enabled, the middle button is shown and the message box text is adjusted accordingly.

-Loadgame from menu, console and ingame works
-Force-Loading works only when really nothing changed about the savegame. Otherwise, crash to desktop or the game just freezes.
-Load to map start also works, sometimes with the infamous invisible weapons bug.

-Add string tables instead of hardcoded text.


17.01.2019 07:33

developer   ~0011375

Issue is resolved, but moved to 2.08, as per internal discussion.

Issue History

Date Modified Username Field Change
11.05.2017 01:54 stgatilov New Issue
11.05.2017 02:06 stgatilov Note Added: 0008858
25.07.2018 13:04 grayman Note Added: 0010724
25.07.2018 16:58 stgatilov Note Added: 0010725
11.01.2019 06:42 STiFU Note Added: 0011314
11.01.2019 06:43 STiFU Note Edited: 0011314 View Revisions
11.01.2019 07:43 stgatilov Note Added: 0011315
11.01.2019 07:45 stgatilov Note Edited: 0011315 View Revisions
11.01.2019 07:47 stgatilov Note Added: 0011316
11.01.2019 08:14 STiFU Note Added: 0011317
11.01.2019 14:35 stgatilov Note Added: 0011318
11.01.2019 14:44 STiFU Note Added: 0011319
11.01.2019 14:44 STiFU Note Edited: 0011319 View Revisions
13.01.2019 17:14 STiFU Assigned To => STiFU
13.01.2019 17:14 STiFU Status new => assigned
13.01.2019 23:43 STiFU Note Added: 0011351
14.01.2019 19:16 STiFU File Added: ForceLoadEnabled.JPG
14.01.2019 19:28 STiFU Note Added: 0011353
15.01.2019 22:36 STiFU Status assigned => resolved
15.01.2019 22:36 STiFU Resolution open => fixed
17.01.2019 07:33 STiFU Fixed in Version => TDM 2.08
17.01.2019 07:33 STiFU Target Version => TDM 2.08
17.01.2019 07:33 STiFU Note Added: 0011375
17.01.2019 15:14 duzenko Relationship added parent of 0004964