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 in keeping the highest of two values - PF2e

Hello! I'm trying to create a macro to calculate a player's Athletics roll when using a weapon with the Trip trait. This adds the weapon's Item Attack bonus to the Athletics check. Now, as only the largest of a given bonus can be applied to a roll at a time. I'm attempting to compare the Item Attack bonus, to the Athletics Item bonus that might be given by magic items. The rest of the macro for the checks works fine, so I've isolated the section that's been having issues [[(0d0 + @{TESTCHAR|athletics_item}), (0d0 + @{TESTCHAR|repeating_melee-strikes_$1_weapon_item})kh1]] For some reason, this only return the value of the first roll - the Athletics Item bonus - and no matter what the weapon's Item bonus is, it doesn't return it, and I cannot figure out why. This will largely only be a difference of +-1, but that's often important. Thank you for any advice!
1723003580

Edited 1723003929
vÍnce
Pro
Sheet Author
This works for me; [[ { @{selected|athletics_item}, @{selected|repeating_melee-strikes_$1_weapon_item} }kh1 ]] A couple things I noticed;  when using grouped rolls , use curly brackets not parenthesis.  Also, since your are comparing two attributes (ie no dice rolls) you can drop the fake dice roll from the macro ie "0d0".  And finally, make sure you actually have a value for athletics_item.  I believe it defaults to " " which will cause the inline roll to fail.
vÍnce said: This works for me; [[ { @{selected|athletics_item}, @{selected|repeating_melee-strikes_$1_weapon_item} }kh1 ]] A couple things I noticed;  when using grouped rolls , use curly brackets not parenthesis.  Also, since your are comparing two attributes (ie no dice rolls) you can drop the fake dice roll from the macro ie "0d0".  And finally, make sure you actually have a value for athletics_item.  I believe it defaults to " " which will cause the inline roll to fail. Thank you! That works perfectly. I have the habit of filling in all the values so it doesn't default to " " due to this exact sort of issue, so that's not a problem for me