The AI knows at least 3 levels of "importance" for upgrades. To define them, the upgrade needs
SkirmishAIHeuristic =
this line. Used values for this are "AI_UPGRADEHEURISTIC_IMPORTANT" (for example for fire arrows), "AI_UPGRADEHEURISTIC_FORTRESS" (all fortress upgrades) and "AI_UPGRADEHEURISTIC_FACTORY_UNITUNLOCK" (for unit-producing structures).
Others won't give a crash, and it "feels" like "AI_UPGRADEHEURISTIC_LOW" and "AI_UPGRADEHEURISTIC_MEDIUM" also work, but I'm not sure about that.
As the standard AI never (?) uses fortress upgrades, you might want to change the rather important ones (bats for example) to "AI_UPGRADEHEURISTIC_IMPORTANT".
The importance of buying upgrades on single batallions is defined in skirmishaidata.ini (see part 1 of this tutorial), so those upgrades don't need such a line, but if you want the AI to use forged blades and heavy armor earlier and not just fire arrows, you might just put the technologies for these (those that you research at the blacksmith/treasure trove/eregion forge etc) to "AI_UPGRADEHEURISTIC_IMPORTANT", too.
Note: Do not put all fortress upgrades to "AI_UPGRADEHEURISTIC_IMPORTANT"... in that case the AI will rather upgrade its fortress than building any units.
Edited by Chachalon, 01 May 2006 - 08:13 PM.