Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Yitzi on November 14, 2013, 06:53:30 PM

Title: AI treatment of support costs (possible bug)
Post by: Yitzi on November 14, 2013, 06:53:30 PM
While I usually don't deal with AI, I found a piece that may be bugged, and I'm going to be adjusting it anyway to allow for variable (unit-cost-dependent) support costs, so I need to know how I should deal with it.

The way a lot of the AI works is that certain options are assigned a "value", which I presume is then combined (either as positive or negative) with other values of other features to find the value for various possible approaches, which the AI would then optimize (possibly with a random factor).

For support costs (to determine the importance of SUPPORT rating), the value (which is actually a cost; lower is better) is determined for each supported unit: It is equal to the unit's support cost, plus (unit support cost-raw base production/2) if the unit is taking up more than half the base's production, plus another (unit support cost-raw base production/2) if the unit is taking up all the base's production (or more).

This seems like it may be a mistake, as it means that a 10-production base with 10 units each costing 1 support will not face the "penalty" cost, i.e. the AI will not make sure to use SUPPORT rating to spending most or all its production on support unless it's spent on only 1 or 2 units.

So I suspect what it might be supposed to be is a value equal to {total support cost, plus (TOTAL support cost-raw base production/2) if that's positive, plus (TOTAL support cost-raw base production/2) if the base's production is all being spent on units (even more than one unit.)

Because this is an AI rule and AI does not make the shortlist, I will not be adding it as an option; either it's a bug and I'm fixing it, or it's not a bug and I'll leave it how it is.

Thoughts?
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 15.

[Show Queries]