[Pathfinder 2e] How to make Monster AI

In this article, I share my technique of making Monster AI. For the each component of Monster AI description, please refer to the separate article.

For the full content about Monster AI for Pathfinder 2e, please refer to the main page.

Table of Contents

Monster AI – Creation

There are 5 basic steps:

  1. Gather the monster’s trait
  2. Interpret monster’s traits to combat related terms using monster’s stat block
  3. Translate interpretation into Monster AI language
  4. Organize/fill the monster AI sections
  5. Verify that the Monster AI works

Step 1: Gather

For the best play experience, you absolutely want to feel character/personality of each monster types. One of the key to incorporate the monster’s personality/character in Monster AI is to understand Monster’s traits.

The recommended source for gathering monster’s background are the official Bestiary three volume series.

All monster details can also be accessed for free on http://pfrd.info.

Example:

A zombie’s only desire is to consume the living. Unthinking and ever-shambling harbingers of death, zombies stop only when they’re destroyed.

Zombie Shambler (Bestiary pg.340)

Key information here are “unthinking” and “stop only when they’re destroyed.”

Step 2: Interpret

Stat block interpretation

Pathfinder 2E official book, Gamemastery has information to guide us interpreting the stat block, objectively.

Gamemastery Guide

Stat contour analysis: Convert the stat block to relative scale

The higher the creature level is, the higher the base stats becomes. This is common sense, but this could make comparing absolute values of stat block meaningless comparison without a context. Instead, when identifying the particular monster’s strength and perhaps weakness is to compare each stat parameters relative/normalized to other creatures under the same level.

I will refer this is relative comparison of stat parameters as stat contour. In the Monsters Know What They’re doing website/books, this is referred to as ability contour but here we will be looking more than just ability scores.

Fortunately, one of official rule book, gamemastery guide provides this exact conversion in table format. Below is the reorganized version of 3 of such tables that are relevant for identification of the monster’s primary combat style.

Conversion table

These can be found on Archives of Nethys.

Thus, the first step of interpreting stat block is to convert each of the relevant stat block parameters to relative grades using above conversion tables.

Extreme: The creature is world class in this statistic and can challenge almost any character. Most creatures have no extreme statistics or only one extreme statistic, although some creatures might have additional extreme statistics and weaker related statistics elsewhere (a common example being a creature trading accuracy for extreme damage). Examples from the Bestiary include the succubus’s Diplomacy and the lich’s spell DC.

High: Extremely capable but not world class, the creature presents a challenge for most characters. Just about all creatures have at least one high value. Most combat-focused creatures have high AC and either a high attack bonus and high damage, or a merely moderate attack bonus but extreme damage. An ogre warrior’s attack bonus and a kobold scout’s Stealth are high values.

Moderate: A middle-of-the road statistic can cover anything unremarkable about the creature. Use this one often.

Low: The creature is actively bad at this. Choose these intentionally to represent the creature’s weak points. Most creatures should have at least one low statistic; an example is the goblin pyro’s Will save.

Terrible: Some statistics can dip even lower than low, to terrible. This indicates a truly awful statistic that still isn’t game-breakingly bad. A spider’s Intelligence is terrible, as is a dero stalker’s Will save.

Gamemastery Guide Chapter 2: Tools – Building Creatures p57

Let’s take a look at couple specific examples.

Giant rat is a level -1 creature. For -1 level creature, +3 ability score is considered high. AC 15 is also high. HP 8 is Moderate. Int is terrible. Wisdom is low to moderate. For determining monster’s primary combat style category, identifying the primary strength(s) in stat contour are key. Therefore, giant rat can be described as a high dexterity and high AC creature.

For this second example, hobgoblin soldier is a high to extreme armor class creature.

Determine Primary Combat Style

The official gamemastery guide categorized creatures to 7 baseline types using stat contour and additional abilities. I have reorganized these information into a table format as below.

Based on Archives of Nethys

On this second step, we try to find which of the seven primary combat style the given monster falls under based o the stat contour and additional information in the stat block.

For example, a giant rat with high dexterity and higher than typical speed (30ft) falls under “skirmisher.” Hobgoblin soldier with high to extreme AC and attack of opportunity reaction, it falls under “soldier”.

Monster AI’s basic tactics will be determined based on the primary combat style, but the actual detail of each category are not explicitly defined in the gamemastery book. So this is where designer has to make our own choices.

[Work under progress]

Brute tactics

This is the most straight forward tactics group. Given high damage capability and high HP, these creature’s primary tactics are to use all 3 actions for melee strikes whenever possible.

