Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Ask for variable, then roll that die size?

1586384331

Edited 1586384381
"Ask for die size"  Var=X "Roll 1d"X  [[1dX]] How would I do this? Ask for die size, then roll 1 die of that size, and output  what die size it was. 
1586386325
Andrew R.
Pro
Sheet Author
Roll Queries are what you want. <a href="https://roll20.zendesk.com/hc/en-us/articles/360037773133-Dice-Reference" rel="nofollow">https://roll20.zendesk.com/hc/en-us/articles/360037773133-Dice-Reference</a>
1586422699
GiGs
Pro
Sheet Author
API Scripter
To be specific /roll 1d?{What Die Size?|6} I put a default value of 6 in there.
1586424390
Ziechael
Forum Champion
Sheet Author
API Scripter
Or to limit the die choice to the standard ones and provide a default number of dice to roll but have that as a variable too: /roll ?{How Many Dice|1}d?{What Die Size?|4|6|8|10|12|20|100}
1586425969
GiGs
Pro
Sheet Author
API Scripter
Oh yes, thats a better way to do it.
1586426327
Ziechael
Forum Champion
Sheet Author
API Scripter
"Many ways to skin a cat..." How that made it to be a common saying (in my country at least) is beyond me... but hey, when it applies, it applies :D