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

Set HP across multiple sheets (Pro member with API access)

Hi there I have a script using Tokenmod that allows one of my players to shapeshift between different forms. Each of these forms has a different sheet representing it. As such I am trying to use ChatSetAttr to keep the HP consistent between sheets (ie. when one form loses hp its represented on all other sheets). I have thought about simply unlinking the hp bar from the sheet, which obviously works but I was wondering if there was a way so i could update all the sheets as health is lost and gained. Thank you
1738723254
Gauss
Forum Champion
Hi RPGMer,  ChatSetAttr can affect multiple characters at once using "--sel" (without quotes) in place of the name. It is important to note that all of the tokens will need to be connected to their respective characters.  Alternately, you can do "--name George, Douglas, McFly" (without quotes) and it will affect all characters with those names. 
1738862676
GiGs
Pro
Sheet Author
API Scripter
Usign chatsetattr would be a manual step, and you'd need to check the current character and transfer it to all others. You can also do it with a script which checks the current value of all tokens, and when any changes, checks if it is one of the set of tokens that represents this character, and update all HP with each change. You might want to change actual HPs on the sheet, rather than tokens, so that the HPs are kept accurate when tokens aren't on the map.