Difference between revisions of "Script:Group Initiative"
From Roll20 Wiki
(→Configuring for Specific Sheets) |
m (→Configuring for Specific Sheets) |
||
(29 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{revdate}}{{orange|This page have only some info on the API, and to see the latest documentation for it, run the <code>!group-init --help</code> command inside a game.}} | ||
+ | {{main|API:Script Index}} | ||
{{script overview | {{script overview | ||
|name=GroupInitiative | |name=GroupInitiative | ||
− | |author= | + | |author=[[Aaron|Aaron C. M.]] |
− | |version=0.9. | + | |version=0.9.36 |
− | |lastmodified= | + | |lastmodified=2022-02}} |
+ | =Overview= | ||
+ | '''GroupInitiative''' adds a command for rapidly adding large groups of [[tokens]] to the {{Turn Tracker}}. As of v0.3, there are quite a few configuration commands (some examples below). | ||
− | + | '''For full documentation of API, run the <code>!group-init --help</code> command inside a game.''' | |
+ | * {{forum|permalink/7921574/ (Script Update) GroupInitiative - Now with Dice Modifiers for the initial roll!}} | ||
− | + | {{#evp:youtube|QBSCmjAwrjI|Group Initiative showcase starts at '''3:15''' |right|450}} | |
− | Remove any tokens that already have a turn. | + | __TOC__ |
− | For all selected tokens, find the character they represent. | + | ==How it works== |
− | For each character, figure out the initiative bonus. | + | The basic process followed by the script is this: |
− | Initiative bonuses are calculated using Bonus Stat Groups. Each Bonus Stat Group is a collection of Attribute Names and Stat Adjustment operations to apply to them. | + | * Remove any [[tokens]] that already have a turn. |
− | Bonus Stat Groups are evaluated in order. The first one that produces a bonus is used. If a character doesn't have one of the Attribute Names listed in the Bonus Stat Group (or that Attribute Name does not contain a valid number), that group does not produce a bonus. | + | * For all selected tokens, find the character they represent. |
− | The selected Roller is used to generate the rolls for each token, with the bonus for its character applied (or 0 if it doesn't have a character). | + | * For each character, figure out the initiative bonus. |
− | Add each token to the | + | * Initiative bonuses are calculated using Bonus Stat Groups. Each Bonus Stat Group is a collection of Attribute Names and Stat Adjustment operations to apply to them. |
− | + | * Bonus Stat Groups are evaluated in order. The first one that produces a bonus is used. If a character doesn't have one of the Attribute Names listed in the Bonus Stat Group (or that Attribute Name does not contain a valid number), that group does not produce a bonus. | |
− | === | + | * The selected Roller is used to generate the rolls for each token, with the bonus for its character applied (or 0 if it doesn't have a character). |
− | + | * Add each token to the {{Turn Tracker}}. | |
− | : | + | ==Commands== |
− | ::''This is the root api command. If you have any tokens selected, it will add them to the initiative order. If you don't have anything selected, it will show the help.'' | + | ===Rolls=== |
− | :'''!group-init -- | + | {{apiboxRec}} |
+ | :<code>!group-init</code> | ||
+ | ::''This is the root api command. If you have any tokens selected, it will add them to the initiative order. If you don't have anything selected, it will show the <code>--help</code>.'' | ||
+ | :<code>!group-init --bonus <bonus></code> | ||
+ | ::''This command is just line the bare <code>!group-init</code> roll, but will add the supplied bonus to all rolls. The bonus can be from an [[Inline Roll]].'' | ||
+ | :<code>!group-init --reroll [bonus]</code> | ||
+ | ::''This command rerolls all of the tokens currently in the turn order as if they were selected when you executed <code>!group-init</code>. An optional bonus can be supplied, which can be the result of an inline roll.'' | ||
+ | :<code>!group-init --ids [...]</code> | ||
+ | ::''This command uses the configured Roller to determine the initiative order for all tokens whose ids are specified.'' | ||
+ | :<code>!group-init --adjust <adjustment> [minimum]</code> | ||
+ | ::''Applies an adjustment to all the current Turn Order tokens (Custom entries ignored). The required adjustment value will be applied to the current value of all Turn Order entries. The optional minium value will be used if the value after adjustiment is lower, which can end up raising Turn Order values even if they were already lower.'' | ||
+ | :<code>!group-init --adjust-current <adjustment> [minimum]</code> | ||
+ | ::''This is identical to <code>--adjust</code>, save that it is only applied to the top entry in the Turn Order.'' | ||
+ | ===Other=== | ||
+ | :<code>!group-init --help</code> | ||
::''This shows the help, which includes state information about the currently selected Roller, available Stat Adjustment Options, and the ordered list of Bonus Stat Groups.'' | ::''This shows the help, which includes state information about the currently selected Roller, available Stat Adjustment Options, and the ordered list of Bonus Stat Groups.'' | ||
− | :'''!group-init --add-group --<adjustment> [--<adjustment>] <attribute name[|<max|current>]> ... | + | :<code>!group-init --sort</code> |
+ | ::''Will sort everything in the {{Turn Tracker}}. Good to run after having all intitiatives rolled.'' | ||
+ | :<code>!group-init --toggle-turnorder</code> | ||
+ | ::''Opens or closes the Turn Order window.'' | ||
+ | :<code>!group-init --clear</code> | ||
+ | ::''Removes all tokens from the Turn Order. If Auto Open Init is enabled, it will also close the [[Turn Tracker]] box.'' | ||
+ | :<code>!group-init --add-group --<adjustment> [--<adjustment>] <attribute name[|<max|current>]> ...</code> | ||
::''This command adds another Bonus Stat Group to the end of the list. Examples and further explanation below.'' | ::''This command adds another Bonus Stat Group to the end of the list. Examples and further explanation below.'' | ||
− | : | + | :<code>!group-init --del-group <number></code> |
::''Removes the Bonus Stat Group identified by number.'' | ::''Removes the Bonus Stat Group identified by number.'' | ||
− | : | + | :<code>!group-init --promote <number></code> |
::''Moves the Bonus Stat Group identified by number up one slot.'' | ::''Moves the Bonus Stat Group identified by number up one slot.'' | ||
− | : | + | :<code>!group-init-config --set-roller <roller name></code> |
::''Sets the Roller to use for figuring initiative.'' | ::''Sets the Roller to use for figuring initiative.'' | ||
− | + | ==Rollers== | |
There are currently 4 different Rollers: | There are currently 4 different Rollers: | ||
− | :* Least-All-Roll -- Roll 1d20+Bonus for every token, then take the lowest number as the initiative for all tokens. | + | :* Least-All-Roll -- Roll 1d20+Bonus for every token, then take the lowest number as the initiative for all tokens. |
:* Mean-All-Roll -- Roll 1d20+Bonus for every token, then take the average (rounded down) roll as the initiative for all tokens. | :* Mean-All-Roll -- Roll 1d20+Bonus for every token, then take the average (rounded down) roll as the initiative for all tokens. | ||
− | :* Individual-Roll -- Roll 1d20+Bonus for each token and set each token's initiative to whatever it rolled. | + | :* Individual-Roll -- Roll 1d20+Bonus for each token and set each token's initiative to whatever it rolled. |
− | :* Constant-By-Stat -- Set the initiative to whatever the Bonus for that token is. | + | :* Constant-By-Stat -- Set the initiative to whatever the Bonus for that token is. |
− | + | ==Add-Group Detailed Explanation== | |
− | The --add-group command creates a new Bonus Stat Group. It takes one or more attribute specifications. An attribute specification is made up of one or more Stat Adjustment Options, followed by an Attribute Name (optionally with |max on the end). | + | The <code>--add-group</code> command creates a new Bonus Stat Group. It takes one or more attribute specifications. An attribute specification is made up of one or more Stat Adjustment Options, followed by an Attribute Name (optionally with <code>|max</code> on the end). |
'''Stat Adjustment Options''' | '''Stat Adjustment Options''' | ||
:* '''Bare''' -- Use this when you want just the attributes value. This will add a Bonus Stat Group with just the attribute dexterity in it. | :* '''Bare''' -- Use this when you want just the attributes value. This will add a Bonus Stat Group with just the attribute dexterity in it. | ||
− | :::'''''Example''': !group-init --add-group --Bare dexterity'' | + | :::'''''Example''': {{c|!group-init --add-group --Bare dexterity}}'' |
:* '''Floor''' -- Use this to compute the floor of the value. This is useful when you have attributes that are decimal values, but you want a whole integer. | :* '''Floor''' -- Use this to compute the floor of the value. This is useful when you have attributes that are decimal values, but you want a whole integer. | ||
− | :::'''''Example''': !group-init --add-group --Floor skill bonus'' | + | :::'''''Example''': {{c|!group-init --add-group --Floor skill bonus}}'' |
:* '''Ceiling''' -- The same as Floor, but returns the next highest whole integer. The Bonus Stat Group added by this command would turn the attribute skill bonus from 2.35 to 3: | :* '''Ceiling''' -- The same as Floor, but returns the next highest whole integer. The Bonus Stat Group added by this command would turn the attribute skill bonus from 2.35 to 3: | ||
− | :::'''''Example''': !group-init --add-group --Ceiling skill bonus'' | + | :::'''''Example''': {{c|!group-init --add-group --Ceiling skill bonus}}'' |
:* '''Bounded''':<low>:<high> -- Use this to restrict the value of an attribute to a particular range. This would specify a Bonus Stat Group where dexterity can only be between -2 and +2: | :* '''Bounded''':<low>:<high> -- Use this to restrict the value of an attribute to a particular range. This would specify a Bonus Stat Group where dexterity can only be between -2 and +2: | ||
− | :::''''''Example''': !group-init --add-group --Bounded:-2:2 dexterity'' | + | :::''''''Example''': {{c|!group-init --add-group --Bounded:-2:2 dexterity}}'' |
::'''Note''': To leave a value unrestricted, you can leave the bound for that side empty. This would specify a Bonus Stat Group where dexterity has a maximum value of +4, but can be as low as it wants: | ::'''Note''': To leave a value unrestricted, you can leave the bound for that side empty. This would specify a Bonus Stat Group where dexterity has a maximum value of +4, but can be as low as it wants: | ||
− | :::'''''Example''': !group-init --add-group --Bounded::4 dexterity'' | + | :::'''''Example''': {{c|!group-init --add-group --Bounded::4 dexterity}}'' |
:* '''Stat-DnD''' -- Use this to convert an attribute from a Dungeons and Dragons Stat into the Stat's associated bonus. 18 becomes 4, 7 becomes -2, etc. This would specify a Bonus Stat Group which finds the stat bonus for the dexterity stat: | :* '''Stat-DnD''' -- Use this to convert an attribute from a Dungeons and Dragons Stat into the Stat's associated bonus. 18 becomes 4, 7 becomes -2, etc. This would specify a Bonus Stat Group which finds the stat bonus for the dexterity stat: | ||
− | :::'''''Example''': !group-init --add-group --Stat-DnD dexterity'' | + | :::'''''Example''': {{c|!group-init --add-group --Stat-DnD dexterity}}'' |
− | + | ===Advanced Examples=== | |
You can chain multiple Stat Adjustment Options together. This would specify a Bonus Stat Group where dexterity is first converted to a Dungeons and Dragons stat bonus, and then is bounded to a maximum of +2: | You can chain multiple Stat Adjustment Options together. This would specify a Bonus Stat Group where dexterity is first converted to a Dungeons and Dragons stat bonus, and then is bounded to a maximum of +2: | ||
− | + | <pre>!group-init --add-group --Bounded::2 --Stat-DnD dexterity</pre> | |
Stat Adjustment Options always operate on the value to the right. In the example above, Bounded would be applied to whatever is returned from Stat-DnD. | Stat Adjustment Options always operate on the value to the right. In the example above, Bounded would be applied to whatever is returned from Stat-DnD. | ||
You can also chain multiple attribute specifications together. The Bonus is calculated by adding the results of each together. This would create a Bonus Stat Group that is the sum of the dexterity and initiative stats: | You can also chain multiple attribute specifications together. The Bonus is calculated by adding the results of each together. This would create a Bonus Stat Group that is the sum of the dexterity and initiative stats: | ||
− | + | <pre>!group-init --add-group --Bare dexterity --Bare initiative</pre> | |
A more complicated example. This would specify a Bonus Stat Group which consists of the sum of the Dungeons and Dragons stat bonus computed for the max field of dexterity, the Dungeons and Dragons stat bonus computed from the max field of wisdom limited to a maximum of +2, and the current value of initiative. | A more complicated example. This would specify a Bonus Stat Group which consists of the sum of the Dungeons and Dragons stat bonus computed for the max field of dexterity, the Dungeons and Dragons stat bonus computed from the max field of wisdom limited to a maximum of +2, and the current value of initiative. | ||
− | + | <pre>!group-init --add-group --Stat-DnD dexterity|max --Bounded::2 --Stat-DnD wisdom|max --Bare initiative</pre> | |
===Computing the Bonus=== | ===Computing the Bonus=== | ||
Line 74: | Line 99: | ||
'''Example:''' Assume you have the following 3 stat groups: | '''Example:''' Assume you have the following 3 stat groups: | ||
− | # dexterity|current + initiative|current + rage|current | + | # <code>dexterity|current</code> + <code>initiative|current</code> + <code>rage|current</code> |
− | # dexterity|current + initiative|current | + | # <code>dexterity|current</code> + <code>initiative|current</code> |
− | # dexterity|current | + | # <code>dexterity|current</code> |
− | |||
+ | If a character has attributes named both <code>dexterity</code> and <code>initiative</code>, but doesn't have one named <code>rage</code>, the first Bonus Stat Group would not produce a number. In that case, the second Bonus Stat Group would produce a number, which would then be used as the Bonus. | ||
− | Hopefully that will be enough documentation that people can use this | + | Hopefully that will be enough documentation that people can use this! |
<br clear="all"> | <br clear="all"> | ||
− | + | ==Configuring for Specific Sheets== | |
− | ''' | + | The API have built in '''Configuration''' for a number of sheet, that can be selected through the chat menu when you call <code>!group-init --help</code>. |
− | + | ||
− | + | ||
− | + | ||
− | '''D&D | + | Preset options exists for the following sheets: |
− | + | * '''[[D&D 5E by Roll20]]''' | |
− | + | * '''[[DnD5e Shaped Character Sheet|D&D 5E (Shaped)]]''' | |
− | + | * '''[[Stargate|Stargate RPG]] by Wyvern Gaming''' | |
− | + | ||
− | ''' | + | Here are configuration for other sheets that you can simply copy and run yourself: |
− | + | ||
− | + | '''[[D&D 5E by Roll20]]'''-character Sheet | |
− | + | <pre style="overflow:auto;" data-language="javascript">!group-init --del-group 1 | |
− | + | !group-init --add-group --bare initiative_bonus | |
− | + | </pre> | |
− | + | ||
− | + | '''[[DnD5e Shaped Character Sheet|D&D 5E (Shaped)]]'''- character sheet | |
− | + | <pre style="overflow:auto;" data-language="javascript">!group-init-config --set-dice-count|0 | |
− | + | !group-init --del-group 1 | |
+ | !group-init --add-group --bare initiative_formula | ||
+ | </pre> | ||
+ | |||
+ | '''[[Pathfinder Community Sheet|Pathfinder Community]]'''-character sheet | ||
+ | <pre style="overflow:auto;" data-language="javascript">!group-init --del-group 1 | ||
+ | !group-init --add-group --bare init --tie-Breaker init|current | ||
+ | (Optional) | ||
+ | !group-init-config --set-dice-count|1 | ||
+ | !group-init-config --set-max-decimal|2 | ||
+ | !group-init-config --set-roller|Individual-Roll | ||
+ | !group-init-config --sort-option|Descending | ||
+ | !group-init-config --toggle-replace-roll | ||
+ | </pre> | ||
+ | |||
+ | '''[[SWD6|Star Wars D6]]''' char sheet ''(This is incomplete)'' | ||
+ | * only rolls dexterity number of d6s, and adds dexterity-pip & initiative-pip bonus to roll | ||
+ | * doesn't roll wild die | ||
+ | * doesn't account for anything affecting the dex stats | ||
+ | * doesn't get boosted if character has initiative bonus dice | ||
+ | <pre style="overflow:auto;" data-language="javascript">!group-init --del-group 1 | ||
+ | !group-init-config --set-die-size|6 | ||
+ | !group-init-config --set-dice-count-attribute|dexterity | ||
+ | !group-init --add-group --bare dexteritypip --bare initiativepip | ||
+ | </pre> | ||
'''Vampire the masquerade 20th anniversary Sheet''' | '''Vampire the masquerade 20th anniversary Sheet''' | ||
− | : | + | <pre style="overflow:auto;" data-language="javascript">!group-init --del-group 1 |
− | + | !group-init --add-group --Bare dexterity --Bare wits | |
− | + | !group-init-config --set-die-size|10 | |
+ | </pre> | ||
− | === Changelog = | + | =Examples= |
+ | |||
+ | A [[Chat Menu]] for GMs using the {{5E}}, with several useful commands as buttons. | ||
+ | <pre> | ||
+ | /w GM &{template:desc} {{desc= **GROUP INITIATIVE** %NEWLINE% [Group Initiative](!#Group_Initiative) [Sort Initiative](!#Group_Initiative_Sort) [Add Custom](!#Add-Custom) [Add Round Count](!#Round-Count) | ||
+ | [Clear Initiative](!#Group_Initiative_Clear) [Config](!#Group_Initiative_Config)}} | ||
+ | </pre> | ||
+ | |||
+ | = Changelog = | ||
+ | {{changelog version|0.9.36|2022-02|* Fix new Turn Tracker bug}} | ||
+ | {{changelog version|0.9.35|2020-10-01|* [[Stargate]] added as new preset option.}} | ||
{{changelog version|2.2|2015-02-26|* Fixed bug preventing second tier of attributes from being considered}} | {{changelog version|2.2|2015-02-26|* Fixed bug preventing second tier of attributes from being considered}} | ||
{{changelog version|0.5|2015-02-20|* -}} | {{changelog version|0.5|2015-02-20|* -}} | ||
{{changelog version|0.41|2015-02-01|* Release}} | {{changelog version|0.41|2015-02-01|* Release}} | ||
+ | |||
+ | =See Also= | ||
+ | * [[API:Script Index]] curated list of other APIs | ||
+ | * [[Script:GroupCheck]] | ||
+ | * [[Script:EncounterHelper]] - API for organizing Combat encounters, it has options to use GroupInit. | ||
+ | '''More Combat APIs''' | ||
+ | {{:Combat/API}} | ||
+ | |||
+ | [[Category:Featured articles]] | ||
+ | [[Category:Character Sheets]] | ||
+ | [[Category:Tokens]] | ||
+ | [[Category:DnD5E]] | ||
+ | [[Category:Combat/Initiative]] |
Latest revision as of 05:27, 1 May 2023
Page Updated: 2023-05-01 |
![]() | This page have only some info on the API, and to see the latest documentation for it, run the !group-init --help command inside a game. |
Main Page: API:Script Index
Version: 0.9.36
Last Modified: 2022-02
Code: GroupInitiative
Dependencies: None
Conflicts: None
[edit] Overview
GroupInitiative adds a command for rapidly adding large groups of tokens to the t Turn Tracker. As of v0.3, there are quite a few configuration commands (some examples below).
For full documentation of API, run the !group-init --help
command inside a game.
Contents |
[edit] How it works
The basic process followed by the script is this:
- Remove any tokens that already have a turn.
- For all selected tokens, find the character they represent.
- For each character, figure out the initiative bonus.
- Initiative bonuses are calculated using Bonus Stat Groups. Each Bonus Stat Group is a collection of Attribute Names and Stat Adjustment operations to apply to them.
- Bonus Stat Groups are evaluated in order. The first one that produces a bonus is used. If a character doesn't have one of the Attribute Names listed in the Bonus Stat Group (or that Attribute Name does not contain a valid number), that group does not produce a bonus.
- The selected Roller is used to generate the rolls for each token, with the bonus for its character applied (or 0 if it doesn't have a character).
- Add each token to the t Turn Tracker.
[edit] Commands
[edit] Rolls
Roll20 Mod
Mod Suggestions
- D&D 5E
- Combat
- Character Sheet
- Dynamic Lighting
- Jukebox
- Maps
- Text Chat/Macros
- Tokens
- System Specific
- Mod Guides by Script
Debug
Other
!group-init
- This is the root api command. If you have any tokens selected, it will add them to the initiative order. If you don't have anything selected, it will show the
--help
.
- This is the root api command. If you have any tokens selected, it will add them to the initiative order. If you don't have anything selected, it will show the
!group-init --bonus <bonus>
- This command is just line the bare
!group-init
roll, but will add the supplied bonus to all rolls. The bonus can be from an Inline Roll.
- This command is just line the bare
!group-init --reroll [bonus]
- This command rerolls all of the tokens currently in the turn order as if they were selected when you executed
!group-init
. An optional bonus can be supplied, which can be the result of an inline roll.
- This command rerolls all of the tokens currently in the turn order as if they were selected when you executed
!group-init --ids [...]
- This command uses the configured Roller to determine the initiative order for all tokens whose ids are specified.
!group-init --adjust <adjustment> [minimum]
- Applies an adjustment to all the current Turn Order tokens (Custom entries ignored). The required adjustment value will be applied to the current value of all Turn Order entries. The optional minium value will be used if the value after adjustiment is lower, which can end up raising Turn Order values even if they were already lower.
!group-init --adjust-current <adjustment> [minimum]
- This is identical to
--adjust
, save that it is only applied to the top entry in the Turn Order.
- This is identical to
[edit] Other
!group-init --help
- This shows the help, which includes state information about the currently selected Roller, available Stat Adjustment Options, and the ordered list of Bonus Stat Groups.
!group-init --sort
- Will sort everything in the t Turn Tracker. Good to run after having all intitiatives rolled.
!group-init --toggle-turnorder
- Opens or closes the Turn Order window.
!group-init --clear
- Removes all tokens from the Turn Order. If Auto Open Init is enabled, it will also close the Turn Tracker box.
!group-init --add-group --<adjustment> [--<adjustment>] <attribute name[|<max|current>]> ...
- This command adds another Bonus Stat Group to the end of the list. Examples and further explanation below.
!group-init --del-group <number>
- Removes the Bonus Stat Group identified by number.
!group-init --promote <number>
- Moves the Bonus Stat Group identified by number up one slot.
!group-init-config --set-roller <roller name>
- Sets the Roller to use for figuring initiative.
[edit] Rollers
There are currently 4 different Rollers:
- Least-All-Roll -- Roll 1d20+Bonus for every token, then take the lowest number as the initiative for all tokens.
- Mean-All-Roll -- Roll 1d20+Bonus for every token, then take the average (rounded down) roll as the initiative for all tokens.
- Individual-Roll -- Roll 1d20+Bonus for each token and set each token's initiative to whatever it rolled.
- Constant-By-Stat -- Set the initiative to whatever the Bonus for that token is.
[edit] Add-Group Detailed Explanation
The --add-group
command creates a new Bonus Stat Group. It takes one or more attribute specifications. An attribute specification is made up of one or more Stat Adjustment Options, followed by an Attribute Name (optionally with |max
on the end).
Stat Adjustment Options
- Bare -- Use this when you want just the attributes value. This will add a Bonus Stat Group with just the attribute dexterity in it.
- Example:
!group-init --add-group --Bare dexterity
- Example:
- Floor -- Use this to compute the floor of the value. This is useful when you have attributes that are decimal values, but you want a whole integer.
- Example:
!group-init --add-group --Floor skill bonus
- Example:
- Ceiling -- The same as Floor, but returns the next highest whole integer. The Bonus Stat Group added by this command would turn the attribute skill bonus from 2.35 to 3:
- Example:
!group-init --add-group --Ceiling skill bonus
- Example:
- Bounded:<low>:<high> -- Use this to restrict the value of an attribute to a particular range. This would specify a Bonus Stat Group where dexterity can only be between -2 and +2:
- 'Example:
!group-init --add-group --Bounded:-2:2 dexterity
- 'Example:
- Note: To leave a value unrestricted, you can leave the bound for that side empty. This would specify a Bonus Stat Group where dexterity has a maximum value of +4, but can be as low as it wants:
- Example:
!group-init --add-group --Bounded::4 dexterity
- Example:
- Stat-DnD -- Use this to convert an attribute from a Dungeons and Dragons Stat into the Stat's associated bonus. 18 becomes 4, 7 becomes -2, etc. This would specify a Bonus Stat Group which finds the stat bonus for the dexterity stat:
- Example:
!group-init --add-group --Stat-DnD dexterity
- Example:
[edit] Advanced Examples
You can chain multiple Stat Adjustment Options together. This would specify a Bonus Stat Group where dexterity is first converted to a Dungeons and Dragons stat bonus, and then is bounded to a maximum of +2:
!group-init --add-group --Bounded::2 --Stat-DnD dexterity
Stat Adjustment Options always operate on the value to the right. In the example above, Bounded would be applied to whatever is returned from Stat-DnD.
You can also chain multiple attribute specifications together. The Bonus is calculated by adding the results of each together. This would create a Bonus Stat Group that is the sum of the dexterity and initiative stats:
!group-init --add-group --Bare dexterity --Bare initiative
A more complicated example. This would specify a Bonus Stat Group which consists of the sum of the Dungeons and Dragons stat bonus computed for the max field of dexterity, the Dungeons and Dragons stat bonus computed from the max field of wisdom limited to a maximum of +2, and the current value of initiative.
!group-init --add-group --Stat-DnD dexterity|max --Bounded::2 --Stat-DnD wisdom|max --Bare initiative
[edit] Computing the Bonus
When the Bonus is computed for a character, the Bonus Stat Groups are considered in order. The first Bonus Stat Group to produce a number is used. When a Bonus Stat Group is evaluated, it will produce a number as long as every referenced attribute is present and numeric on the character.
Example: Assume you have the following 3 stat groups:
-
dexterity|current
+initiative|current
+rage|current
-
dexterity|current
+initiative|current
-
dexterity|current
If a character has attributes named both dexterity
and initiative
, but doesn't have one named rage
, the first Bonus Stat Group would not produce a number. In that case, the second Bonus Stat Group would produce a number, which would then be used as the Bonus.
Hopefully that will be enough documentation that people can use this!
[edit] Configuring for Specific Sheets
The API have built in Configuration for a number of sheet, that can be selected through the chat menu when you call !group-init --help
.
Preset options exists for the following sheets:
- D&D 5E by Roll20
- D&D 5E (Shaped)
- Stargate RPG by Wyvern Gaming
Here are configuration for other sheets that you can simply copy and run yourself:
D&D 5E by Roll20-character Sheet
!group-init --del-group 1 !group-init --add-group --bare initiative_bonus
D&D 5E (Shaped)- character sheet
!group-init-config --set-dice-count|0 !group-init --del-group 1 !group-init --add-group --bare initiative_formula
Pathfinder Community-character sheet
!group-init --del-group 1 !group-init --add-group --bare init --tie-Breaker init|current (Optional) !group-init-config --set-dice-count|1 !group-init-config --set-max-decimal|2 !group-init-config --set-roller|Individual-Roll !group-init-config --sort-option|Descending !group-init-config --toggle-replace-roll
Star Wars D6 char sheet (This is incomplete)
- only rolls dexterity number of d6s, and adds dexterity-pip & initiative-pip bonus to roll
- doesn't roll wild die
- doesn't account for anything affecting the dex stats
- doesn't get boosted if character has initiative bonus dice
!group-init --del-group 1 !group-init-config --set-die-size|6 !group-init-config --set-dice-count-attribute|dexterity !group-init --add-group --bare dexteritypip --bare initiativepip
Vampire the masquerade 20th anniversary Sheet
!group-init --del-group 1 !group-init --add-group --Bare dexterity --Bare wits !group-init-config --set-die-size|10
[edit] Examples
A Chat Menu for GMs using the D&D 5E by Roll20/w GM &{template:desc} {{desc= **GROUP INITIATIVE** %NEWLINE% [Group Initiative](!#Group_Initiative) [Sort Initiative](!#Group_Initiative_Sort) [Add Custom](!#Add-Custom) [Add Round Count](!#Round-Count) [Clear Initiative](!#Group_Initiative_Clear) [Config](!#Group_Initiative_Config)}}
[edit] Changelog
v0.9.36 (2022-02)
- Fix new Turn Tracker bug
v0.9.35 (2020-10-01)
- Stargate added as new preset option.
v2.2 (2015-02-26)
- Fixed bug preventing second tier of attributes from being considered
v0.5 (2015-02-20)
- -
v0.41 (2015-02-01)
- Release
[edit] See Also
- API:Script Index curated list of other APIs
- Script:GroupCheck
- Script:EncounterHelper - API for organizing Combat encounters, it has options to use GroupInit.
More Combat APIs
Universal combat scripts assist in making combat flow more easily. This can mean anything from automatically handling initiative(t Turn Tracker), automating exchanges between combatants, or doing more comprehensive management. Scripts made for specific Game systems or Roll20 sheets are listed on D&D 5E & System_Specific
- Group Initiative -- Adds the selected tokens to the turn order after rolling their initiative + configurable data.
- TurnMarker1 -- provides a visual marker to show which token's turn it is & centers map on them.
- CombatMaster(Forum) (by Victor B.) -- API for improving various aspects of combat. Automating condition duration in combat, Initiative improvement, and more.
- autoButtons - automatically generate damage & healing buttons in chat after rolls are made, making it quick & easy to apply the damage & healing to other characters.
- AddCustomTurn(Forum) (by Aaron)-- An easy way to add (and remove) custom turns which increment or decrement, and have auto delete features.
- EncounterHelper -- Group tokens into encounters, making it easy to shown/hide/reset individual encounters on the same map, along with rolling initiative for them.
-
-- A script to simplify Turn Order Management, and move it into chat.
- Critical -- Quick method of determining the outcome of a critical hit.
- Fumbler -- Quick method of determining the outcome of a fumble.
- Initiative Tracker Plus -- Initiative and effect tracker with other features.
- InitiativeMaster -- Standard, Group & Individual Initiative manager for Script:RoundMaster with many additional features
- RoundMaster -- Generic Turn Order Tracker, Token status manager, and Effect macro system