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

Inline success check

Greetings y'all that are capable of helping So, a macro I'm trying to make for one of my games is a like, double success check? if that makes sense? Right now, what I need is a way to roll say 'A' 6 sided dice, and have each dice be check against a quality 'Q'. So that would be {Ad6}>Q. if A =6 and Q=3, (also, I love dice being sorted high to low, so I basically always put that in) /roll {6d6sd}>4  {6,5,4,4,3,1} = 4 Successes Now what I would like to see if that the total number of successes happens to be higher than a different variable that I can call. lets say the value is 2 and the name is Z I don't do a lot of coding, but I still remember how Ti-84 graphing calculator basic programming works And the exact way I'd do it there (And I've checked, this works) :0 -> C :For(x,1,A) :If randInt(1,6)>Q :C+1 -> C :END :IF C>Z :Then :Disp "WIN" :else :DISP "LOSE" Please I hope the above makes sense, and if anyone could provide a solution I'll be deeply grateful
You are going to need an API script. That is way beyond the scope of what a macro can do.
1543977192
Andrew C
Marketplace Creator
So what you're saying is... 1) I want to roll a variable pool of d6 (so nd6) 2) I want to check the pool for {nd6} > k (and count each d6 >= k) 3) Then check if k > S where S is the number of successes? Shouldn't you be able to have { {(?(Pool of Dice|0))d6}>k}>?(How Many Successes|0) and have it work? I haven't tested it by the way, just using my understanding of macro logic.
1543978169
GiGs
Pro
Sheet Author
API Scripter
This bit by the way: /roll {6d6sd}>4 Doesn't need to be in curly brackets, This works just as well: /roll 6d6sd>4 And with queries to substitute for the fixed numbers /roll {?{Pool of Dice|1}d6sd}>?{Difficulty|4} The tricky part is the extra part, and Andrew's approach doesn't work (sorry, Andrew). You cant have conditionals (if...then) or multiple > (greater thans) on the same expression. Al e. is correct that you need to the API (a Pro subscriber perk) for this. 
1544000380
Ziechael
Forum Champion
Sheet Author
API Scripter
For a basic solution requiring very basic 'at a glance' manual logic you can just go with (replace the bold bit with whatever your sheet uses or a hardcoded value... or even a drop down menu of known players): /em @{selected|charactername}  achieves [[ {?{Pool of Dice|1}d6sd}>?{Difficulty|4}]] successes with a target of [[?{Target successes}]] The target is an inline roll to increase visibility but could just as easily be left as a pure query output value. Beyond something like that you are in API territory as mentioned, if the game creator goes pro then I'd recommend Power Cards, it could handle something like that I'm sure.