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.
GiGs said: 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. Sorry but how exactly would i go about changing sheets that didn't have a token associated with it currently?
1739371534
GiGs
Pro
Sheet Author
API Scripter
chatsetattr changes the attributes on character sheets, it doesn't directly affect tokens. If attributes are then linked to tokens, you see the changed attribute, but its changed on the character sheet.
I apologise if I sound a bit stupid but are you referring to using the --name attribute of chatsetattr to simply supply the names on the character sheets?
1739997634
GiGs
Pro
Sheet Author
API Scripter
I was pretty sick when I wrote that, hence the terseness. Whenever you use chatsetattr, it changes attributes on a character sheet. Then token values change if they are linked to those attributes. It doesn't matter whether you use --name or not (forgive me, I forget the syntax of the script), chatsetattr always affects attributes on a character sheet.
1740092275
Gauss
Forum Champion
RPGMer, If you provide exact context of what you'd like to do I can write the ChatSetAttr command for you.  Character names, which character sheet is being used, and what you'd like the change to be.
Gauss said: RPGMer, If you provide exact context of what you'd like to do I can write the ChatSetAttr command for you.  Character names, which character sheet is being used, and what you'd like the change to be. Thank you that would be awesome. I have a player who is playing a homebrew subclass of warlock. Basically they can transform into different elemental types (attacks deal different damage types, resistances, etc.) To make this easier for them to do we created multiple character sheets to house the different attacks, along with a rollable token and used Tokenmod to give a chat menu that they could just click between the different forms, with each token linked to its relevant sheet. The problem with this is when they change forms the health of the token changes to the health the other character sheet was left at during the last transform meaning every transform the player has to go in and manually change things like class resource usage, health, hit die, etc. I'm wanting to know if there is a command that would, on clicking of the button, automatically update the new sheet to the current values before. Also i was wondering if there was possibly an easier way to do this than what I am doing. Like would it be possible to have ChatSetAttr to change the values of the one sheet for damage type, etc. or is having seperate sheets easier? For reference the sheets involved are Logan Valentine(base sheet), Necrotic Form, Lightning Form, Fire Form, Radient Form, Cold Form and Poison Form. Thanks again
1740285591
Gauss
Forum Champion
Probably the best method going forward would be for me to enter your game, take a look at the sheets, and work up a solution from there.  Could you PM me an invite?