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

5e OGL Player current and total health macro

/w gm &{template:default} {{name=Hit Points/Total}} {{Gendraem (Raz)=[[@{Gendraem (Raz)|hp}]] of [[@{Gendraem (Raz)|hp_max}]]}} Why is hp_max not a valid attribute to call? Is there any other way to get the total HP from a character sheet besides the following? /w gm @{selected|bar1} HP of @{selected|bar1|max I would like to call the hps/total hp of all my players with one click instead of clicking on each token and running the macro.
I think you need to use the vertical bar instead of the underscore when dealing with max (e.g., hp|max) in macros. See the last portion of this section: <a href="https://wiki.roll20.net/Macros#Using_a_Selected_Token_with_a_Macro" rel="nofollow">https://wiki.roll20.net/Macros#Using_a_Selected_Token_with_a_Macro</a>
1537621103

Edited 1537621675
This is the macro I used to use to track my character's resources. Set it up once and would call this regularly throughout the game. The names are obviously unique to my game. Likewise, I tailored this to their specific class resources. But you can see that I call health with @{charactername|hp|max} . The following characters were for reference Draven: Cleric, Edmund: Paladin, Grimoire: Bard, Shade: UA Ranger, Hefter: Monk. /w gm &amp;{template:npcaction} [[{{rname=Group Resources}} {{description= **Draven** HD: **@{Draven|hit_dice}** | HP: **@{Draven|hp}** ([[round((@{Draven|hp} / @{Draven|hp|max}) * 100)]]%) | AC: **@{Draven|ac}** ***Spells*** DC: **[[8 + @{Draven|pb} + @{Draven|wisdom_mod}]]** | Prepared: **[[@{Draven|wisdom_mod} + @{Draven|caster_level}]]** Level 1 Slots: **@{Draven|lvl1_slots_expended}** / @{Draven|lvl1_slots_total} Level 2 Slots: **@{Draven|lvl2_slots_expended}** / @{Draven|lvl2_slots_total} Level 3 Slots: **@{Draven|lvl3_slots_expended}** / @{Draven|lvl3_slots_total} Level 4 Slots: **@{Draven|lvl4_slots_expended}** / @{Draven|lvl4_slots_total} ***Resources*** @{Draven|class_resource_name}: **@{Draven|class_resource}** / @{Draven|class_resource|max} @{Draven|other_resource_name}: **@{Draven|other_resource}** ----------------------------------------- **Edmund** HD: **@{Edmund|hit_dice}** | HP: **@{Edmund|hp}** ([[round((@{Edmund|hp} / @{Edmund|hp|max}) * 100)]]%) | AC: **@{Edmund|ac}** ***Spells*** DC: **[[8 + @{Edmund|pb} + @{Edmund|charisma_mod}]]** | Prepared: **[[@{Edmund|charisma_mod} + floor(@{Edmund|level}/2)}]]** Level 1 Slots: **@{Edmund|lvl1_slots_expended}** / @{Edmund|lvl1_slots_total} Level 2 Slots: **@{Edmund|lvl2_slots_expended}** / @{Edmund|lvl2_slots_total} Level 3 Slots: **@{Edmund|lvl3_slots_expended}** / @{Edmund|lvl3_slots_total} ***Resources*** @{Edmund|class_resource_name}: **@{Edmund|class_resource}** / @{Edmund|class_resource|max} @{Edmund|other_resource_name}: **@{Edmund|other_resource}** ----------------------------------------- **Grimoire** HD: **@{Grimoire|hit_dice}** | HP: **@{Grimoire|hp}** ([[round((@{Grimoire|hp} / @{Grimoire|hp|max}) * 100)]]%) | AC: **@{Grimoire|ac}** ***Spells*** DC: **[[8 + @{Grimoire|pb} + @{Grimoire|charisma_mod}]]** | Known: **12** Level 1 Slots: **@{Grimoire|lvl1_slots_expended}** / @{Grimoire|lvl1_slots_total} Level 2 Slots: **@{Grimoire|lvl2_slots_expended}** / @{Grimoire|lvl2_slots_total} Level 3 Slots: **@{Grimoire|lvl3_slots_expended}** / @{Grimoire|lvl3_slots_total} Level 4 Slots: **@{Grimoire|lvl4_slots_expended}** / @{Grimoire|lvl4_slots_total} Level 5 Slots: **@{Grimoire|lvl5_slots_expended}** / @{Grimoire|lvl5_slots_total} ***Resources*** @{Grimoire|class_resource_name}: **@{Grimoire|class_resource}** / @{Grimoire|class_resource|max} ----------------------------------------- **Hefter** HD: **@{Hefter|hit_dice}** | HP: **@{Hefter|hp}** ([[round((@{Hefter|hp} / @{Hefter|hp|max}) * 100)]]%) | AC: **@{Hefter|ac}** ***Resources*** @{Hefter|class_resource_name}: **@{Hefter|class_resource}** / @{Hefter|class_resource|max} | DC: **[[8 + @{Hefter|pb} + @{Hefter|wisdom_mod}]]** @{Hefter|other_resource_name}: **@{Hefter|other_resource}** ----------------------------------------- **Shade** HD: **@{Shade|hit_dice}** | HP: **@{Shade|hp}** ([[round((@{Shade|hp} / @{Shade|hp|max}) * 100)]]%) | AC: **@{Shade|ac}** ***Spells*** DC: **[[8 + @{Shade|pb} + @{Shade|wisdom_mod}]]** | Known: **6** Level 1 Slots: **@{Shade|lvl1_slots_expended}** / @{Shade|lvl1_slots_total} Level 2 Slots: **@{Shade|lvl2_slots_expended}** / @{Shade|lvl2_slots_total} Level 3 Slots: **@{Shade|lvl3_slots_expended}** / @{Shade|lvl3_slots_total} ***Resources*** @{Shade|other_resource_name}: **@{Shade|other_resource}**}}
@Jeremy, Thanks for sharing your setup! I have since copied it and added some other things like current/total for HD and HP. I've also added the characters current level at the top. I'm really liking the more concise format. Cheers!