Below is a basic tactics for zombie brute. The full version of its AI is listed in the example section.

Until this reaches to 🎯: 👣 (stride)
While action is available:⚔️ fist

Soldier tactics

Soldiers use more sophisticated combat tactics. In video games, these creatures are called “tanks”. These are primary melee combatant but rather than going for the highest damage per turn of their own, they put themselves next to target so it can absorb damage for the team.

Reaction ability like attack of opportunity and high AC are its defining features.

Below is a basic tactics for hobgoblin soldier as an example. For detail decision making process of creating this AI has separate article.

If shield is available: Raise shield
Until this reaches to 🎯: 👣(stride)
While action is available:⚔️ longsword

Sniper tactics

This is another combat style straight forward to interpret. Usually, these creature will need hit and run tactics to keep the necessary distance if PC is trying close the gap/forcing it to be involved in the melee combat.

Skirmisher tactics

Similar to snipers, these creatures use dexterity for both offense and defense.

Higher Speed than typical

One of the key trait for this group is that these creatures have higher speed. Three action system with higher speed than other creatures allow these creature to perform hit & run tactics even without special encounter action. This is particularly valid because in Pathfinder 2E, creatures do not have capability of reaction attack by default.

This can be elegantly depicted as following with example is from giant rat.

Until this reaches to 🎯: 👣 (stride)
While action is available: ⚔️ jaws
If this has space to retreat: 3️⃣ 📍(retreat) 

This uses a very specific syntax/style I have been developing for Pathfinder 2E system. The key is 3️⃣, which is reserved action. This syntax flags user the particular action step is reserved for specific action i.e. the third step here is reserved for “retreat”. So preceding to this step should only use up 2 actions.

Normally, the while line above will use up all 3 actions. However, if third action retreat is possible, then it will stop after second action. It is only when the third step retreat is not possible, the “while” statement will use up all 3 actions.

Spellcaster/Magical striker

These creatures should have strategy/tactics developed based on the available spells.

Skill Paragon

These creatures have a characteristic, combat style defining skill(s). Primary stat contour is many skills at moderate or high and potentially one or two extreme skills. and typically high reflex or will and low fortitude saving throws.

Traits Interpretation

In this step, if gathered traits/monster background has combat relevance, try to interpret into general scheme how it contributes.

Example:

Traits

Unthinking

Interpretation

Once a zombie identifies a target, it tries to reach to the target in a direct straight linear path even if it were through difficult or hazardous terrains.

Traits

Stop only when they’re destroyed

Interpretation

Zombie won’t flee. Fight until its death.

It is worth noting that in many cases stat block may already incorporates traits/background described in official source.

Hobgoblins are highly organized, and they work efficiently and effectively in groups, whether that group is a small raiding party, a roving war band, or a fully regimented army

Bestiary p206

Hobgolins have “formation” in their stat blocks.

Step 3: Translate

In this step, interpretation of the previously identified monster traits and combat relevant stat block entries need to be translated into Monster AI language.

The difference between interpretation (step 2) and translation (step 3) is the former is of general schema how one would control the Monster if there was a Game Master. The Game Master being another human, general scheme such as saying “hit & run tactics” could be sufficient. GM will then translate this his/her own on the fly during the game play.

This would not be enough for Monster AI. AI needs explicit action by action guidance for (hopefully) every possible practical scenario. So following properly translated AI, beginner or experienced GM will end up controlling the monster the same way (nearly) every time. The variation of AI action comes from PC’s actions.

For example, “hit & run tactics” from the interpretation step should be translated into something like: “Use first two actions for strike and the third action as stride.”

The translation step itself consists of several sub-steps.

  1. Determining adaptation category
  2. Determining target preference
  3. Determining default movement strategy
  4. [Optional] determine position strategy for ranged type attacks
  5. Translate primary combat style (basic tactics)
  6. The rest

In this example, I will be using Giant Rat statblock.

Giant Rat (Bestiary 1 p276)

Step 3-1: Determine Adaptation Category

Using intelligence modifier, determine the adaptation category of the monster. This step incorporates both interpretation and AI translation as the classification of category is based on the Keith Ammann’s work and I have translated each category.

I have felt, here is more appropriate to use absolute number rather than relative value.

CategoryINT ModifierDescription
None≤ -2Fixed
Immunity-1 or 0If this attack is a hit & target has an immunity to the attack, adapt.
Immunity, Resistance1If this attack is a hit & target has an immunity or resistance to the attack, adapt.
Immunity, Resistance, Weakness2-4If this attack is a hit & target has an immunity or resistance to the attack, adapt. After (6-INT Modifier) turns, start using the best total damage option.
Instant>4Use the best total damage option every turn.

