URL:
<http://gna.org/patch/?6081>
Summary: Multipliers: ruleset control over minimum/maximum
Project: Freeciv
Submitted by: jtn
Submitted on: Sun 10 May 2015 13:46:21 BST
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: jtn
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: 3.0.0
_______________________________________________________
Details:
Split out from patch #4887:
> *Limits controlled by effects*
>
> Initially the min/max for multipliers is static. By
> analogy with the "Max_Rates" effect, it would be good to
> have it able to depend on overall government, wonders, etc,
> so that better governments allow you more (or less...)
> freedom to set policies.
Here's a more detailed design sketch.
This might be too much to try to put in 2.6, although I'm tempted to give it a
go. I'd like it to be in 3.0 at least.
----
*Player policy target specification and UI*
Ruleset multiplier definition will continue to set the absolute
minimum/maximum value the policy can ever take; the new effects control the
range it can take right now.
At all times, players will be able to set a target outside the currently valid
range (unlike taxes); this is necessary to avoid lost opportunities
(otherwise, if a new government enabled a more extreme policy in turn X, but
you couldn't set the slider until turn X, you can't benefit until turn X+1),
and also means the game doesn't have to guess whether to move your policy when
the range changes (again, unlike taxes).
Thus, the UI should make it very clear what the current effective range is and
whether a target is outside it:
* Policy sliders should indicate current min/max
** Use additional tick marks
<https://developer.gnome.org/gtk2/stable/GtkScale.html#gtk-scale-add-mark>
labelled "Min/Max" for Gtk (for Qt will probably have to fall back to text)
** If min==max(==cur), single tick mark with "Fixed" instead
** Else if cur==min or cur==max, will need a single tick mark with "Cur=Min"
or similar
* Slider/number/whatever should go red (or something) when target is outside
current range
* Current value (as displayed in patch #6079) will always honour min/max,
giving additional feedback
* Add events (configurable in the usual way):
** For boundary crossing:
*** "Reached target for Personal Freedom"
*** "Now closer to target for Personal Freedom"
*** "Can no longer meet the target for Personal Freedom"
** "Policy range for Personal Freedom has changed" (maybe, certainly
controlled separately)
----
*When effective range can change*
As I said elsewhere in patch #4887, the general nature of multipliers would
allow players to game the tradeoff if the effects take place at different
times, if they had control of when policies change. Therefore I think we
should restrict when effective min/max can change, to avoid the opportunity
for exploits / micromanagement.
However, with a variable range, relying on the existing latching of patch
#5341 is not ideal; the current value is updated at a single point as soon as
the player ends their phase, so any benefit from any range increases from new
techs etc would be delayed a further turn. It would be better if the policy
value behaved as though it was always a function of range and target, so that
if the range changes it can immediately move closer to the target.
But if the range changes instantly, this can reopen exploits, for instance
changing government mid-turn with Statue of Liberty to move the effective
policy value. So there need to be restrictions on when the effective range can
change.
End phase/turn activities are a bit chaotic, so there's no obvious single
point to latch the effective range. I think it needs be able to move freely
during some periods where no player can influence the order of events, so that
e.g. a new tech can immediately benefit any activity that happens to come
later in the end-turn sequence, as for other tech effects. But it needs to be
frozen while any player is in control (not just the affected player), to
prevent teammates colluding or enemies exploiting a mid-turn policy change.
I think the range should probably be thawed once per turn for the duration of
end-turn activities. I considered thawing it for end-phase activities that are
not at the end of the turn in turn-based games, but this is probably
exploitable by colluding players. (In concurrent phasemode, can we thaw for
end-phase activities that are also end-turn activities?)
This is a bit hacky, but seems like the best compromise given the existing
hackiness of end phase/turn activities, and will I think mostly give
unsurprising behaviour.
It does mean that mid-turn events like conquering a city to gain a wonder will
not immediately benefit the player (but the player won't have to micromanage,
as they can set a target in advance).
(The state required to track this will also be useful to implement the event
messages described above.)
----
*Effects specification*
* Two new effects "MultiplierMinAdjust", "MultiplierMaxAdjust"
* A new universal "Multiplier" which can only be used with these effects
The sum of each effect will be added to the ruleset min/max, rather than being
an absolute value (so that no effects are needed if runtime control is not
desired).
If the sum does not yield a valid value for the policy (between steps or out
of range) it is clamped in a predictable way.
For example, for a policy whose full range is 0-5:
[multiplier_personal_freedom]
name = _("Personal Freedom")
start = 0
stop = 5
step = 1
default = 0
To prevent control of this policy under Despotism (range 0-0, i.e. fixed
value):
[effect_despotism_freedom_max]
type = "MultiplierMaxAdjust"
value = -5
reqs =
{ "type", "name", "range"
"Multiplier", "Personal Freedom", "Local"
"Government", "Despotism", "Player"
}
To give a limited range of 1-3 under Republic:
[effect_republic_freedom_min]
type = "MultiplierMinAdjust"
value = 1
reqs =
{ "type", "name", "range"
"Multiplier", "Personal Freedom", "Local"
"Government", "Republic", "Player"
}
[effect_republic_freedom_max]
type = "MultiplierMaxAdjust"
value = -2
reqs =
{ "type", "name", "range"
"Multiplier", "Personal Freedom", "Local"
"Government", "Republic", "Player"
}
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?6081>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev