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 .
×

Macro: Combining Dice Functions (Re-Roll Once Issue)

I'm having a small problem getting multiple functions to work together in a single macro. I've re-named the attributes I'm using to be generic and a bit easier to read. Intended Result: Utilizing the default, generic character sheet I am building macros for individual customizations a player might choose. Each roll is built from two components: a Stat and a Rating. Both are Attributes in the character sheet I am referencing. Each roll is checked against a static Success Threshold of 4 or greater, and the number of Successes is the important value to give to the player. For this particular equipment option, it allows the player to re-roll any failed dice once, and then gives the player the total number of successes. Utilized Macro: Stat: 4 Rating: 6 "/roll {@{Stat}D@{Rating}ro<3}>4" Expected Result: From my understanding, the Macro should pull @{Stat} and get 4, then pull @{Rating} and get 6. So at this point it should look like "{4D6ro<3}>4". Then it should roll the 4D6, and check if any are equal to or less than 3. So if we get 1,4,5,6 then it should find that 1 is less than 3. It should then reroll that once, so even if the second roll is a 2 it will leave it there. So it should check 4, 5, 6, 2 to see if any are greater than or equal to 4. So 4, 5, and 6 are, and thus it should display "3 Successes". Actual Result: It is inconsistent. The following is the last 10 rolls made using the above macro, edited to fit in once image easily. The green-boxed rolls work as they should, the red-boxed rolls roll too many times, and the yellow-boxed rolls roll too few times. And this distribution is pretty similar to the whole slew of test rolls I did.
1498452300
The Aaron
Pro
API Scripter
Those all look correct to me?  The greeted out dice are the ones that were refilled, the one immediately following it is the result from the refill.  Taking your yellow one as an example, the initial roll was: 3 6 1 5 wkth rerolls: 3 2 6 1 3 5
That's why certain numbers are greyed out? There wasn't anything in the Dice Reference for re-rolling that I saw that mentioned changing the display, so I thought it was appending the re-rolls at the end, instead of doing them immediately after. So I thought, using the yellow example again, that the initial roll was 3 2 6 1 and then it would re-roll twice getting 3 and 5. Thanks for the help, I have a lot less work to do than I thought.
1498521691
The Aaron
Pro
API Scripter
No problem!