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 .
×

Random HP for Monsters for D&D 2024 Sheets

Hi all, Do any scripts work for D&D 2024 sheets to randomly calculate enemy HP values?  I've tried: MonsterHitDice - doesn't work. TokenMod - works (assuming that the sheet attributes load properly, which is a crapshoot), but calculates the current and max HP separately. !token-mod --set bar1_value|[[ @{selected|npc_hpformula} ]] bar1_max|[[ @{selected|npc_hpformula} ]] ChatSetAttr - doesn't work. TokenMod seems the most promising so far, but is there a way to set both current and max values to the same number? -Adam
1779304698
Gauss
Forum Champion
Hi Adam Caramon,  Try this instead:  !token-mod --set bar1_value|[[@{selected|npc_hpformula}]] bar1_max|$[[0]]
!token-mod --set bar1|[[@{selected|npc_hpformula}]] From the TokenMod Help handout: bar1 , bar2 , bar3 , and bar4 are special. Any value set on them will be set in both the _value and _max fields for that bar. This is most useful for setting hit points, particularly if the value comes from an inline roll. It looks like MonsterHitDice and ChatSetAttr have not been updated to work with Beacon-based sheets, such as the D&D 5E by Roll20 2024 sheet. 
Gauss said: Hi Adam Caramon,  Try this instead:  !token-mod --set bar1_value|[[@{selected|npc_hpformula}]] bar1_max|$[[0]] Thanks - that seems to do the trick.  Couldn't find this with an hour of Google. -Adam
1779309307
Gauss
Forum Champion
Thanks Jarren, forgot about that solution as well. :)