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

Mod/API - [idea] Boss Health Bar

This is a mod I saw being utilized in foundry, where a large health bar is associated with the health of the token.  Reasons why this is a good idea: Demonstrates the importance of this fight, creates tension, overall looks really damn cool.
1686089752

Edited 1686089765
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Dimethoxy! Unfortunately, Mod scripts cannot touch the User Interface.  Idea: You could link all three bars to the same HP Attribute. The boss would have a triple bar.
Thanks for the input Keith! I wasn't thinking to modify the UI; Rather would it be feasible to have a token (In this case a big HP bar) correlated, and shrinks based on the percentage of the associated health?  IE: Having a token shrink based on the value of it's HP (or other attributes)? Again thanks Keith.
1686096062
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That sounds like it would be possible with the API. Interesting--having the full value be the width of the page in pixels and setting the top left of the origin point of the page would allow you to have the bar stretch across the top of the map.
Here is where the idea originated, in a fight with Shedrak Of The Eyes from OotA. As you mentioned it is anchored in the top left. (This one does have a grey bar animation for the health going down, which isn't needed) The text can just be written in, but I think it really adds to the moment of the fireball being dropped on him, and getting to see a chunk of his HP depleted, albeit not much, but that is what creates intensity, suspense and emersion! It would be really cool to have, and hope it would be simple to code.  Thanks again for your response Keith, and continuing to make Roll20 better everyday :)
1686107095
The Aaron
Roll20 Production Team
API Scripter
What you could do is add a box on the DL layer then put an invisible token with sight for all players in it, and appropriate lighting, then draw a health bar with filled rectangle paths, and adjust it as the token's health is adjusted. There's some edge cases with DL lines crossing it, and it being on the level of the map, rather than attached to the screen, but it could work and be pretty cool. 
1686109980
GiGs
Pro
Sheet Author
API Scripter
I think you could definitely do this with a Mod/script - your GM would need a pro scubscription and someone would need to create the script.
If you're fine with imperfect bar, then you could probably use something I've been using in one of my games. <a href="https://app.roll20.net/forum/post/11464106/change-side-of-multi-sided-token-based-on-a-value-from-a-character-sheet/?pageforid=11464106#post-11464106" rel="nofollow">https://app.roll20.net/forum/post/11464106/change-side-of-multi-sided-token-based-on-a-value-from-a-character-sheet/?pageforid=11464106#post-11464106</a> The question there was so I wanted to update the multi sided token based on the value in one of the three token variables. You could probably just create&nbsp; multi-sided token with the some number of increments (1/8th of the health bar? Depending on your needs) and then track progress with adjusting specific value of a token.Maybe just add some logic to convert hp percentage to such value.
1687981492

Edited 1687984300
Would there be a way to do this with TokenMod? Please tell me if I am making no sense here. but if you have a token that is the health bar along the top. could you link the width or height of the token into one of the bars (say bar1), as the value in bar1 reduces/increases it modifies the width/height of the token? so then the GM just tracks the health of the boss on this token rather than the NPC token. if it isnt possible to link it to bar1_value, then something like this may suffice. initial boss health would be something like this: !token-mod --set width|*?{whats the boss' health? set this to 100% health divided by 10|0} height|/6 then the second script to shrink the bar (this will be reduced from both sides but it will still show a health reduction. !token-mod --set width|1u !token-mod --set width|*?{what is the current health divided by 10|0} I have divided the value by 10 just to keep the bar size reasonable and it keeps the maths simple. if you want to be fancy with this you could have tokens, one red and the other green, the red bar on the map layer below the green bar token then as you reduce the width of the green bar you slowly reveal the red bar beneath. then to reset the token to initial size !token-mod --set scale|1u