Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2000:
[Freeciv-Dev] Pacts patch (alpha quality)
Home

[Freeciv-Dev] Pacts patch (alpha quality)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Pacts patch (alpha quality)
From: Paul Thomas <Paul.Thomas@xxxxxxxxxxxxx>
Date: Tue, 21 Mar 2000 18:50:26 +1100

This is a patch to add various states of "alliance" to FreeCiv.  It's
against the current CVS (late pm 21 March here in .au).

It's somewhat tested, but for a change this big of course I'd like
lots more help playtesting, both for code errors and game balance /
compatability issues.  All feedback is most welcome.

Some notes on the implementation:

 * there are six states of relation, corresponding to (my memory of)
   CivII rules:

   "Neutral" is the default state.  The normal ZOC and other rules
   apply in this state.

   "Alliance" can be entered from the diplomacy dialog.  If two
   players have an alliance, they can share territory; ZOC is ignored
   between the two players; they can occupy each others cities and be
   transported on each others boats; and they don't interfere with
   each others production.

   "Peace" can be entered from the diplomacy dialog or by breaking an
   alliance.  ZOC is ignored between the players, and you can't
   attack.

   "War" is entered when a peace treaty is broken.  Normal ZOC rules
   and other rules apply.

   "Ceasefire" can be entered from the diplomacy dialog.  It's like
   peace, but only lasts a set number of turns before expiring.

   "No capability" is a special state for unpatched clients and
   servers.

 * I've introduced a new capability, "pacts"; the player information
   packet is modified, and there are a bunch of utility functions in
   common/player.c for dealing with pacts.

 * a lot of places in the code that had checks like this:
     if (player_number_one != player_number_two)
   or
     if (player_number_one == player_number_two)
   have been rewritten to use the new players_at_war() and
   players_allied() functions, as appropriate.

 * players have a reputation, which is known to all.  Your reputation
   is damaged by breaking pacts and diplomatic incidents.

 * governments with a senate (republic, democracy) may overrule your
   decision to break a pact, and may even dissolve and plunge you into
   revolution.  This follows (my memory of) CivII rules.

There are some known issues and unresolved bugs.  Help with these is
very much appreciated:

 * this patch is big and affects both the server and client.

 * only the Xaw client is modified.  If someone who uses Gtk could
   provide a matching set of patches for the Gtk client, that would be
   great.

 * the "Cancel Pact" button is disabled in too many cases; it should
   be enabled whenever a ceasefire, peace, or alliance is in effect.
   At the moment it's enabled whenever the above holds and an embassy
   has been established.

 * the button in the diplomacy reads '_("Pacts")' instead of 'Pacts'
   (or the localised equivalent).  This one has me stumped!

 * when an alliance is broken, resolve_unit_stack needs to be called
   to resolve stacks of previously-allied units that can no longer
   share a square.  This isn't yet done.

 * the AI knows nothing about pacts or reputation.

Falk may recognise some of his handiwork from a year or so ago, when
we joined forces and I incorporated his patches.  He deserves a lot of
the credit.  Thanks again, Falk!

-- paul

Attachment: pacts.patch.gz
Description: application/gunzip


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Pacts patch (alpha quality), Paul Thomas <=