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

From Roll20 Wiki

Jump to: navigation, search
(Created page with "{{script overview |name=RollStats |author={{user profile|503018|manveti}} |version=0.1 |lastmodified=2015-05-12}} '''RollStats''' tracks roll statistics and displays them in ...")
 
(redirect to Script Index, API no longer available)
 
(3 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=RollStats
 
|name=RollStats
 
|author={{user profile|503018|manveti}}
 
|author={{user profile|503018|manveti}}
|version=0.1
+
|version=0.2
|lastmodified=2015-05-12}}
+
|lastmodified=2015-09-29
  
 
'''RollStats''' tracks roll statistics and displays them in various formats.  Rolls are tracked for each player, for each die size, both for the current session (since the API sandbox was started) and for all time.
 
'''RollStats''' tracks roll statistics and displays them in various formats.  Rolls are tracked for each player, for each die size, both for the current session (since the API sandbox was started) and for all time.
Line 11: Line 15:
  
 
=== Syntax ===
 
=== Syntax ===
 +
<!-- suppress category
 
{{syntaxbox top|cron|formal=true}}
 
{{syntaxbox top|cron|formal=true}}
 
{{API command|rollstats}} {{API parameter|name=options|optional=true}}<br>
 
{{API command|rollstats}} {{API parameter|name=options|optional=true}}<br>
Line 25: Line 30:
 
* '''-h''', '''--help''': Displays a help message and exits.
 
* '''-h''', '''--help''': Displays a help message and exits.
 
* '''-g''', '''--global''': Shows stats for all players.
 
* '''-g''', '''--global''': Shows stats for all players.
* '''-p''' ''P'', '''--player''' ''P'': Shows stats for player P, specified by display name, player ID, or Roll20 user ID.
+
* '''-p''' ''P'', '''--player''' ''P'': Shows stats for player ''P'', specified by display name, player ID, or Roll20 user ID.
 
* '''-l''', '''--leaderboard''': Shows summary information (roll count, average value, and expected value) for each player, sorted in decreasing order of value / expected (i.e. lucky to unlucky).
 
* '''-l''', '''--leaderboard''': Shows summary information (roll count, average value, and expected value) for each player, sorted in decreasing order of value / expected (i.e. lucky to unlucky).
 
* '''-d''' ''N'', '''--die''' ''N'': Shows more detailed stats (count and %, plus expected count and %, for each possible roll, along with the mean and expected mean) for the specified die size.
 
* '''-d''' ''N'', '''--die''' ''N'': Shows more detailed stats (count and %, plus expected count and %, for each possible roll, along with the mean and expected mean) for the specified die size.
 
* '''-s''', '''--session''': Shows only stats for the current session (since the API sandbox was last restarted).  In most cases, this will be for the current play session, but it might be less if the sandbox was restarted during play or more if players remain connected between play sessions.
 
* '''-s''', '''--session''': Shows only stats for the current session (since the API sandbox was last restarted).  In most cases, this will be for the current play session, but it might be less if the sandbox was restarted during play or more if players remain connected between play sessions.
 
* '''-c''', '''--chat''': Shows stats in the chat instead of whispering them to the player who executed the command.
 
* '''-c''', '''--chat''': Shows stats in the chat instead of whispering them to the player who executed the command.
* '''--clear''': Clears session stats if combined with -s; otherwise clears "all time" stats.  Can only be executed by a GM.}}
+
* '''--clear''': Clears session stats if combined with '''-s'''; otherwise clears "all time" stats.  Can only be executed by a GM.}}
 
{{param description bottom}}
 
{{param description bottom}}
 
+
-->
 
The default mode of operation shows a high-level summary (roll count, mean value, and expected value for each die size rolled) of all the rolls made by the player who executed the command.
 
The default mode of operation shows a high-level summary (roll count, mean value, and expected value for each die size rolled) of all the rolls made by the player who executed the command.
  
 
=== Changelog ===
 
=== Changelog ===
 +
{{changelog version|0.2|2015-09-29|* Handle malformed roll nodes better}}
 
{{changelog version|0.1|2015-05-12|* Initial release}}
 
{{changelog version|0.1|2015-05-12|* Initial release}}

Latest revision as of 19:58, 20 September 2021

  1. RedirectAPI:Script Index

script overview |name=RollStats |author=manveti |version=0.2 |lastmodified=2015-09-29

RollStats tracks roll statistics and displays them in various formats. Rolls are tracked for each player, for each die size, both for the current session (since the API sandbox was started) and for all time.

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


[edit] Syntax

The default mode of operation shows a high-level summary (roll count, mean value, and expected value for each die size rolled) of all the rolls made by the player who executed the command.

[edit] Changelog

v0.2 (2015-09-29)

  • Handle malformed roll nodes better


v0.1 (2015-05-12)

  • Initial release