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

Pulling numbers from Character sheets for Macro

January 17 (7 years ago)
Hello all,
I am new here and am very excited to get started running my games through the site. I am pretty confused about macros, but have been reading as much as I can and I think I am slowly (real slowly.... :) ) getting the hang of it.
I am going to be running a 6ed Champions game in a few weeks, once I get my head around Roll20 and I have a question about:
1: How information can be pulled from a sheet.
2: How can you tell if the information on a sheet has been set to pulled from? i.e. just because a stat exists on a sheet is it usable in a, macro or does something need to be set up in API?
3: How can you look to see how sheet is set up in this way or not?

Thanks! I did read the wiki. I have searched the forums. I have watched like 300 videos on youtube. Thank you so much for any help you can deliver. I am excited to see such a vibrant community of engaged players. I haven't played a game in years because it is so hard to find a like minded group of folks.

I am using the Champions sheet available through the Roll20 site. Also, I posted this in the Character sheets forum earlier and think this is maybe a more appropriate place. So sorry for the double posting.

Best,
Jones
January 17 (7 years ago)
Gen Kitty
Forum Champion
That's ok.  I deleted your other post, so you'll only get replies to this post :)
January 17 (7 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The wiki is pretty bad at describing the macro syntax. Attributes on a character sheet are always able to be accessed in a macro/chat command. There is no such thing as an inaccessible attribute on Roll20 sheets.

To pull the value of an attribute you use the following syntax:
@{keyword|attribute_name}

So say you had a character named example, with an attribute called strength, you'd reference that like this:

@{example|strength}

Note that this syntax is case INsensitive.

You can also reference attributes of a selected or targeted token's associated character by using the selected or target keyword in place of the character name.

And finally, if you are making a character ability you can ignore the keyword part of the command as long as you intend to pull the attribute from the character the ability is on. So if we were referencing that strength attribute from our example in an ability or sheet generated roll on the example character,we could simply write @{strength}.

I'd recommend running through the tutorial if you haven't already.
January 17 (7 years ago)
Thanks for the reply. It is pretty confusing and I haven't coded in a loooooong time. 
One additional question that I have is when you are trying to utilize a function through the sheet, say, to add to the stun (read as Hit Points) to one of the three bubbles above the token. I've gone through all the options that come up when I try to assign it to a token and it won't pull that info over. I have been assuming that is just a broken part of the sheet but it would be super helpful if it worked.
Thanks again for the help!
January 17 (7 years ago)
GiGs
Pro
Sheet Author
API Scripter
Is the stat youre trying to assign to a bubble an autocalc value?
January 18 (7 years ago)
See... this is the things I don't know how to find out. When I go to abilities or what have yous I get a bunch of values and I can't figure our which of the three or four 'Stun' selections should be the appropriate one nor how to check if anything is an autocalc. I realize I am trying to get someone to just spoon feed this to me and I feel like a moron. But daaaaang this shiz is crazy!  :') 
January 18 (7 years ago)
GiGs
Pro
Sheet Author
API Scripter
If you're using the Hero 6th Edition sheet, I've just had a look at it and unless I'm missing something, the sheet is broken. The cells you should be using are stun_show and body_show, but they are set up Disabled, and you can't adjust them.

So your confusion is totally justified.

The only thing you can do right now is to create separate Body and Stun stats on the Attributes and Abilities tab, and link those stats to the token bars. Call them something different: "Stun_Temp" and "Body_Temp" for instance.

Hopefully someone will fix the sheet.
January 20 (7 years ago)
Thanks for looking into that! I really appreciate it. That's super. And it makes me feel good to know that I was possibly/prob figuring it out correctly and it wouldn't work because it couldn't work.
its been way too long since I've dove into any coding and can't imagine I am up to it. Hopefully someone gives it a go.
thanks again!
January 20 (7 years ago)
GiGs
Pro
Sheet Author
API Scripter
I just fixed the STUN, BODY, and END stats, and created a pull request with roll20. If my changes are accepted, they should appear in the sheet sometime this week.
January 20 (7 years ago)
Zoinks! That’s so kind and thoughtful. I really appreciate it.