Classic Battlefield Modding Wikia
Advertisement

If you want to make bots better pilots the place to make changes is not the Aerial Height maps, but the mods's AI\Aibehaviors.ai file.

Looking at the BF2 AIbehaviors, what I noticed was that the Plane behavior and the Heli types use standardweights, instead of custom weights.  There is a lot of room for tweaking here.  There already is a custom Plane behavior, which does not appear to be used - probably because with 16 player sized AI maps released by DICE, there was not much room for bots flying planes anyway.

so if you change these lines in the mod's \AI\Aibehaviors.ai file:

aisettings.setVehicleMods Plane StandardWeights

aisettings.setVehicleMods Helicopter StandardWeights

to use custom weights as show (These lines are separate sections for planes and Helis) 

aisettings.setVehicleMods Plane StandardWeights

aisettings.setVehicleMods Helicopter HeliMoveWeights


This is what the Planes and Helis currently use:

aiSettings.createBehaviourModifiers StandardWeights

aiSettings.setBehaviourModifier Avoid       1.0

aiSettings.setBehaviourModifier MoveTo      1.0

aiSettings.setBehaviourModifier Idle        0.1

aiSettings.setBehaviourModifier Fire        7.5

aiSettings.setBehaviourModifier Special     3.0

aiSettings.setBehaviourModifier TakeCover   2.0

aiSettings.setBehaviourModifier Change      1.9

aiSettings.setBehaviourModifier Revive      3.0

aiSettings.setBehaviourModifier c4          1.0

aiSettings.setBehaviourModifier Special2    1.0

aiSettings.setBehaviourModifier Special3    1.0

aiSettings.setBehaviourModifier Random      1.0

aiSettings.setBehaviourModifier Triggerable 1.0

Notice that Avoid is set to a weight of only 1, compared to fire which is 7.5. These are weights, used to adjust the chance of a bot choosing a specific action.

Now change this code from this:


aiSettings.createBehaviourModifiers PlaneWeights

aiSettings.setBehaviourModifier Avoid       0.0

aiSettings.setBehaviourModifier MoveTo      1.0

aiSettings.setBehaviourModifier Idle        0.1

aiSettings.setBehaviourModifier Fire        1.5

aiSettings.setBehaviourModifier Special     1.0

aiSettings.setBehaviourModifier TakeCover   0.0

aiSettings.setBehaviourModifier Change      0.0

aiSettings.setBehaviourModifier Revive      1.0

aiSettings.setBehaviourModifier c4          1.0

aiSettings.setBehaviourModifier Special2    1.0

aiSettings.setBehaviourModifier Special3    1.0

aiSettings.setBehaviourModifier Random      1.0

aiSettings.setBehaviourModifier Triggerable 1.0

To:

aiSettings.createBehaviourModifiers PlaneWeights

aiSettings.setBehaviourModifier Avoid       7.5

aiSettings.setBehaviourModifier MoveTo      1.0

aiSettings.setBehaviourModifier Idle        0.01

aiSettings.setBehaviourModifier Fire        7.5

aiSettings.setBehaviourModifier Special     3.0

aiSettings.setBehaviourModifier TakeCover   2.0

aiSettings.setBehaviourModifier Change      1.9

aiSettings.setBehaviourModifier Revive      3.0

aiSettings.setBehaviourModifier c4          1.0

aiSettings.setBehaviourModifier Special2    1.0

aiSettings.setBehaviourModifier Special3    1.0

aiSettings.setBehaviourModifier Random      1.0

aiSettings.setBehaviourModifier Triggerable 1.0


We are making Avoid and Fire much higher priorities.   Idle is reduced to 1.01.  I don't know which of the others controls bots using anti-heat seeking missle counter-measures, so I left the rest the same.   It would probably be a matter of setting each line to 0 one line at a time and testing to track it down. 

 Now for the Helicopters. Change this:  

aiSettings.createBehaviourModifiers HeliMoveWeights

aiSettings.setBehaviourModifier Avoid       1.0

aiSettings.setBehaviourModifier MoveTo      1.0

aiSettings.setBehaviourModifier Idle        0.01

aiSettings.setBehaviourModifier Fire        1.0

aiSettings.setBehaviourModifier Special     1.0

aiSettings.setBehaviourModifier TakeCover   1.0

aiSettings.setBehaviourModifier Change      1.0

aiSettings.setBehaviourModifier c4          1.0

aiSettings.setBehaviourModifier Special2    1.0

aiSettings.setBehaviourModifier Special3    1.0

aiSettings.setBehaviourModifier Random      1.0

aiSettings.setBehaviourModifier Triggerable 1.0

to

aiSettings.createBehaviourModifiers HeliMoveWeights

aiSettings.setBehaviourModifier Avoid       7.5

aiSettings.setBehaviourModifier MoveTo      1.0

aiSettings.setBehaviourModifier Idle        0.01

aiSettings.setBehaviourModifier Fire        7.5

aiSettings.setBehaviourModifier Special     3.0

aiSettings.setBehaviourModifier TakeCover   2.0

aiSettings.setBehaviourModifier Change      1.9

aiSettings.setBehaviourModifier Revive      3.0

aiSettings.setBehaviourModifier c4          1.0

aiSettings.setBehaviourModifier Special2    1.0

aiSettings.setBehaviourModifier Special3    1.0

aiSettings.setBehaviourModifier Random      1.0

aiSettings.setBehaviourModifier Triggerable 1.0

Now the planes and Helicopters are set up with the same settings, but you can play around and tweak the custom weights to get the bots to fly like you want them.  

Advertisement