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 (Add config example)
Line 7: Line 7:
  
 
==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.
Line 19: Line 19:
  
 
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
+
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>
 +
 
  
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

Revision as of 15:01, 5 August 2021

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

Main Page: API:Script Index

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

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.

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}.

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

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}]]}}


See Also