Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: Tech cost patch v4
Home

[Freeciv-Dev] Re: Tech cost patch v4

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Juha Litola <slave@xxxxxxxxxxxx>
Cc: Petr Baudis <pasky@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Tech cost patch v4
From: Paul Zastoupil <paulz@xxxxxxxxxxxx>
Date: Wed, 28 Nov 2001 13:33:32 -0800

On Wed, Nov 28, 2001 at 06:11:39PM +0200, Juha Litola wrote:
> On Wed, Nov 28, 2001 at 04:13:48PM +0100, Petr Baudis wrote:
> 
> > > > Shouldn't you also modify ai/advmilitary.c ? >:)
> > > I hope not, I haven't got faintest idea what happens there. Someone
> > > more familiar with ai should probably check if modifications are
> > > needed.
> > Use grep. Your GREAT friend! It tells me:
> > freeciv/ai/advmilitary.c:        techcost = techdist * (techdist + 
> > pplayer->research.researchpoints) *
> > freeciv/ai/advmilitary.c:      l = k * (k + 
> > pplayer->research.researchpoints) * game.researchcost;
> > So run your favourite editor, hunt these lines and modify them :-).
> My version didn't have line with techcost, only two lines with l = k...
> Fixed them to use new goal_tech_cost function which I added to 
> common/tech.c. aitech.c seems to use research_time so it should work.
> Hopefully ai will now be ok.
> 
> I also added gtk-client to show costs for goals.
> 

I played most of a game with it.  I like it.

You need to patch data/default/game.ruleset to make this work, otherwise
the server chokes on startup (i.e. reading rulesets).

I didn't do extensive AI tests with it.  Maybe later.

-- 
Paul Zastoupil


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