Savegame compatibility

Web version of freeciv at play.freeciv.org
cazfi
Elite
Posts: 1753
Joined: Tue Jan 29, 2013 6:54 pm

Savegame compatibility

Postby cazfi » Mon Apr 20, 2015 9:05 pm

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: 1753
Joined: Tue Jan 29, 2013 6:54 pm

Re: Savegame compatibility

Postby cazfi » Mon Apr 20, 2015 9:12 pm

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);

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Savegame compatibility

Postby AndreasR » Tue Apr 21, 2015 4:30 pm

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: 1753
Joined: Tue Jan 29, 2013 6:54 pm

Re: Savegame compatibility

Postby cazfi » Fri Apr 24, 2015 3:45 pm

Check the savegame compatibility issues also when updating freeciv-web to a freeciv revision containing patch #6027, patch #6022

Gizmo
Posts: 2
Joined: Wed May 13, 2015 11:49 pm

Re: Savegame compatibility

Postby Gizmo » Thu May 14, 2015 12:04 am

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: 2
Joined: Wed May 13, 2015 11:49 pm

Re: Savegame compatibility

Postby Gizmo » Thu May 14, 2015 12:38 am

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 132 times

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

Re: Savegame compatibility

Postby cazfi » Mon Jul 27, 2015 7:49 am

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.

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Savegame compatibility

Postby AndreasR » Mon Jul 27, 2015 5:03 pm

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: 473
Joined: Wed Feb 20, 2013 4:50 pm

Re: Savegame compatibility

Postby sveinung » Thu Jul 30, 2015 1:05 am


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

Re: Savegame compatibility

Postby sveinung » Wed Aug 05, 2015 11:22 am

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.