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

Comparison of one roll against multiple threshold.

1668215064

Edited 1668215175
Long story short, is there a way to use the same roll against multiple threshold? In the system I play, Alternity, it's a reverse d20 system, there are "degrees of success", and you need to roll lower than that to have different outcomes. Let's say you have 14 in Diplomacy. You roll a d20, Nat 20 is a crit fail, 15+ is a regular fail, 14 (diplomacy score) to 8 is an Ordinary Success, 7 (diplomacy score divided by two) to 4 is a Good Success, 3 (diplomacy score divided by 4, rounded down) and less is an Amazing Success, and a Nat 1 gives you at least a success no matter the circumstance (for example, that guy has a 3 Intuition score, even if he gets a +6 malus he's get at least an ordinary even if the result is 7). Now, I won't go into the details of the Situation Dice (bonus or malus) this time, it's not that relevant to the question here. I'm trying to make a macro that throws the initiative of a single character and add it to the tracker. Roll20's tracker works incredibly bad with that system, since all the characters act  according to the result of their Action Check (initiative),  in four "phases" during a round (Amazing, Good, Ordinary and Marginal (for Fail)), and they act all at the same time (they call their intent, and everything resolves at the same time at the end of the phase). I managed something, where each character can click on a macro linked to their token, that has a dropdown list with the result of their prior check, and they select their result, putting 4 for amazing, 3 for good, 2 for ordinary, 1 for fail and 0 for Crit Fail. /w gm [[?{Which degree of success did you achieve on the Action Check?|Amazing, 4|Good, 3|Ordinary,2|Marginal,1|Crit Fail,0} &{tracker}]] It works, but eh. It's also a pain concerning the NPCs, I group up the enemies together, but they have a few supporting NPCs and they all have different Action Check (kinda required because of their roles), and it takes time to set up everything. And in this system, you roll the Action check EACH round, so it gets tedious fast. Is there a way to have at least an output where Amazing is 0, Good is 2, Ordinary is 2, Fail is 3 and crit fail is 4 (or the reverse, it doesn't matter much)? Like with the logic of If (ROLL= 20) then     tracker = 0 else if (ROLL >  ActionCheck) then     tracker = 1 else if (ROLL > ActionCheck/2) then     tracker = 2 else if (ROLL > ActionCheck/4)  then     tracker = 3 else     tracker = 4 end if I tried so hard with Overwriting headers, trying to do things with  RainbowEncoder's wild macros ,  Nygaard's trick to reuse rolls and do math on it ,  Mike's way to compare numbers , and just trying unholy amalgamations of different techniques, I still can't figure it out. If someone would be so kind to help me there, the macro needs to take the @{selected|ActionCheck} of the token, roll a d20, and compare it to the ActionCheck, ActionCheck/2 (round down), and ActionCheck/4 (round down), and depending on the condition output 0 to 4 into the tracker.
1668225253
timmaugh
Forum Champion
API Scripter
Are scripts available, or are you looking for a standard, Roll20 solution?
I'm a free user, so I guess not. If I had that available, I'd have already done something, coding is easy and fun. Usually...
Needed something like this and the awesome David M came up with a solution, take a look here (uses macro + table) <a href="https://app.roll20.net/forum/post/9281671/help-with-indicating-varying-success-levels-in-a-macro/?pageforid=9281671#post-9281671" rel="nofollow">https://app.roll20.net/forum/post/9281671/help-with-indicating-varying-success-levels-in-a-macro/?pageforid=9281671#post-9281671</a> and scroll down to David's solution.&nbsp; Hopefully it'll do what you need.
Norman, thank you SO FUCKING MUCH!!! I had to edit his code&nbsp; just a little bit /s, &nbsp;but eventually I found something that kinda worked. &amp;{template:default} {{name=@{selected|token_name}'s Action Check}} {{Base die=$[[3.computed]]}}&nbsp; {{Action Check= [[@{selected|ActionCheck}]]/[[floor(@{selected|ActionCheck}/2)]]/[[floor(@{selected|ActionCheck}/4)]] }} {{Result=[[1t[[[ceil(([[[[d20cs1cf20]]+@{selected|ActionDie}cs&lt;0cf&lt;0]]-(@{selected|ActionCheck}/4))/(@{selected|ActionCheck}/4))&amp;{tracker}]]SkillResult]]]}} {{Action Die: @{selected|ActionDie}= Total Roll: $[[4]] For people with Action Die bonus, ignore the top result and take this one, except if there's a Crit (the d20 doesn't show on screen if you have a ADB).}} {{Action Die: 0}} Here it is exploded: &amp;{template:default} {{name=@{selected|token_name}'s Action Check}} {{Base die=$[[3.computed]]}}&nbsp; {{Action Check= [[@{selected|ActionCheck}]]/[[floor(@{selected|ActionCheck}/2)]]/[[floor(@{selected|ActionCheck}/4)]] }} {{Result=[[1t[[[ceil(([[[[d20cs1cf20]]+@{selected|ActionDie}cs&lt;0cf&lt;0]]-(@{selected|ActionCheck}/4))/(@{selected|ActionCheck}/4))&amp;{tracker}]]SkillResult]]]}} {{Action Die: @{selected|ActionDie}= Total Roll: $[[4]] For people with Action Die bonus, ignore the top result and take this one, except if there's a Crit (the d20 doesn't show on screen if you have a ADB).}} {{Action Die: 0}} The last two lines are because some characters can have a bonus to their Action Check, but most don't (and I don't want to clutter TOO much the chat). Otherwise I'd not bother, but because of the calculation, the inline doesn't appear green or red with a Nat 1 or Nat 20, but does when I refer to the d20 itself... So it's a template Overwrite, where if someone has no bonus (hence a 0 in the ActionDie), the line is empty, but if they have a bonus, it states the die and then the line appears (the last line appears too, but it's a sacrifice I'm willing to make). Here's some pics with someone with a bonus (in the first, it doesn't change anything, but in the second it makes the roll from an Ordinary to a Good), then with someone without a bonus: &nbsp;
1668328073

Edited 1668330059
And it adds everything in the Turn Tracker, I just added items with the minimum values of each tier (it's not as clean as just 1,2,3,4, but it's usable at least), and once every players clicks the macro and I do the same for my NPCs and enemies (only one enemy per type), I just sort the turn tracker in an ascending order, and it's all separated with the items with the correct values: The math is quite simple in the end, it's the Base Dice (d20) plus the bonus Action Dice (0, -d4 or -d6), minus a quarter of the ActionCheck score&nbsp; (usually from 8 to 14, but it can go technically from 5 to 19) which is&nbsp; NOT rounded, to determine the Amazing score, all divided by the Amazing score, the total which is rounded to the upper number, which I then add to the tracked. So ceil(((BD+AD)-AC/4)/(AC/4)). The results depend on the action score, but I've made MANY tests on a paper sheet, and found that for the range of numbers possible, 0 and less are always Amazing results, 1 is always a Good result, 2 and 3 are always Ordinary results, and anything over 3 is a Failure. So I made rollable tables from -3 to 0 for Amazing, 1 for Good, 2 and 3 for Ordinary, and 4 to 26&nbsp; for Failure &nbsp;(15+ are in case I create someone with 3 of Action Check somehow... or reuse the macro for other things, where 3 is technically a possible score), and the correct table is called by the calculation. I'll just manually do something for people with Critical Fails, since it's basically impossible to check for 20 automatically.
Huh, apparently all but one pics appear... Let's try again? Anyway thank you SO FUCKING MUCH AGAIN!!!
Sorry for the necro, but I was wondering... Probably not, but would it be possible to automatically detect Critical Fails (nat 20) and make Result say "Crit Fail" instead of just "Failure", and put the initiative at 20 instead of the number it should have been? I tried with many variations of boolean checks, overwrite rows with the roll, and&nbsp; IF/THEN statements , but it seems that I can't reuse the d20 anyhow to make it possible... Is there a wizard that can help me? Reminder: &amp;{template:default} {{name=@{selected|token_name}'s Action Check}} {{Action Check= [[@{selected|ActionCheck}]]/[[floor(@{selected|ActionCheck}/2)]]/[[floor(@{selected|ActionCheck}/4)]] }} {{Base die=$[[3.computed]]}} {{Result=[[1t[[[ceil(([[[[d20cs1cf20]]+@{selected|ActionDie}cs&lt;0cf&lt;0]]-(@{selected|ActionCheck}/4))/(@{selected|ActionCheck}/4))&amp;{tracker}]]SkillResult]]]}} {{Action Die: @{selected|ActionDie}= Total Roll: $[[4]] For people with Action Die bonus, ignore the top result and take this one, except if there's a Crit (the d20 doesn't show on screen if you have a ADB).}} {{Action Die: 0}} And I use Rollable tables from -3SkillResult to 26SkillResult (although anything higher than 13 is highly irregular, so 20SkillResult could be converted to Crit Fail if someone can think of something).
1670320759
GiGs
Pro
Sheet Author
API Scripter
The only ways you can do that are a) replace the roll with a RollableTable - but tables dont accept modifiuers so this isn't paractical very often. b) upgrade to pro and use a script - and then you'd need to create a script (though ScriptCards or Tim's meta screipts should be able to do it with little work) There's no other way to replace a nimber with text (like "Fail").
Thanks anyways.