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

Rolling 5e npc health from their character sheet while HP is unlinked on token

Ok so this should be a trickier one!  From what I can see tokens in D&D 5e do not directly LINK their health to their character sheet.  The game makers just set their TOKENS to have the health SET at a matching value.  I'm cool with that, It saves all Goblins sharing the same current HP and so on.  What I want to have is to select each npc token, have their individual health-dice-formula (e.g 2d6+2) rolled and have each token updated per each result.  If all goes well, this doesn't affect the npc character sheet, the bar-1 of each npc is just updated per a function/ macro I use for all of them and then their health updates on the token.  Let me know if something easily is accessible! 
I don't know if I understood your question. But I use the API !token-mod and I have a macro into every NPC/Monster Abilities tab. Then I roll for each one or selected ones. Select the bar you wish to use for HP and change the Hit Die for each accordingly: !token-mod --set bar3|[[2d8]]
1578972913
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I believe the One Click script "Monster Hit Dice" by The Aaron will do this.
1578973867
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you want to go the token-mod route and are using the D&D 5e by Roll20 sheet, this will set everything in one swell foop: !token-mod --set bar1|[[@{selected|npc_hpformula}]]
keithcurtis said: If you want to go the token-mod route and are using the D&D 5e by Roll20 sheet, this will set everything in one swell foop: !token-mod --set bar1|[[@{selected|npc_hpformula}]] I typed this into the game with a bunch of goblins selected, it didn't change anything sadly
Made sure the token mod API script was added (wasn't so clear i needed it) but it's there now, not working. 
1579116034
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It randomizes for me, but each token receives the same random number. There's probably something I'm not thinking of. Have you tried the Monster Hit Dice script?
Nope, downloaded that script, refreshed the api, refreshed the page, nothing :P 
1579120268
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Just to eliminate any other possible causes, are any scripts responding?
1579120691
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I just ran a test with Monster Hit Dice script. These settings work in the test game:
IT WORKS! However there is still some strangeness if I select a group  A group of goblins will all come to the same result if I select all of them at once.  If I include a big boss goblin, he also will have the same result with the rest of the group, even though his hpformula involves more dice. 
1579217813
The Aaron
Roll20 Production Team
API Scripter
That's with the TokenMod command, right?&nbsp; That's how that one works.&nbsp; If Monster Hit Dice, if you select them all, copy, delete, paste, it will reroll them.&nbsp; Otherwise it rolls them on drop. Ok.. I just added a command to MonsterHitDice: !mhd This will reroll the hit dice for all selected tokens. Pull Request:&nbsp; <a href="https://github.com/Roll20/roll20-api-scripts/pull/899" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/pull/899</a> Source:&nbsp;<a href="https://github.com/shdwjk/Roll20API/blob/master/MonsterHitDice/MonsterHitDice.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/MonsterHitDice/MonsterHitDice.js</a>
The Aaron said: That's with the TokenMod command, right?&nbsp; That's how that one works.&nbsp; If Monster Hit Dice, if you select them all, copy, delete, paste, it will reroll them.&nbsp; Otherwise it rolls them on drop. Ok.. I just added a command to MonsterHitDice: !mhd This will reroll the hit dice for all selected tokens. Pull Request:&nbsp; <a href="https://github.com/Roll20/roll20-api-scripts/pull/899" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/pull/899</a> Source:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/MonsterHitDice/MonsterHitDice.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/MonsterHitDice/MonsterHitDice.js</a> Could you pm me this please?&nbsp; It's slightly easier tyo check back on pm than a forum post :P&nbsp;
1579219136
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Easier than clicking "Follow this Topic"?
keithcurtis said: Easier than clicking "Follow this Topic"? Ah
The Aaron said: That's with the TokenMod command, right?&nbsp; That's how that one works.&nbsp; If Monster Hit Dice, if you select them all, copy, delete, paste, it will reroll them.&nbsp; Otherwise it rolls them on drop. Ok.. I just added a command to MonsterHitDice: !mhd This will reroll the hit dice for all selected tokens. Pull Request:&nbsp; <a href="https://github.com/Roll20/roll20-api-scripts/pull/899" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/pull/899</a> Source:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/MonsterHitDice/MonsterHitDice.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/MonsterHitDice/MonsterHitDice.js</a> YES! Copy, delete, pasting does the job excellently!&nbsp; And even more excellently it does the same for new tokens being dragged out which is just.... However the !mhd didn't do anything, sorry to say
1579265202
The Aaron
Roll20 Production Team
API Scripter
Did you install that new version and select tokens? &nbsp;If you're installing from the 1-click, the command should show up on Tuesday.&nbsp;