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

Simple Way to Change the Entire Party's HP

Greetings fellow wastelanders, I'm playing a Fallout campaign. I'm looking for a way to change the entire party's character sheets at once. Let's start with a simple example and then get to where I really want to use this. I'd like to be able to give the entire party damage or let the entire party recover their HP. Is there some kind of command or macro to lower or raise all PC's HP at once? Any help appreciated
1728071145

Edited 1728071323
GiGs
Pro
Sheet Author
API Scripter
I don't believe you can do this without an API script. Roll20 macros cannot change attributes on a sheet - they can only report their values. If you do have access to the API, you'll either need a custom API script or maybe you'll be able to use TokenMod or chatSetAttrs in an imaginative way. The tricky part is that every character will need a different amount of healing, which is why it may need to be a custom script. It can be done, but not without a bit of work.
1728072167
timmaugh
Pro
API Scripter
Note...All of these ideas require the Metascript Toolbox (script package) to be installed. If you want to affect all player tokens on the map, you can use SelectManagers {&select} syntax with criteria: {& select *, +pc, +bar1>0} That would virtually select all PC tokens (see this link for discussion of what that means) on this map who have a bar1 value over 0 (as if you'd have hit points connected to bar1). Then you can modify attributes with CharSetAttr (another script) as long as you're not using a Beacon sheet because... of course. For wanting to add a d10 to an HP attribute (within the bounds of the max value), that should look something like: !modbattr --sel --hp|[[1d10]] {&select *, +pc, +bar1>0} That would add the same value to all selected characters. Alternatively, if you want to issue individualized/random alterations, you can simultaneously implement SelectManager's !forselected handle, and iterate over the tokens. In this case, you'd defer the roll so that it doesn't happen on the parent message (like the previous roll example), but would instead happen anew for every downstream outbound message (ie, every character). That would look like: !forselected(^) modbattr --sel --hp|[^[^1d10^]^] {&select *, +pc, +bar1>0}
Thanks GiGs! I'm just now getting into the API stuff, it's... daunting.
1728076176
timmaugh
Pro
API Scripter
Watch this video . It will help explain a few things. If it gets to be too much after the second part (there are four parts, with the first 2 being about 16-ish minutes... I think?), don't worry. You can come back for the other stuff later after you get more comfortable with scripts. The examples I showed, above, use metascripts (which are explained in parts 3 & 4 of the video), but you don't have to do much more than what I show, so you shouldn't have to worry too much about that part right now.