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

Help: Macro for rolling hit dice AND assigning to token bar3

Hello,  I want to be able to click on any token, roll it's hit die (hp) and that roll will automatically update the creature's bar3 (red) hp max and value so that they're both full.  My current macro is: /gmroll [[?{|1}d8]]  This is shown as a token action, and this currently works for rolling but obviously not assigning it to the token's bar 3 value and max. I've spent a while trying to find any help but so far can't find anything that does this. Thank you for any help!
1712433673

Edited 1712433883
Gauss
Forum Champion
Hi Nicolas, Which character sheet are you using? 
Gauss said: Hi Nicolas, Which character sheet are you using?  Hi Gauss, No character sheet. It's for token settings. I want to be able to click on any token and add (or reassign) its hp with the one button. So far I have something like: /gmroll [[?{|1}d8 &{@{selected|hp}/@{selected|hp|max}}]] but that's not working (I don't know how to code really). Thanks for any help!
Without a Mod (API) script, any chat commands (macros) are “read only” and cannot adjust token settings.  If the game creator has a Roll20 Pro subscription then you can use TokenMod to do this: !token-mod --set bar3|+?{How many dice?|1}d8!
1712437793

Edited 1712437809
GiGs
Pro
Sheet Author
API Scripter
You can't do this without a Mod (requiring a Pro subscription). What matters is the game's creator subscription level - is your game creator a Pro subscriber? Edit: what Jarren said :)