PFRPG2 - NPC Ability Automation

Basics

If enabled in the campaign options, an automation field will appear in the three different types of NPC ability records (Interaction Abilities, Automatic and Reactive Abilities, and Offensive or Proactive Abilities for NPCS, Reactions, Routine and Other Actions for Hazards).

Enabling view/editing of the automation data

The options are:

  • Off - the automation field is never shown.  Note - this does not disable automation.

  • On - the automation field is shown all the time.  It will not be shown if the NPC record is locked and there is no data in the field.

  • Edit Only - the automation field will only be shown when the NPC record is unlocked.  It will be hidden when the NPC record is locked, even if there is data in the field.

Editing the automation field

The automation field is a string field that contains text which is used by the ruleset to create double-click fields in the ability description that can carry out certain actions (see Automation Actions below).

The data takes the form of:

  • One automation action per line.

  • A description text string that determines where the double click action is placed within the ability description text.  This text also determines where automation guideline square brackets [ .. ] are inserted in the descriptive text to indicate where the action can be initiated by double-clicking.  This text is enclosed in double-quotes: “ .. “

The action code to execute when the description text is double-clicked.  This is separated from the description text by a pipe | symbol.  Include the pipe symbol even if the description text match isn’t being used.

NOTE: The automation data is read when the Automation field loses focus - tab out or click outside of the field.  When adding new automation, or editing existing automation, make sure you exit the automation field so that the automation parsing code will run and assign the data to the text in the ability description

For example:
"blinded"|Effect: Blinded [SELF]
This creates a double-click effect action on the first occurrence of blinded in the ability description:

When this is double clicked, the “Blinded” effect will be applied to the creature itself:

Multiple automation actions in the same ability

An ability can have multiple actions - simply put each individual action on a separate line in the automation field.

For example:

Gotchas

  • The descriptive text will only match on the first occurrence of the string.  If there are multiple occurrences of the text with different functionality then try to use a unique text string to match each individually.

Action codes

The PFRPG2 ruleset currently supports the following action types:

  1. Attack:

  2. Damage:

  3. Heal:

  4. Save:

  5. Effect:

  6. Trait

Future versions will add:

  1. Action vs. DC - where an action is rolled against a DC - for example, the Demoralize Intimidation skill action rolls an Intimidation check against the targets will DC.

Each automation action is detailed below.  Fields highlighted in blue are optional.

Attack

The attack action takes the same format as the normal attack text within an NPC record.
Melee attack is assumed unless the action string begins with “Ranged ”
Standard targeting is used.

  • [CD] - auto apply any Cooldown action attached to this ability when this action is used.

  • [USE] - auto reduce the [USES: XX] tag in the ability title by one when this action is used.

Format:
Attack: Ranged <standard attack string>[CD][USE]

For example:

  • Attack:jaws +6 (agile, finesse) - makes a melee attack with the listed traits.

  • Attack:Ranged jaws +6 (agile, finesse, range increment 20 feet) - makes a ranged attack with the listed traits.

Cooldown

Applies “[USED]” label to the ability title and a “USED:” effect to the NPC with a duration based off the dice string.
This doesn’t prevent use of the ability, it is a visual indicator to the GM that the ability has been used.
The dice string is evaluated using random numbers, not an actual dice roll.

Format:
Cooldown:<dice or numerical string>

For example:

  • Cooldown: 1d4 - Adds the USED: effect with a random duration of 1-4 rounds

  • Cooldown: 4- Adds the USED: effect with a random duration of 4 rounds

Damage

The damage action takes the same format as the normal damage text within an NPC record.  

  • Standard targeting is used unless [SELF] is used in the action string.

  • Traits in the ability title (within brackets) will be added to the damage traits.

  • [CD] - auto apply any Cooldown action attached to this ability when this action is used.

  • [USE] - auto reduce the [USES: XX] tag in the ability title by one when this action is used.

  • [TRAITS: abc] - (optional) adds traits “abc” to the damage traits.

  • [HALF] - (optional) damage rolled will be halved.  Used for providing automation where damage could be halved outside of the basic saving throw functionality.

Format:
Damage:<damage string including damage types>[CD][USE][SELF][TRAITS: abc]

For example:

  • Damage:1d4 piercing plus 1d4 fire

  • Damage: 1d6 piercing[TRAITS: deadly d8] - adds the “deadly d8” trait to the damage action.

Effect

