bugFreeciv - Bugs: bug #21268, Scenario start positions can't...

 
 
Show feedback again

bug #21268: Scenario start positions can't restrict nation choice for players

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sun 10 Nov 2013 12:48:58 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Jacob Nevins <jtn>Open/Closed: Closed
Release: 2.4.0Operating System: Any
Planned Release: 2.5.0,2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon 16 Dec 2013 12:39:10 PM UTC, SVN revision 23861:

Add a scenario option to restrict the set of nations players can pick to
those for which start positions have been defined in the scenario.
(This used to be the default behaviour in 2.0.x, but has not been since
then, probably by accident. The new default behaviour remains to not
restrict nation choice, and none of the supplied scenarios use the new
option.)
Also, improve comments and diagnostics about what happens in this case.

See gna bug #21268.

(Browse SVN revision 23861)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Mon 16 Dec 2013 12:08:06 PM UTC, SVN revision 23860:

Add a scenario option to restrict the set of nations players can pick to
those for which start positions have been defined in the scenario.
(This used to be the default behaviour in 2.0.x, but has not been since
then, probably by accident. The new default behaviour remains to not
restrict nation choice, and none of the supplied scenarios use the new
option.)
Also, improve comments and diagnostics about what happens in this case.

See gna bug #21268.

(Browse SVN revision 23860)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 14 Dec 2013 05:08:49 PM UTC, comment #3:

(The label for this in the editor, "Nation Start Positions", leaves a lot to be desired; unfortunately it needs to be short. Should really dust off pepeto's editor tooltips patch from bug #15580.)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 14 Dec 2013 05:07:10 PM UTC, comment #2:

> The current behaviour has been there so long that scenario
> authors / players might be surprised by its suddenly starting
> to happen in a stable series.

Attached patch for S2_5 and later makes it a scenario option, with restrictions off by default, and doesn't change any supplied scenarios, so they remain unrestricted. So no surprises.
If there are ancient scenarios kicking around where this is desired, they'd have to be updated to a more recent savegame format and have the 'startpos_nations' option set.

(With restrictions in force, the Gtk client's "pick-a-nation" dialog has groups which are entirely empty, which looks a bit naff; patch #3448 will take care of this.)

This patch also mops up some of the comment changes about nation selection currently in file #19349 attached to patch #4304.

(file #19476)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 10 Nov 2013 02:20:16 PM UTC, comment #1:

If we are to fix this, I'm not sure whether to do so for 2.4.1 or 2.5.0. The current behaviour has been there so long that scenario authors / players might be surprised by its suddenly starting to happen in a stable series.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 10 Nov 2013 12:48:58 PM UTC, original submission:

init_available_nations() has logic to carefully restrict availability of nations when loading a scenario with restricted start positions.

I have not been able to find a way to invoke this. savegame.c and savegame2.c both bail out on 'is_new_game' (aka save_players=FALSE) files after loading the map (and its start positions) but before getting as far as their calls to init_available_nations(). So it never gets called in the presence of map positions to restrict availability; the previous call from load_rulesets() (which makes all nations available) remains in force.

As a result, the client always offers the full set of nations for picking, regardless of the scenario. (And when it comes time to allocate start positions, if as is likely the player has picked a nation for which there is no start position, the server gives them a random one.)

(For players who don't specify a nation, the server does still try to pick random ones to match the available start positions.)

The last branch I can find in which this appears to function as intended is the head of S2_0. (Head of S2_1 and 2.2.7 both ignore start positions; haven't checked whether this got broken by some change that got backported onto all branches.)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #19476:  trunk-S2_5-startpos-restricted-nations.patch added by jtn (19kB - text/x-diff - trunk/S2_5 r23854)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Dec 2013 12:39:55 PM UTCjtnStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sat 14 Dec 2013 05:07:10 PM UTCjtnAttached File-=>Added trunk-S2_5-startpos-restricted-nations.patch, #19476
      StatusNone=>Ready For Test
      Assigned toNone=>jtn
      Planned Release=>2.5.0,2.6.0
      SummaryScenario start positions don\'t restrict nation choice for players=>Scenario start positions can't restrict nation choice for players
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup