This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Kind-of, sort-of improved facility_worth function


It seems that in 3rd-age, the new code strongly favors production
facilities (granary, palace, forum, harbor).  It rarely seems to build
defensive facilities (city walls, stockade).  Growth facilities don't
exist in this game, so that part of the code is never activated.  I'd
imagine that the same happens in advances, but I have not yet tested it.

I did find that the code that handles repair facilities is defective,
but it was easy enough to fix.

I've tested civ2.g, and noticed several odd things.  Are frigates really
supposed to have 210 hitpoints (a battleship only has 40)?  And aren't
all of the facilities supposed to do something?  The only things I can
find concerning facilities are that the size of cities is limited if it
doesn't have an aqueduct and sewer system, city walls improve defense,
barracks repair ground units, port facilities repair ships, and airports
repair aircraft.  In that case, what's the point of the 33 other
facilities (and the 28 "wonders")?


By the way, one unrelated thing I noticed while testing with 3rd-age.g
is that the AI will often tell a unit to attack, even if it has an
attack strength of zero!


On Wed, 2002-07-31 at 14:54, Hans Ronne wrote:
> One thing I noticed about production is that you only consider
> um_occ_mult_production. There is also um_occ_add_production. Moreover, we
> have uu_occ_add_maxcells and uu_occ_mult_maxcells which allows the unit to
> use more cells than its size number. These are perhaps even more valuable.

I don't think that any games use occupant-add-production,
occupant-add-maxcells, or occupant-multiply-maxcells (although an early
version of "Space Civilization" used occupant-multiply-maxcells).  I'll
still try to support them.

> 
> When it comes to the build code, I certainly agree that we can improve how
> it handles facilities. However, first it must be simplified and unified. As
> I mentioned in an earlier mail, plan_improve isn't used for building by
> advanced units; they use auto_pick_new_build_task instead. And for
> non-advanced units, PLAN_IMPROVING is completely meaningless with respect
> to building - it is only used for material collection and tech development
> in the "time" game. So enabling (or improving) the facility building code
> that I wrote once in plan_improve won't make a difference as long as there
> is no code in mplayer_decide_plan or elsewhere that analyzes the tactical
> situation, decides that it is time for this particular unit to build
> facilites rather than defenders or whatever, and sets PLAN_IMPROVING
> accordingly. Something similar to what auto_pick_new_plan does in the
> advanced unit build code. If I remember correctly, this is why the facility
> building code in plan_improve was commented out. It serves no purpose
> without support elsewhere in the ai.

It looks like the overall problem is far more complicated than I
realized.  And I do think that the "Improving" plan should work the same
for advanced and non-advanced units.  It would be useful in fantasy.g,
for example, so that the AI could understand the value of amulets of
power, rings of protection/regeneration, etc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]