AI behaviors

During combat, characters in *Pillars of Eternity* perform actions based on pre-programmed **AI behaviors**; instruction sets which define when a character should use certain abilities and under what conditions.

All enemies have preprogrammed instructions, while party members AI behaviors may be selected from a list of a few different presets based on their class, using the "Class Behavior" dropdown in the AI behaviors window. In addition, you may choose to allow the AI to use per rest abilities, and change the auto-attack behavior.

A common factor of all AI behaviors is that each instruction is picked using weighted random selection using its priority (higher priorities are picked more often). The instruction is evaluated based on the current state of combat, whether it is on cooldown, whether the character has the requisite resources to cast the ability, and whether all its instruction casts have been used (instructions with 0 max casts ignore this limit). If all the requirements are met the instruction is run, otherwise another instruction is selected.

## List of class AI behaviors

### Barbarian

#### Aggressive

Starts combat with Frenzy or Barbaric Yell. Will use Savage Defiance below 50% Endurance. Barbaric Shout will be used if Per Rest is enabled.

#### Berserk

Starts combat with Wild Sprint to head toward the enemy with the lowest Deflection. Uses Frenzy and Barbaric Yell at will. Will use Heart of Fury if Per Rest is enabled.

### Chanter

#### Aggressive

Chanter emphasizes offense-oriented invocations like Hel-Hyraf Crashed Upon the Shield, The Thunder Rolled Like Waves on Black Seas, Thrice She Was Wronged, Thrice Justly Avenged, and White Worms Writhed in the Bellies of the Dead. If these are not available, summons are prioritized over support invocations.

#### Summoner

Chanter prioritizes summons like But Reny Daret's Ghost, He Would not Rest, and If their Bones Still Slept Under that Hill, None Can Say. If those are unavailable, support invocations are emphasized over aggressive invocations.

#### Support

Chanter emphasizes support-oriented invocations like Not Felled by the Axe, Nor Broken by the Storm and summons, like But Reny Daret's Ghost, He Would not Rest, and If their Bones Still Slept Under that Hill, None Can Say. Prioritizes team support invocations over summons.

### Cipher

#### Damage

The cipher begins with a physical attack and then focuses on using Powers that emphasize damage, like Mind Wave and Soul Shock. As a secondary emphasis, the cipher uses crowd control abilities like Eyestrike, Tenuous Grasp, and Whisper of Treason.

#### Defensive

The cipher opens with a physical attack and then focuses on using Powers that emphasize personal or support defense, like Psychovampiric Shield, Pain Link, Body Attunement, Pain Block, Wild Leech, and Tactical Meld. If these aren't available, the cipher will fall back on a mix of damage and crowd control spells.

#### Crowd Control

The cipher opens with a physical attack and then focuses on using Powers that emphasize crowd control, like Eyestrike, Tenuous Grasp, and Whisper of Treason. As a secondary emphasis, the cipher uses damaging abilities like Mind Wave and Soul Shock.

### Druid

#### Damage

If Per Rest is enabled, the druid will cast Dancing Bolts, Nature's Mark, Talon's Reach, Insect Swarm, Infestation of Maggots, Returning Storm, and Stag's Horn as applicable. If Per Rest is not enabled, the druid will behave normally unless are Engaged in melee and reduced to less than 50% Endurance, in which case they will Spiritshift.

#### Support

If Per Rest is enabled, the druid will cast Support-oriented spells like Nature's Vigor, Woodskin, Nature's Balm, Beetle Shell, Purge of Toxins and Moonwell. If Per Rest is not enabled, the druid will behave normally unless are Engaged in melee and reduced to less than 50% Endurance, in which case they will Spiritshift.

#### Crowd Control

If Per Rest is enabled, the druid will cast Charm Beast, Nature's Mark, Hold Beasts, Conjure Blight spells, Spreading Plague, and Nature's Terror when applicable. If Per Rest is not enabled, the druid will behave normally unless are Engaged in melee and reduced to less than 50% Endurance, in which case they will Spiritshift.

#### Spiritshift

This behavior emphasizes Spiritshifting as soon as the druid is able to Engage an enemy in melee. If Per Rest is enabled, the druid will use Damage and Crowd Control spells, emphasizing lower level options and only ones that are foe-only. Additionally, the druid may cast healing spells and party support spells.

### Fighter

#### Aggressive

The fighter uses Knock Down and Disciplined Barrage at the first opportunities. Clear Out will also automatically be used whenever the fighter has three enemies in range if Per Rest is enabled.

