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

Add Temp HP Macro

December 13 (1 year ago)

Edited December 13 (1 year ago)

I'm wondering how I can change my current Temp HP value to a specific value with a type function within roll 20. For example what can I type in to change my temp HP value to 18? Or, is there a way to have the Short Rest and Long Rest buttons do the same thing, add temp hp?


I don't think there is a way to change values or attributes on your character sheet with a macro without access to Mods/API scripts. If you are in a game created by a Pro user, there are mods available that can change values like ChatSetAttr and ScriptCards though.

December 13 (1 year ago)
Gauss
Forum Champion

Hi Jack B., 

As Joshua stated you will need an API script for that. 

How my groups do it is by using the third bubble for temporary HP, linking the bubble to temp HP on the character sheet.
Then for the second box on the token's bar line we put "0" (without quotes). 
This allows you to adjust it just like you would HP, but it has no /# like it does HP. 

December 13 (1 year ago)

Edited December 13 (1 year ago)

Gauss said:

How my groups do it is by using the third bubble for temporary HP, linking the bubble to temp HP on the character sheet.
Then for the second box on the token's bar line we put "0" (without quotes). 
This allows you to adjust it just like you would HP, but it has no /# like it does HP. 

If you want to use the third bubble for temporary hit points, but have the bar display only when there is a value, then this trick will work:

Change the 'max' field to be @{hp_temp} and it will always update to be the same as the current value. You can do this directly on the Token Settings page if 'hp_temp' is linked without opening the A&A page for the character sheet.

That way the bar is only visible whenever there is a Temp HP value. If the Temp HP value is set to 0 then the bar disappears. It becomes a visual indicator that there is temporary HP available to be used.

Edit: I just realized this trick wasn't listed on the Tips & Tricks thread, so I added it!

December 13 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

Thats a clever trick. I usually struggle to keep the number of used bubbles down to 3, but if you have any free bubbles, that seems excellent.

December 13 (1 year ago)
vÍnce
Pro
Sheet Author

+1 Very cool trick.

GiGs said:

Thats a clever trick. I usually struggle to keep the number of used bubbles down to 3, but if you have any free bubbles, that seems excellent.

Option; add a second (or third) token controlled by the same player.  Link those bubbles to whatever your want.  Now you have extra bubbles.  I know there are drawbacks to this but it's one method of getting extra visuals.

Another option if you are using the 5E by Roll20 sheet is to set the third bubble to Other Resource. Then on your character sheet rename the other resource box to something like Temp HP, enter your current and max values then set it to reset on a short rest. Now your Temp HP will reset any time you click on one of the rest buttons.

December 13 (1 year ago)

Edited December 13 (1 year ago)
Gauss
Forum Champion


Jarren said:

Gauss said:

How my groups do it is by using the third bubble for temporary HP, linking the bubble to temp HP on the character sheet.
Then for the second box on the token's bar line we put "0" (without quotes). 
This allows you to adjust it just like you would HP, but it has no /# like it does HP. 

If you want to use the third bubble for temporary hit points, but have the bar display only when there is a value, then this trick will work:

Change the 'max' field to be @{hp_temp} and it will always update to be the same as the current value. You can do this directly on the Token Settings page if 'hp_temp' is linked without opening the A&A page for the character sheet.

That way the bar is only visible whenever there is a Temp HP value. If the Temp HP value is set to 0 then the bar disappears. It becomes a visual indicator that there is temporary HP available to be used.

Edit: I just realized this trick wasn't listed on the Tips & Tricks thread, so I added it!


I wasn't able to get this working the way you described it. 
If I put @{hp_temp} in the token settings bar's second box, it doesn't work. 
I have to put it in the attribute's second box.

Additionally, if the value is 0/@{hp_temp} (ie: 0/0) there is still a (empty) bar.

The method I was describing above achieves the same result I saw with your method, except there is no denominator (12/0 is displayed as "12").

December 14 (1 year ago)

Edited December 14 (1 year ago)

Gauss said:

I wasn't able to get this working the way you described it. 
If I put @{hp_temp} in the token settings bar's second box, it doesn't work. 
I have to put it in the attribute's second box.

Additionally, if the value is 0/@{hp_temp} (ie: 0/0) there is still a (empty) bar.

The method I was describing above achieves the same result I saw with your method, except there is no denominator (12/0 is displayed as "12").

It sounds like it's working the way I described and intended! Unless I'm misunderstanding you.

The point is to be able to have a full bar showing if there are any amount of temporary hit points available. It will be a full bar whether it's 1 temporary hit point, or 20.

E.g. If you want to use Bar2 to show a full bar whenever there is any amount of Temporary Hit Points, then you would open the Token Settings for the character, and link the Bar2 attribute to 'hp_temp', set the current amount of temporary hit points in the Bar2 'current' (left) field, and set the Bar 2 'max' (right) field to '@{hp_temp}':


On testing, I realized that you'll have to manually change the token bar value one time for the sheetworkers to actually update and display the bar. After saving the changes on the token, it looks like this:

As soon as I enter '20' into the Bar2 bubble again, it shows like this:


And what is interesting is that the Bar2 'max' field on the Token Settings page will automatically update and show the 'current' value, but the attribute is actually still there, as long as you don't change either of the Bar2 fields from the Token Settings page - make sure to only update the Temporary Hit Point value from the Bar2 bubble. (I just found this out, so I'll update the Tips & Tricks post as well).

But changing the Bar2 bubble to '0' makes the blue line disappear, showing that there are no more Temporary Hit Points available:


December 14 (1 year ago)
Gauss
Forum Champion

Jarren, I think I see the problem, when I initially did it it didn't have the bar until I updated the temporary HP. 

The method I originally suggested, putting a 0 in the max value, also behaves the same way, except instead of showing up as "#/#" in the bar it is "#  +". 
So it depends on how people want it displayed.

Here are both methods: 

 

Right is @{hp_temp} in the maximum box. 
Left is 0 in the maximum box. 

December 14 (1 year ago)

Ah yep. I originally saw this a while back when someone was asking about how to display the bar without the '+' symbol.  So yeah using '0' works just as well.

I also have my bar set to 'compact' so I don't see the values. I forgot to check and see what it would look like under other settings. Good to know, thanks!