All AI in the game is controlled by Tactics Tables essentially identical to the one available to the player. The main differences being that theirs have more options and are not limited by character or skill level. This post will contain some examples of the more interesting NPC tactics tables (mostly mage varients) the game uses as well as a partial listing of what commands the various numbers equate to in the Tables’ .gda files (for modders who wish to alter them).
First the examples:
——————————————————–
Archer (Dwarf)
——————————————————–
01. Self: Being attacked by melee == Jump to Tactic 6
02. Target: Movement Impaired == Move away
03. Self: Surrounded by at least 2 enemies == Move away
04. Self: Target between short and medium range == Move away
05. Self: Target at short range == Move away
06. Target: Target using magic == Deactivate Suppressing Fire
07. Self: Mana/Stamina < 25% == Deactivate Rapid Shot
08: Target: At least 3 enemies are alive == Scattershot
09. Target: Target using melee == Pinning Shot
10. Enemy: Target using melee == Pinning Shot
11. Target: Target using melee or ranged == Activate Suppressing Fire
12. Self: Mana/Stamina >= 75% == Activate Rapid Shot
13. Target: Has high armor rating == Shattering Shot
14. Target: Has medium armor rating == Shattering Shot
15. Target: Any == Critical Shot
——————————————————–
Mage (Balanced)
——————————————————–
01. Self: Being attacked by melee == Jump to Tactic 5
02. Target: Movement Impaired == Move away
03. Self: Surrounded by at least 2 enemies == Move away
04. Self: Target at short range == Move away
05. Self: Mana/Stamina < 10% == Deactivate Spell Might
06. Self: Mana/Stamina >= 50% == Activate Spell Might
07. Self: HP < 75% == Heal
08. Self: Being attacked by melee or ranged == Activate Stone Armor
09. Self: Being attacked by magic == Spellshield
10. Self: Being attacked by ranged == Heroic Aura
11. Ally: HP < 75% == Heal
12. Self: Mana/Stamina >= 90% == Jump to Tactic 17
13. Target: Any == Petrify
14. Target: Any == Crushing Prison
15. Enemy: 3+ Clustered == Earthquake
16. Enemy: 2+ Clustered == Earthquake
17. Target: Has any buff at any range == Dispel Magic
18. Enemy: Has any buff at any range == Dispel Magic
19. Ally: Being attacked by melee or ranged == Heroic Defense
20. Ally: Being attacked by ranged == Heroic Aura
21. Target: Any == Stonefist
22. Target: Any == Arcane Bolt
——————————————————–
Mage (Blood, Balanced)
——————————————————–
01. Self: Any == Activate Arcane Shield
02. Surrounded by at least 2 enemies == Mind Blast
03. Surrounded by at least 2 enemies == Chain Lightning
04. Self: HP >= 25 == Jump to Tactic 7
05. Ally: Highest HP == Blood Sacrifice
06. Self: Any == Deactivate Blood Magic
07. Self: Being attacked by a melee attack == Jump to Tactic 11
08. Target: Movement Impaired == Move away
09. Self: Surrounded by at least 2 enemies == Move away
10. Self: Target at short range == Move away
11. Self: Mana/Stamina >= 10 == Jump to Tactic 13
12. Self: HP >= 50 == Activate Blood Magic
13. Self: Being attacked by melee or ranged == Misdirection Hex
14. Self: Mana/Stamina >= 75 == Jump to Tactic 18
15. Enemy: 3+ Clustered == Blood Wound
16. Enemy: 3+ Clustered == Blizzard
17. Self: At least 3 enemies are alive == Chain Lightning
18. Target: Any == Blood Wound
19. Enemy: Target using melee or ranged == Misdirection Hex
20. Target: Target at short range == Cone of Cold
21. Target: Any == Vulnerability Hex
22. Target: Any == Winter’s Grasp
23. Target: Any == Arcane Bolt
——————————————————–
Mage (Blood, Nuker)
——————————————————–
01. Self: HP >= 50 == Jump to Tactic 4
02. Ally: Highest HP == Blood Sacrifice
03. Self: Any == Deactivate Blood Magic
04. Self: Being attacked by a melee attack == Jump to Tactic 10
05. Target: Movement Impaired == Move away
06. Self: Surrounded by at least 2 enemies == Move away
07. Self: Target at short range == Move away
08. Self: Mana/Stamina >= 50 == Jump to Tactic 10
09. Self: HP >= 50 == Activate Blood Magic
10. Self: Mana/Stamina >= 75 == Jump to Tactic 14
11. Enemy: 3+ Clustered == Blood Wound
12. Enemy: 3+ Clustered == Tempest
13. Enemy: 3+ Clustered == Fireball
14. Target: Target between medium and long range == Blood Wound
15. Self: At least 3 enemies are alive == Chain Lightning
16. Target: Target between medium and long range == Fireball
17. Target: Target at short range == Shock
18. Target: Target using melee or ranged == Weakness
19. Target: Any == Lightning
20. Target: Any == Arcane Bolt
——————————————————–
Mage (Healer)
——————————————————–
01. Self: Being attacked by melee == Jump to Tactic 5
02. Target: Movement Impaired == Move away
03. Self: Surrounded by at least 2 enemies == Move away
04. Self: Target at short range == Move away
05. Self: Mana/Stamina < 10% == Deactivate Cleansing Aura
06. Self: Mana/Stamina >= 50% == Cleansing Aura
07. Self: Surrounded by at least 2 enemies == Mind Blast
08. Self: At least two allies have curable effects == Mass Rejuvination
09. Self: At least two allies have HP < 50% == Group Heal
10. Self: At least two allies have HP < 50% == Mass Rejuvination
11. Ally: Any == Rejuvination
12. Self: Any == Rejuvination
13. Self: HP < 75% == Heal
14. Ally: HP < 75% == Heal
15. Self: HP < 90% == Regeneration
16. Ally: HP < 90% == Regeneration
17. Ally: HP < 75% == Lifeward
18. Self: Being attacked by magic == Antimagic Ward
19. Ally: Being attacked by magic == Antimagic Ward
20. Self: Any == Glyph of Warding
21. Ally: HP < 50% == Glyph of Warding
22. Target: Any == Arcane Bolt
——————————————————–
Mage (Nuker)
——————————————————–
01. Self: Being attacked by melee == Jump to Tactic 5
02. Target: Movement Impaired == Move away
03. Self: Surrounded by at least 2 enemies == Move away
04. Self: Target at short range == Move away
05. Self: Surrounded by at least 2 enemies == Mind Blast
06. Self: Mana/Stamina >= 75% == Jump to Tactic 11
07. Enemy: 3+ Clustered == Tempest
08. Self: Surrounded by at least 2 enemies == Chain Lightning
09. Enemy: 3+ Clustered == Fireball
10. Target: Any == Petrify
11. Target: Target between medium and long range == Grease
12. Self: At least 3 enemies are alive == Chain Lightning
13. Target: Target between medium and long range == Fireball
14. Target: Target at short range == Shock
15. Target: Any == Lightning
16. Target: Any == Arcane Bolt
——————————————————–
Warrior (Reaver)
——————————————————–
01. Self: Surrounded by no enemies == Deactivate Pain Aura
02. Self: HP >= 90% == Deactivate Blood Frenzy
03. Self: HP < 50% == Activate Blood Frenzy
04. Self: Being attacked by a melee attack == Activate Pain Aura
05. Self: Surrounded by at least 2 enemies == Activate Pain Aura
06. Self: Surrounded by at least 2 enemies == Two-Handed Sweep
07. Self: At least 1 enemy is dead == Devour
08. Target: Has high armor rating == Sunder Armor
09. Target: Has medium armor rating == Sunder Armor
10. Self: Any == Perfect Strike
11. Target: Any == Pommel Strike
——————————————————–
Warrior (Templar)
——————————————————–
01. Target: Target using melee or ranged == Jump to Tactic 3
02. Target: Mana/Stamina >= 90% == Holy Smite
03. Target: HP < 75% == Assault
04. Target: Target at short range == Cleanse Aura
05. Self: Surrounded by at least 2 enemies == Cleanse Aura
06. Self: Mana/Stamina >= 75% == Jump to Tactic 9
07. Self: Any == Perfect Strike
08. Self: Mana/Stamina < 25% == Jump to Tactic 10
09. Self: Any == Activate Precise Striking
10. Target: Any == Holy Smite
11. Target: Any == Shield Bash
12. Target: Any == Assault
Now, for the partial .gda translation:
——————————————————–
Target Type
——————————————————–
1: Self
2: Ally
3: Enemy
7: Most Hated
——————————————————–
Condition
——————————————————–
1 : HP < 100%
2 : HP < 90%
3 : HP < 75%
4 : HP < 50%
5 : HP < 25%
6 : HP < 10%
7 : HP >= 90%
8 : HP >= 75%
9 : HP >= 50%
10 : HP >= 25%
11 : HP >= 10%
12 : Mana/Stamina < 100%
13 : Mana/Stamina < 90%
14 : Mana/Stamina < 75%
15 : Mana/Stamina < 50%
16 : Mana/Stamina < 25%
17 : Mana/Stamina < 10%
18 : Mana/Stamina >= 90%
19 : Mana/Stamina >= 75%
20 : Mana/Stamina >= 50%
21 : Mana/Stamina >= 25%
22 : Mana/Stamina >= 10%
24 : Clustered with same group, 2+
25 : Clustered with same group, 3+
26 : Clustered with same group, 4+
31 : Nearest visible
50 : Highest HP
56 : Has any buff at any range
64 : Polymorphed
66 : Status: Knockdown
67 : Stun
69 : Knockdown
72 : Slowed
74 : Any
79 : Berserk
81 : Target has low armor rating
82 : Target has medium armor rating
83 : Target has high armor rating
101: Being attacked by melee
102: Being attacked by ranged
103: Being attacked by magic
104: Being attacked by melee or ranged
105: Being attacked by melee or magic
106: Being attacked by ranged or magic
107: Target using melee attack
108: Target using ranged attack
109: Target using magic attack
110: Target using melee or ranged
111: Target using melee or magic
112: Target using ranged or magic
113: Most enemies using melee
114: Most enemies using ranged
115: Most enemies using magic
116: Most enemies using melee or ranged
117: Most enemies using melee or magic
118: Most enemies using ranged or magic
119: All enemies using melee
120: All enemies using ranged
121: All enemies using magic
122: All enemies using melee or ranged
123: All enemies using melee or magic
124: All enemies using ranged or magic
125: At least 1 enemies are alive
126: At least 3 enemies are alive
127: At least 5 enemies are alive
128: At least 1 enemies are dead
129: At least 3 enemies are dead
130: At least 5 enemies are dead
131: At least 2 allies are alive
132: At least 3 allies are alive
133: At least 4 allies are alive
134: Stealthed
139: Immobilized
140: Movement impaired
141: Target at short range
142: Target between short and medium range
143: Target between medium and long range
144: Enemy at right flank
145: Enemy at left flank
146: Enemy at back right flank
147: Enemy at back left flank
148: Surrounded by at least 2 enemies
149: Surrounded by at least 3 enemies
150: Surrounded by at least 4 enemies
153: Surrounded by no enemies
157: Self HP < 100%
158: Self HP < 90%
159: Self HP < 75%
160: Self HP < 50%
161: Self HP < 25%
162: Self HP < 10%
163: Self HP >= 90%
164: Self HP >= 75%
165: Self HP >= 50%
166: Self HP >= 25%
167: Self HP >= 10%
168: Self Mana/Stamina < 100%
169: Self Mana/Stamina < 90%
170: Self Mana/Stamina < 75%
171: Self Mana/Stamina < 50%
172: Self Mana/Stamina < 25%
173: Self Mana/Stamina < 10%
174: Self Mana/Stamina >= 90%
175: Self Mana/Stamina >= 75%
176: Self Mana/Stamina >= 50%
177: Self Mana/Stamina >= 25%
178: Self Mana/Stamina >= 10%
179: Target at front
180: Enemy at Large right flank
181: Enemy at Large left flank
182: Enemy at Large back right flank
183: Enemy at Large back left flank
188: Enemy at Dragon right flank
189: Enemy at Dragon left flank
190: Enemy at Dragon back right flank
191: Enemy at Dragon back left flank
192: Enemy at Dragon close front
193: Enemy at Dragon back
194: Enemy at Dragon far front
195: At least 2 enemies at Dragon back
196: At least 3 enemies at Dragon back
197: At least 4 enemies at Dragon back
198: At least 2 enemies at Dragon close front
199: At least 3 enemies at Dragon close front
200: At least 2 enemies at Dragon far front
201: At least 3 enemies at Dragon far front
202: At least 4 enemies at Dragon far front
203: At least 2 allies have HP < 50%
204: At least 3 allies have HP < 50%
205: At least 4 allies have HP < 50%
206: At least 2 allies have curable effects
207: At least 3 allies have curable effects
208: At least 4 allies have curable effects
——————————————————–
Command
——————————————————–
2 : Attack
3 : Wait
4 : Use Ability
5 : Activate Mode
6 : Deactivate Mode
9 : Move
10: Jump to Tactic
14: Fly/Turn
——————————————————–
Wait Subcommands
——————————————————–
1: Wait with cooldown
——————————————————–
Move Subcommands
——————————————————–
6: Move away from enemy
7: Move away a short distance
——————————————————–
Fly/Turn Subcommands
——————————————————–
1: Turn toward Hated Enemy
7: Fly to waypoint nearest Hated Enemy