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

Rerolling with modifiers

Forgive me if this has been posted already, a search didn't lead me to any good answers. I'm getting a generic error with this macro: /roll  {20d6+1}ro<1>3 As far as I can tell it's simply because the modifier to the d6 is incompatible with the reroll command. It's not because there are no 1's (I tried rerolling 2s). Is there a workaround? Or is it simply a "one or the other" situation? Ideally I'd like to have it reroll before the modifier is applied to each individual die, which is then measured for success against the last variable (3 in this case).
1592239350
The Aaron
Roll20 Production Team
API Scripter
try: /roll (20d6ro<1>3)+1
1592239405
The Aaron
Roll20 Production Team
API Scripter
Though I don't think you can do a less than and a greater than.
That one didn't give me the error, but it seems like it's just adding 1 to total successes rather than to each roll:
1592244434
The Aaron
Roll20 Production Team
API Scripter
So we're clear, what are you trying to get out of this? 1d6, reroll 1s, +1,  done 20 times, count number >=3 ?
1592246580

Edited 1592247010
I'm trying to put together a macro for 40k rules. For example: You roll 6 To Hit dice looking for a 4+ You get a +1 bonus because you've got a cool gun, and reroll 1s because of a nearby commander. You roll and the dice read 1, 2, 3, 5, and 6. You reroll that 1 and get a 3. Your final results are 3, 4, 4, 5, 6, and 7. Since you're looking for a 4+ you have 5 successful hits. The easy workaround is to modify the target number (e.g. when you have a +1 To Hit you're looking for 3s instead of 4s) but that breaks some rules in a few places. Just kidding, it apparently doesn't work if you try to add math to the comparison, and if you put the math in parenthesis it returns a static number.
1592275974
Oosh
Sheet Author
API Scripter
It should work with square brackets. Try this: /r 20d6>[[4-?{Modifier|0}]]
That worked! After a cursory check it doesn't resolve the lefthand side correctly (as you might imagine, since it adds all the dice together), but resolving the righthand side is certainly good enough! I'm going to play with this a little to see if I can make it do what I want it to, but this is definitely promising. Thanks, everyone!