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

Rounding Down in Pathfinder Macros

Hey, I'm back and with a new problem that has me stumped. Good thing is that this one is an easy fix for those of you who know this better than me. What I'm trying to do is use an ability with a sword (while two-handed, receiving 1-1/2 of my Strength modifier) that also multiplies that damage by 1-1/2 of the entire strike if the target is evil. I'm trying to round the values down to the nearest whole integer, but it's really... uh stumping me. This is what I have so far. Any idea how I can manage this and tips on using 'floor' in the future? Cheers! {{Sword Damage=[[floor(1d8 + 1 + (floor(@{Knight-Lord Gerard|str-mod} * 1.5)) + ?{Power Attack Bonus|9} + 2 + ?{Dam Mods|0}) * ?{Evil|1.5})]]}}
Try this: [[ floor(1d8 + 1 + (floor(@{Knight-Lord Gerard|str-mod} * 1.5)) + ?{Power Attack Bonus|9} + 2 + ?{Dam Mods|0}) * ?{Evil?|Yes, 1.5|No, 1} ]] I removed an extra ) at the end.
Silvyre said: Try this: [[ floor(1d8 + 1 + (floor(@{Knight-Lord Gerard|str-mod} * 1.5)) + ?{Power Attack Bonus|9} + 2 + ?{Dam Mods|0}) * ?{Evil?|Yes, 1.5|No, 1} ]] I removed an extra ) at the end. As trim and as bonny as a sloop with new sails and a fresh coat of paint. 
1448861513

Edited 1448861655
Whoops. [[ floor((1d8 + 1 + (floor(@{Knight-Lord Gerard|str-mod} * 1.5)) + ?{Power Attack Bonus|9} + 2 + ?{Dam Mods|0}) * ?{Evil?|Yes, 1.5|No, 1}) ]] Was too quick on the trigger, there. The issue wasn't a missing ) at the end but a missing ( at the beginning.
1448862717

Edited 1448863303
Oh, I just remembered that multipliers in Pathfinder are additive, not multiplicative. PRD said: Multiplying Damage : Sometimes you multiply damage by some factor, such as on a critical hit. Roll the damage (with all modifiers) multiple times and total the results. Note : When you multiply damage more than once, each multiplier works off the original, unmultiplied damage. So if you are asked to double the damage twice, the end result is three times the normal damage. Your GM might want you to apply the above to your strength mod vs. evil creatures (1.5x and 1.5x multipliers add to become a 2x multiplier). You could do that like so: [[ floor((1d8 + 1 + ?{Power Attack Bonus|9} + 2 + ?{Dam Mods|0}) * ?{Evil?|Yes, 1.5|No, 1}) + floor(@{Knight-Lord Gerard|str-mod} * [[?{Evil?} + 0.5]]) ]]