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: Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Cc: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>, Petr Baudis <pasky@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Ruleset Development - improvements
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 5 Dec 2001 10:12:45 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Dec 04, 2001 at 02:25:40PM -0600, Mike Kaufman wrote:
> 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)

Take a look at your data/default/buildings.ruleset. It is all there.

> and then implement just those.

Go ahead.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "> WHY?! Isn't it better to put $(shell cat cscope.files) on the list of
  I only have a yellow belt in makefile kungfu.  These fancy gnu make things
  are relatively new to some of us..."
    -- Mark Frazer to Vassilii Khachaturov in linux-kernel


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