Example for the case of Giant rat, which has intelligence modifier value of -4.

Interpretation/Translation

INT Modifier <= -2

AI Mechanics Translation

Adaptation: None

Step 3-2: Determine Target Preference

If Wisdom ability score modifier is > 0, add “Most wounded” in 🎯 section. This step is also incorporating interpretation and translation.

Giant rat has Wisdom modifier for +1.

Interpretation/Translation

WIS Modifier > 0

AI Mechanics Translation

🎯 closest > most wounded

Remember that there is priority order for target selection; therefore, most wounded may easily be made into less relevance.

For example, the above case the rats would choose closest target. Only if there is two or more equidistant PCs, it will use the wounded status for tie breaker. I chose this particular order because the rat has imprecise scent perception of 30ft so I felt thematically, it can only smell so much of blood.

If one thinks the creature is after most wounded whenever possible and truly actively looking for such PC, reversing the order could make difference.

Step 3-3: Determine movement strategy

The default is “safest > shortest.” Unless otherwise, indicated even low intelligence, low wisdom monsters still should have instinct to avoid potential dangers.

Creature like zombie may fall under this exception category.

Trait Interpretation

Once a zombie identifies a target, it tries to reach to the target in a direct straight linear path even if it were through difficult or hazardous terrains.

AI Mechanics Translation

👣 Direct

I’ve interpreted such that Zombies do not care what’s on its path, it simply tries to go straight path to the target. This trait is converted to the special movement “Direct”, which is the keyword I created in anticipation for other creatures to do the similar. Honestly, I may have a bit of bias here as 5E zombie specifically states “it does not recognize obstacles, dangerous terrains etc.”

Step 3-4: Determine position strategy

This applies only to the creatures with ranged or area of effect action options. Each action will may need to define optional position.

Step 3-5: Translate primary combat style

In the interpretation step, primary combat style of the monster has been determined. Using available actions from the stat block, translate it into the AI language.

Interpretation

Primary Combat Style: Skirmisher

AI Mechanics Translation

Until this reaches to 🎯: 👣(stride)
While action is available:
  3️⃣If used ≥ 1 jaws & able to retreat:📍(retreat)
  ⚔️ jaws

This is most likely be placed in the “basic tactics” section. Of note, above AI codes are standard way of writing hit & run. So once you determined the combat style being skirmisher, you could check designing skirmisher article to get those code.

Step 3-6: The rest

This step is to catch the rest, but this may be the most personality defining step in many, more sophisticated monsters.

All the combat related action entries in monster’s stat block must have an entry in Monster AI. Non-default, alternative attack options are often placed in the special tactics section.

Also, any trait that has been discovered/interpreted that has not been yet covered elsewhere need to find its place.

Step 4: Organize/Fill

If you followed the translation step from top to bottom, you should already have most of Monster AI completed.

However, in this step, you want to ensure the actual order of entries, the place of each entry etc. are correct.

During this step, you could add to General strategy note/text section some short-cut keyword. For example, I may noticed one monster uses “flee” option in couple different situations. Each flee action for this monster is, step + stride + stride. So I could define Flee in the note section as such and in the rest of Monster AI section just refer to the sequence of actions as “flee”.

Step 5: Verify

The last step is to verification. This step consists of 3 parts:

  1. Stat block check
  2. Quick imaginary test run
  3. Play test

Stat block check

In Pathfinder 2e Monster AI creation, stat block is the core source. So one must ensure the given monster’s stat block is entirely covered. If any of the combat applicable component is not covered in the Monster AI, the Monster AI is incomplete.

Quick imaginary test run

At this step, I run a few imaginary situations to make sure Monster AI works as intended. Some good sample tests scenario are:

  1. Start of combat i.e. Monster & Player Characters are still distant apart. How do they close a gap each other?
  2. Ranged attack scenario
  3. Melee attack scenario
  4. Each of special tactics cases

More you make Monster AI, the better you will get at this step in particular.

Play Test

Now, the monster is ready to be played in actual encounter. It is not infrequent, I have to go back to adjust monster AI for previously created Monsters due to some specific situation, previously unanticipated or come across better way of coding certain common sequence of actions. Again, monster AI creation is something you get better more you do just like computer programming.

This website uses trademarks and/or copyrights owned by Paizo Inc., used under Paizo’s Community Use Policy (paizo.com/communityuse). We are expressly prohibited from charging you to use or access this content. This website is not published, endorsed, or specifically approved by Paizo. For more information about Paizo Inc. and Paizo products, visit paizo.com.