Jump to content


Photo

[BfME II] AI tutorial, part 2


  • Please log in to reply
2 replies to this topic

#1 Chachalon

Chachalon
  • Members
  • 28 posts
  • Projects:Burning Sky for C&C Tiberian Wars (just some storywriting & concept drawings...)

Posted 01 May 2006 - 01:36 PM

This next part is about changing the upgrade priorities of the AI. You'll need to manipulate upgrade.ini for this.
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.


#2 gansnudel

gansnudel
  • Members
  • 25 posts

Posted 24 July 2006 - 07:20 AM

Actually the AI will build fortress upgrade even without those heuristic parameters when it has tons of cash and very late game.

I found that the best way to make the AI build them intelligently is the AI_UPGRADEHEURISTIC_FACTORY_UNITUNLOCK line.That makes the AI build fortress improvements when it has the cash to spare and doesn´t need units, quite similar to how a human player would behave.

#3 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 24 July 2006 - 07:45 AM

within the file SkrimishAI there ist the order

offensivebuildings = XXXTower

Does anyone knows where offensivebuildings is defined, and/or the build priority is set ?

if you change XXXTower to XXXFortress he actually builds fortresses, but only after quite a while. This is what I want to change. I want the AI to produce more offensive buildings




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users