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]

Up next: facility_worth?


Now that the exploring_worth code is in a reasonable (although not
perfect) state of operation, I thought I'd try to tackle the
facility_worth function, which looks like it is in even worse shape than
exploring_worth was.

I realized that the facility_worth is seriously deficient in its basic
design. Some of the things that it needs to consider when looking at a
facility are:

* Does it improve offensive/defensive abilities?
* Does it produce a material or improve production of a material?
* Does the transport need it to grow beyond a certain size?
* Can it repair the transport or mobile units that may share the
transport?

Some considerations that might be useful in other games might be:

* Does it give the transport additional ACP's?
* Does it increase the transport's speed?
* Can it repair the transport?
* Does it increase the number of cells that the transport can use?

These considerations do not always overlap nicely, especially when
weighing defense vs. production, and so I think that the facility_worth
function needs to be split into at lease four functions for four
different types of facilities:

defensive_facility_worth (e.g. city walls)
productive_facility_worth (e.g. factory or granary)
growth_facility_worth (e.g. aqueduct)
repair_facility_worth (e.g. barracks or Ring of Regeneration)

Perhaps there could also be functions like offensive_facility_worth
(e.g. Ring of Power) and accelerator_facility_worth (e.g. leader in
napoleon.g) so that the same code base would allow the AI to understand
items that its units could carry.


These changes would make it possible to re-write the "Improving" plan so
that it could make an intelligent choice when trying to improve a unit. 
Would this be worth a try?


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