PFRPG2 - PC Feature Automation

Basics

If enabled in the campaign options, an automation field will appear in various different types of Fantasy Grounds (FG) data records.  Currently supported records are:

  • Feats

  • Class Features

  • Items

  • Lookup data and lookup data features

  • Ancestry features

Enabling view/editing of the automation data

To view and/or edit data record automation data the “Show Ability Automation Field” in the Campaign Options “Experimental Development” section needs to be changed from “Off”.

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 carry out certain actions (see Automation Actions below) when the records is first added to the PC, with some record/automation combinations having additional functionality.

The data takes the form of:

  • One or more automation actions

  • Each automation action is enclosed in square brackets  [automation action string]

  • The automation actions includes one keyword at the beginning of the string and then one or more additional data entries - some separated by spaces, some using a pipe symbol “|”

For example:[Will trained] will set the PC’s will save proficiency level to trained, unless it is already trained or higher.

Item Automation

Automation gets applied when an item is added to a PC and also as an item is equipped.  If the automation type supports deletion the deletion automation is also ran when the item is unequipped or removed - some automation types have specific handling of item carried state, this is detailed in the automation type “Item support?” details below.

Multiple automation actions in the same record

An ability can have multiple actions - simply put each individual actions within the square brackets.

For example:[Will trained][Fortitude trained]

XREF (Cross Reference) Functionality

Character effects (in the Combat tab of the PC sheet) allow substitution of various values using curly brackets {...}  One of these substitution values is {XABC} where ABC is a three digit upper case code that refers to the Cross Reference data stored in the PC sheet.

 

Referring to the screenshot below:

  1. Clicking on the three-bars icon at the bottom of the Character Effects section on the PC Combat tab will open the X-Ref Variables window.

  2. This character has one x-ref variable: BIR = fire

  3. Whenever {XBIR} is used in a PC effect in this section of the character sheet, not in the combat tracker, the value for BIR will be substituted.  In this case, DMG: 4 melee, {XBIR}; AC: -1 becomes DMG: 4 melee, fire; AC: -1

X-Ref variables in use

The current variables known to be in use are detailed in the table below.

X-Ref Variable

Use

Source

BIR

Barbarian Instinct Rage

Core Rules

DVH

Dwarven Vengeful Hatred

Core Rules

SDA

Old version = KDA

Suli Dualborn “A”

= First energy resistance

Lost Omens Ancestry Guide

SDB

Old version = KDB

Suli Dualborn “B”

= Second energy resistance

Lost Omens Ancestry Guide

KDE

Kobold Draconic Exemplar

Advanced Player’s Guide

DFR

Deep Fetchling Resistance

Lost Omens Ancestry Guide

Action keywords

