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 (Add config example)
(Config Examples: Add Stargate example)
Line 65: Line 65:
 
<pre  style="overflow:auto;white-space:pre-wrap;">&{template:swd6} {{name=Dexterity}} {{Roll=[[(@{dexterity} -@{WoundMod} +@{Force_Up} -1)d6cf0cs7 + @{dexteritypip} + 1d6@{wilddie}]]}}</pre>
 
<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>
  
 
=See Also=
 
=See Also=

Revision as of 15:45, 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}]]}}

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}) \]"} }

See Also