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 .
×
Advertisement Create a free account

Roll Random List

Score + 1
I searched but did not find, so I made this. If its somewhere else tell me and Ill vote like this: /r "apple, banana, cranberry, date"  rolls 1d4 and returns the result, so rolling 2 returns banana and rolling 3 returns cranberry. length is arbitrary, say, 'up to 20' /r "black, blue, green, red, white" rolls a 1d5 and returns the result, so a 2. returns blue. etc please make this happens without a macro. it should be fairly easy to implement and is super useful. there should be some way to hide the list and just show result to players. like of the DM uses it or perhaps the type of quotes used.
1623389493
Scott C.
Forum Champion
Sheet Author
API Scripter
I believe what you want is rollable tables. They aren't quite that dynamic, but are how table rolls are implemented.
can they be done inline? what I am suggesting is not a lot of code, 10-20 lines parseinputstring "g,h,j" = new array roll = rand(count(new array)) return: new array(roll) its really about that easy for the basics