Applies an effect action on the targets.  The effect automation action takes standard condition and effect strings as detailed in the PFRPG2 Wiki.  Multiple effects/conditions can be applied as part of a single “Effect”: action with the usual semi-colon ( ; ) delimiter.

  • Targeting - standard targeting will be used unless one of the following is specified.

    • Standard targeting is used unless [SELF] is used in the action string.  Not supported (ignored) if a success level tag is used.

    • [TOSELF] applies the effect to the targets but then targets the effect back to the NPC.  Not supported (ignored) if a success level tag is used. R19

    • [TOTARGETS] applies the effect to the actor but then targets the effect back to the targets.  Not supported (ignored) if a success level tag is used.  Use targeting to apply, not drag/drop.

  • Specify the duration of the effect with the [D:XX] tags - where XX is the duration in rounds.  No duration tag means the effect is indefinite.  XX can be a dice string - e.g. 1d4+2.  The dice string is evaluated using random numbers, not an actual dice roll.

  • Optional: [MINS] or [HOURS] - the effect duration is specified in minutes or hours not rounds.  [HOURS] results in the duration in the combat tracker being set to 0 as hour/s long effects aren’t currently tracked.

  • To specify that the duration decrements at the end of the turn use [END].  If not specified the default of the start of the turn will be used.

  • To indicate an optional DC associated with the effect use [DC:YY{F}] - where YY is the DC related to the effect.  An optional F can be added (without the curly brackets) to specify a flat check - e.g. [DC:20F] for a DC 20 flat check.

  • [CD] - Optional..  Auto apply any Cooldown action attached to this ability when this action is used.

  • [USE] - Optional.  Auto reduce the [USES: XX] tag in the ability title by one when this action is used.

  • The Init value to reduce the duration will be the current init value when the effect is applied.

  • [ACTION], [ROLL] or [SINGLE] - Optional.  When to expend the effect, after an action, a roll or expend each effect once it’s been used.

  • [GM] - Optional.  Effect = GM only.  Indicates that the player won’t see the application of the effect in the chat window, nor will they see the applied effect in the combat tracker.

  • [<success level>] - Optional. When a save or attack has been rolled for this action and an ApplyAllEffects action is triggered, this success level will be matched to the save success level stored for each target.  Supports multiple success level values per effect with each level within a pair of square brackets in the format: [CRITSUCCESS], [SUCCESS], [FAILURE], [CRITFAILURE] or [ALL].  Note: an effect action with a success level tag doesn’t support the [SELF] tag, it will be ignored - success levels are designed for targets other than self only.

Format:
Effect:<effect string>[D:XX][SELF][END][DC:YY{F}][CD][USE][GM][<success level>]

Note: [DC:] must come before [D:] currently.

For example:

  • Effect: Blinded[D:1d10] - The target is blinded for 1d10 rounds.

  • Effect: Clumsy:2[D:6] - The target is Clumsy:2 for 6 rounds.

  • Effect: PERS: 1d6 fire[DC:10] - Changes the default flat check of persistent damage to 10 (the default is 15).  Note the F for flat check is not needed here as it is assumed to be a flat check for persistent damage.

  • Effect: Grabbed[DC:20] - The target is grabbed with an escape DC of 20.  The DC for grabbed is for information only.

  • Effect: ATK:1 status;DMG:2 status[SINGLE] - The single use per effect modifiers for attack and damage actions are added to the target.

  • Effect: Clumsy:2[D:6][CRITFAILURE]- The target is Clumsy:2 for 6 rounds.  Will be applied with the ApplyAllEffects action if the target had a critical failure in a previous save action from this ability.

ApplyAllEffects

Applies effects based on the result level of a previously triggered saving throw action (Save), VsDC or Attack action, from the same source actor and ability.  Effects will be matched on their  [CRITSUCCESS], [SUCCESS], [FAILURE], [CRITFAILURE] or [ALL]. tags - note these result names are used for all actions, even attacks.

Format:
ApplyAllEffects

For example:

  • ApplyAllEffects

Heal

The heal action allows healing or adding temp HP to a target.

  • The heal value uses the standard dice string notation - e.g. 1d6+4

  • Standard targeting is used unless [SELF] is used in the action string.

  • Healing will be to HP (wounds) unless [TEMP] is used in the action string.

  • [CD] - auto apply any Cooldown action attached to this ability when this action is used.

  • [USE] - auto reduce the [USES: XX] tag in the ability title by one when this action is used.

Format:
Heal:<heal dice string[SELF][TEMP][CD][USE]

For example:

  • Heal:1d6+4 - Heals 1d6+4 HP to all targets.

  • Heal:6[SELF] - Heals 6 HP to self (overrides any targeting).

  • Heal:1d10[TEMP] - Applies 1d10 temporary HP to all targets.

Permanent Effect (PermEffect)

Note: This does not match with any ability text - don’t use the usual “xxx”| before the PermEffect automation, simply use PermEffect:... for the whole line.

