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

MonsterHitDice problem

On one of my campaigns (the new one I am trying to set up, natch), !mhd (0.3.11) is not running properly.  It fires off, but only returns a chat message " (From ): Rolling hit dice for 1 token(s). " with no actual change in the HP of the selected token (drawn clean from the Compendium). I've gone through the other threads on this topic going back months and years, and have tried all the variations of settings suggested there, to no avail. It is currently set with: Bar: Bar1 Sheet: DnD 5e - OGL by roll20 Hit Dice attribute: npc_hpformula Yes, I've set the Sheet to "Custom" and tried it. I've also tried it in the Normal and Experimental sandboxes. This game is set up for the 2024 character sheet (though Roll20 seems to think I've snuck 2014 assets in there and prompting me to consider adding that character sheet). I haven't seen anything indicating mhd is not compatible with 2024, but the Roll20 forum is not always the easiest place to dig out information.
1748110233
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
As far as I know, Monster Hit Dice is not compatible with the 2024 Beacon sheet. I'll see if I can let the Aaron know. It might not be a heavy lift.
Ah. Well, that would certainly explain it. 😜  I thought  I had read somewhere that it was now working with Beacon, but I might be misremembering or misunderstanding. 
1748112749
The Aaron
Roll20 Production Team
API Scripter
It looks like the 2024 sheet is exposing a computed with the same name as the 2014 sheet.&nbsp; I'll just need to update the code to use getSheetItem() instead of directly relying on an attribute and it should make it work with both sheets... Ok, done.&nbsp; I've sent a pull request so it should just start working next week when they merge it, or you can grab the latest version here:&nbsp;&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> &nbsp; (but because this uses GlobalConfig, you'll want to switch back to the library version once it comes out)
Awesome! Thanks so much, Aaron!
1748617731

Edited 1748639338
Hey, Aaron, I circled around to this today, and it looks like the new version is in place (0.3.12 from 24 May), but I'm still not getting results. In-game, it simply says: (From ): Rolling hit dice for 1 token(s). (or however many tokens I have selected) and in the (Experimental) sandbox console: "Error: No attribute or sheet field found for character_id -OQzE3yUYh2J8Hx6Mz7I named npc_hpformula" and the HP are not changing.&nbsp;I am aiming at Bar 1 and using the "DnD 5e - OGL by roll20" character sheet in the MHD configuration.
1748794895
The Aaron
Roll20 Production Team
API Scripter
Hmm.&nbsp; &nbsp;Clearly this was not ready.&nbsp; I've rolled it back and will do more thorough testing.
Thanks, Aaron -- back from out of town, and MHD (0.3.13) seems to be operating as intended -- one or more tokens selected, run the command, hey-presto new HP numbers.&nbsp; Thanks!
Could you share your notes with the rest of the class? I'm still struggling lol
Hi, Aaron -- okay, apparently I wasn't paying attention when I wrote the above -- MHD (0.3.13) works fine on a 2014 sheet (as before), but is not&nbsp;making changes on a 2024 sheet. I'm not getting those errors in the console (yay!), and I am getting the " (From ): &nbsp; Rolling hit dice for 1 token(s)" message, but the HP are not changing. Sorry for the confusion.
Just to close the loop, this seems to be working (again?), changing HP values on the 2024 sheet as expected.&nbsp; ¯\_(ツ)_/¯