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 .
×

How to reference Attributes within text fields (5.5e/2024 Sheet)

So I'm trying to make an attack auto-calculate the DC of an extra effect within the On Hit text box. Currently I have to manually set the different values with [[8+4+2]], since I can't get it to reference the correct ability score and proficiency bonus. I've tried the following: [[8+@strength_mod+@proficiency_bonus]] [[8+[@strength_mod]+[@proficiency_bonus]]] [[8+[[@strength_mod]]+[[@proficiency_bonus]]]] [[8+(@strength_mod)+(@proficiency_bonus)]] [[8+{@strength_mod}+{@proficiency_bonus}]] None of them work at all, they just put out 8. I don't know if it's even possible in a text box, but I don't see why not, since it can do calculations with the bracket command code. Any help would be appreciated.
1786495359

Edited 1786495432
Gauss
Forum Champion
Hi Kasper,  None of your examples have a proper attribute call in them.  Attribute calls are: @{character's name|attribute's name} Example: @{character's name|strength_mod} (make sure you fill out the character's name) Alternately, you can use "selected" (without quotes) in place of the character's name.  However, since these are in the "On Hit" box, you should be able to get away with leaving the name out:  example: @{strength_mod} It should fill in the character name automatically.
1786497191

Edited 1786497361
It worked with putting the character name in, and putting the @ in the right place. However, while I can call for proficiency_bonus without errors, it doesn't add it, and when I look there's not actually any attributes referencing proficiency at all. Is it called something else in the attributes or what am I missing here? EDIT: Found it! It's just called pb for some reason. Thanks a lot for your assistance!
1786497269

Edited 1786497342
Gauss
Forum Champion
I suggest going to the attributes on the character. Make sure the name is the one you want, and make sure the values are populated.  Sometimes the 2024 sheet fails to populate the attributes.  If you are still having issues after checking that I suggest getting into a Discord call where you share your screen. That will be the easiest way for me to see what is going on. 
Gauss said: I suggest going to the attributes on the character. Make sure the name is the one you want, and make sure the values are populated.  Sometimes the 2024 sheet fails to populate the attributes.  If you are still having issues after checking that I suggest getting into a Discord call where you share your screen. That will be the easiest way for me to see what is going on.  Hehe you were quicker in reply than my edit. Thanks!