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 roll ranges.

1390123046

Edited 1390123173
Sorry for the ineffectual title, can't think how to summarize this question in a little title. Would it be possible to set up a macro that returns different value depending on different ranges of the die roll. I need my monster to deal damage to a player, it follows a formula that reads. Roll 2d20. If the total of both rolls are following, do the following damage. 1-8: +1 damage. 9-19: +2 damage. 20-34: +3 damage. 35-40: +4 damage. Maybe it is the mathmatical part of my brain that refuse to wake up, but I can't think of a way (if it even is possible in roll20) to do this. Alternatively, I can set up a table and weigh the different damages, but I won't be able to add individual monster dmg modifier to the roll. If anyone know if this is possible please let me know. (: Thanks, Swidt
1390127056
Gauss
Forum Champion
You probably need to use the API to automate this. I would talk to the API forum and perhaps they can write you a script.
Merci, I will seek help there :).
1390137884

Edited 1390138655
DXWarlock
Sheet Author
API Scripter
You can do it with macros and some math: Such as: [[1d6]]+[[(floor((2d20)/10))+1]] will do 1d6 damage + (1-4) what its doing is rolling 1d6, and also rolling 2d20 then dividing by 10 and trimming to whole number and adding 1..so 1 to 10=1, 11 to 20=2. etc. and adding that to the 1d6 roll. Just change the 1d6 to suit what you need. or the 2d20/10 to whatever end result you need. edit: hmm read it too fast and been up for too long in a row :) Just noticed its not 1-10,11-20, and so on... its 1-8, then 9-19..no common denominator of one number...probably can be done with a lot of math in the roll, let me smash my head against it..has to be a way. If I cant think of one, maybe G G can..hes made some insane macro math.
1390138672

Edited 1390138892
Yeah I managed to do a little script to set it up, and then used a macro to call said script. But thank you for reminding how the 10th system worked. Hehe sometimes math can be useful ;)