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

Rolling D4s to D12s Macro with ??

Is there a way to create a Macro to Roll varying dice {d4 d6 d8 d10 d12} using the query command?  The game I want to play uses multiple sided dice in a single roll but is not a specific number of each each time.  The number of dice needed to make success rolls changes every action.  It would be very tedious to type /roll 1d4, 2d6, 1d8, 1d10, 2d12 or some variation there of each turn I think.
1477709146
Tetsuo
Forum Champion
/roll ?{Number of dice}d?{type of dice?}
Thanks Frank! I shall give that try.
Actually that Macro doesnt work for what I want.  I can roll X number of die for the Y sided die separately.  Example 3d4.  But I cant roll a d4, d6, d8, d10, d12 all at once.  Example  rolling 1d4+2d6+1d8+1d10+2d12.  Also the dice table also only appears to roll one die of choice at a time.  The only way to roll: /r 1d4+2d6+1d8+1d10+2d12 is to type it out.
1477754325
Tetsuo
Forum Champion
Ok, try: /roll ?{Number of d4s|0}d4 + ?{Number of d6s|0}d6 + ?{Number of d8s|0}d8 + ?{Number of d10s|0}d10 + ?{Number of d12s|0}d12
1477755537

Edited 1477756112
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Try this: /r ?{Number of dice to roll|1, 1d?{die1|4|6|8|10|12}|2, 1d?{die1|4|6|8|10|12} + 1d?{die2|4|6|8|10|12} |3, 1d?{die1|4|6|8|10|12} + 1d?{die2|4|6|8|10|12} + 1d?{die3|4|6|8|10|12}|4, 1d?{die1|4|6|8|10|12} + 1d?{die2|4|6|8|10|12} + 1d?{die3|4|6|8|10|12} + 1d?{die4|4|6|8|10|12}|5, 1d?{die1|4|6|8|10|12} + 1d?{die2|4|6|8|10|12} + 1d?{die3|4|6|8|10|12} + 1d?{die4|4|6|8|10|12} + 1d?{die5|4|6|8|10|12}} ?{Number of dice to roll|1, ?{# of die 1}d?{die1|4|6|8|10|12}|2, ?{# of die 1}d?{die1|4|6|8|10|12} + ?{# of die 2}d?{die2|4|6|8|10|12} |3, ?{# of die 1}d?{die1|4|6|8|10|12} + ?{# of die 2}d?{die2|4|6|8|10|12} + ?{# of die 3}d?{die3|4|6|8|10|12}|4, ?{# of die 1}d?{die1|4|6|8|10|12} + ?{# of die 2}d?{die2|4|6|8|10|12} + ?{# of die 3}d?{die3|4|6|8|10|12} + ?{# of die 4}d?{die4|4|6|8|10|12}|5, ?{# of die 1}d?{die1|4|6|8|10|12} + ?{# of die 2}d?{die2|4|6|8|10|12} + ?{# of die 3}d?{die3|4|6|8|10|12} + ?{# of die 4}d?{die4|4|6|8|10|12} + ?{# of die 5}d?{die5|4|6|8|10|12}}
1477755631

Edited 1477756195
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'm assuming that you can only ever roll a max of 5 dice in the above, but you could easily extend it to whatever the system's max is. If the system doesn't have a max, then the best you will be able to do is do it out to some reasonable maximum as you can't make a dynamically long roll query to infinite lengths without the API. The wiki for the above usage of nested roll queries:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> EDIT: I would also HIGHLY recommend saving this as a character ability rather than a global macro as reopening and then resaving global macros eats the html replacements. EDIT the Second: realized that I misread your post and you need to be able roll variable numbers of each die as well, I'll change the above for that. EDIT the third: the above now shows dynamic rolls of both number and size of die out to 5 different die sizes
1477759501

Edited 1477759548
Thank you for all the replies. &nbsp;I will give these a try and keep experimenting. &nbsp;Thanks again! :)
&nbsp; Success. &nbsp;Showing off idea to friend in Google+ and here is the way to do what I want. &nbsp;Roll the die. &nbsp;Drag the die to the table. &nbsp;Highlight all the dice you want to roll. &nbsp;Right click on the dice. &nbsp;Go to Multi-Sided and then chose Random Side.