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: Petr Baudis <pasky@xxxxxxxxxxx>, <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Ruleset Development - improvements
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 Dec 2001 19:45:03 +0000 (GMT)

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.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"God runs electromagnetics by wave theory on Monday, Wednesday, and 
Friday, and the Devil runs them by quantum theory on Tuesday, Thursday, 
and Saturday."
        - Sir William Bragg



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