Making the AI use custom SuperWeapons

 

Custom SuperWeapons are used by the AI. To add more possibilities, a new tag for custom SuperWeapons has been introduced:

AITargetingType=[SW Number] ;determines where the AI is going to fire the SuperWeapon

The [SW Number] is a number from 1 to 13 and determines what the AI targets when about to fire the SW. The number represents an entry in the [SuperWeaponTypes] list. The game reads the number and uses the SW specific target.

An example:

AITargetingType=10

SW Number 10 is the Genetic Mutator, so the game will fire this SW on the largest group of enemy infantry, just like the Genetic Mutator is fired.
The following table covers all the current possibilities:

AITargetingType Target
0 No action at all (default for most of SW).
1 Enemy Base (AIIonCannonXXXValue) [Nuclear Missile]
5 Enemy Base (place with least amount of enemy units/base defenses) [Paradrops]
8 Largest group of enemy units (infantry and/or vehicles) [Psychic Dominator]
10 Largest group of enemy infantry [Genetic Mutator]

Some new SWs have hardcoded default values.
for example: NewParaDrop and DropPod  - 5 is default value.
However you can change targeting value for any kind of SW.
SW numbers that are not listed either have no functionality at all or are the same as a number already listed.

Rock Patch Help CE Main page Last change: 20.03.07