Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Script:Pathfinder 2 Utilities"

From Roll20 Wiki

Jump to: navigation, search
m
Line 62: Line 62:
 
=== Functional Commands ===
 
=== Functional Commands ===
  
<code>get <value></code> will read the named value from the character sheet. This can be any stat, save, skill, or certain calculated values such as <code>ac</code> or <code>level</code>. Value names can be abbreviated to any unique prefix. This is primarily intended for GMs to quickly read values from character sheets without opening them, but can be used by any player.
+
<code>get <value></code> will read the named value from the character sheet and print it out, applying any active modifiers to it. This can be any stat, save, skill, or certain calculated values such as <code>ac</code> or <code>level</code>. Value names can be abbreviated to any unique prefix. Extra tags can be specified to customize modifiers. This is primarily intended for GMs to quickly read values from character sheets without opening them, but can be used by any player.
  
<code>best <value></code> should be used with multiple targets. It works like <code>get</code> but displays only the highest value and the name of the target that has it. As with <code>get</code>, this is primarily intended for GMs who need to quickly know "the group's best Perception score", for example.
+
<code>best <value></code> should be used with multiple targets. It works like <code>get</code> but displays only the highest value and the name of the target that has it. As with <code>get</code>, this is primarily intended for GMs who need to quickly know "the group's best Perception score", for example. It also respects modifiers and the specified tags, so if the best result is not what you expect, check a modifier isn't changing things!
 +
 
 +
<code>assure <value></code> gets the Assurance value for the given skill on the selected target(s). It does not attempt to check that they have the Assurance feat. It does not accept tags or apply modifiers because the Assurance feat explicitly does not do so.
  
 
<code>roll <value></code> (taggable) rolls the target value for all targets, applying modifiers for the given tags, and displays the results in a table. The results also include the highest level at which the roll beats the standard DC, and the highest opponent modifier such that the opponent's DC would be beaten.
 
<code>roll <value></code> (taggable) rolls the target value for all targets, applying modifiers for the given tags, and displays the results in a table. The results also include the highest level at which the roll beats the standard DC, and the highest opponent modifier such that the opponent's DC would be beaten.
Line 155: Line 157:
  
 
<pre>
 
