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: Andrew Sutton <ansutton@xxxxxxx>
Cc: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>, Josh Cogliati <jjc@xxxxxxxxxxxxxxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Ruleset Development - improvements
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Tue, 4 Dec 2001 16:53:25 +0100

Dear diary, on Tue, Dec 04, 2001 at 04:24:55PM CET, I got a letter,
where Andrew Sutton <ansutton@xxxxxxx> told me, that...
> On Tuesday 04 December 2001 10:20 am, Petr Baudis wrote:
> > That's very nice to say, but much harder to implement. Basically, it's
> > pretty hard to tell it universally what granary does, what leonardo
> > workshop does and what magellan's does. Not mentioning city walls or even
> > palace. You need either a heap of capabilities similiar to the ones units
> > have, or some scripting language embedded into the ruleset, and you should
> > be able to modify desire of particular building that way.
> 
> actually, that's not entirely true. each improvement (not wonder mind you) 
> works toward some benefit inside a city. they can be distinctly categorized 
> by what the iprove.
>       - city growth
>       - happiness
>       - production
>       - science
>       - trade
       - i.e. luxury&science&money
>       - others?
       - space
       - military (quite a hack currently)
       - defense
       - pollution
       - misc - corthouse && super highways
> 
> each building can contain information as to which of these categories it 
> belongs to. the ai, when figuring out what to build can consider what it 
> deems is important to the city.
harbour will be improtant differently for city on small island and for city 
near one-square
lake. we need probably that what ben wrote in his previous mail rather. and
hardcode/script effects of granary or coinage or corthouse.

well. relevant code is in ai_eval_buildings() (/me looks there, deletes three
superfluous lines and commits ;-). for your own security i recommend you to
read cleaned version also. looking forward for your patches ;).

> 
> an alternative, and possibly better management idea is the concept of 
> governers. a governer controls the default production within a city for both 
> ai and human players (at least in civ3 it does). there's a little set of 
> parameters that you can set that helps guide the governer.
> 
> actually, this implementation has another benefit. it breaks the ai for city 
> management out into a discrete unit. so it doesn't have to be incorporated 
> into the main ai code. it also provides a very useful feature to users who 
> can't stand to micromanage city production (like me :)
did you have a look at Raimar's CMA? this's already implemented :-).

-- 

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC, FreeCiv hacking
.
  "A common mistake that people make, when trying to design
   something completely foolproof is to underestimate the
   ingenuity of complete fools."
     -- Douglas Adams in Mostly Harmless
.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/


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