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

Ordering rollable table results

I'm using this guide for making a roll table that properly simulates successes and failures for exalted and while it's great, one improvement would be to have the results ordered in descending value. When previously using a macro to roll a pool of d10s, I used the sorting modifier for this but I don't know how to apply that to a table or how to do an equivalent. I realise it might not be possible as it's a table and not a range of numbers but I'm pretty new to using the more fiddly parts of roll20 so I thought I'd ask, sorry if this is a pointless or obvious question.
1628685177
GiGs
Pro
Sheet Author
API Scripter
If 1 isnt a special result, you can do this without using a rollable table. There's a way to count successes, and failure, where successes count a 1 success, and failures count as -1, and rolls in between count as 0. Then you can add 1 to the result, so you get 0, 1, and 2 successes. Here's how to do that: /roll {?{NumDie|1}d10sd}>10f<6 +?{NumDie|1} or [[{?{NumDie|1}d10sd}>10f<6 +?{NumDie|1}]] So each die gives -1, 0, or 1 success, than adding the number of dice rolled converts each die into 0, 1, or 2 successes. The above will sort the dice in descending order.
1628685970

Edited 1628686244
GiGs
Pro
Sheet Author
API Scripter
You could go further and have successes coded as green, and failures as red, by using the cs and cf modifiers. And since the double success can vary from 7-10, you could have that as an input too. Putting it all together /roll {?{Number of Dice?|1}d10cs>?{Doubles On?|10|9|8|7|No Doubles,11}cf<6sd}>?{Doubles On?}f<6 +?{Number of Dice?|1} [[{?{Number of Dice?|1}d10cs>?{Doubles On?|10|9|8|7|No Doubles,11}cf<6sd}>?{Doubles On?}f<6 +?{Number of Dice?|1}]] This will show double successes as green, normal successes uncoloured, and failures as red. You can replace Number of Dice and Doubles On with attribute references, just make sure to insert them in both places (each is used twice).
Oh damn, this is excellent! I have put a small additional element on the end for adding automatic successes (a pretty common occurrence in the system) but this is very smooth. /roll {?{Number of Dice?|1}d10cs>?{Doubles On?|10|9|8|7|No Doubles,11}cf<6sd}>?{Doubles On?}f<6 +?{Number of Dice?|1}+?{Automatic Successes|0} Thanks very much for your help!
1628697895
GiGs
Pro
Sheet Author
API Scripter
You're welcome. I'm glad you found it helpful :)