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

[Conan RPG] vs. Multiple Target numbers

1459884290
Tom
Pro
Sheet Author
Hey everyone, So I'm helping a buddy test out the new Conan RPG Quickstart here on roll20 and I need two tricks to make the core mechanic really sing on R20.   First, is there a way to compare a single roll against 2 target numbers?  The way the mechanic works is that you roll 2d20 against a set target number, but also ranks in a focus.  Each die that rolls ≤ the target is a success, but each of those dice that is ≤ the focus score (1-3) counts as an extra success. Second, any roll of 20 creates a "complication".  Assuming I set these up as inline rolls, is there a way to have a 20 return a red result (usually 1 is red and 20 is green)?
1459885623
Diana P
Pro
Sheet Author
Tom said: Hey everyone, So I'm helping a buddy test out the new Conan RPG Quickstart here on roll20 and I need two tricks to make the core mechanic really sing on R20. &nbsp; &lt;snip&gt; Second, any roll of 20 creates a "complication". &nbsp;Assuming I set these up as inline rolls, is there a way to have a 20 return a red result (usually 1 is red and 20 is green)? You can adjust the values for the critical success and fail/fumbles: [[d20cf=20]] will give you the red indicator on the 20 only. More in the Wiki at: <a href="https://wiki.roll20.net/Dice_Reference#Critical_Su" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Critical_Su</a>... You could also use the success indicator to highlight your rolls lower than your focus score as well [[d20cs&lt;@{focusscore}cf=20]] &nbsp;maybe giving you something like [[2d20cs&lt;@{focusscore}cf=20&lt;@{targetnumber}]] (have not tested this; don't know if i have the syntax exactly correct) but I do not know any way to compare against two numbers directly without using the API.
1459885762
The Aaron
Roll20 Production Team
API Scripter
For the first one, the best I could suggest is setting rolls of 1-3 to be critical success, so green. &nbsp;That doesn't give you a full total, but would let you know you need to check the roll: [[ 2d20cs&lt;3cf0 ]] shows any roll of 1-3 as green, nothing as red (cf0 is effectively off) See: <a href="https://wiki.roll20.net/Dice_Reference#Critical_Su" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Critical_Su</a>... For the second, you can add cf20 to the roll: [[ 2d20cs&lt;3cf20 ]] shows rolls of 1-3 as green, rolls of 20 as red, and rolls with a 1-3 and a 20 as blue See:&nbsp; <a href="https://wiki.roll20.net/Dice_Reference#Critical_Su" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Critical_Su</a>... Combine that with your check against success: [[ 2d20cs&lt;3cf20&lt;?{Target Number|15} ]] Should give a pretty usable solution, if not the ideal one. See:&nbsp; <a href="https://wiki.roll20.net/Dice_Reference#Target_Numb" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Target_Numb</a>...
1459887923

Edited 1459888361
Tom
Pro
Sheet Author
Thanks guys! &nbsp;This works marvelously! &nbsp; Interesting though. &nbsp;When I use [[d20cf20]], the output in the chat window is highlighted in blue. &nbsp;It isn't unless you mouseover that you see the red result. &nbsp;But Aaron, your last macro works perfectly. &nbsp;
1459888153

Edited 1459888186
Diana P
Pro
Sheet Author
Excellent!&nbsp; Happy gaming!
1459889174
The Aaron
Roll20 Production Team
API Scripter
It's because what you're rolling is really [[d20cf20 cs20 ]] &nbsp;So, it's both a success and a failure. &nbsp;If you only want red, you have to set the critical success to something else. &nbsp;[[d20cf20 cs0 ]] will effectively turn it off (can't roll 0 on 1-20).
Alternatively, because you have a pro subscription, you could do this with an api script.
1459894403
Tom
Pro
Sheet Author
Honey Badger, I can handle putting together a macro, and even puzzle out CSS given time. &nbsp;But my JS skills are hopelessly out of date. &nbsp;I leave the API stuff to those who know their stuff.
1459909570

