Tutorial: Editing the AI 101

Discuss and post your mods and scenarios here for others to download.

Moderator: Vic

Adam Rinkleff
Posts: 375
Joined: Mon Jul 23, 2007 10:06 pm

RE: Tutorial: Editing the AI 101

Post by Adam Rinkleff »

The AI tends to build infantry and tanks, and sometimes it shuffles around a stack of infantry guns. It would be nice if the AI were modified in order to build better units which had a variety of different unit types. The AI should really be given an example of an infantry unit, armor unit, etc, which it should then try to build copies of.
User avatar
CSO_Talorgan
Posts: 783
Joined: Sat Mar 10, 2007 5:53 pm

RE: Tutorial: Editing the AI 101

Post by CSO_Talorgan »

Is this available as a .pdf somewhere?
User avatar
Jeffrey H.
Posts: 3154
Joined: Fri Apr 13, 2007 6:39 pm
Location: San Diego, Ca.

RE: Tutorial: Editing the AI 101

Post by Jeffrey H. »

ORIGINAL: ernieschwitz

About AI-role scores:

I have a sort of problem i want to fix. I have alot of different Armor units, and i want the AI to build less of one type it is currently building by the boatload. I have lowered the AI scores by a factor of 10, on the unit it keeps building. Will that have any effect at all? Or is it that the AI-role scores are defined like ratios?

Some input would be great :)

Just a thought here Ernie, maybe the AI role score appears in a denominator ?
History began July 4th, 1776. Anything before that was a mistake.

Ron Swanson
User avatar
Khanti
Posts: 442
Joined: Tue Aug 28, 2007 3:02 pm
Location: Poland

RE: Editing the AI 101

Post by Khanti »

ORIGINAL: Vic

AIROLE

For each SFType you can and must tell the AI in what role the AI should use it.
It is possible to give a SFType values in different AIRoles.

You can set any value you want... The AI always will use the best to determain what to produce or transfer, but also will take into account cost and enemy army composition.

A few roles dont work yet because the AI does not know how to use them. These are: Paradrop, AA, Transporter and Bomber strategic.

(...)

The higher you raise the AIRole of a certain SFType the more you'll see it being used.

A few questions here about setting AI roles:

Example 1.
I set Light Tanks AI role 10) Armor = 50 (all other roles = 0)
I set Medium Tank AI role 10) Armor = 100 (all other roles = 0)

1) Does it mean for AI to use Medium Tanks twice as much as Light Tanks in armor formations?
2) Is AI searching ALL units by value "role 10) Armor = xx" and compare which unit to use?
3) Or is AI searching only within unit and compare how to use unit? (like in Example 2)

Example 2.

I set Destroyer to AI Role 18) Naval Superiority = 50
and
I set the same Destroyer to AI Role 19) Raider = 50.

4) Will AI use Destroyers half as superiority fleets, half as raiders?
5) Should I also set AI role 21) Sea = 100 in that case?

Example 3.

I set Anti-tank Gun AI role 7) InfantrySupport=40
and
I set Machinegun AI role 7) InfantrySupport=40

6) How AI will understand this if it can produce both units?
═══
There is no such thing as a historically accurate strategy game. Every game stops being historically accurate from the very first move player do. First unit that moves ahistorically, first battle with non-historical results, mean we ride in unknown.
User avatar
Khanti
Posts: 442
Joined: Tue Aug 28, 2007 3:02 pm
Location: Poland

RE: Editing the AI 101

Post by Khanti »

Can AI attack sleeping regime?
What conditions should be set to make AI attack?
═══
There is no such thing as a historically accurate strategy game. Every game stops being historically accurate from the very first move player do. First unit that moves ahistorically, first battle with non-historical results, mean we ride in unknown.
Post Reply

Return to “Mods and Scenarios”