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

querry for dice type?

i cant for the life of me figure out how to get a macro set up to query for the dice type im trying to set up a macro that i click once, it asks me how many dice, then it asks me what dice type.  this is a working macro that asks me how many d4 to roll and then asks for a modifier to add on [[?{number of dice?|1}d4+?{modifier?|0}]] this is probably super simple but im not well versed in macros, and ive spent hours searching and trying different things.
1561151181

Edited 1561151333
Kraynic
Pro
Sheet Author
Maybe something like this: [[?{number of dice?|1}d?{number of sides?|4,4|6,6|8,8|10,10|12,12|20,20|30,30|100,100}+?{modifier?|0}]] In that example of the sides query, the numbers before the commas are displayed in the dropdown, and what is after the comma, but before the pipe, is used as the answer in the formula.
thank you so much.
1561158982

Edited 1561167634
GiGs
Pro
Sheet Author
API Scripter
Kraynics suggestion is great. I just want to add that in this case  the macro can be simplified a touch: [[?{number of dice?|1}d?{number of sides?|4|6|8|10|12|20|30|100}+?{modifier?|0}]] Then you have something like this: |6,6| As Kryanic points out, the value before the comma is what is shown in the dropdown, and the number after is what is used in the macro. This allows you to have something like: |six sided,6| This would show to the player "six sided" in the dropdown, and when they select it, the "6" would be used in the macro. But when the values before and after the comma are the same, you dont have to use them both, so if you just want to show "6" to the players, and use "6" in the macro, this is fine: |6|
1561166496
Kraynic
Pro
Sheet Author
Interesting.  I've never tried to shorten multiple entries.  lol
thanks everybody, i got it working just how i needed it