Page 1 of 1

New Commands for the AI

Posted: Fri Jul 11, 2008 4:23 pm
by Pocus
The first (if you discount AI.SetPoolRatio, an old timer of AACW) to be done!! They have a really big potential to help the AI get a strategic understanding. I know some of you can regret that the AI won't be full generic as before, but the task is so immense, and our resource so tight, that we have to be pragmatic :)


What's new:

SetAIPoolRatios renamed to AI.SetPoolRatio. Old syntax supported.
AI.SetPoolRatio. = FamilyUID1|Coeff1|FamilyUID2|Coeff2 ..

Description: In AACW, to give the ideal proportion of units recruited.


<new!> AI.SetAggro = TheaterUID1|Coeff1|TheaterUID2|Coeff2 ..

Description: Allows to modify the perceived superiority (or inferiority) of the AI in a specific AI theater. AI theaters are for now the Grand Areas. Example in AACW Mid Atlantic is a theater. A weather zone or Kentucky is not a theater.

For example: AI.SetAggro = $Mid_Atlantic|150 will multiply by 1.5 the overall combat ratio the AI calculate.

General comment: when above 1, the ratio will give the AI more aggressiveness and it will be more on attack. On the reverse if under 1, the AI will favor defense. The more above 1, the more aggressive the AI will be, and the same for a ratio near 0. AI Ratio are always bound between 5 and 02.

Game Example: This command allows you to favor a defensive or offensive stance in a particular theater. For shorter scenarios, setting a coefficient higher than 100 will help the AI attacks. For example in WIA\Pequot War, a coeff of 200 will ensure some aggressive (and bold!) move. You can alter the ratio by events, depending of the conditions of your liking.

<new!> AI.ChgLocalInterest = RegionUID1|Coeff1|RegionUID2|Coeff2 ..

This command alters how the AI perceive the interest of a region. A coefficient under 100 will reduce the interest, above 100, will increase the interest. Don't hesitate to put extreme coefficients (10 or 20, or on the contrary 200 to 500%), as you are forcing the AI against its natural trend, and she need to be convinced to act unnaturally to her!

Game Example: Set the coefficient of Newport in WIA to 10% for the USA, until Boston is under control (change coefficients by events as you do for many others things). The reasoning is that Newport is a deathtrap for the USA AI, as she has not the maritime superiority and can be trapped there, attracted by the objective, without the possibility to get out.

General Note: The value of a region depends of a dozen of factors, among them the structures types and level, supply level, number of land links, Military control, part of a patch of controlled regions (or isolated one), loyalty, Strategic City or Objective City tags and more... The most important parameters are: is the region a strategic city/objective. A region of almost no interest can have a 2, while a coastal region with a mid-sized town and harbor can get a 30 and the same but as an objective can sore to 200!

That is all, enjoy (I hope), and report! The commands will be available in the next patch of each AGE game.

Posted: Fri Jul 11, 2008 4:56 pm
by lodilefty
Huzzah! :coeurs: :king: :king:

Posted: Fri Jul 11, 2008 5:04 pm
by lodilefty
What executable do I need to use these? [WiA for now :) ]

Posted: Fri Jul 11, 2008 5:15 pm
by Stwa
So I am assuming we could use these commands to set the AI interest for all non-objective and non-strategic cities to ZERO,NONE,NADA .

Oui?

Posted: Fri Jul 11, 2008 5:18 pm
by Pocus
Must be 1% minimum (a contingency in the storage procedure), but this is rounded to nearest, so 49 or less would become 0 and 149 would be 1, not much anyway.

Posted: Fri Jul 11, 2008 5:24 pm
by Stwa
Pocus wrote:Must be 1% minimum (a contingency in the storage procedure), but this is rounded to nearest, so 49 or less would become 0 and 149 would be 1, not much anyway.


OK, this is beeg time progress. So where are the links to the WIA DB. How unstable can it be, you have already released the game?

Posted: Fri Jul 11, 2008 10:29 pm
by GShock
Amazing!!!

[color="Red"]EDIT: Though it's OK to be enthusiastic, there's no need to use expletives that others find offensive to express that; Rafiki[/color]

