Savegame compatibility

Web version of freeciv. Please mention the site you're using, if speaking things other than general freeciv-web codebase.
cazfi
Elite
Posts: 3094
Joined: Tue Jan 29, 2013 6:54 pm

Savegame compatibility

Post by cazfi »

Freeciv savegame format changes freely during development of new version -> save from the dev version of yesterday may not be compatible with dev version of today. The savegame compatibility is only provided between stable releases (in practice also the development version is always able to load saves from any stable versions even if not from the halfway format between previous stable version and current development version). Freeciv-web uses development versions of freeciv -> there are savegame compatibility breaks.

This thread is for advance warnings about those, and also for freeciv-web developer discussion about the mitigation plans.
cazfi
Elite
Posts: 3094
Joined: Tue Jan 29, 2013 6:54 pm

Re: Savegame compatibility

Post by cazfi »

patch #6003 adds traderoute direction information. Fallback mechanisms work from old stable version saves, but not from any recent development version saves. Loading of the saves without that information will fail.
In this case I think we should patch freeciv-web version of freeciv (for some reasonable time) so that in case of lacking traderoute direction, default one is used:

savegame3.c:
dir = secfile_lookup_str(loading->file, "%s.route_direction%d", citystr, i);
->
dir = secfile_lookup_str_default(loading->file, "Bidirectional", "%s.route_direction%d", citystr, i);
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Savegame compatibility

Post by AndreasR »

Thanks for the advance notice of savegame compatibility issues. I agree that patching Freeciv-web to read older savegames would be nice. Thankfully players have been mostly forgiving of some necessary savegame breaks.

Without a doubt the highest priority issue for Freeciv-web now should be fixing bug #23430.

Andreas
cazfi
Elite
Posts: 3094
Joined: Tue Jan 29, 2013 6:54 pm

Re: Savegame compatibility

Post by cazfi »

Check the savegame compatibility issues also when updating freeciv-web to a freeciv revision containing patch #6027, patch #6022
Gizmo
Posts: 3
Joined: Wed May 13, 2015 11:49 pm

Re: Savegame compatibility

Post by Gizmo »

i have a problem saving in freeciv-web:
when i load an advanced savegame into fcw it restarts from the beginning, at 4000 BC (T0)
do i have to start pre-saved games differently? (after loading i clicked on 'start game')
Gizmo
Posts: 3
Joined: Wed May 13, 2015 11:49 pm

Re: Savegame compatibility

Post by Gizmo »

Gizmo wrote:i have a problem saving in freeciv-web:
when i load an advanced savegame into fcw it restarts from the beginning, at 4000 BC (T0)
do i have to start pre-saved games differently? (after loading i clicked on 'start game')
strange.. in a new savegame it seems to work now.
maybe the reason was that i had a websocket error earlier in that savegame
(i use windows 7 x64 with firefox 37.0.2)
Attachments
civ of the Helvetian - 3550BCE (T9).js.txt
(41.82 KiB) Downloaded 393 times
cazfi
Elite
Posts: 3094
Joined: Tue Jan 29, 2013 6:54 pm

Re: Savegame compatibility

Post by cazfi »

cazfi wrote:also for freeciv-web developer discussion about the mitigation plans.
Was any work made for the savegame incompatibilities mentioned in this thread before the new version of freeciv-web went to production? There seems to be several bugreports related to a case where an older savegame has been loaded.
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Savegame compatibility

Post by AndreasR »

cazfi wrote:
cazfi wrote:also for freeciv-web developer discussion about the mitigation plans.
Was any work made for the savegame incompatibilities mentioned in this thread before the new version of freeciv-web went to production? There seems to be several bugreports related to a case where an older savegame has been loaded.
Unfortunately, no work was done for the savegame incompatibilities. Loading of old incompatible savegames has been disabled.
Most users seems to understand and accept the current way Freeciv-web version upgrades are handled: that the price of progress of new versions of Freeciv-web is that some times the savegames could get lost because a new version will not support the old format. The only bugreport of this that I'm aware of this this one reported by myself: https://gna.org/bugs/?23707

Do you have any suggestions about how to improve this? More frequent releases of Freeciv and Freeciv-web simultaneously, where loading the previous savegame-format is supported?

Andreas
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Savegame compatibility

Post by sveinung »

sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Savegame compatibility

Post by sveinung »

Patch #6154 creates a way to mark a code section as development version internal save game compatibility and select if it should be included or not.

Patch #6153 would have broken the loading of unit orders. Patch #6171 adds development version internal save game compatibility for it.
Post Reply