Summary: Ability to not save resources not exposed to
scenario editor
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat Dec 14 13:27:03 2013
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 



For scenarios, the savefile format has the ability to specify that no
resources be saved in the scenario, so that resources will be generated
randomly when the scenario is loaded for play, according to settings chosen in

(This is controlled by the "specials" capability in the savefile, which
becomes the server's "have_resources" variable -- in fact these have
controlled whether more stuff is saved at various times, see bug #21346 for
confusion, which will need sorting out first.)

* There's an additional wrinkle: if the savegame doesn't have the "specials"
capability but does have "rivers_overlay", then just river specials are saved
(in older versions; gen_roads makes this moot in newer versions).

However, there's no way for people editing scenarios with the built-in map
editor to access this functionality, though -- it's currently necessary to
hack savefiles by hand, I think. (Maybe the old, separate editor could use

The only way to load a scenario for editing is to start a game with it (which
will generate resources and set have_resources). If you go into edit mode and
do "save scenario", those resources will be saved in the game and new
resources will not be generated when the resulting scenario is loaded for

Existing scenarios with this property (search as earth-80x50-v3, which has
"rivers_overlay" instead of "specials") thus can't be edited without losing
this property.

The obvious place to expose this in the UI is as a flag alongside "Save
players" in game/scenario properties. Implementation issues:
* What should be the UI if a player does "save scenario" with this flag set
but resources present on the map? The obvious one is to pop up a "clear
resources or unset flag" choice, but the client/server interaction makes this
hard. Unlike players, I'm uncomfortable with quietly discarding stuff in the
savefile but leaving it visible in the editor -- too easy to lose work.
* We'll need to squirrel away the 'have_resources' value from game load so
that it can be reinstated on scenario save, because currently you can only
edit having gone through a game-start transition, which will set the real
have_resources flag.

Could in principle expose 'have_rivers_overlay', but if we only get round to
this in S2_5 or later (as seems likely) then I think the issue goes away (and
so should rivers_overlay, probably).

May as well expose 'have_huts' at the same time (once the confusion of bug
#21345 is sorted out).


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to