Complete.Org: Mailing Lists: Archives: freeciv-dev: March 1999:
Re: [Freeciv-Dev] Something that really bugs me
Home

Re: [Freeciv-Dev] Something that really bugs me

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Something that really bugs me
From: Per Mathisen <permath@xxxxxxxxxxx>
Date: Thu, 18 Mar 1999 11:18:35 +0100 (MET)

On Thu, 18 Mar 1999, Kris Bubendorfer wrote:
> I have no idea where or how the code that automatically selects the next 
> thing 
> to build works, but I am totally sick of it selecting capitalisation.
> 
> This is a particular problem, as capitalisation is never finishes, and thus 
> cities stay producing it forever.
> 
> Normally I am quite happy for it to choose it's own `next project' except 
> that 
> I am always wasting lots of time going through the city list changing from 
> capitalisation to ANYTHING else.
> 
> What is worse, is that it is still selected even if you've got lots of money.
> 
> Basically, this is a fish - to see if anybody agrees with me, and to find out 
> if somebody is knowledgeable about that part of the code to make a little fix 
> :)

I believe a simple solution would be something like the below. It has
not been tested. Furthermore, has anyone checked if the AI ever switches
production of capitalization to something else? I did not see anything in
the AI code that suggests that it does.

--- ../../freeciv/ai/advdomestic.c      Fri Mar 12 10:49:20 1999
+++ advdomestic.c       Thu Mar 18 12:00:54 1999
@@ -254,7 +254,7 @@
       values[B_BARRACKS] = bar;
   }
 
-  if (could_build_improvement(pcity, B_CAPITAL))
+  if (could_build_improvement(pcity, B_CAPITAL) && pplayer->ai.control)
     values[B_CAPITAL] = TRADE_WEIGHTING * 999 / MORT; /* trust me */
 /* rationale: If cost is N and benefit is N gold per MORT turns, want is
 TRADE_WEIGHTING * 100 / MORT.  This is comparable, thus the same weight -- 
Syela */

Yours,
Per


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