Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Generalised improvements testing
Home

[Freeciv-Dev] Re: Generalised improvements testing

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Daniel Sjölie <deepone@xxxxxxxxxx>
Cc: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Generalised improvements testing
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Dec 2001 14:05:42 +0000 (GMT)

On Tue, 11 Dec 2001, Daniel Sjölie wrote:

> On 2001-12-11 13:01:57, Ben Webb wrote:
> > So, since any unhappiness from aggressive units (e.g. under Democracy) is 
> > calculated _after_ the effects of Temples etc., the only two ways of 
> > cancelling this unhappiness are luxuries (to make happy citizens) or 
> > happy/content-making Wonders. Normal buildings can't do this. Sound 
> > reasonable?
> 
> Well, this is the way I've understood the game to work
> as far as I can remember...

        OK, well I guess this shows how little of my time I've wasted 
playing the game, then. ;) In this case, the helptexts are confusing. 
Rather than saying "the Temple makes one unhappy citizen content" they 
should add "oh yes, unless that citizen is unhappy because of aggressive 
units, in which case there's nothing the Temple can do about it" but 
perhaps that's unnecessarily verbose. I do notice that the "Happiness" 
help section does indeed explain this. So I'll address it in code and 
rulesets (the code is easy, the rulesets more fiddly).

> The versions I've played lately are Civ3 and CivCTP and I'm sure both
> list "virtual improvements"...

        Well, the current rulesets use the equiv_dupl or equiv_repl field 
to link buildings to Wonders that replace them, so it's relatively 
straightforward to deduce which "virtual" improvement corresponds to a 
Wonder.

> Ok... What I think _should_ be done is having a
> "give_improvement_effect" that will add some kind of virtual
> improvements to cities that should be affected...

        Tricky to do in code, as this effect would have to be expanded out 
into the actual improvement effects in each city. It would be possible to 
implement a "virtual effect" macro (as a time-saving measure for the user, 
and to ensure the effects of the original building and its replacing 
Wonder are kept in sync) which just takes the effects of the original 
building and changes the "range" parameter to match the equiv_range of the 
Wonder. Same thing for your "extend_improvement_effect" thing, just with 
cond_bldg set.

> I think the Oracle is a different kind of problem that should be solved
> with something like "extend_improvement_effect" taking an improvement
> and an effect as argument and adding the effect to all those
> improvements (but not giving the improvement)...

        I'm not sure what this would add to the current implementation, 
where the effect is defined but made conditional on the improvement (look 
at the definition of the Oracle's effects in buildings.ruleset).

> I don't know if this is pratical though... :)

        The practical solution from a coder's perspective (IMHO) is to 
extend the current make-happy/make-content effects so that it can be 
specified in the ruleset whether they apply before or after unhappiness 
generated by military units. This has the advantage that all possibilities 
can be covered, while time-saving virtual effects can be added later.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"Go away... I'm all right."
        - Last words of H.G. Wells



[Prev in Thread] Current Thread [Next in Thread]