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

[3.5E] Turn Check Macro

1459144301
Andrew C
Marketplace Creator
Is there a way to basically replicate the "Turn Check" table in a macro? I assume there may be similar things in other systems, but it works in the following way. PC makes a roll (in 3.5E it is [[1d20+modifier]] ) and then checks that result against a table. So that check is effectively: If 0< Roll < 2 result is A, 3 < Roll < 5 result is B, etc, etc, etc. I am not sure if Roll20 Macros allow for an 'if-elseif-else' type function setup.
1459145472

Edited 1459145592
Silvyre
Forum Champion
It is not possible to conditionally hide and display text without the assistance of an API Script . Access to the API is available in games in which the Creator has an active Pro subscription. However, if you're mostly just interested in calculating the "max hit dice affected", you just need a bit of math . Within the same thread , I showcased how the API Script called PowerCards can use conditional logic to the same effect .
1459145890

Edited 1459146179
Andrew C
Marketplace Creator
So outside APIs there is no nice way to do that.  I was thinking you might be able to get away with a kind of modulus mathematics. floor(([[1d20+mod]])/3)-3+@{selected| charaacter level} should get me something like the Max CR.  Then you could easily load the [[2d6+ (modifiers)]] as a second line in the usual 3.5E.  Then you could turn around and drop a [[ ( [[(MaxCR number,0) keep highest]],CL+4)keep lowest ]] to represent the lowest being Level-4 and the highest being Level+4. It would just be nicer if there was a conditional mathematics result.
1459147496
Silvyre
Forum Champion
Yeah, I used: Most Powerful Undead Affected (Maximum Hit Dice): [[ @{level} - ({4 - floor(({1d20 + @{cha-mod} + 0 [Mods], 0d0}kh1 + 2) / 3), 4 + 0d0}kl1) ]]
1459160768

Edited 1459161394
Andrew C
Marketplace Creator
Silvyre> Is there a way to group the "4-floor..." section with something like a "0" or "0d0" to limit the answer to lowest 0? I was trying it but 'breaking' a DnD35StdRoll basic template. EDIT: This is the modified version. &{template:DnD35StdRoll} {{basicflag=true}} {{name=Terror of the Unknown}} {{subtags=That is a truly terrifying thing}} {{MaxHD=[[ (?{Monster CR|1} + {4 - floor(({1d20 + ?{Monster CHA Mod|0}, 0d0}kh1 + 2) / 3), 4 + 0d0}kl1) ]] }} {{Total HD Affected=[[2d6+?{Monster CR|1}+?{Monster CHA Mod|0} ]] }} {{note= Those affected will flee or if unable to flee will cower shaken.}}
1459182499
Silvyre
Forum Champion
Andrew said: Is there a way to group the "4-floor..." section with something like a "0" or "0d0" to limit the answer to lowest 0? Sure, but be aware that this would limit the lower bound on MaxHD to @{level} instead of @{level} - 4 as per the RAW . To do this, replace 4 + 0d0 with 0d0. [[ (?{Monster CR|1} + {4 - floor(({1d20 + ?{Monster CHA Mod|0}, 0d0}kh1 + 2) / 3), 4 + 0d0}kl1) ]] I see that you changed a sign from - to +. This means the lower 1d20 + ?{Monster CHA Mod|0} is, the higher MaxHD is. Are you using a "rolling lower is better" house rule?
1459225093
Andrew C
Marketplace Creator
That might just be a screwup of misreading your version. Basically it is meant to function exactly as if the Monster was performing a Turn Check with its CR as a proxy for its Level.
1459225474
Silvyre
Forum Champion
Okay, just wanted to be sure. :)
1459225786

Edited 1459225804
Andrew C
Marketplace Creator
So I'm hoping what it would go logically is... { Turn Check w/ CR as a proxy for Cleric Level } --> { Spit out 0, or Minimum HD whichever is greatest } { Roll HD Affected } { Display it all in the Template }
1459226847
Silvyre
Forum Champion
Andrew said: { Spit out 0, or Minimum HD whichever is greatest } Oh, you'll want to change [[ @{level} - (etc.) ]] into [[ {@{level} - (etc.), 0d0}kh1 ]] Make that change and correct the sign in your macro above , and you should be good to go.
1459239098
Andrew C
Marketplace Creator
Thanks Silvyre. I really find the notation system hard to read.  Maybe it's my machine and fonts, but a big nest of "{" "[" and "(" and I really struggle to keep track of them.
A misplaced ( will ruin your day too. Spacing things out as Silvyre did above does help with readability as well as finding stray brackets.
1459333074
Andrew C
Marketplace Creator
Ed, Even then... they do my head in :P
1459353998
Silvyre
Forum Champion
Here's a version with minimal brackets: [[ {?{Monster CR|1} - {4 - floor({1d20 + ?{Monster CHA Mod|0}, 0d0}kh1 / 3 + 2 / 3), 4 + 0d0}kl1, 0d0}kh1 ]]
I think the {, [, and  ('s are the real monsters here. 
1459485112
Andrew C
Marketplace Creator
Why can't I Thumbs Up Ed's post? :P
1459485251
Andrew C
Marketplace Creator
Silvyre, It's not the formula itself, I'm then tossing that into a Roll Template that bounds every section in "{{" and "}}".  So you leave one out and whole template borks, one too many and the formulas in the template bork... Not hacking out Diana P for her great work on the 3.5E stuff... just wish something other { [ ( had been chosen to parse everything.