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] Graded Checks Success/Failure

1462328925

Edited 1462329039
So while running mutants and mastermind game last night I notice that when it came to graded checks i was very slow in figuring out the degrees of success/failure &nbsp;so i would get frustrate at my self which would take it longer for me to figure out, so i was wondering if some one could help me with a macro/ or write a script that i can easily calculate the graded result. so graded checks work like this (for those who dont know what im talking about) Result of check - DC for ever whole 5 positive or negative is a degree of failure (for example [DC 20] a result of 30 would be 3 degrees of success while a result of 10 would be 2 degrees of failure) the only exception is that again [DC 20] result of 21 is 1 degree of success and a result of 19 would be 1 degree of failure so essentially the first failure degree are much larger than the rest &nbsp;[19-11] ( <a href="http://www.d20herosrd.com/#TOC-GRADED-CHECKS" rel="nofollow">http://www.d20herosrd.com/#TOC-GRADED-CHECKS</a> )&nbsp; so as simple as something like [[ (?{Result|0}-?{DC|0})/5]] would work in theory but i would like something more absolute (so it doesn't come out as 0.2 or -2.6 it just reads number of success or failures) any one up for the challenge.
1462332570

Edited 1462334745
I added a few things to your existing macro: A ceil() function for the purposes of rounding. I added a small positive number (0.01) to ensure an output of not 0 but 1 [degree of success] when ?{Result} equals ?{DC}. {?{Result} + d1}&lt;?{DC} resolves to equal 1 when ?{Result} is less than or equal to ?{DC} - 1. Otherwise, it resolves to equal 0. I added this to correct for "offset" when outputting negative degrees of success (i.e. to prevent "0 degrees of success"). Degrees of success: [[ ceil(([Result] ?{Result|1} - [DC] ?{DC|10} + 0.01) / 5) - [[{?{Result} + d1}&lt;?{DC}]] ]] If you want to get fancy with Roll Highlighting : Degrees of success: [[ ceil(([Result] ?{Result|1} - [DC] ?{DC|10} + 0.01) / 5) - [[{?{Result} + d1}&lt;?{DC}]] + d0cs[[{?{Result} + d1}&lt;?{DC}]]cf[[{?{Result} + d0}&gt;?{DC}]] ]]
Thankyou very much works excatly how i wanted it to Thank you&nbsp;