<pre>
aabefriendalocal
+
aabefriendalocal (Age of Ashes Player's Guide)
aaadministeraltaerein
+
aaadministeraltaerein (Age of Ashes 2)
aaorganizelabor
+
aaorganizelabor (Age of Ashes 2)
ecpromotethecircus
+
aatopplecrates (Age of Ashes 3)
ecperformatrick
+
aadeducetraditions (Age of Ashes 4)
 +
aainfluenceregent (Age of Ashes 4)
 +
aacheckthewalls (Age of Ashes 4)
 +
aaguildinvestigation (Age of Ashes 4)
 +
aaseekthehiddenforge (Age of Ashes 4)
 +
aabuildconnections (Age of Ashes 5)
 +
aahostevent (Age of Ashes 5)
 +
aainfluenceguild (Age of Ashes 5)
 +
aaissuechallenge (Age of Ashes 5)
 +
aadistractguards (Age of Ashes 6)
 +
aainvestigatechamber (Age of Ashes 6)
 +
aaconvincemengkare (Age of Ashes 6)
 +
ecpromotethecircus (Extinction Curse 1)
 +
ecperformatrick (Extinction Curse 1)
 
</pre>
 
</pre>
  
 
== Changelog ==
 
== Changelog ==
 +
{{changelog version|160520|2020-05-16|* "AC" as a property specifier is treated as armor class, not a shortening of acrobatics
 +
* Assure command added
 +
* Get and Best are now taggable and respect modifiers
 +
* Some more abilities added from Age of Ashes}}
 
{{changelog version|100520|2020-05-10|* Release}}
 
{{changelog version|100520|2020-05-10|* Release}}
 
<br>
 
<br>
 
<br>
 
<br>
 
[[Category:Pathfinder]]
 
[[Category:Pathfinder]]

Revision as of 22:16, 16 May 2020

API ScriptAuthor: Mark G.
Version: 100520
Last Modified: 2020-05-10
Code: Pathfinder2Utilities
Dependencies: None
Conflicts: None

Public releases as above. Dogfood builds at https://github.com/hyphz/Roll20PF2/ .

A collection of utilities for GMing and playing Pathfinder 2nd Edition, in particular support for PF2's abilities.

Contents

Syntax

!pf[s] [@targets] get <valuename>
!pf[s] [@targets] best <valuename>
!pf[s] [@targets] roll <valuename> [tags..]>
!pf[s] [@targets] rollinit[!] [valuename] [tags..]
!pf[s] [@targets] ability <ability> [skill] [tags..]
!pf[s] [@targets] mod add <name> <type> <value> <tags..>
!pf[s] mod list
!pf[s] mod clear
!pf[s] mod del <name>
!pf[s] [@targets] mod explain <tags..>

Installation and Configuration

Copy the script's code, available from the menu on the right and stored at Roll20's API GitHub Repository. Paste the code into a new script in your campaign's API Script Editor. Save the new script and it will be available inside your campaign.

Script Use

Targetting

All commands start with "!pf". Starting with "!pfs" will send the result only to the running player and the GM.

Targets can be specified as a list beginning with an @ sign. Each is specified as part of a character name, in lower case with no spaces. So, for example, "Ed Goblin" could be specified as edgo.

You can target all PCs with @pcs, all NPCs with @npcs, and all tokens with @all.

You can target several tokens by separating their names with commas: eg @edgo,billgo .

If you do not specify a target, all selected token(s) are targeted.

If you do not specify a target and do not have any tokens selected, and you are not the GM, all tokens you control are targeted.

There is no "protection" on targeting; anyone can target any token. It is assumed you are playing cooperatively!

Modifiers and Tags

Every command that rolls a dice (listed as "taggable") below also accepts any number of tags to specify properties of the roll that might alter modifiers, listed as hashtags after the command; eg #fear #arcane

Commands that roll skills automatically add the name of the skill and its governing attribute as tags: eg, rolling athletics will automatically add #athletics #strength without you needing to type them.

mod add will add a modifier to tracking. It must be followed by a name for the modifier, its type (c, s, i, or u for circumstance, status, item or untyped, respectively) and a set of tags. Only rolls with all the listed tags are affected.

For example, !pf @edgo mod add Bravery s 2 #fortitude #fear will add a modifier called "Bravery", affecting Ed Goblin, which is a +2 status bonus affecting rolls tagged with both "fortitude" and "fear".

Using mod add with the name of a modifier that already exists will update the existing modifier. Note that this checks only for a matching name, not matching targets. After the above command, !pf @billgo mod add Bravery s 2 #fortitude #fear will update the "Bravery" modifier to refer to Bill Goblin instead of Ed Goblin. If you want Ed to keep the modifier, you can either add a new named modifier for Bill (!pf @billgo mod add BraveryBill..., or modify the modifier to include them both !pf @billgo,edgo mod add Bravery...)

!pf mod list will list all current modifiers. !pf mod clear will erase all modifiers. !pf mod del <name> will delete the named modifier. These don't need any targets.

mod explain will display a table calculating how the final modifier for the given targets and tags is calculated - when rolling, normally only the final modifier is shown. So, for example, !pf @edgo mod explain #fortitude will show the net effect of all modifiers affecting all Fortitude rolls made by Ed Goblin (but not specific types of Fortitude rolls)

Functional Commands

get <value> will read the named value from the character sheet and print it out, applying any active modifiers to it. This can be any stat, save, skill, or certain calculated values such as ac or level. Value names can be abbreviated to any unique prefix. Extra tags can be specified to customize modifiers. This is primarily intended for GMs to quickly read values from character sheets without opening them, but can be used by any player.

best <value> should be used with multiple targets. It works like get but displays only the highest value and the name of the target that has it. As with get, this is primarily intended for GMs who need to quickly know "the group's best Perception score", for example. It also respects modifiers and the specified tags, so if the best result is not what you expect, check a modifier isn't changing things!

assure <value> gets the Assurance value for the given skill on the selected target(s). It does not attempt to check that they have the Assurance feat. It does not accept tags or apply modifiers because the Assurance feat explicitly does not do so.

roll <value> (taggable) rolls the target value for all targets, applying modifiers for the given tags, and displays the results in a table. The results also include the highest level at which the roll beats the standard DC, and the highest opponent modifier such that the opponent's DC would be beaten.

rollinit <skill> (taggable) rolls initiative using the given skill, applying the initiative modifier from the character sheet. If no skill is specified the default is Perception. If a ! is included after the command (ie, rollinit!), the results are sent to the turn tracker. So you can quickly roll initiative for all pcs with !pf @pcs rollinit!.

ability <ability> [skill] (taggable) uses the given ability, rolling the appropriate skill or attribute and displaying an abbreviated form of the ability's success/failure chart in chat. Ability names are lower case without spaces as with character names, and can be abbreviated to any unique suffix. If the ability is Secret, the roll is sent only to the GM. If the ability is one which allows the player to choose the used skill, the skill must be specified after the ability.

Supported Abilities

The following basic abilities from the core book are supported. This shows the string that can be entered to refer to them; any unique prefix can also be used. For example, borrowanarcanespell can be abbreviated to just borrow, or even bo. Unfortunately, leaving out articles cannot be used as an abbreviation (eg, creatediversion for createadiversion will not work). Inconsistencies in article use match the main rulebook.

The symbol * indicates an ability is secret. + indicates that a skill must be specified.

aid+
balance
borrowanarcanespell
climb
coerce
commandananimal
concealanobject*
craft
createadiversion
createforgery*
decipherwriting+*
demoralize
disarm
disabledevice
earnincome+
feint
forceopen
gatherinformation
grapple
hide*
highjump
identifyalchemy*
identifymagic*+
impersonate*
learnaspell+
lie*
longjump
maneuverinflight
palmanobject
perform
pickalock
recallknowledge*+
repair
request
seek*
sensedirection*
sensemotive*
shove
sneak*
squeeze
steal
subsist+
swim
track
treatdisease
treatpoison
treatwounds
trip
tumblethrough

The two uses of Medicine are represented as separate abilities: stabilize and stopbleeding.

identifycreature is technically a special case of Recall Knowledge but is supported as a separate ability as a reminder.

The following class special abilities or skill feats are also supported. Note that the script makes no attempt to check that targets actually have these abilities.

awesomeblow
battleassessment*
battleprayer
delaytrap
evangelize
goblinsong
recognizespell*+
sabotage
sacreddefense
scaretodeath
trainanimal
trickmagicitem
whirlingthrow

Also, the following custom actions from Adventure Paths are included. They are prefixed by abbreviations indicating the adventure path in order to minimise accidental matching.

aabefriendalocal (Age of Ashes Player's Guide)
aaadministeraltaerein (Age of Ashes 2)
aaorganizelabor (Age of Ashes 2)
aatopplecrates (Age of Ashes 3)
aadeducetraditions (Age of Ashes 4)
aainfluenceregent (Age of Ashes 4)
aacheckthewalls (Age of Ashes 4)
aaguildinvestigation (Age of Ashes 4)
aaseekthehiddenforge (Age of Ashes 4)
aabuildconnections (Age of Ashes 5)
aahostevent (Age of Ashes 5)
aainfluenceguild (Age of Ashes 5)
aaissuechallenge (Age of Ashes 5)
aadistractguards (Age of Ashes 6)
aainvestigatechamber (Age of Ashes 6)
aaconvincemengkare (Age of Ashes 6)
ecpromotethecircus (Extinction Curse 1)
ecperformatrick (Extinction Curse 1)

Changelog

v160520 (2020-05-16)

  • "AC" as a property specifier is treated as armor class, not a shortening of acrobatics
  • Assure command added
  • Get and Best are now taggable and respect modifiers
  • Some more abilities added from Age of Ashes


v100520 (2020-05-10)

  • Release