User avatar
jastaV
AGEod Guard of Honor
Posts: 1159
Joined: Mon Apr 14, 2008 9:22 am

AI improvement: Mil. Opt.

Tue Nov 04, 2008 11:45 am

AFAIK, EvalReplacement command was only used to check actual number of replacements before removing some of them in "Remove replacements to get VP" Mil. Options.
Guess, EvalReplacement command could be used as a good check up condition to smart up AI options activation.

An Example.
Consider Military Options aimed to buy new Reg. Infantry Replacements, ($famLine).
In MilitaryOption1_AIActivate the only working condition is Probability. That does not prevent AI from buying new Reg. Infantry Replacements even when a mess of them is already available.
I suggest to add there, (into MilitaryOption1_AIActivate) an "EvalReplacement; "side"|$famLine|=<|##" condition, with ## beeing a quite low number.

Supposing:
EvalReplacement; FRA|$famLine|=<|4
AI will enable the option only when AI side as an actual shortage of Reg. inf. repl., (4 or less) using own resources for other Mil. Opt. activation when already having a mess of such replacements.


To Pocus:
Just say Yes, and I'll go after the issues in default NCP scenarios I'm working on for fixing! :neener:
Ney: The army will not move!
Napoleon: The army will obey me!
Ney: The army will obey to its Generals’ orders!

[SIZE="1"]Fontainebleau, April 1814[/size]

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Tue Nov 04, 2008 2:21 pm

I thought I did that, this was my intent anyway, so it is a good idea if you can 'smarten' the AI decision process with such tests.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 4 guests