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

Trying to get Score Modifier attribute, can't find anything.

1521559780

Edited 1521559895
I have been looking for a few days now, and I'm not seeing anything about calling an attributes score modifier. I have posted a picture below. I could access the 16 in Strength, but I have no clue how to get the +3. I could always create my own attribute called "Str" or "Acrobatics" and manually insert them... which would suck if I'm the one who has to update everyone's cards for that.  Is there a way to actually access the score modifier and/or the save proficiency? Or the proficiency bonuses? I'm trying to easily make saving checks and other buttons for my players and NPCs.  Edit: I suppose I should mention beforehand, I'd prefer they didn't have to type in their modifier. That is the entire point of trying to figure this out.
1521560860

Edited 1521560983
vÍnce
Pro
Sheet Author
Not sure what sheet that is? Looks cool. Some sheet's simply include the attribute's name when you hover over the field.  If not, you can right-click the field and use the browser's context menu; inspect element to learn the attribute's name.  In the console window, you will see something like;  <input type="text" name="attr_STR-mod"> just drop the "attr_" portion of the name attribute used for the input.  So your macro would use "@{selected|STR-mod}" to grab the STR-mod value.
1521560989

Edited 1521561000
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi David. I'm not sure which sheet/system you are using, but if there isn't a hover triggered help text over the modifier, you can get the name of the attribute by using the browser's inspect tool. Unfortunately, all sheets use a different naming scheme, so I can't just tell you what it would be. Here's a  gif of getting an attribute name . Ninja'd by Vince :)
I think it is called 5e scrolls and thank you Scott and Vince. I'm sure Vince's would have worked and Scott, your gif showed me I could inspect the page. attr_strength_mod is the one!  Wonderful! I'll probably release all the stuff I'm working on later on. Thank you both again! 
1521564675

Edited 1521564988
Okay... another question... can they actually be used?  The first one gives a number and the second one breaks. (Just the last line) Edit: Trying to drop the attr_ as Vince suggested! This is what I get without the attr_ and I tried doing that equation without the @{} but I am not entirely sure how to get math to work. I'll try [[ ]]
1521564958
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, need to take the attr_ out of it.
1521565003

Edited 1521565140
Hey Scott, I just edited my reply!  and it works! I hope others find this post useful. :)  Answer:  [[ @{selected|strength_mod} ]] - For my case [[ @{selected|attribute} ]] - For others depending on their value
1521566088
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Glad you got it figured out.
1521688307

Edited 1521688338
note: the selected tag means you need a token >selected< so you will want: @{selected|strength_mod} or, in english: The Selected Token's attached Character Sheet's Strength Modifier Very important bit to note about @{selected| (also useful: character_name amongst others )