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:GroupCheck"

From Roll20 Wiki

Jump to: navigation, search
m
m
 
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
{{main|API:Script Index}}{{revdate}}
 
{{script overview
 
{{script overview
 
|name=GroupCheck
 
|name=GroupCheck
Line 4: Line 5:
 
|version=1.12
 
|version=1.12
 
|lastmodified=2019-08-10}}
 
|lastmodified=2019-08-10}}
 
 
 
==Overview==
 
==Overview==
'''Groupcheck''' is a popular [[API]] script meant to run checks for several tokens at once. You can specify the type of check to run and it will roll it once for every selected token. Note that '''you will have to configure the script and import the right types of checks before you can use it'''.
+
'''Groupcheck''' is a popular [[API]] script meant to run checks for several [[tokens]] at once. You can specify the type of check to run and it will roll it once for every selected token. Note that '''you will have to configure the script and import the right types of checks before you can use it'''.
  
For the full documentation, check the {{repo|Roll20/roll20-api-scripts/tree/master/GroupCheck/1.12 README}}, or the API's info page in the API Selection menu.
+
For the '''full documentation, check the {{repo|Roll20/roll20-api-scripts/tree/master/GroupCheck/1.12 README}}''', or the API's info page in the API Selection menu.
 
{{#evp:youtube|mgk5Xqu6hEo|Example of GorupCheck & ApplyDamage in use|right|500}}
 
{{#evp:youtube|mgk5Xqu6hEo|Example of GorupCheck & ApplyDamage in use|right|500}}
 
* '''{{forum|permalink/4359153/ ApplyDamage}}''' -- Supplementary API to GroupCheck, which enables to automatically apply damage to a group of characters, based on failed/succeeded GroupCheck rolls. Example: Damage of an AoE Spell, based on success/fail on saving throw
 
* '''{{forum|permalink/4359153/ ApplyDamage}}''' -- Supplementary API to GroupCheck, which enables to automatically apply damage to a group of characters, based on failed/succeeded GroupCheck rolls. Example: Damage of an AoE Spell, based on success/fail on saving throw
 
* '''{{forum|permalink/3631602/ (Script)GroupCheck}}''' - original forum thread
 
* '''{{forum|permalink/3631602/ (Script)GroupCheck}}''' - original forum thread
* {{repo|Roll20/roll20-api-scripts/tree/master/GroupCheck sourcecode}}
+
* {{repo|Roll20/roll20-api-scripts/tree/master/GroupCheck GroupCheck sourcecode}}
 
+
* {{gist|joesinghaus/9fd52108d07e5ef83ed879a7c6fdc68f ApplyDamage sourcecode}}
 
__TOC__
 
__TOC__
 
==Basic usage==
 
==Basic usage==
  
 
Having configured some checks, you can call the script using the following syntax
 
Having configured some checks, you can call the script using the following syntax
<pre>
+
<pre style="overflow:auto;white-space:pre-wrap;">!group-check [--options] --Check Command</pre>
!group-check [--options] --Check Command
+
 
</pre>
+
 
Here, you can supply zero or more options (see the section on options for specifics) that modify what exactly is rolled. '''Check Command''' is the command associated to the check you want to run. If no valid '''Check Command''' is supplied, a list of valid commands (in the form of API buttons) is instead output to chat, allowing you to press them to roll the corresponding check.
 
Here, you can supply zero or more options (see the section on options for specifics) that modify what exactly is rolled. '''Check Command''' is the command associated to the check you want to run. If no valid '''Check Command''' is supplied, a list of valid commands (in the form of API buttons) is instead output to chat, allowing you to press them to roll the corresponding check.
 
'''Check Command''' will then be rolled once for every selected token that represents a character, and the result will be output to chat.
 
'''Check Command''' will then be rolled once for every selected token that represents a character, and the result will be output to chat.
  
 
===Example===
 
===Example===
Suppose that we are using D&D 5E, and want to roll a Dexterity saving throw for every selected token, outputting the result to the GM only. The command would be
+
{{apiboxRec}}
 +
Suppose that we are using [[5E|D&D 5E]], and want to roll a Dexterity saving throw for every selected token, outputting the result to the [[GM]] only. The command would be
  
<pre>
+
<pre style="overflow:auto;white-space:pre-wrap;">!group-check --whisper --Dexterity Save</pre>
!group-check --whisper --Dexterity Save
+
</pre>
+
  
 
Note that this only works after having imported the right data for the sheet you are using.
 
Note that this only works after having imported the right data for the sheet you are using.
Line 46: Line 43:
  
 
* <code>!group-check-config --show </code> – will display the current list of checks and the default options for GroupCheck.
 
* <code>!group-check-config --show </code> – will display the current list of checks and the default options for GroupCheck.
* <code>!group-check-config --import '''[Name]'''</code> – imports a predefined set of checks and adds them to the list. Currently, the available choices for '''[Name]''' are '''5E-Shaped''', '''5E-OGL'''([[D&D 5E by Roll20]]), '''Pathfinder-Official''', '''Pathfinder-Community''', and '''3.5'''.
+
* <code>!group-check-config --import '''[Name]'''</code> – imports a predefined set of checks and adds them to the list.
 +
* Currently, the available choices for preset imports are:
 +
** '''5E-OGL'''([[D&D 5E by Roll20]])
 +
** '''5E-Shaped'''
 +
** '''Pathfinder-Official'''
 +
** '''Pathfinder-Community'''
 +
** '''3.5'''
 +
** So to configure it for the [[5ESheet|common 5E sheet]], write <code>!group-check-config --import 5E-OGL</code>
 +
* <code>!group-check-config --add { "Check Command" : { "name" : "Check Name", "formula" : "FORMULA"} }</code>  – manually add a Check/Roll to the API.
 +
** See {{repo|Roll20/roll20-api-scripts/tree/master/GroupCheck/1.12#manipulating-the-check-database Manipulating the check database}} for details
 +
* <code>!group-check-config --delete [Command]</code> will delete the check called Command from the database.
 +
* <code>!group-check-config --clear</code> will empty the list of checks in the database
 +
 
 +
===Config Examples===
 +
 
 +
'''[[SWD6|Star Wars D6]]'''
 +
How to configure the "Dexterity" roll for the sheet. Same formula can be used for the other main attributes.
 +
 
 +
<pre  style="overflow:auto;white-space:pre-wrap;">!group-check-config --add { "Dex" : { "name" : "Dexterity Check", "formula" : "\[(\at{dexterity} -\at{WoundMod} +\at{Force_Up} -1)d6cf0cs7 + \at{dexteritypip} + 1d6\at{wilddie}\]"} }</pre>
 +
Based on the original macro from the sheet:
 +
<pre  style="overflow:auto;white-space:pre-wrap;">&{template:swd6} {{name=Dexterity}} {{Roll=[[(@{dexterity} -@{WoundMod} +@{Force_Up} -1)d6cf0cs7 + @{dexteritypip} + 1d6@{wilddie}]]}}</pre>
 +
 
 +
'''[[Stargate RPG]]'''
 +
 
 +
Configs for for all attribute checks & saves, couple of skills, and some other rolls. (matches v.1.72)
 +
 
 +
<pre  style="overflow:auto;white-space:pre-wrap;">!group-check-config --add { "str" : { "name" : "Strength Check", "formula" : "\[d20 + (\at{str_mod})\]"} }
 +
!group-check-config --add { "dex" : { "name" : "Dexterity Check", "formula" : "\[d20 + (\at{dex_mod})\]"} }
 +
!group-check-config --add { "con" : { "name" : "Constitution Check", "formula" : "\[d20 + (\at{con_mod})\]"} }
 +
!group-check-config --add { "wis" : { "name" : "Wisdom Check", "formula" : "\[d20 + (\at{wis_mod})\]"} }
 +
!group-check-config --add { "int" : { "name" : "Intelligence Check", "formula" : "\[d20 + (\at{int_mod})\]"} }
 +
!group-check-config --add { "cha" : { "name" : "Charisma Check", "formula" : "\[d20 + (\at{cha_mod})\]"} }
 +
 
 +
!group-check-config --add { "str save" : { "name" : "Strength Save", "formula" : "\[d20 + (\at{str_save})\]"} }
 +
!group-check-config --add { "dex save" : { "name" : "Dexterity Save", "formula" : "\[d20 + (\at{dex_save})\]"} }
 +
!group-check-config --add { "con save" : { "name" : "Constitution Save", "formula" : "\[d20 + (\at{con_save})\]"} }
 +
!group-check-config --add { "wis save" : { "name" : "Wisdom Save", "formula" : "\[d20 + (\at{wis_save})\]"} }
 +
!group-check-config --add { "int save" : { "name" : "Intelligence Save", "formula" : "\[d20 + (\at{int_save})\]"} }
 +
!group-check-config --add { "cha save" : { "name" : "Charisma Save", "formula" : "\[d20 + (\at{cha_save})\]"} }
 +
 
 +
!group-check-config --add { "perception" : { "name" : "perception", "formula" : "\[d20 + (\at{perception})\]"} }
 +
!group-check-config --add { "stealth" : { "name" : "stealth", "formula" : "\[d20 + (\at{stealth})\]"} }
 +
!group-check-config --add { "acrobatics" : { "name" : "acrobatics", "formula" : "\[d20 + (\at{acrobatics})\]"} }
 +
!group-check-config --add { "insight" : { "name" : "insight", "formula" : "\[d20 + (\at{insight})\]"} }
 +
!group-check-config --add { "investigation" : { "name" : "investigation", "formula" : "\[d20 + (\at{investigation})\]"} }
 +
 
 +
!group-check-config --add { "td" : { "name" : "Tension Dice", "formula" : "\[\at{td}\]"} }
 +
!group-check-config --add { "long rest" : { "name" : "Long Test", "formula" : "\[\at{rank}\at{hd}\]"} }
 +
 
 +
!group-check-config --add { "init" : { "name" : "Initiative", "formula" : "\[d20 + (\at{init}) \]"} }
 +
!group-check-config --add { "moxie" : { "name" : "Moxie", "formula" : "\[d20 + (\at{moxie}) \]"} }</pre>
  
So to configure it for the common 5E sheet, write <code>!group-check-config --import 5E-OGL</code>
 
 
=See Also=
 
=See Also=
 
* [[API:Script Index]] (partial) list of other APIs
 
* [[API:Script Index]] (partial) list of other APIs
 +
* [[Script:Group Initiative]]
 
<br>
 
<br>
 
<br>
 
<br>
 +
[[Category:Character Sheets]]
 +
[[Category:DnD5E]]
 +
[[Category:DnD]]
 +
[[Category:Pathfinder]]

Latest revision as of 09:52, 18 February 2022

Main Page: API:Script Index

API ScriptAuthor: Jakob
Version: 1.12
Last Modified: 2019-08-10
Code: GroupCheck
Dependencies: None
Conflicts: None

[edit] Overview

Groupcheck is a popular API script meant to run checks for several tokens at once. You can specify the type of check to run and it will roll it once for every selected token. Note that you will have to configure the script and import the right types of checks before you can use it.

For the full documentation, check the README, or the API's info page in the API Selection menu.

Example of GorupCheck & ApplyDamage in use

Contents

[edit] Basic usage

Having configured some checks, you can call the script using the following syntax

!group-check [--options] --Check Command

Here, you can supply zero or more options (see the section on options for specifics) that modify what exactly is rolled. Check Command is the command associated to the check you want to run. If no valid Check Command is supplied, a list of valid commands (in the form of API buttons) is instead output to chat, allowing you to press them to roll the corresponding check. Check Command will then be rolled once for every selected token that represents a character, and the result will be output to chat.

[edit] Example

Suppose that we are using D&D 5E, and want to roll a Dexterity saving throw for every selected token, outputting the result to the GM only. The command would be

!group-check --whisper --Dexterity Save

Note that this only works after having imported the right data for the sheet you are using.

If you have two tokens selected, representing the characters Sarah and Mark, the script will output (with default settings)

Sarah: [[d20 + @{Sarah|dexterity_saving_throw_mod}]]

Mark: [[d20 + @{Mark|dexterity_saving_throw_mod}]]

Internally, the form of the check is proscribed by a formula; the formula in this case is of the form [[d20 + @{dexterity_saving_throw_mod}]], and the script will fill in the right attribute in place of @{dexterity_saving_throw_mod}.

[edit] Configuration

The script is designed to be easily configured to your specific system's needs. You can configure the script using the !group-check-config command. !group-check-config accepts the following options:

  • !group-check-config --show – will display the current list of checks and the default options for GroupCheck.
  • !group-check-config --import [Name] – imports a predefined set of checks and adds them to the list.
  • Currently, the available choices for preset imports are:
    • 5E-OGL(D&D 5E by Roll20)
    • 5E-Shaped
    • Pathfinder-Official
    • Pathfinder-Community
    • 3.5
    • So to configure it for the common 5E sheet, write !group-check-config --import 5E-OGL
  • !group-check-config --add { "Check Command" : { "name" : "Check Name", "formula" : "FORMULA"} } – manually add a Check/Roll to the API.
  • !group-check-config --delete [Command] will delete the check called Command from the database.
  • !group-check-config --clear will empty the list of checks in the database

[edit] Config Examples

Star Wars D6 How to configure the "Dexterity" roll for the sheet. Same formula can be used for the other main attributes.

!group-check-config --add { "Dex" : { "name" : "Dexterity Check", "formula" : "\[(\at{dexterity} -\at{WoundMod} +\at{Force_Up} -1)d6cf0cs7 + \at{dexteritypip} + 1d6\at{wilddie}\]"} }

Based on the original macro from the sheet:

&{template:swd6} {{name=Dexterity}} {{Roll=[[(@{dexterity} -@{WoundMod} +@{Force_Up} -1)d6cf0cs7 + @{dexteritypip} + 1d6@{wilddie}]]}}

Stargate RPG

Configs for for all attribute checks & saves, couple of skills, and some other rolls. (matches v.1.72)

!group-check-config --add { "str" : { "name" : "Strength Check", "formula" : "\[d20 + (\at{str_mod})\]"} }
!group-check-config --add { "dex" : { "name" : "Dexterity Check", "formula" : "\[d20 + (\at{dex_mod})\]"} }
!group-check-config --add { "con" : { "name" : "Constitution Check", "formula" : "\[d20 + (\at{con_mod})\]"} }
!group-check-config --add { "wis" : { "name" : "Wisdom Check", "formula" : "\[d20 + (\at{wis_mod})\]"} }
!group-check-config --add { "int" : { "name" : "Intelligence Check", "formula" : "\[d20 + (\at{int_mod})\]"} }
!group-check-config --add { "cha" : { "name" : "Charisma Check", "formula" : "\[d20 + (\at{cha_mod})\]"} }

!group-check-config --add { "str save" : { "name" : "Strength Save", "formula" : "\[d20 + (\at{str_save})\]"} }
!group-check-config --add { "dex save" : { "name" : "Dexterity Save", "formula" : "\[d20 + (\at{dex_save})\]"} }
!group-check-config --add { "con save" : { "name" : "Constitution Save", "formula" : "\[d20 + (\at{con_save})\]"} }
!group-check-config --add { "wis save" : { "name" : "Wisdom Save", "formula" : "\[d20 + (\at{wis_save})\]"} }
!group-check-config --add { "int save" : { "name" : "Intelligence Save", "formula" : "\[d20 + (\at{int_save})\]"} }
!group-check-config --add { "cha save" : { "name" : "Charisma Save", "formula" : "\[d20 + (\at{cha_save})\]"} }

!group-check-config --add { "perception" : { "name" : "perception", "formula" : "\[d20 + (\at{perception})\]"} }
!group-check-config --add { "stealth" : { "name" : "stealth", "formula" : "\[d20 + (\at{stealth})\]"} }
!group-check-config --add { "acrobatics" : { "name" : "acrobatics", "formula" : "\[d20 + (\at{acrobatics})\]"} }
!group-check-config --add { "insight" : { "name" : "insight", "formula" : "\[d20 + (\at{insight})\]"} }
!group-check-config --add { "investigation" : { "name" : "investigation", "formula" : "\[d20 + (\at{investigation})\]"} }

!group-check-config --add { "td" : { "name" : "Tension Dice", "formula" : "\[\at{td}\]"} }
!group-check-config --add { "long rest" : { "name" : "Long Test", "formula" : "\[\at{rank}\at{hd}\]"} }

!group-check-config --add { "init" : { "name" : "Initiative", "formula" : "\[d20 + (\at{init}) \]"} }
!group-check-config --add { "moxie" : { "name" : "Moxie", "formula" : "\[d20 + (\at{moxie}) \]"} }

[edit] See Also