Posted: Sat Jul 12, 2008 9:38 am
by Athena
Spank Time! ;)

Posted: Sun Jul 13, 2008 6:25 pm
by lodilefty
AI.SetAggro and AI.ChgLocalInterest are working very nicely! In Pequot War, the British don't simply squat at home any more. :king:

...of course, I also had to use a few other little tricks, too! ;) :sourcil:

The balancing of these to 'tune' the AI is going to take a LOT of playtest. I'm about 75% happy with the GBR side in Pequot War, and it's a simple 'pocket sized' 8 turn scenario.... :nuts:

betas, prepare! :niark:

Posted: Sun Jul 13, 2008 7:23 pm
by Stwa
lodilefty wrote:AI.SetAggro and AI.ChgLocalInterest are working very nicely! In Pequot War, the British don't simply squat at home any more. :king:

...of course, I also had to use a few other little tricks, too! ;) :sourcil:

The balancing of these to 'tune' the AI is going to take a LOT of playtest. I'm about 75% happy with the GBR side in Pequot War, and it's a simple 'pocket sized' 8 turn scenario.... :nuts:

betas, prepare! :niark:


I thought you were supposed to be working on the weather areas.

Posted: Sun Jul 13, 2008 9:07 pm
by lodilefty
Stwa wrote:I thought you were supposed to be working on the weather areas.


Competed & submitted.
On to understanding of the AI controls. Then Pontiac's War.... :)

Posted: Sun Jul 13, 2008 9:07 pm
by Clovis
Will solve the AI long range raid in AACW. Now...When this patch will come??? :grr:

Posted: Sun Jul 13, 2008 9:23 pm
by lodilefty
Clovis wrote:Will solve the AI long range raid in AACW. Now...When this patch will come??? :grr:


WiA is in the works. Gray might know about AACW....

Posted: Sun Jul 13, 2008 9:23 pm
by Clovis
lodilefty wrote:WiA is in the works. Gray might know about AACW....


Oh, I've time.... :coeurs:

Posted: Mon Jul 14, 2008 9:20 am
by Pocus
I can surely do a quick beta patch for AACW, before leaving on vacation. I'll see with Michael if he also has some stuff ready.

Posted: Sat Jul 26, 2008 4:50 am
by bigus
Wow ....
Great job folks!...... :gardavou:

This engine is a modders dream come true.

Bigus

Posted: Tue Jul 29, 2008 4:23 pm
by Paul Roberts
Wow! I've just discovered this thread and this information. Pocus never disappoints!

My question:

1) Will it be possible to set different priorities for each side (say, USA and CSA) in different theaters, so that (for example) the USA AI is more aggressive in Kentucky than the CSA AI is?

2) Will it be possible to change these factors via event after a scenario has begun?

Hopefully the scripting possibilities are endless... :coeurs:

Posted: Tue Jul 29, 2008 6:50 pm
by lodilefty
Paul Roberts wrote:Wow! I've just discovered this thread and this information. Pocus never disappoints!

My question:

1) Will it be possible to set different priorities for each side (say, USA and CSA) in different theaters, so that (for example) the USA AI is more aggressive in Kentucky than the CSA AI is?

2) Will it be possible to change these factors via event after a scenario has begun?

Hopefully the scripting possibilities are endless... :coeurs:


1) Yes
2) Yes

Most likely ;)

Posted: Tue Jul 29, 2008 7:34 pm
by tagwyn
How can I implement these wonderful changes without messing with the source code(?} being that I am not a programmer nor do I wish to be? Can smeone put them in a form I can download? :p apy:

Posted: Tue Jul 29, 2008 7:40 pm
by lodilefty
tagwyn wrote:How can I implement these wonderful changes without messing with the source code(?} being that I am not a programmer nor do I wish to be? Can smeone put them in a form I can download? :p apy:


They are all script codes, used in events.

Described in the Modding forum...

Posted: Fri Aug 22, 2008 12:26 am
by bigus
Were these commands included into the B1 or B2 for AACW?

Bigus

Posted: Fri Aug 22, 2008 1:13 am
by Gray_Lensman
deleted

Posted: Fri Aug 22, 2008 4:35 pm
by Pocus
B2 published.