Difference between revisions of "Script:Pathfinder 2 Utilities"
From Roll20 Wiki
(→Supported Abilities) |
(→Supported Abilities) |
||
Line 74: | Line 74: | ||
=== Supported Abilities === | === 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, <code>borrowanarcanespell</code> can be abbreviated to just <code>borrow</code>, or even <code>bo</code>. Unfortunately, leaving out articles cannot be used as an abbreviation (eg, < | + | 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, <code>borrowanarcanespell</code> can be abbreviated to just <code>borrow</code>, or even <code>bo</code>. Unfortunately, leaving out articles cannot be used as an abbreviation (eg, <code>creatediversion</code> for <code>createadiversion</code> will not work). Inconsistencies in article use match the main rulebook. |
* indicates an ability is secret. + indicates that a skill must be specified. | * indicates an ability is secret. + indicates that a skill must be specified. |
Revision as of 20:50, 12 May 2020
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. 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. 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.
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.
- 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 aaadministeraltaerein aaorganizelabor ecpromotethecircus ecperformatrick
Changelog
v100520 (2020-05-10)
- Release