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 .
×
This post has been closed. You can still view previous posts, but you can't post any new replies.

Complex math

I've found that you can't use very complex math when determining rolls. Any use of parentheses will prevent the formula from working, and the program only follows a very simple order of operations. For example, I want to be abe to add two seperate attributes together, then use that sum as the number of dice I roll. Any way I try to type it, however comes out wrong. Here's basically what I want to roll: /roll (@agility+@perception)d12!!>9 Theoretically that should sum my Agility score and my Perception score, then roll that many d12's and return to me how many were greater than 9. It doesn't work, though. It just returns an error message. I've tried it using @agility+@perceptiond12, but that only returns my Agility added to each of the perception dice I rolled. We need a dice macro that allows at least algebra level math as well as order of operations. The system I'm using won't work without it.
Just a thought, but what happens if you do @agilityd12+@perceptiond12?
1358003474
Gauss
Forum Champion
You can do the following: Step 1: /roll @agility d12!!>9+ @perception d12!!>9 Step 2: place the cursor just before the 'd' and delete the spaces. Now it looks like this: /roll @agilityd12!!>9+ @perceptiond12!!>9 This will do exactly what you asked for. Note: the exploding dice will not add to the successes if the size of the die is eqal to or greater than the target number. This is because !! explodes the dice and adds them together. You may wish to use ! only if you want to count each exploded die separately. Example: Lets assume I roll 5d12!!>9 and I get the following rolls: (1+7+4+9+22) = 2 successes. If I had been rolling 5d12!>9 I would have gotten the following: (1+7+4+9+12+10) = 3 successes. In the first, 12+10=22 which is one success. In the second, 12+10 were not added together and each counted as it's own success. - Gauss