Follow-up Comment #4, bug #16385 (project freeciv):

Here's where I've got to:

First, after some work, I've more or less changed my mind about having a
single "owner" field + borders flag in the tile; see below for reasoning. I'm
now thinking about separate per-tile "tile owner" and "base owner" fields
(both pointing to players).

Add new base flags "ownable" and "capturable". Make the existing "border_sq",
"vision_main_sq", and "vision_invis_sq" properties require "ownable" to be
set.

An "ownable" base is one that (usually) has an owner.
* The initial owner is that of the unit who created it.
* Once created, by default, an "ownable" base doesn't change owner. (Such a
base can end up un-owned if a player is killed/removed, but this is rare. It
could also happen with scenario/editor.)
* An "ownable" base doesn't necessarily act as a border source (only if
"border_sq" is set).

A "capturable" base is an "ownable" base that changes hands when occupied by
a unit at war with the current owner.
* Can't have a mixture of capturable and ownable-but-not-capturable bases on
the same tile, so that's an automatic "conflicts" when loading rulesets.

[Edited: I hadn't seen bug #14236. While we're in there, it probably wouldn't
be hard to add another option that controls whether a base remains owned when
it contains no units. Would need to think a bit about details e.g. allied
stacks.]

A fortress would thus be "ownable", "capturable", and have "border_sq" set --
this should result in no change from current behaviour.

A buoy would be "ownable" but not "capturable", and have the vision fields
set, by default. Consequences:
* It doesn't claim any borders (not even the tile it's on). This fixes most
of the problems originally raised.
* It can't be captured. The only way to stop the owner seeing with it is to
pillage it (which is cheap and easy, if the owner isn't defending it).
* In particular, my buoy can be inside someone else's borders and still
provide vision to me.

The last point is more or less why I changed my mind about having a single
owner; when documenting "ownable" it seemed unnecessarily dirty to say "this
can't change owners (unless you build a city nearby)". I don't think having
two owners changes the design much, in fact. (Obviously border claiming bases
must have the two owner fields the same...) It also makes the necessary
changes to the editor much cleaner, I think.

Something I've had in the back of my mind while designing this is a sort of
capture-the-flag scenario -- this would use ownable capturable "flag" bases
which have no particular effect (no border source, etc).

One thing I haven't quite worked out is whether capture-by-unit and
capture-by-borders should both be controlled by the "capturable" flag, or
whether they need separate options. (I'm assuming the former, for now.)

As far as client UI is concerned, I was thinking of an "ownable" base
displaying a flag like a city does (when citybar is disabled), but having
this be overridden by shields if there's a unit on the tile. This has the
advantage of not requiring new graphics :)

I've got a mess of code changes but nothing that compiles yet, and I've been
getting a bit bogged down in the border code. I'll probably wait for bug
#16613 and patch #1864 to land before taking this up again.

Assuming everyone's happy, I'd like to get it in 2.3.0, which is why I'm
working on it now (since it changes packet formats etc), but it probably
shouldn't be a blocker.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16385>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to