The PFRPG2 ruleset currently supports many different types of action keywords, with others being added during testing and ongoing development.  The following is a list of the main keyword types:

  1. Saving throw proficiency level - the names of the saving throw: fort, Fortitude, Ref, Reflex, Will.

  2. Skill proficiency level - the name of the skill - Acrobatics, Athletics, etc..

  3. Speed - modifies the speed of a PC by a numerical value.

  4. Movement- adds a string to the PC special movement field if it doesn’t already exist.

  5. Size - sets the size of the PC.

  6. Bulk - modifies the encumbrance bulk limits by a numerical value.

  7. Senses - adds a string to the PC senses field if it doesn’t already exist.

  8. Trait - adds a string to the PC traits field if it doesn’t already exist.

  9. HP - modifies a specific HP field with a numerical value.

  10. Feat - adds a feat to the PC

  11. Spell - adds a spell to a specified spell class.

  12. Spellclass - adds a spell class to the PC’s actions tab.

  13. Skill - sets the proficiency level of a names skill (same as “skill proficiency level” above, needed for custom skills.

  14. Defense - sets a specific defense proficiency level

  15. Attack - sets a specific attack/weapon proficiency level

  16. Save - sets a specific saving throw proficiency level (same as “saving throw proficiency” above.

  17. Choice - presents the user with a data selection choice.  Primarily used for class options.

  18. Options - presents the user with a number of options encoded within the automation string; also used for matching deity or XRef data to options.

  19. Effect - adds a character (“char”) effect to the PC or an “item” effect (active when an item is equipped) or a weapon “use” effect that is active during an attack or damage action.

  20. Item - adds an item to the character inventory.

  21. Weapon - adds a weapon entry to the character.  Primarily used for adding ancestry or features based unarmed attacks.

  22. Delete - used as the last entry in a record automation data.  Indicates that the base record should be removed after all automation is processed.  Primarily used for class kits, to remove the base class kit item record once all items in the kit have been added.

  23. Special handling of unique cases - currently supports the “armor proficiency” and “weapon proficiency” feats and the “divine font” class feature.

  24. Message - sends a ruleset string resource message to the chargen tracker.

  25. None - used to indicate that there is no appropriate automation in the record.  This allows correct messaging in the chargen tracker log window.

Proficiency levels

If a proficiency level is being set the full name must be used: trained, expert, master or legendary.  Note: only a higher proficiency level than the currently set value will be applied.

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

Automation removal

Some automation actions support the removal of the automation when the record is deleted from the PC.  This relies on being able to reliably remove the automation added.  Some automation can’t be reliably removed - usually the automation that sets a specific value rather than numerically adjusts a current one or adds a one-off feature - e.g. proficiency level can’t be reliably removed because other features may have changed the base proficiency level after the automation was applied, but a numerical adjustment to speed (e.g. [SPEED +5] can be removed.  Automation removal support is detailed in each action below.

“Or” functionality

Some string additional actions support “or” functionality - using the “/” operator.  This usually means that two values are provided, the first will be added to the target field unless it already exists in the field, if so the second value will be added to the field.  If both values already exist then nothing will be added.  For example:  “/Low-light vision/Darkvision”.  If the first string “Low-light vision” doesn’t exist in the target field it will be added to that field, but if “Low-light vision” already exists in the field then “Darkvision” will be added.

FILTER functionality

Automation entries can have a FILTER:Class=XXXX entry within the automation field.  Currently only “Class” is supported.  This allows all automation after the FILTER keyword to be applied only to a character who has a specific class.

For example: [Athletics trained]FILTER:Class=Druid[FEAT add animal companion|no|druid][SPELL add heal animal|focus spells|1]

This results in every PC being trained in athletics, but only PCs whose class is “druid” will also get the additional automation (FEAT and SPELL) applied when the record with the automaton is added to the character.

Saving throw proficiency level

Sets the proficiency level of the named saving throw if the new value is higher than the existing value.

  • Keyword = short or long saving throw name - Fortitude, Fort, Ref, Reflex, Will

  • Additional data - the proficiency level

  • Remove supported?  No

Skill proficiency level

Sets the proficiency level of the named saving throw if the new value is higher than the existing value.

  • Keyword = short or long saving throw name - Fortitude, Fort, Ref, Reflex, Will

  • Additional data - the proficiency level

  • Remove supported?  No

Examples:

  • [Fort trained]

  • [Reflex expert]

  • [Will master]

Speed

Modifies the speed of a PC by a numerical value.

  • Keyword = Speed

  • Additional data - the numerical number to adjust the speed miscellaneous modifier.  Supports an operator of = (set - default) + (add) or - (subtract).

  • Remove supported?  Yes - (not for set “=” operator)

Examples:

  • [SPEED +5] - adds five to the current speed miscellaneous modifier.

  • [SPEED 10] - sets the speed miscellaneous modifier to ten.

  • [SPEED -10] - subtracts 10 from the current speed miscellaneous modifier.

Movement (available Release 18d)

Adds a string to the special movement field of the PC if it doesn’t already exist.

  • Keyword = Movement

  • Additional data - the string of the movement name

  • Remove supported?  Yes

Examples:

  • [MOVEMENT Swim 20 feet]

Size(available Release 18d)

Sets the Size string of the PC.

  • Keyword = Size

  • Additional data - the string of the creature size

  • Remove supported?  No

Examples:

  • [SIZE small]

Bulk

Modifies the encumbrance bulk limits by a numerical value.

  • Keyword = Bulk

  • Additional data - the numerical number to adjust the encumbrance bulk modifier.  Supports an operator of = (set - default) + (add) or - (subtract).

  • Remove supported?  Yes - (not for set “=” operator)

Examples:

  • [BULK +2] - adds two to the current encumbrance bulk limits modifier.

  • [BULK 3] - sets the encumbrance bulk limits modifier to 3.

  • [BULK -1] - subtracts 1 from the current encumbrance bulk limits modifier.

Senses

Adds a string to the senses field of the PC if it doesn’t already exist.

  • Keyword = Senses

  • Additional data - the string of the sense name

  • Supports “or” functionality.

  • Remove supported?  Yes

Examples:

  • [SENSES Darkvision]

  • [SENSES Low-light Vision]

  • [SENSES /Low-light vision/Darkvision] - uses “or” functionality - will add “Low-light vision” to the PC senses field, but will add “Darkvision” if “Low-light vision” already exists

Trait

Adds a string to the traits field of the PC if it doesn’t already exist.

  • Keyword = Trait

  • Additional data - the string of the trait name

  • Supports “or” functionality.

  • Remove supported?  Yes

Examples:

  • [TRAIT Elf]

  • [TRAIT Half-Elf]

HP

Sets a value in, or adds a value to, an HP field.

  • Keyword = HP

  • Additional data - the HP field and the value

    • HP Field = “ancestry” (sets the Ancestry HP value), “miscperlevel” (modifies the miscellaneous per level modifier value) or “misc” (modifies the miscellaneous modifier).

    • Value = the number to set (ancestry) or adjust (miscperlevel) the target field.

  • Remove supported?  Yes (from R18t2)

Examples:

  • [HP ancestry 10]

  • [HP miscperlevel 1]

  • [HP misc 5]

Feat

-- Handle feat automation.

-- Must include type of automation action.  ADD currently supported.

-- Format: <action> <feat name>|<multiple (opt)>|<distinguishing trait (optional)>

-- <feat name> - the feat name to match within the loaded data.

-- <stack/multiple (opt)> - indicates if multiple versions of this feat can be added.  Default = no.

-- Currently only supports a single trait name to distinguish the trait to select.  Is this enough?

-- An example of a feat that needs the trait is the sorcerer and wizard "counterspell" first level class feat. 

Using "wizard" or "sorcerer" as trait match name will give the correct feat match.

  • Keyword = Feat

  • Additional data - operation - currently “add” only supported.

  • More data - <feat name>|<multiple (opt)>|<distinguishing trait (optional)>

  • Remove supported?  Yes

Spell

-- Spell functionality - "add" currently supported

-- Format: SPELL <action> <spell name>|<spell class name>|<spell slot level> (optional)

-- <spell name> - matches against campaign and loaded modules.

-- <spell class name> - The name of the spell class on the actions tab to add the spell to.

-- <spell slot level> - an optional spell slot level to add the spell to, if this is not specified then the spell level will be used.

-- <uses per day> - only relevant for prepared spell classes and for spells other than cantrips (which don't have daily use restrictions).  Allows the number of times the spell is prepared to be specified - requires <spell slot level> to be present - even if blank.  Available with R18e.

  • Keyword = Spell

  • Additional data - 

  • Remove supported?  Yes

Spellclass

-- Spell class functionality - "add" action currently supported

-- Format: SPELLCLASS <action> <casting type>|<spell class name>|<magical tradition>|<spell casting ability>|<proficiency level>|<base focus points> (optional)

-- <action> - “add” currently supported.

-- <casting type> - prepared, spontaneous or focus

-- <spell class name> - The name of the spell class to create on the actions tab.  Note - this is currently ignored for focus spell classes, and “Focus Spells” will be used.

-- <magical tradition> - The tradition of the spell class - arcane, divine, occult or primal

-- <spell casting ability> - the ability to set in the spell class details.  Full ability name: wisdom, intelligence, charisma, etc..

-- <proficiency level> - the proficiency level for the newly created spell class.  Can be untrained, trained, expert, master or legendary.  Assumes trained if not present.  Must be present if setting a focus spell class <base focus points> to something other than 1.

-- <base focus points> - optional, used to set base focus points for a focus spells class.  Defaults to 1 if not present.

  • Keyword = Spellclass

  • Additional data - 

  • Remove supported?  No

Skill

-- Handle skill proficiencies or adding a new skill (e.g. lore skill).

-- Format: SKILL <skill name> <new prof level>

-- Lore skills are added if the last word of the skill name is "lore".  For example: [PROF SKILL warfare lore trained] will train Warfare Lore.

-- This is currently hard coded for "lore" skills.  Is there a need for other subskill types?

  • Keyword = Skill

  • Additional data - 

  • Remove supported?  No

Defense

-- Handle defense proficiencies.

-- Format: DEFENSE <proficiency name> <new prof level>

-- <proficiency name> can be the name of an individual armor item, armor type(group) or armor type.  The name matching code is processed in this order.

  • Keyword = Defense

  • Additional data - 

  • Remove supported?  No

Attack

-- Handle attack proficiencies.

-- Format: ATTACK <type>|<proficiency name>|<new prof level>

-- <type> is used to match the weapon to the proficiency.  It can be category (e.g. martial), group (e.g. swords) or name (the name of the weapon - e.g. longsword). 

-- <proficiency name> can be the name of an individual weapon item, weapon type(group) or weapon category.  The name matching code is processed in this order.

  • Keyword = Attack

  • Additional data - 

  • Remove supported?  No

Save

-- Handle save proficiencies.

-- Format: SAVE <save name> <new prof level> 

  • Keyword = Save

  • Additional data - 

  • Remove supported?  No

Choice

-- Handle choice - assumes lookup data

-- TODO - make more generic

-- Currently class, deity and heritage are supported.

-- Format: CHOICE <lookup data type>|<category name>|<sub-category name> 

-- lookup data type = Condition, Deity, Domain, Effect, Heritage, Class, Choice

-- Category name = the name filter for the data type - could be multiple words.

-- Sub-category name = the name of the sub category - could be multiple words.

-- You must include a category and sub-category name to match corresponding lookup data.

-- Examples:

-- CHOICE Deity|Primary|Core Deities

-- CHOICE Class|Alchemist|Research Field

  • Keyword = Choice

  • Additional data - 

  • Remove supported?  No

Options

-- Handle options

-- Format: OPTIONS <option type>|<record type>|<option data>

-- <option type> - the type of option.  Currently "choice", "deity" and "xref" are supported.  Choice presents a choice to the user, deity populates an item based off the PC's selected deity name, "xref" populates ??? based off an XRef data value.

-- XRef not coded yet.

-- <record type> - the target record type associated with this option.  Currently "item" and "feat" supported.  "featwithtrait" for matching feats with a trait.  "xref" for storing options.

-- <option data> - the data needed to construct and process the option.

  • Keyword = Options

  • Additional data - 

  • Remove supported?  No

Examples:

  • [OPTIONS choice item greataxe (2 gp)|greatclub (1 gp)|greatsword (2 gp)|battle axe and steel shield (3 gp)]

  • [OPTIONS choice feat Assurance (Athletics)|Toughness|Cat Fall]

  • [OPTIONS choice featwithtrait=wizard Cantrip Expansion|Reach Spell|School Aura]

  • [OPTIONS deity item torag=axe|desna=starknife]

  • [OPTIONS choice xref=BIR Black Dragon=acid|Blue Dragon=electricity|Green Dragon=poison|Red Dragon=fire|White Dragon=cold|Brass Dragon=fire|Bronze Dragon=electricity|Copper Dragon=acid|Gold Dragon=fire|Silver Dragon=cold]

Effect

-- Handle effects

-- Format: EFFECT <effect type> <OFF> <effect string> 

-- Effect type = character/char; items: use, carry or equip

Duplicate character effects won’t be added - a duplicate has the same name, effect and base item link.  This is mostly to prevent duplications with data upgrade processes.

  • Keyword = Effect

  • Additional data - effect type.  character/char, item, use, carry or equip.  This determines when the effect is applied, removed or used.  Character or char applies the effect as a permanent character effect when the record is added to the PC, it is removed when the record is deleted.  Use means the effect is applied to a weapon in the actions tab and will be applied to an action when that weapon is used - i.e. an attack or damage action with the weapon. carry applies the effect to the PC as a character effect when the item is carried or equipped, it is removed when the item is not carried or equipped.  Item (legacy = equip) applies the effect to the PC as a character effect when the item is equipped, it is removed when the item is no longer equipped.

  • <OFF> - optional.  If present for a character effect, the effect will initially be loaded in the inactive state (“off”).

  • <effect string> - a normal FG effect string.  This supports dynamic variables within curly brackets {...}

Remove supported?  Yes

Examples:

[EFFECT equip SAVE:1 item] - applies a “SAVE:1 item” character effect when an item with this automation is equipped.

Item

-- Handle item automation.

-- Must include type of automation action.  “add” currently supported.  Primarily used for combining class kits etc. into a single item that expands when added to a PC.

-- Format: <action> <item name>|<quantity>|<container name>(optional)

-- <item name> - the name of the item record to match within the loaded data.

-- <quantity> - indicates how many of this item to add.  Default = 1.

-- <container name>(optional) - indicates the name of the container that this item will be added to

  • Keyword = Item

  • Additional data - 

  • Remove supported?  No

Weapon

-- Handle weapon automation.

-- Must include type of automation action.  “add” currently supported.  Primarily used for adding an unarmed attack (ancestry/heritage/barbarian instinct, etc.) to a PC.

-- Format: <action> <weapon data>

-- <weapon data> - Pipe "|" separated information needed to create the weapon item entry:

-- Name|Subcategory|Group|Damage|Damage type|Traits|Hands|Bulk|Range

-- Range added in Release 18d.  This is needed to create a ranged weapon entry in the PC actions tab.

-- Note - all fields must be included and pipe separated, even if they’re blank.

  • Keyword = Weapon

  • Additional data - 

Remove supported?  No

Replace

-- Process the replace automation

-- This is used to effectively replace an existing record in the same list as the record with the automation.

-- Whereas the code actually deletes the old record, this is used to functionally replace the old with the new record.

-- This is usually in featlist, inventorylist, specialabilitylist, etc. - the code will determine which list to use (the same list as the triggering record)

-- Used to allow removal of lower tier feats/features - e.g. Rogue's sneak attack.

-- Example: [REPLACE Sneak Attack (1d6)]

-- Format: <replace> <name>

 

  • Keyword = Replace

  • Additional data - feat/feature/ability name

Remove supported?  No

Delete

-- Process the delete automation - this is used as the last automation entry in a record to remove the base automation record.

-- Specifically created to delete an item kit once all of the items in the kit have been created.

-- Format: <delete> <item>

  • Keyword = Delete

  • Additional data - 

  • Remove supported?  No

Special Handling

Special handling of unique cases - currently supports the “armor proficiency” and “weapon proficiency” feats and the “divine font” class feature.

  • Keyword = the name of the special handling

  • Additional data - no.

  • Remove supported?  No

Message

-- Write a message to the chargen tracker

-- Format: [MESSAGE <LINK> <CUSTOM> <message string resource name>]

-- LINK (optional) - provide a link to the base record in the chargen log.

-- CUSTOM (optional) - flag that the remainder of the automation data is a custom string to add to a brief default “partial automation” message.

-- CUSTOM1 (optional) - flag that the remainder of the automation data is a custom string to add to a brief “manual attention required” message.

-- ATTENTION (optional) - flag that the remainder of the automation data is a custom string to add to a brief message in bold starting with +++.

-- <message string resource name> - the FG string resource name.  Assumes one '%s' entry to populate the feat/feature name.

  • Keyword = Message

  • Additional data - 

  • Remove supported?  No (N/A)

Examples:

[MESSAGE CUSTOM This is my message] - This will add a partial automation message to the tracker, with the custom text “This is my message” in bold.

None

-- "none" automation means that the entry is basically for information, with no ruleset effect.  This means that there won't be a "can't apply automation" message in the chargen tracker.

  • Keyword = None

  • Additional data - no.

  • Remove supported?  No (N/A)

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.