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

Help request - macro to change a 1 on a d6 into a 2

I'm looking in the Wiki for a macro that will accomplish changing a roll of 1 on a dice roll into a 2. The closest macro I've found thus far is one that will re-roll a dice (1d6r). Is there a macro that will do this that I haven't seen yet? Thanks!!
[[ 1d6ro1]] will roll a d6, and if it gets a 1 it will re-roll it only once. [[ {1d6, 2}}kh ]] will roll a d6, compare it to "2" and keep the higher of the two (so if you rolled a 1, the 2 is higher and will be kept)
1434478785
The Aaron
Roll20 Production Team
API Scripter
If you need to do that with multiple d6s and want to preserve the odds of a 2 (2-in-6, where 3-6 is 1-in-6 and 1 is 0-in-6), you can setup a rollable table (say, d6min2) and roll them like: [[ 3t[d6min2] ]] I actually have an API script that creates these weighted tables: <a href="https://app.roll20.net/forum/post/950142/script-we" rel="nofollow">https://app.roll20.net/forum/post/950142/script-we</a>...
Very helpfull - Thanks!!
Hey Mark, when I copy/past "[[ {1d6, 2}}kh ]]", I get: "Cannot mix sum and M rolls in a roll group" in the chat column. Any suggestions?
1434480139

Edited 1434487316
The Aaron
Roll20 Production Team
API Scripter
Both things in a group must be the same type. The 1d6 is a die type, the 2 is not. This should correct it: [[ {1d6, 2 d1 }kh1 ]] Edit: Fixed with comments from below!
1434480478

Edited 1434480647
Wes
Pro
Sheet Author
Glad I refreshed! "The Aaron" Beat me to it!
When I test "[[ {1d6, 2d1}}kh ]]", it seems to roll a d6 and then add 2d1 to the roll... Am I not seeing something?
It just looks like it is adding together, but if you do the math... it is only picking the higher roll.
Nope. I activate the macro. It rolls a 3, but the final "roll" is a 5.
You have an extra } curly brace at the end. If you do [[ {1d6, 2d1}kh ]] it actually throws an error. You need to use kh1 instead.
Thanks HoneyBadger! It works! =)