patchFreeciv - Patches: patch #3448, [metaticket] "Nation...

 
 
Show feedback again

patch #3448: [metaticket] "Nation sets": allow set of nations that will ever appear in-game to be chosen

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Thu 26 Jul 2012 11:24:50 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: In ProgressPrivacy: Public
Assigned to: Jacob Nevins <jtn>Open/Closed: Open
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.

 

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

Fri 20 Dec 2013 11:53:50 PM UTC, comment #9:

Changing this to a metaticket,

Patches now ready for review (in related tickets) and if no comments will be committed soon. Patch series:

Other clients' support (notably Qt and SDL) not yet done -- if anyone else wants to take them on I'd be happy for them to.

Mostly conforms to the original design given here. Exceptions:

> default_groups = "Extended"

This syntax became 'default_nationset = "all"' (and only allows one argument, because what would be the point of more?)

> If loading a savegame with a declared subset and nations
> inconsistent with it that we know about, we should probably
> just locally add them to the subset for the duration of that
> game.

In this situation we change nationset to one that includes all nations in the savegame, if available. (This also handles pre-nationset savegames.)

One loose end not yet dealt with (but not enough to block submitting the bulk of this, I think):

> The list of nations shown in the client help should reflect
> the selected nationset.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 10 Nov 2013 01:21:55 AM UTC, comment #8:

Current WIP. Adds Gtk3 support. Not far from submission now. (I shall be glad to see the back of this.)

Compared to file #19212, the following tickets have been spun off and are no longer in this series: bug #21206, bug #21207, patch #4304, and a bit of patch #4299.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 20 Oct 2013 02:13:13 AM UTC, comment #7:

(Oh, and it still has loads of debug logging detritus.)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 20 Oct 2013 02:10:04 AM UTC, comment #6:

Current WIP patch stack attached (these will become separate tickets in time).
Pretty much completely working for server and Gtk2 client. Work still needed on tidying and other clients.

