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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Trying to setup a dice roller with different dice options, any help appreciated

Hi, I've been trying to get a dice roller working where I can select from a variety of dice, multiple dice and ideally the output is in a template. The formula I've working on is: /roll ?{Number of dice|1}d?{Number of sides|4|6|8|10|12|20} This gives a pretty ugly output but works. I've been trying to get the above to work with the template command  &{template:default} {{name=@{selected|token_name}}} Can anyone give me some help to setup the dice roll command and output into the template please.
1644488891
GiGs
Pro
Sheet Author
API Scripter
This will make the roll: &{template:default} {{name=@{selected|token_name}}}{{[[?{Number of dice|1}d?{Number of sides|4|6|8|10|12|20}]]}} If you want to show the number of dice, so can split it up &{template:default} {{name=@{selected|token_name}}}{{?{Number of dice|1}d?{Number of sides|4|6|8|10|12|20}=[[?{Number of dice}d?{Number of sides}]]}}
That's amazing. Thank you so much for that, I'm still working on my Macro skills but clearly It's a work in progress.
1644524354
Andreas J.
Forum Champion
Sheet Author
Translator
Steve P. said: That's amazing. Thank you so much for that, I'm still working on my Macro skills but clearly It's a work in progress. <a href="https://wiki.roll20.net/Complete_Guide_to_Macros_%26_Rolls" rel="nofollow">https://wiki.roll20.net/Complete_Guide_to_Macros_%26_Rolls</a>