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

Hitpoints in ranges to prevent metagaming

1701363608

Edited 1701364096
I would like to prevent my players from revealing how many hit points their characters are missing. I would like to build a macro that compares the current hit points with the maximum hit points and displays a message in the chat in categories such as slightly wounded, severely wounded, near death. Slightly wounded if more than 50% of the maximum hit points, seriously wounded if less than 25% and close to death if less than 10%. Does anyone have any ideas? Thank you very much! Forgot to mention: We are playing DnD5e and using the DnD5e by roll20 sheet. 
1701365915
The Aaron
Roll20 Production Team
API Scripter
There are several ways of doing this with the Mod (API) Script perk from the Pro Subscription.  It's a bit harder with just the features of a Plus or Free Subscription.
1701369139

Edited 1701370647
Here's an option using several rollable tables (available to free/Plus users): Create 6 rollable tables, each with a single entry: 0Wounded Dead 1Wounded Near Death 2Wounded Severely Wounded 3Wounded Slightly Wounded 4Wounded Barely Wounded 5Wounded Not Wounded Then you can use this macro for a selected token: /w gm @{selected|token_name} is [[1t[[[ [[{[[ceil(0@{selected|bar1} / 0@{selected|bar1|max} * 100)]],-1}>1]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}>10]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}>25]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}>50]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}>100]] ]]Wounded]]] Or this if you want it displayed in the 'npaction' roll template: /w gm &{template:npcaction} {{rname=@{selected|token_name} Health}} {{description=@{selected|token_name} is [[1t[[[ [[{[[ceil(0@{selected|bar1} / 0@{selected|bar1|max} * 100)]],-1}>1]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}>10]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}>25]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}>50]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}>100]] ]]Wounded]]]}} This will only whisper the result to the GM. If you want to whisper it only to the player who is calling the macro, then I would suggest using the Macro Overloading trick . Otherwise just remove the '/w gm' and it will be displayed publicly in chat.
Thank you very much, this is exactly what I was looking for!
1701539367
vÍnce
Pro
Sheet Author
@Jarren That's a very cool and useful macro.  If that isn't already included in the Roll20 Tips and Tricks (Innovative Solutions to Common Problems) thread, it should be!  Thanks for posting.
Since you are using the 5E by Roll20 sheet you could alternately use the mancerroll template.  This option doesn't require any rollable tables: &{template:mancerroll} {{title=@{selected|token_name}'s Health Status}} {{c1=[[{0,1,10,25,50,100}<[[ceil(0@{selected|bar1} / 0@{selected|bar1|max} * 100)]]]]}} {{option1=Dead.}} {{option2=Near Death.}} {{option3=Severely Wounded.}} {{option4=Slightly Wounded.}} {{option5=Barely Wounded.}} {{option6=Not Wounded.}}
Great, I didn't know the manceroll template at all until just now.
Thanks Ryan. I didn't know about this manceroll template at all either. It doesn't seem to be documented  on the 5e sheet roll templates article . That's a handy template.
You can find the documentation on the mancerroll template here <a href="https://wiki.roll20.net/D%26D_5e_by_Roll20_Roll_Templates" rel="nofollow">https://wiki.roll20.net/D%26D_5e_by_Roll20_Roll_Templates</a>
vÍnce said: @Jarren That's a very cool and useful macro.&nbsp; If that isn't already included in the Roll20 Tips and Tricks (Innovative Solutions to Common Problems) thread, it should be!&nbsp; Thanks for posting. Posted ! I thought I had already seen this trick there, but it is a little different than the others already listed, so I agree that it warrants its own submission.
Ryan85202 said: Since you are using the 5E by Roll20 sheet you could alternately use the mancerroll template.&nbsp; This option doesn't require any rollable tables: &amp;{template:mancerroll} {{title=@{selected|token_name}'s Health Status}} {{c1=[[{0,1,10,25,50,100}&lt;[[ceil(0@{selected|bar1} / 0@{selected|bar1|max} * 100)]]]]}} {{option1=Dead.}} {{option2=Near Death.}} {{option3=Severely Wounded.}} {{option4=Slightly Wounded.}} {{option5=Barely Wounded.}} {{option6=Not Wounded.}} That is an awesome use of that roll template!