#### Hold Ground

The fighter uses Vigorous Defense when engaged by more than two opponents. Uses Unbending when below 50% Endurance if Per Rest is enabled. Defender is enabled by default and, if disabled, will be re-enabled at the start of the next combat.

### Monk

#### Aggressive

The monk uses Swift Strikes or Torment's Reach at the first opportunity. Uses Clarity of Agony whenever subjected to a hostile status effect with a duration over 5 seconds. Uses Stunning Blows whenever possible.

### Disruptor

The monk behaves as Aggressive but prioritizes spellcasters and characters with low Deflection and will break Engagement to do so.

### Paladin

#### Aggressive

The paladin uses Flames of Devotion and Sworn Enemy at the first opportunities. Zealous Focus is enabled by default and, if disabled, will be re-enabled at the start of the next combat.

#### Support

The paladin uses Lay on Hands whenever an ally is below 50% Endurance. Uses Liberating Exhortation whenever an ally is subjected to a hostile status effect with a duration over 5 seconds. Uses Reinforcing Exhortation on an ally that is being attacked by more than two enemies. Uses Reviving Exhortation on the first ally to be knocked unconscious in combat. Uses Hastening Exhortation on allies (only if Per Rest is enabled). Zealous Endurance is enabled by default and, if disabled, will be re-enabled at the start of the next encounter.

### Priest

#### Aggressive

The priest uses Interdiction as soon as combat begins. If Per Rest is enabled, the priest emphasizes Damage and Crowd Control spells like Barbs of Condemnation, Divine Mark, Instill Doubt, Despondent Blows, and Pillar of Faith.

#### Support

The priest uses Holy Radiance whenever someone in the party is below 33% Endurance or if two or more people are below 50% Endurance. If Per Rest is enabled, the priest emphasizes healing and support spells like Armor of Faith, Blessing, Holy Meditation, Restore Minor Endurance, Withdraw, etc. The "Prayer Against" spells are used reactively when more than 1 party member is suffering from an applicable effect.

#### Healing

The priest uses Holy Radiance whenever someone in the party is below 33% Endurance or if two or more people are below 50% Endurance. If Per Rest is enabled, the priest will use healing and revival spells.

### Rogue

#### Aggressive

The rogue uses Crippling Strike, Blinding Strike, Withering Strike, Fearsome Strike (only if Per Rest is enabled) at the first opportunity. Uses Finishing Blow against targets below 25% Endurance.

#### Cautious

The rogue prefers to attack targets that are already Engaged by an ally. Uses Crippling Strike, Blinding Strike, Withering Strike, Fearsome Strike (only if Per Rest is enabled) at the first opportunity. Uses Finishing Blow against targets below 25% Endurance. Uses Escape to move to the most distant ally when Endurance drops below 33%.

### Ranger

#### Aggressive

The ranger uses Wounding Shot and Marked Prey against targets Engaged by the companion.

#### Cautious

The ranger holds position and prioritizes enemies that are Engaged by his or her animal companion. Uses Wounding Shot and Marked Prey against targets Engaged by the companion.

### Wizard

#### Damage

Wizards use Arcane Assault as soon as combat opens. If Per Rest is enabled, they use direct damage or foe-only AoE spells like Minoletta's Minor Missiles, Jolting Touch, Kalakoth's Sunless Grasp, Necrotic Lance, Ghost Blades, etc.

#### Crowd Control

If Per Rest is enabled, the wizard focuses on foe-only spells that cause Afflictions like Arkemyr's Dazzling Lights, Bewildering Spectacle, Combusting Wounds, Curse of Blackened Sight, Arduous Delay of Motion, Expose Vulnerabilities, etc.

#### Defensive

Wizards use Arcane Veil and/or Grimoire Slam as soon as they are Engaged in melee. If Per Rest is enabled, the wizard uses spells like Wizard's Double, Spirit Shield, Mirrored Images, and Llengrath's Displaced Image, but otherwise remains at range and uses standard attacks.

#### Spellsword

If Per Rest is enabled, the wizard uses spells like Wizard's Double, Spirit Shield, Concelhaut's Parasitic Staff, Llengrath's Displaced Image, Flame Shield, and Citzal's Spirit Lance to enhance themselves before charging headlong into battle.

## Notes

* The data above was pulled from the PartyMemberInstructionSetList object, found in "PillarsOfEternity\_Data/assetbundles/prefabs/objectbundle/classbasedinstructionsets" in the game files.