Summary: "Nation sets": allow set of nations that will ever
appear in-game to be chosen
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Fri Jul 27 00:24:50 2012
                Category: None
                Priority: 5 - Normal
                  Status: Need Info
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.5.0



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"
** 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,
** ...while still complaining about references that can't be satisfied from
the full set, as this is valuable to nation maintainers for spotting typos
* 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.


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



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

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:

default_government = "Despotism"
default_groups = "Extended"

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


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to