Edited 1459916863
Silvyre
Forum Champion
I'm working on adapting one of my previous macros , which will output either 0, 1 or 2 depending on where a d20 roll lies with respect to a Target Number and Focus. When it's done, it'll look something like this: [[ {ceil((.1 + ?{TN} - d20cs&lt;?{TN}cf&lt;?{Focus}cf20) / (.1 - ?{TN} + 20 - ?{Focus})), 0d0}kh1 ]] The above might be used inline, e.g.: /em makes a skill check (Target Number ?{TN|10} / Focus ?{Focus|1|2|3}) and gets [[ {ceil((.1 + ?{TN} - d20cs&lt;?{TN}cf&lt;?{Focus}cf20) / (.1 - ?{TN} + 20 - ?{Focus})), 0d0}kh1 + {ceil((.1 + ?{TN} - d20cs&lt;?{TN}cf&lt;?{Focus}cf20) / (.1 - ?{TN} + 20 - ?{Focus})), 0d0}kh1 ]] successes! Or used with /roll, e.g.: /em makes an ``unskilled`` skill check (Target Number ?{TN|10} / Focus ?{Focus|1|2|3}): /r [[ {ceil((.1 + ?{TN} - d20cs&lt;?{TN}cf&lt;?{Focus}cf&gt;19) / (.1 - ?{TN} + 20 - ?{Focus})), 0d0}kh1 ]]&nbsp;&nbsp; +&nbsp;&nbsp; [[ {ceil((.1 + ?{TN} - d20cs&lt;?{TN}cf&lt;?{Focus}cf&gt;19) / (.1 - ?{TN} + 20 - ?{Focus})), 0d0}kh1 ]] Including a Roll Query for how many dice to roll (up to 5d20): /em makes a skill check (Target Number ?{TN|10} / Focus ?{Focus|1|2|3}): /r ?{Number of dice| 1, [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]] | 2, [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]] | 3, [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]] | 4, [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]] | 5, [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]]&nbsp; +&nbsp; [[{ceil((.1+?{TN&#125;-d20cs&lt;?{TN&#125;cf&lt;?{Focus&#125;cf20)/(.1-?{TN&#125;+20-?{Focus&#125;))&#44;0d0&#125;kh1]] } Of course, the ?{TN} and ?{Focus} Roll Queries could easily be replaced by Attributes.
Tom said: Honey Badger, I can handle putting together a macro, and even puzzle out CSS given time. &nbsp;But my JS skills are hopelessly out of date. &nbsp;I leave the API stuff to those who know their stuff. I try not to promote my scripts too much, but powercards could easily handle what you want to do.
1460053918
Tom
Pro
Sheet Author
Ok everyone, so getting closer on this one. &nbsp;But I've run into a snag. &nbsp;Maybe someone can help me out. &nbsp;It's probably one of those dumb instances where I have to translate standard macro code into a series of computer profanity (#$^&%). [[ 2d20cs&lt;@{Acrobatics}cf20&lt;(@{Agility}+@{Acrobatics}) ]] success(es) vs TN [[ @{Agility}+@{Acrobatics} ]] Agility = 12 Acrobatics = 1 The TN calculates just fine, but I always get 2 successes. The mouseover reading looks like this: 2d20cs&lt;1cf20&lt;(12+1)=2 This occurs whether I make&nbsp;(@{Agility}+@{Acrobatics}) a nested inline roll or not. Any ideas?
1460055938
Diana P
Pro
Sheet Author
Odd. With the parentheses, I see what you do, but when I nest the roll : [[2d20cs&lt;1cf20&lt;[[12+1]] ]]&nbsp;&nbsp; (or &nbsp; [[ 2d20cs&lt;@{Acrobatics}cf20&lt;[[@{Agility}+@{Acrobatics}]] ]] &nbsp;&nbsp; )&nbsp; then I get a mix of 0's, 1's, and 2's.&nbsp; Maybe make sure that when you nest the roll, the parentheses are removed? (though I don't know why that should matter..... :\ )
1460058976
Tom
Pro
Sheet Author
Thanks, Diana. &nbsp;That seems to work. &nbsp;No idea why. &nbsp;:)
1460066761
The Aaron
Pro
API Scripter
I believe it's because the expression parser expects a number to follow the &lt;. &nbsp;Probably if you looked at the javascript console there would be an error hiding there.