(file #19212)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 22 Sep 2013 01:02:34 PM UTC, comment #5:

I am still working on this, s-l-o-w-l-y. I still hope to get it in 2.5, and it does change the network protocol.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Wed 08 May 2013 10:57:35 PM UTC, comment #4:

Since this patch has been sat in my stash for a few weeks, I may as well post it here as a preview while I get my act together.
This isn't a candidate for commit as it doesn't have any actual functionality, but it demonstrates the ruleset format and server UI changes I'm thinking of.

(file #17935)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 29 Jul 2012 07:50:48 PM UTC, comment #3:

The list of nations shown in the client help should reflect the selected nationset.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Fri 27 Jul 2012 12:23:34 AM UTC, comment #2:

> I'll raise a separate ticket for a simpler stopgap design for
> 2.4.x.

This is now patch #3449.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Fri 27 Jul 2012 12:06:33 AM UTC, comment #1:

Nations exiting from the "core set" will need to be carefully controlled to avoid savegame compatibility issues.
If loading a savegame with a declared subset and nations inconsistent with it that we know about, we should probably just locally add them to the subset for the duration of that game.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Thu 26 Jul 2012 11:24:50 PM UTC, original submission:

Here's a sketch of a design to allow nations to be divided into subsets. It's aimed at solving problems recently discussed with the default nation set -- (a) allowing translators to focus on a smaller "core" of nations if they wish, (b) allowing players not to be overwhelmed by the choice -- but could find other uses. It tries to avoid the problems I pointed out in patch #3432.

This design requires changes to the network protocol and noticeable work on the client UI, so cannot be targeted at 2.4.x. I'll raise a separate ticket for a simpler stopgap design for 2.4.x.

Requirements are:

  • Allow definition of subsets of the nations in a ruleset, such that when a subset is selected, no nations outside that subset will ever be used -- users can't pick them, won't be picked randomly, not used for civil war.
    • This is so that translators can choose to focus on a "core" set, be sure that untranslated strings won't appear if users choose that "core" group.
  • Allow users to easily choose which subset of nations to use, in pregame (not after game start).
    • For single-player, should be as simple as a drop-down in the "pick nation" dialog.
    • For multi-player, should allow server operator to pick, or optionally, players to vote.
  • Allow the same individual nation definition files to be used for different subsets, and don't complain about references outside the subset (civilwar, conflicts_with)
    • ...while still complaining about references that can't be satisfied from the full set, as this is valuable to nation maintainers for spotting typos etc.
  • Allow easy definition of a user-visible "full" subset containing every nation in the ruleset, with a ruleset-defined name, without every nation definition having to remember to declare membership in this set.

Proposal:

In nations.ruleset, allow definition of a nation set with [nset_XXX]. This will look rather similar to [ngroup_XXX], and share the same namespace, but nationsets will be orthogonal to nation groups. Example usage for the case in point:

As with groups, the default set for the ruleset will be the first one defined.

Defining at least one set is mandatory (in order to give it a name). However, if only one set is defined, it will be kept out of the way of the user as much as possible.

In individual nation definitions, set membership is included in the 'groups="Foo", "Bar", "Baz"' just the same as group membership.

In nations.ruleset, define a "default_groups" list of groups/sets of which every nation is a member. Example:

Nations not in any set will cause a warning on ruleset load.

Add a server option "nationset". Value can be "" to use ruleset's default, or an explicitly set string. Allow players to vote to change this setting in pregame, but require some level of agreement.

On changing this setting, any existing nation selections not compatible with the new set go back to "random", clients only display nations/groups in the subset, effective "maxplayers" may change leading to kicks, etc -- so this is not to be done lightly.
(Could resend nations from the server when this changes, or will probably rely on client to hide unavailable nations correctly, to save network traffic on changes. Former means you only pay for "core" nation traffic at client connect if that's what you're using, latter means you don't get a massive burst of network traffic from changing a dropdown in pregame.)

Send the nation sets to the client alongside nation groups. However, they are not to be displayed in the same way as nation groups. Instead, add a drop-down in the client, on the "pick nation" dialog or similar, allowing changing the nation set (if more than one is defined). Changing this triggers a "/set nationset foo" to the server, similar to the aifill dropdown.

The effect of all this mechanism:

On game start, the random nation selection will only consider nations in the selected set. (This should be stronger even than "conflicts_with" -- it should as if the other nations don't exist.)

During the game, civilwar nations will again only be considered from the subset.

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 #19351:  trunk-nation-sets-wip-ter.mbox added by jtn (169kB - application/mbox - trunk r23707 + patch #4299 + patch #4300 + patch #4301 + patch #4302 + patch #4303 +patch #4304: WIP (server/Gtk2/Gtk3))
file #19212:  trunk-nation-sets-wip-bis.mbox added by jtn (152kB - application/mbox - trunk r23595: WIP (most server, common client, and Gtk2 work done))
file #17935:  trunk-nation-sets-wip.patch added by jtn (41kB - text/x-patch - trunk r22836: WIP (only ruleset/network changes))

 

Digest:
   bug dependencies, patch dependencies.

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 17 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 28 Dec 2013 11:21:23 AM UTCjtnDependencies-=>Depends on bugs #21380
    Tue 24 Dec 2013 11:05:10 PM UTCjtnDependencies-=>Depends on patch #4354
    Sat 21 Dec 2013 12:00:37 AM UTCjtnDependencies-=>Depends on patch #4351
    Fri 20 Dec 2013 11:59:53 PM UTCjtnDependencies-=>Depends on patch #4350
    Fri 20 Dec 2013 11:53:50 PM UTCjtnSummary"Nation sets": allow set of nations that will ever appear in-game to be chosen=>[metaticket] "Nation sets": allow set of nations that will ever appear in-game to be chosen
    Fri 20 Dec 2013 11:37:59 PM UTCjtnDependencies-=>Depends on patch #4349
    Fri 20 Dec 2013 11:37:33 PM UTCjtnDependencies-=>Depends on patch #4348
    Sun 15 Dec 2013 11:31:59 AM UTCjtnDependencies-=>Depends on patch #4304
    Sun 15 Dec 2013 11:31:19 AM UTCjtnDependencies-=>Depends on bugs #21350
    Sun 10 Nov 2013 01:23:52 AM UTCjtnAttached File-=>Added trunk-nation-sets-wip-ter.mbox, #19351
    Mon 21 Oct 2013 08:08:01 PM UTCjtnDependencies-=>Depends on bugs #21206
    Mon 21 Oct 2013 08:07:39 PM UTCjtnDependencies-=>Depends on bugs #21207
    Sun 20 Oct 2013 02:10:04 AM UTCjtnAttached File-=>Added trunk-nation-sets-wip-bis.mbox, #19212
      Planned Release2.5.0=>2.5.0,2.6.0
    Wed 08 May 2013 10:57:35 PM UTCjtnAttached File-=>Added trunk-nation-sets-wip.patch, #17935
    Sun 21 Apr 2013 01:14:02 PM UTCjtnStatusNeed Info=>In Progress
      Assigned toNone=>jtn
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup