bugFreeciv - Bugs: bug #21347, Ability to not save resources not...

 
 
Show feedback again

bug #21347: Ability to not save resources not exposed to scenario editor

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat 14 Dec 2013 01:27:03 PM UTC  
 
Category: editorSeverity: 3 - Normal
Priority: 5 - NormalStatus: Duplicate
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: Any
Planned Release: 2.6.0, 3.0.0Contains string changes: Yes

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 25 Jun 2016 01:38:29 PM UTC, comment #12:

-> patch #7325

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 25 Jun 2016 01:35:12 PM UTC, SVN revision 33024:

Effectively reverted bug #21347 exposing 'have_resources' to the editor.

(Browse SVN revision 33024)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 25 Jun 2016 01:34:55 PM UTC, SVN revision 33023:

Effectively reverted bug #21347 exposing 'have_resources' to the editor.

(Browse SVN revision 33023)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 24 Jun 2016 01:16:33 PM UTC, comment #9:

New TRUNK version of the revert patch, containing network protocol changes.

(file #27656)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 23 Jun 2016 01:34:32 AM UTC, comment #8:

Patches to revert editor view of have_resources (some other parts of recent changes remain as rework toward future implementation)

If this revert gets accepted as solution for now, new ticket about really adding editor support for have_resources should be added.

(file #27638, file #27639)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 23 Jun 2016 01:15:37 AM UTC, comment #7:

Turns out 'have_resources' set to FALSE interacts really badly with existing vision. It could only be used in a scenario map that has no players.

For now (and permanently for S2_6) I see removal of the editor support for 'have_resources' as the best course of action.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 18 Jun 2016 06:07:46 AM UTC, SVN revision 32894:

Made 'have_resources' scenario property editor controlled.

Requested by Jacob Nevins

See bug #21347

(Browse SVN revision 32894)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 18 Jun 2016 06:07:19 AM UTC, SVN revision 32893:

Made 'have_resources' scenario property editor controlled.

Requested by Jacob Nevins

See bug #21347

(Browse SVN revision 32893)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 18 Jun 2016 06:07:04 AM UTC, comment #4:

> There's problems with the initial state of the setting in client side


-> bug #24767

That part should not require network protocol changes.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 16 Jun 2016 02:38:32 PM UTC, comment #3:

S2_6 version

There's problems with the initial state of the setting in client side, but those are likely to go to another ticket (have to investigate a bit more)

(file #27560)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 16 Jun 2016 01:16:50 PM UTC, comment #2:

TRUNK commit candidate. S2_6 to follow.

(file #27558)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 01 May 2016 07:38:14 AM UTC, comment #1:

My current WIP patch for TRUNK attached, but as long as bug #24627 is there, it's quite useless.

(file #27244)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 14 Dec 2013 01:27:03 PM UTC, original submission:

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 pregame.

(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 these?)

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 play.

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

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #27638:  RevertEditorHaveResources.patch added by cazfi (8kB - text/plain-diff)
file #27244:  EditorHaveResources.patch added by cazfi (16kB - text/plain-diff)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 20 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 25 Jun 2016 01:38:29 PM UTCcazfiStatusReady For Test=>Duplicate
      Open/ClosedOpen=>Closed
    Fri 24 Jun 2016 01:16:33 PM UTCcazfiAttached File-=>Added RevertEditorHaveResources-2.patch, #27656
    Thu 23 Jun 2016 01:34:32 AM UTCcazfiAttached File-=>Added RevertEditorHaveResources.patch, #27638
      Attached File-=>Added RevertEditorHaveResources-S2_6.patch, #27639
      StatusIn Progress=>Ready For Test
    Thu 23 Jun 2016 01:15:37 AM UTCcazfiStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Sat 18 Jun 2016 06:08:17 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 16 Jun 2016 02:38:32 PM UTCcazfiAttached File-=>Added EditorHaveResources-S2_6-2.patch, #27560
      StatusNone=>Ready For Test
      Contains string changesNone=>Yes
    Thu 16 Jun 2016 01:16:50 PM UTCcazfiAttached File-=>Added EditorHaveResources-2.patch, #27558
    Sun 01 May 2016 07:38:14 AM UTCcazfiAttached File-=>Added EditorHaveResources.patch, #27244
    Sun 01 May 2016 07:37:08 AM UTCcazfiDependencies-=>Depends on bugs #24627
    Mon 07 Sep 2015 03:43:15 AM UTCcazfiCategoryNone=>editor
      Planned Release=>2.6.0, 3.0.0
    Sat 14 Dec 2013 01:27:15 PM UTCjtnDependencies-=>Depends on bugs #21346
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup