Difference between revisions of "Script:Wild Dice"
From Roll20 Wiki
Andreas J. (Talk | contribs) m (image) |
Andreas J. (Talk | contribs) (add SWD6 example) |
||
Line 14: | Line 14: | ||
* '''<code><nowiki>!wd [[dice expression]]</nowiki></code>''' example: <code><nowiki>!wd [[4d6+2]]</nowiki></code> rolls 3 normal d6s, and one Wild Die | * '''<code><nowiki>!wd [[dice expression]]</nowiki></code>''' example: <code><nowiki>!wd [[4d6+2]]</nowiki></code> rolls 3 normal d6s, and one Wild Die | ||
− | * '''<code><nowiki>!wwd [[dice expression]]</nowiki></code>''' command to whisper rolls to GM | + | * '''<code><nowiki>!wwd [[dice expression]]</nowiki></code>''' command to whisper rolls to [[GM]] |
* '''<code><nowiki>!wd --help</nowiki></code>''' posts the help menu in the chat. | * '''<code><nowiki>!wd --help</nowiki></code>''' posts the help menu in the chat. | ||
<br> | <br> | ||
[[File:Wild-Dice-result-v3-4.png]] | [[File:Wild-Dice-result-v3-4.png]] | ||
− | < | + | === Examples === |
+ | You can reference character stats in your rolls. | ||
+ | |||
+ | {{ex}} | ||
+ | Using the [[SWD6|Star Wars D6]] character sheet, this API command makes a Dexterity roll for character "Bob". | ||
+ | <pre style="overflow:auto;white-space:pre-wrap;">!wd [[(@{Bob|dexterity} -@{Bob|WoundMod} +@{Bob|Force_Up} + ?{Dice mods|0})d6 + @{Bob|dexteritypip} + ?{Other Mods(pip)|0}]]</pre> | ||
+ | |||
+ | The dice expression is based on the sheet's original macro for making a dexterity roll: | ||
+ | <pre style="overflow:auto;white-space:pre-wrap;">&{template:swd6} {{name=Dexterity}} {{Roll=[[(@{Bob|dexterity} -@{Bob|WoundMod} +@{Bob|Force_Up} + ?{Dice mods|0} -1)d6cf0cs7 + @{Bob|dexteritypip} + ?{Other Mods(pip)|0} + 1d6@{Bob|wilddie}]]}}</pre> | ||
=== Changelog === | === Changelog === | ||
+ | {{changelog version|0.3.5|2020-06-08|* {{repo|Roll20/roll20-api-scripts/pull/992 update}} }} | ||
{{changelog version|0.3.4|2020-03-30|* bugfix}} | {{changelog version|0.3.4|2020-03-30|* bugfix}} | ||
{{changelog version|0.3.2|2017-03-30|* Updated}} | {{changelog version|0.3.2|2017-03-30|* Updated}} | ||
{{changelog version|0.2|2015-02-28|* Added pips}} | {{changelog version|0.2|2015-02-28|* Added pips}} | ||
{{changelog version|0.1|2015-02-28|* Release}} | {{changelog version|0.1|2015-02-28|* Release}} |
Revision as of 10:38, 5 August 2021
Version: 0.3.4
Last Modified: 2020-03-30
Code: WildDice
Dependencies: IsGM
Conflicts: None
Implements the Wild Dice rolling mechanic. Used in various d6 systems like Star Wars D6.
It replaces one d6 in a given roll with an exploding die, and in the special case of the exploding die rolling a 1, it removes the 1 and the highest die roll from the roll total.
Commands:
-
!wd [[dice expression]]
example:!wd [[4d6+2]]
rolls 3 normal d6s, and one Wild Die -
!wwd [[dice expression]]
command to whisper rolls to GM -
!wd --help
posts the help menu in the chat.
Examples
You can reference character stats in your rolls.
Example:
Using the Star Wars D6 character sheet, this API command makes a Dexterity roll for character "Bob".
!wd [[(@{Bob|dexterity} -@{Bob|WoundMod} +@{Bob|Force_Up} + ?{Dice mods|0})d6 + @{Bob|dexteritypip} + ?{Other Mods(pip)|0}]]
The dice expression is based on the sheet's original macro for making a dexterity roll:
&{template:swd6} {{name=Dexterity}} {{Roll=[[(@{Bob|dexterity} -@{Bob|WoundMod} +@{Bob|Force_Up} + ?{Dice mods|0} -1)d6cf0cs7 + @{Bob|dexteritypip} + ?{Other Mods(pip)|0} + 1d6@{Bob|wilddie}]]}}
Changelog
v0.3.5 (2020-06-08)
v0.3.4 (2020-03-30)
- bugfix
v0.3.2 (2017-03-30)
- Updated
v0.2 (2015-02-28)
- Added pips
v0.1 (2015-02-28)
- Release