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

How do I program a custom character sheet to track hit points in a way compatible with token bars?

This is probably a really easy question to answer but I've been searching and googling and I haven't been able to find it. I have hp_current and hp_max as attributes but i don't know how to combine them into a single bar-compatible attribute.

June 25 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

Each attribute has both a current and max rating, you dont need to create two separate stats. 

If you want to display and use the max value of an attribute, add _max to its name,

So, you'd create a hp attribute (not hp_current), and create a second attribute hp_max. 

The second attribute will actually not be a true second attribute, but will be the max value of hp.

June 25 (6 years ago)

Edited June 25 (6 years ago)
Kraynic
Pro
Sheet Author

Generally, the sheet will automatically generate a "_max" value for any attribute you have.  If you have your sheet active, put a value in hp_current and look at it in the Attributes & Abilities tab, I bet there will be a max value slot set up for it.  It will be "hp_current_max", though, since hp_current" is the base attribute.  Basically, the names have to be identical except for "_max".


Edit:  And I took too long typing my answer up!

I knew it was something that'd be obvious in retrospect but in all my googling I never saw anything specifying that _max was a modifier. Thanks.

June 25 (6 years ago)

Edited June 25 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter


FrostLock said:

I knew it was something that'd be obvious in retrospect but in all my googling I never saw anything specifying that _max was a modifier. Thanks.

It's on this page (do a search for "max", its the first result), but it's not very well explained so it's easy to miss or misunderstand.