Save game claims win condition is Scenario, even when it isn't

Bug #1201398 reported by Hans Joachim Desserud
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

Steps to reproduce:
1. Start a new game with a win condition like collectors or endless game.
2. Save said game.
3. Look at the save game in either the save or the load game dialog.

Expected result:
The win condition from step 1 should be listed.

Actual result:
For some reason they all list Scenario, no matter what I have selected.

Wondering if the translated names didn't match and trigger some default type, I tried switching the game to English which had the same results. When I browse the games listed in the load game dialog I notice older games list the correct win conditions.

widelands r6626 on Ubuntu 13.04.

Tags: savegame ui

Related branches

Revision history for this message
cghislai (charlyghislain) wrote :

Indeed something is wrong with my code, sometimes the win condition is stored as the script name, sometimes as the translated name, i may have to check for version.
I will also allow showing current game info in the save dialog if no game is selected.

Changed in widelands:
assignee: nobody → cghislai (charlyghislain)
status: New → Confirmed
SirVer (sirver)
Changed in widelands:
status: Confirmed → Fix Committed
milestone: none → build18-rc1
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Hm, it seems like this has reversed now. If I start a new game with a selected win condition, the save game will list that win condition. So far, so good. However, if I check the Scenario checkbox for a game or start a new campaign game, the save game will claim win condition is "Not Set". Is this intended? :)

(I also have a couple of save games which display "not_set", though I am not sure why that would be. I think they are all quite old, in case that matters though)

Revision history for this message
cghislai (charlyghislain) wrote :

of course not intended..
This is strange because code to handle scenario is still in there, so with newly saved game this should be correctly set, but I have the same issue here.
I will check that and ensure it works for former version as well, in those it was stored as "not_set".
Thanks for checking!

Changed in widelands:
status: Fix Committed → In Progress
Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
cghislai (charlyghislain) wrote :

I'm reopening this one, there are still inconsistencies and I see the "Not set" too often.

Changed in widelands:
status: Fix Committed → In Progress
SirVer (sirver)
Changed in widelands:
milestone: build18-rc1 → build19-rc1
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

For build18, should we simply hide the win condition for the save game, load game and replay dialogs? As long as we cannot present it consistently, we might as well not show it to the user to avoid confusion. Then, once we figure out whatever is plaguing this, we can instead introduce this feature in build19.

Revision history for this message
SirVer (sirver) wrote :

I think it is useful to show this. maybe we get more bug reports that will help us track the issue down.

Revision history for this message
wl-zocker (wl-zocker) wrote :

I think the problem is that the win condition is not loaded correctly:
- Start a game, choose a win condition, save the game, exit it.
- The correct win condition is shown in the load dialog (i.e. it has been saved correctly).
- Load the game, save it again and exit.
- In the load dialog, the win condition is "not set".
At least that is the case in r6910.

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: In Progress → Incomplete
Revision history for this message
wl-zocker (wl-zocker) wrote :

The observations from #7 are still valid in r7199.

Changed in widelands:
status: Incomplete → Confirmed
Revision history for this message
GunChleoc (gunchleoc) wrote :

I think the problem is that the win conditions are localized before they are saved into the savegame. I noticed this while working on the UI overhaul, but changing this isn't as trivial as I thought. We do need to fix this though.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I did a test with the game set to English, and this still happens. So, it is not related to the wrong localization, which is a different problem.

GunChleoc (gunchleoc)
Changed in widelands:
assignee: cghislai (charlyghislain) → GunChleoc (gunchleoc)
status: Confirmed → In Progress
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
GunChleoc (gunchleoc)
Changed in widelands:
assignee: GunChleoc (gunchleoc) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.