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

Formula to add 1/2 Proficiency Bonus to saving throws

I created a weapon for a player that allows them to add 1/2 their proficiency bonus (rounded down) to WIS and CHA saves. I know I can manually change to a flat number on the Abilities & Attributes page, but there's gotta be a formula I can use instead. Unfortunately I'm getting stuck on the order of operations/parentheses. Help? So far, I have: (@{pb}+[floor{@{pb}/2}]) I know that curly brackets have special meaning in Roll20, so is there a way to go about this?
1495554955

Edited 1495555250
Ziechael
Forum Champion
Sheet Author
API Scripter
Try this: [[@{pb}+floor(@{pb}/2)]] Single [ ] has the effect of making a 'label' for rolls. This allows the user to have a whole bunch of code that can be interpreted in the tooltip as 1 + 2 [Shock] + 3 [fire] = 6 etc.  Also the floor and ceil commands operate using () not {} :)
1495555017
The Aaron
Pro
API Scripter
Probably you want: (@{pb}+[[floor{@{pb}/2}]]) or (@{pb}+(floor{@{pb}/2})) Single [ ] are used as a label in a roll, so wouldn't be evaluated.
Thank you! That works. :)