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

Trying to get a syntax/macro to work. Canny Defense.

+[[{@{level},@{intelligence_mod}}kl1]] dodge to ac This isn't working cant figure out why. Any thoughts? Its suppose to add my int mod but cap out on my level.
1574007797

Edited 1574008448
vÍnce
Pro
Sheet Author
" ... a duelist adds 1 point of Intelligence bonus (if any) per duelist class level as a dodge bonus to her Armor Class while wielding a melee weapon. ... " I'm thinking your macro should be more like below, according to the raw. +[[(@{intelligence_mod}/@{intelligence_mod})*{@{level}]] dodge to ac
That basically just add's my duelist level. (2/2)*5, which is just 1*5. I need a macro that will add my intelligence up to my duelist level. So for instance with a int mod of +2, at level 1 it will be +1 to dodge, level 2 +2 to dodge, and level 3 will still be +2.
For the OP, remove the space between the @ and the { and it should work.
There are no spaces, it may look like it here but I've tripled checked.
1574009596

Edited 1574010870
vÍnce
Pro
Sheet Author
Daniel M. said: That basically just add's my duelist level. (2/2)*5, which is just 1*5. I need a macro that will add my intelligence up to my duelist level. So for instance with a int mod of +2, at level 1 it will be +1 to dodge, level 2 +2 to dodge, and level 3 will still be +2. +[[ { ( (@{intelligence_mod}/@{intelligence_mod})*@{level} ),@{intelligence_mod} }kl1 ]] dodge to ac EDIT: removed an errant { from my macro above. Edit2: removed an extra ) Sorry, I haven't had my coffee yet... ;-(
It doesn't seem to be working for me, have you tested it yourself?
Where/how are you running this macro? Are you adding it to your sheet somehow? Just to confirm, you are using the D&D 5e by Roll20 sheet, right? Do you get an error message or anything in the chat when trying to use this?
Pf R20 sheet
As a buff
Vince, what erroneous result could arise from the OP method? I am not seeing why you need to go through all the math gyrations, but I could have missed something.
The sheet is called Pathfinder by Roll20
1574011901
vÍnce
Pro
Sheet Author
Hmm.  I'm a little confused since you mentioned caping to your level, but the last example you gave looks like you are caping to your int-mod. just a test, say int-mod is 2 and level is 5 [[ { ( (2/2)*5 ),2 }kl1 ]]  dodge bonus would cap at 2.
1574013047
vÍnce
Pro
Sheet Author
Rabulias said: Vince, what erroneous result could arise from the OP method? I am not seeing why you need to go through all the math gyrations, but I could have missed something. I think the OP's formula works for what it is, but I'm not sure it follows the rule.  With that in mind, the " adds 1 point of Intelligence bonus (if any) " in the rule description made me think that you wouldn't get any bonus, regardless of level unless int-mod>1, so I did the extra division and group  comparison, but perhaps I'm interpreting the rule wrong. Highly likely.  ;-) 
int 2 level 5 bonus is 2 int 5 level 2 bonus is 2 the bonus is based off my int mod, but the max the bonus can be is equal to my duelist level
1574019065

Edited 1574019257
vÍnce
Pro
Sheet Author
I think your initial formula will work.&nbsp; Sorry for muddying the waters with a more complex formula.&nbsp; The PF1 sheet by roll20 doesn't handle kl1/kh1 directly.&nbsp; Use MIN() MAX() instead. ( <a href="https://app.roll20.net/forum/permalink/6998171/" rel="nofollow">https://app.roll20.net/forum/permalink/6998171/</a> ) Try +MIN(@{intelligence_mod},@{level}) dodge to ac
1574020542

Edited 1574022206
GiGs
Pro
Sheet Author
API Scripter
Daniel's macro in the first post is correct for what he wants to do: +[[{@{level},@{intelligence_mod}}kl1]]&nbsp; Though that rules text Vince posted is written as unclearly as possible, this does appear to be what it means. It's a keep-lowest operation checking level, and int_mod, This is the correct code for that.&nbsp; The question is, why isn't it working? I'm not familiar with the PF sheet. When you use this, Daniel, does it change the output at all? Try a roll using this, and compare against a roll not using it, and check the difference. Edit: &nbsp;'Ninja'd# by Vince, the slowest ninja attack ever! that's what I get for keeping the page open for half an hour before replying :)
@gigs it doesnt do anything
@vince, tyvm that works
1574021866
vÍnce
Pro
Sheet Author
Great.&nbsp; Sorry for the detour... I didn't realize the official sheet handled kl1/kh1 as min/max until I actually tried it in-sheet. ;-)&nbsp; Cheers