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 .
×
May your rolls be chill this holiday season!
Create a free account

@{pb} doesn't work for me or my players in any of their sheets

Hi, everyone! So, whenever any of us try to use @{pb} we always get this: "(ceil((5)/1e10) + ceil((5)/4))". We're using the 5th edition OGL. Would anyone know what could be the problem?
That formula should be correct, if you do not want to see the ceil put [[ ]] around the @{pb}
1484581781

Edited 1484581829
The Aaron
Pro
API Scripter
PB is a formula attribute.  If you're using it as part of a roll, it will work: [[ 1d20 + @{pb} + @{str_mod} ]] If you need to just see the value, you can access it as part of a lone roll: [[@{pb}]] If you want to just see it as a number in your rolls, you can use a nested inline roll: [[ 1d20 + [[@{pb}]] + @{str_mod} ]] And of course labeling is always nice: [[ 1d20 + [[@{pb}]][PB] + @{str_mod}[Str] ]] Hope that helps!
The way that the formula you posted works, it calculates the pb in two parts. Ceil((5)/1e10) [I am assuming that the 5 is the level of the character] will always result in 1. The second part, ceil((5)/4), calculates the remainder for the proficiency bonus. For levels 1-4, this results in a 1, which when added to part 1 gives the correct proficiency bonus of 2. For levels 5-8, this results in a 2, which gives a total proficiency bonus of 3. This continues for levels 9-12 (resulting in 4 total), 13-16 (resulting in 5 total), and 17-20 (resulting in 6 total).
I see! Thank you very much!
On a similar note, I was trying to add deflect missiles as an attack to roll damage reduced but putting DEX + [[@{base_level}]] into damage modifier does not seem to output anything but DEX. Ideas on that one? H
1484597785
The Aaron
Pro
API Scripter
Do you mean: @{DEX} + [[@{base_level}]]  Or are you saying that [[@{base_level}]] evaluated to nothing? To see what something is, I'll often type it in the chat like: base_level: @{selected|base_level} ::= [[ @{selected|base_level} ]] does that expand to anything for you?
1484598674

Edited 1484599339
Sorry, I mean in the attack, DEX is selected. I try to add a base_level modifier and it is ignored in the roll. Edit: I tried adding @{name|base_level} and @{selected|base_level} in that attack input and it still did not work. Using both of those directly in chat provided the correct value both times. H
This is because the last input expects only flat numbers, not calculations. Move the [[@{base_level}]] into the first damage slot. So it should be d10 + @{base_level}
I see. I put d10 +@{base_level} into damage and it works fine. I can not annotate but that is fine. H
By annotate do you mean 5[level]? If so you could easily do [[@{base_level}]][level] instead of @{base_level}
Yes, that worked. I tried the double square brackets around everything instead of just base_level. thanks again H