Summary: "Nation sets": initial cut-down implementation for
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Fri Jul 27 00:27:39 2012
                Category: None
                Priority: 7 - High
                  Status: None
                 Privacy: Public
             Assigned to: jtn
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.4.0-beta1,2.5.0



The design in patch #3448 requires network protocol changes and a chunk of
work. Here's a cut-down proposal to sneak into 2.4.x.

Not tried actually coding this up yet, so details may change.


Include the "nation set" definition syntax for nations.ruleset [nset_XXX] from
patch #3448.
However, unlike 2.5, it won't be mandatory to have any nation sets.
(This is an optional ruleset format extension. If we're going to do this, it
must thus go in for 2.4.0-beta1.)

Nation sets will behave the same as groups in 2.4.x -- they'll be displayed
alongside nation groups, there's no new UI, the client is unchanged.
(For expediency the order of groups vs sets will be fixed: sets then groups.
This is not as flexible as it could be, but allows us to make the "Core" group
the default group.)

The only difference is that, at game start time, we'll go through the
explicitly-picked player nations and calculate the union of nation sets they
belong to; belonging to no nation set counts as belonging to a notional "all"
Then we'll take all nations not in that union set out of consideration, before
assigning random nations, and remember that criterion for in-game nation
assignment too (e.g. civil war).
(For expediency, this might just add internal "conflicts_with" relationships,
which doesn't give an absolute guarantee that the nation will never be used,
but is probably good enough.)

If there are no explicitly-picked nations, we'll use the first defined nation
set for restrictions, or no restrictions if no sets defined.

This should allow us to usefully define a "core" set in the supplied rulesets,
while not impacting any other rulesets that don't use our nation set.

* Players see the "Core" set by default in the "pick nation" UI; if none of
them choose another group tab, only nations from that set will be used in the
** (At least in the SDL client.)
* Games where no players pick nations will again use nations only from the
"Core" set.
* Unfortunately there's no way to tell the server that you want a completely
random nation selection from the "extended" set. So no more games where the
world spontaneously consists entirely of Dryads, Hackers, Martians, Ozites,
and Vampires -- someone will have to pick a nation. (The 2.5 design won't
suffer from this.)


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to