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

From Roll20 Wiki

Jump to: navigation, search
m (Touch up grammar w.r.t. multiple options.)
(redirect to Script Index, API no longer available)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{script overview
+
#Redirect[[API:Script Index]]
 +
<!-- Don't delete redirect, help center links to this page even though API have been removed
 +
[[Category:Discontinued API Scripts]] -->
 +
 
 +
script overview
 
|name=HiddenRolls
 
|name=HiddenRolls
 
|author={{user profile|503018|manveti}}
 
|author={{user profile|503018|manveti}}
|version=0.2
+
|version=0.3
|lastmodified=2015-05-09}}
+
|lastmodified=2015-06-26
  
 
'''HiddenRolls''' is a package of commands for hiding roll information in various ways.  Inline rolls can be modified to display only the total (hiding the formula), only the roll values (hiding the formula and totals), or only the formula (whispering the totals to the GM).
 
'''HiddenRolls''' is a package of commands for hiding roll information in various ways.  Inline rolls can be modified to display only the total (hiding the formula), only the roll values (hiding the formula and totals), or only the formula (whispering the totals to the GM).
Line 11: Line 15:
  
 
=== Syntax ===
 
=== Syntax ===
 +
<!-- supress category
 
{{syntaxbox top|HiddenRolls|formal=true}}
 
{{syntaxbox top|HiddenRolls|formal=true}}
 
{{API command|hideroll}} {{API parameter|name=options|optional=true}} {{API parameter|name=command}}<br>
 
{{API command|hideroll}} {{API parameter|name=options|optional=true}} {{API parameter|name=command}}<br>
Line 34: Line 39:
 
:!hideall: Sends the stripped command to global chat instead of whispering it to the sender.}}
 
:!hideall: Sends the stripped command to global chat instead of whispering it to the sender.}}
 
{{param description bottom}}
 
{{param description bottom}}
 
+
-->
 
=== Use ===
 
=== Use ===
  
Line 72: Line 77:
  
 
=== Changelog ===
 
=== Changelog ===
 +
{{changelog version|0.3|2015-06-26|* Handle roll templates transparently}}
 
{{changelog version|0.2|2015-05-09|* Add workaround for roll templates}}
 
{{changelog version|0.2|2015-05-09|* Add workaround for roll templates}}
 
{{changelog version|0.1|2015-05-08|* Initial release}}
 
{{changelog version|0.1|2015-05-08|* Initial release}}

Latest revision as of 20:02, 20 September 2021

  1. RedirectAPI:Script Index

script overview |name=HiddenRolls |author=manveti |version=0.3 |lastmodified=2015-06-26

HiddenRolls is a package of commands for hiding roll information in various ways. Inline rolls can be modified to display only the total (hiding the formula), only the roll values (hiding the formula and totals), or only the formula (whispering the totals to the GM).

It is recommended that this script be used in conjunction with the CommandShell module, which will improve output formatting and command discovery.


Contents

[edit] Syntax

[edit] Use

  • !hideroll replaces all inline rolls in the given command with their respective totals.
  • !hiderolls is a synonym for !hideroll.
  • !hidetotal replaces all inline rolls in the given command with new expressions containing only the dice from the original (i.e. no bonuses or annotations). The full expression is whispered to the GM.
  • !hidetotals is a synonym for !hidetotal.
  • !hideall forwards the given command to the GM. The command is also whispered back to the sender, with inline rolls removed (and replaced with their respective formulas).


In order to guarantee the integrity of roll results, the Roll20 API does not provide a way to insert roll results into an inline roll. As a result, HiddenRolls displays dice results as "{1d0+V1+V2+...}[XdY] ", where V1, V2, etc. are roll values and XdY is the dice expression. For example, "[[1d20+7]]" would be displayed as "[[{1d0+12}[1d20] +7]]". The "1d0" allows the expression to function like a dice expression (otherwise the label would generate errors in certain conditions), and the label allows the GM to verify the roll formula.

[edit] Examples

Below are some example commands, along with the chat commands they will generate. Note that the whispers below are sent by the API, so they will not appear in the sender's chat log unless they are the target of the whisper.

!hideroll The ogre swings its club ([[1d20+7]] to hit), doing [[2d6+5]] damage
The ogre swings its club ([[19]] to hit), doing [[13]] damage
!hiderolls -v The fireball explodes for [[5d6]] damage
The fireball explodes for [[17]] damage
/w gm The fireball explodes for [[{1d0+1+3+6+5+2}[5d6] ]] damage
!hidetotal The troll makes a toughness save: [[1d20+8]]
The troll makes a toughness save: [[{1d0+15}[1d20] +0[hidden] ]]
/w gm The troll makes a toughness save: [[{1d0+15}[1d20] +8]]
!hidetotals -v The enchanter's spell does [[2d8+2]] damage
The enchanter's spell does [[{1d0+7+3}[2d8] +0[hidden] ]] damage
/w gm The enchanter's spell does [[{1d0+7+3}[2d8] +2]] damage
/w Tim The enchanter's spell does [[{1d0+7+3}[2d8] +2]] damage
!hideall Slipping stealthily into a sneaky stance: [[1d20+12]]
/w gm Slipping stealthily into a sneaky stance: [[1d20+12]]
/w Snake Slipping stealthily into a sneaky stance: [1d20+12]
Note the single brackets: the expression is not an inline roll, and is present only to display the formula being rolled.
!hideall -v Is it live or is it Magicex? [[1d20+8]] will save.
/w gm Is it live or is it Magicex? [[1d20+8]] will save.
Is it live or is it Magicex? [1d20+8] will save.
Note the single brackets: the expression is not an inline roll, and is present only to display the formula being rolled.

[edit] Changelog

v0.3 (2015-06-26)

  • Handle roll templates transparently


v0.2 (2015-05-09)

  • Add workaround for roll templates


v0.1 (2015-05-08)

  • Initial release