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

[Freeciv-Dev] Re: Ruleset Development - improvements

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>, Petr Baudis <pasky@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Ruleset Development - improvements
From: Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Date: Tue, 4 Dec 2001 14:25:40 -0600

On Tue, Dec 04, 2001 at 08:55:07PM +0100, Raimar Falke wrote:
> On Tue, Dec 04, 2001 at 07:45:03PM +0000, Ben Webb wrote:
> > On Tue, 4 Dec 2001, Raimar Falke wrote:
> > 
> > > On Tue, Dec 04, 2001 at 06:01:50PM +0000, Ben Webb wrote:
> > > >         As far as I can tell by looking at Freeciv-CVS and the original 
> > > > impr-gen patch, this submission would appear to be part of my impr-gen 
> > > > patch, with some of the function names changed and a few comments 
> > > > added, 
> > > > so I disagree. Besides, Sebastian has been very quiet recently anyway.
> > > 
> > > I don't know anything about improvement requirements. Mhhh
> > 
> >     Well, I haven't seen any code other than my own that uses 
> > improvement requirements, so I guess only I and the guy that wrote the 
> > original ruleset code knows anything about improvement requirements... and 
> > therein lies my problem. ;)
> > 
> > > >         The problem with this approach is that a building can have a 
> > > > global effect (e.g. a wonder) so to be completely general you have to 
> > > > consider all cities in the game (yours and other players') when you 
> > > > recalculate the city.
> > > This was about local city buildings. Wonders are special IMHO.
> > 
> >     OK, also consider building a Barracks. You have to consider all 
> > other cities to make sure they don't have a Wonder in them that makes a 
> > Barracks redundant (i.e. Sun Tzu's). Obviously (I hope) you'd actually 
> > store the "make Barracks redundant" effect in a list somewhere to 
> > eliminate this loop over all cities, and this is what my impr-gen patch 
> > does. You can't just have a simple lookup as is currently done, because 
> > multiple Wonders (or even normal buildings) may make a Barracks redundant. 
> > The situation is complicated by the cond_eff field in buildings.ruleset, 
> > as adding a local building may activate the effects of a Wonder (or other 
> > building) which in turn can cause effects in other cities... and so on.

Obviously, someone is going to have to come up with a list of possible
effects (impr. affecting certains geographical areas,  affecting units,
affected by governments, whatever) and then implement just those. There's
no way to get a perfectly generic solution for improvements. I can dream
up arbitrarily complex examples of improvement effects, so it's got to
stop somewhere.

I would say to start, we ought to have fields available to allow the
current paycivs (and AC) work as required. At that point we might think
about a couple more effects that allow some flexibility or
extensibility but then _stop_ there. In our ruleset documentation, we
say "this is the level of generality that we support". Hmm, but maybe
this is already done?

-mike

> 
> Ok I rephrase my "Wonders are special" to "improvements (buildings and
> wonders) which have an effect larger than the city scope are
> special". Copernicus is a wonder with a city scope only effect.
> 
>       Raimar
> 
> -- 
>  email: rf13@xxxxxxxxxxxxxxxxx
>   What's nice about GUI is that you see what you manipulate.
>   What's bad about GUI is that you can only manipulate what you see.


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