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

Dice Result = A Different Result

Is it possible to set up a roller where one result becomes another? Such as (on 2d6+X) 13-15 = 1 16-18 = 2 19-21 = 3 22-24 = 4 I've been looking around and I've been unable to find anything I can use. Does anyone know if such an option exists and how can I make it? It would actually be preferable if this was a macro as X can be anywhere from 2 to 12.
1574606513
Spren
Sheet Author
The basic macro system wouldn't be able to do something like that. As a Pro user if you are the GM you could use an api script. I know the Powercards script has the ability to add conditionals.
My coding abilities are bad though.
1574618903
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Only if you can come up with a strictly mathematical transformation that can convert one of those results into the results you are looking for. It would likely be on the complex side. This is something I find spreadsheets useful for, as you can list the initial results down one column and try out a formula on the second, fine-tuning it until you get what you are looking for.
1574630211
GiGs
Pro
Sheet Author
API Scripter
To build on keith's suggestion, it looks like your dice roll follows a simple divide by 3 rule, so you could use something like /roll {ceil(2d6/3)-4,0d0}kh1 Explaining each part: ceil(2d6/3) divides by 3 and rounds up. So 13-15 = 5. Then subtract 4 to make it 1. { , }kh1 Takes numbers or rolls separated by commas, and keeps the highest one (kh1). One problem with it is you cannot mix numbers and rolls - they have to be all numbers or all rolls. so 0d0  is a way of making the system think the number zero is a roll. {ceil(2d6/3)-4,0d0}kh1 So, finally this takes your desired roll, or 0, whichever is higher. It discards all the rolls that would be below 0.
Thanks, with some fiddling to make it fit my needs that worked!