This action automation is used when the NPC is first added to the Combat Tracker.  Any PermEffect text will be added to the NPC effects in the combat tracker when the creature is first added.  This automation action takes standard condition and effect strings as detailed in the PFRPG2 Wiki.  Multiple effects/conditions can be applied as part of a single “PermEffect:” action with the usual semi-colon ( ; ) delimiter.

Format:
PermEffect: <effect to apply>

Example:

  • PermEffect: IFT:flat-footed; DMG: 1d6 precision - will apply the effect “IFT:flat-footed; DMG: 1d6 precision” when the NPC is added to the CT.

Save

Triggers a save action on the targets.

  • Standard targeting is used unless [SELF] is used in the action string.

  • Indicate a basic save (half damage on success, no damage on critical succes, etc.) with the [BASIC] or [HALF] tags.  Adds the “basic” trait to the save action.

  • Save traits are automatically extracted from the traits in the ability title - contained within brackets ( .. ) in the ability title, no need to add anything to the automation code.

  • Additional traits can be added to the traits already extracted from the ability title using the [TRAITS: aaa, bbb, bbb] tag, where aaa, bbb, ccc are comma separated trait names.

  • Specify the DC of the save with the [DC:XX] tags - where XX is the target DC.  This is required.

  • Specify the type of save immediately after the “Save:” action header: fortitude, reflex or will.

  • [CD] - auto apply any Cooldown action attached to this ability when this action is used.

  • [USE] - auto reduce the [USES: XX] tag in the ability title by one when this action is used.

Format:
Save:<type>[DC:XX][SELF][HALF][BASIC][TRAITS:aaa, bbb, ccc][CD][USE]

For example:

  • Save:reflex[DC:18][BASIC] - perform a basic reflex save with a target DC of 18.  Standard targeting is used.

  • Save:fortitude[DC:22][SELF] - The actor performs a DC 22 fortitude save.

  • Save:reflex[DC:18][BASIC][TRAITS:divine]- perform a basic reflex save with a target DC of 18.  Standard targeting is used.  The trait “divine” is added to any traits already present in the ability title.

Uses

To track ability uses enter a [USES: XX] value in the NPC ability title, where XX is the number of uses the ability has.

To track uses, add the [USE] tag to any of the NPC automation actions.  When an action with the [USE] tag is triggered within an ability’s automation, the value of the remaining uses for that ability, if the USES exists in the ability title, is reduced by one - the value won’t go below zero.  There is no messaging when the USES counter reaches, or tries to go beyond, zero.

Trait

Displays a window detailing the traits listed (comma separated).  This does not add traits to an ability or an action.

Format:
Trait:<list of traits>

For example:

  • Trait:illusion, incapacitation, visual - displays the trait information (lookup against loaded modules) for the listed traits:

Versus DC (vsdc)

Currently under development!  Skills aren’t implemented yet, effects aren’t fully operational, etc..

Triggers an action against the DC of the target.

  • <type> is the ability/skill to use for the action.  For example: Athletics (Case Sensitive)

  • <target DC type> is the target save, ability or skill for the action.  For example: FORT

  • [CD] - auto apply any Cooldown action attached to this ability when this action is used.

  • [USE] - auto reduce the [USES: XX] tag in the ability title by one when this action is used.

Format:
VsDC:<type>:vs:<target DC type>[SELF][TRAITS:aaa, bbb, ccc][CD][USE]

 Example:

VsDC:Athletics:vs:FORT Will perform an athletics check vs. the target's FORT DC.

Saving Throws: FORT, REF, WILL

CreatureAbility

Displays a window detailing the single “Creature Ability” lookup data record listed.

Format:
CreatureAbility”<exact name of the lookup data record of type “Creature Ability” - include any special character (e.g. action symbols)>

For example:

  • CreatureAbility:Engulf

OpenLink

Open an anonymous link.  The code will convert the <link record type> and <record name> into appropriate windowclass and record source (anonymous) formats.

  • <link record type> - the type of record to open.  Currently supported:

    • spell - uses reference.spells.<db record name>@* for anonymous link matching

  • <record name> - The name of the record - this will be converted to XML safe naming to make an anonymous match to the module record.

Format:

openlink:<link record type>:<record name>

For example:

  • OpenLink:Spell:Gust of Wind - this would open an anonymous link to reference.spells.gustofwind@*

No match to one of the above codes

If there is no match to one of the above codes, then the text will still be highlighted (with a popup showing the text after the | ) within an NPC statblock, and just the text after the | will be shown in the combat tracker.

This is to allow notes/guidance text to be added to the automation.

If there is purely notes text within an ability automation field (i.e. none of the above supported action codes are present), then the automation “A” indicator won’t show.