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

Quick Help

Hello all! I'm currently using the Temphp script from the default API library, however was looking to do a minor bit of editing to make the script ignore a single specific character by name, as his 3rd bar is used for something other than temporary hp (his character cannot have temp hp!). Anyone know any specific resources or starting points to figure this out for someone who isn't particularly good at JS?
1504448190
The Aaron
Pro
API Scripter
Is it more important to you to learn to do it, or to have it done? If I were approaching this, I'd probably have it check for a particular status marker and ignore the temp HP if that marker was set.  Alternatively, you could have a known attribute on the character that you look for.  Both those options keep it open for later use by other characters without needing to edit the script. Short of that, you could check the represents id of the token against a known character_id, or grab the associated character and check it's name against a known character name.  Both of those options would let you exclude the character, but would require editing the script if the character's name changed, or if you move the character to a different game (where it has a new character id).
I'd prefer to learn how to do it. The character with this effect is a 1-off situation, so its not really a big deal about moving it etc, just a specific homebrew ruleset that effects this character. I'll probably go with checking for an attribute as it seems simplest. Thanks!
1504510160
The Aaron
Pro
API Scripter
Simplist is checking the represents id on the token to the character id.