[Freeciv-Dev] [bug #21346] Behaviour on saving without have_resources poorly defined

2014-12-23 Thread Marko Lindqvist
Follow-up Comment #2, bug #21346 (project freeciv):

 What is missing here, is having savegame format support for such
 scenarios with rivers as gen-roads.

This ticket was ignored before S2_5 savegame format was frozen, so lack of
this feature ended up as regression in 2.5 final format - if it gets added
back in newer versios, it should be considered a new feature and there's no
need to be restricted by compatibility in implementation.

___

Reply to this item at:

  http://gna.org/bugs/?21346

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21346] Behaviour on saving without have_resources poorly defined

2014-12-23 Thread Marko Lindqvist
Follow-up Comment #3, bug #21346 (project freeciv):

 Alternatively, we could retrospectively declare that it refers
 to just resources, and that older saving behaviour was a bug --
 probably the most useful thing it controls is whether random
 resources get generated fresh on scenario load.

I think this has been the original intend. While that code made no distinction
between resources and infrastructure, the infrastructure is never added by the
map generator - old map-only scenarios never had any infrastructure. 

___

Reply to this item at:

  http://gna.org/bugs/?21346

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21346] Behaviour on saving without have_resources poorly defined

2013-12-14 Thread Jacob Nevins
URL:
  http://gna.org/bugs/?21346

 Summary: Behaviour on saving without have_resources poorly
defined
 Project: Freeciv
Submitted by: jtn
Submitted on: Sat Dec 14 13:26:42 2013
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: Any
 Planned Release: 

___

Details:

Freeciv seems to be changing its mind over time about what the
map.server.have_resources variable (and associated 'specials' savefile
capability) controls.

If have_resources is not set at save time, if I'm reading the code right:
* In savegame.c (and S2_2), none of resources, specials, or bases are saved.
(And similar behaviour on load.)
* On S2_3/S2_4, resources and specials are not saved, but bases are. (And
similarly for loading new-format savefiles.)
* On S2_5, resources and non-road/river specials are not saved, but bases and
roads/rivers are. Loading is similar (old savefiles are treated as above).
** (There's also a rivers_overlay wart in saving, but since it saves
S_OLD_RIVER from run-state I think it will never be activated in practice? I'm
a bit surprised by the presence of compatibility code for absence of ruleset
ROCO_RIVER, given that S_OLD_RIVER seems illegal while running now -- maybe
this is work in progress?)
* On trunk, resources are not saved, but extras (which includes old bases and
specials) are.
(all modulo rivers_overlay)

This is I think mostly academic, because currently there's no way to save a
scenario game without have_resources set, as it will get resources generated
and have_resources set at game start, and the UI doesn't allow save scenario
before that. (I think the debug-only '/scensave' command may be an exception
to this?)

If we take the older behaviour as more correct/intended, then I think the
'have_resources'/'specials' flags are both misnamed, as in fact they
controlled all terrain additions other than rivers.

Alternatively, we could retrospectively declare that it refers to *just*
resources, and that older saving behaviour was a bug -- probably the most
useful thing it controls is whether random resources get generated fresh on
scenario load.
(Would need to work out what to do when loading scenarios from older eras, but
because of the saving behaviour there shouldn't be many kicking around with
specials that have previously been ignored on load.)

I haven't tested much of this understanding, and may have misread the
situation; clearly some thought has been going into updating this stuff
recently for roads/extras.




___

Reply to this item at:

  http://gna.org/bugs/?21346

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21346] Behaviour on saving without have_resources poorly defined

2013-12-14 Thread Marko Lindqvist
Follow-up Comment #1, bug #21346 (project freeciv):

 (There's also a rivers_overlay wart in saving, but since it

 I don't think server ever *saves* as rivers_overlay, it just loads (old)
scenarios where it's set.
 What is missing here, is having savegame format support for such scenarios
with rivers as gen-roads.

 saves S_OLD_RIVER from run-state I think it will never be
 activated in practice? I'm a bit surprised by the presence of
 compatibility code for absence of ruleset ROCO_RIVER, given
 that S_OLD_RIVER seems illegal while running now -- maybe this
 is work in progress?)

 All this seems to be related to loading (where rivers_overlay code is) being
different from saving (where you thought it to be)

___

Reply to this item at:

  http://gna.org/bugs/?21346

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev