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 Companion Script and !longrest

It looks like !longrest @{selected|character_name} resets all expended Hit Dice.  Is this intentional?  A long rest is supposed on only restore half of the expended Hit Dice.  Or am I misinterpreting the rules and how this script is working?
1626728757
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I just ran some testing. On a character who is not tracking hit dice per class, it correctly restores half of all expended hit dice. On a character who is tracking by class, it appears to do nothing. It is possible that the per-class feature was added, but the script (which is not official, to my knowledge), was never updated to acommodate. There are several Rest and Recovery scripts available in the One Click, that might handle this better. Combined: Before: After: Separate: Before and After (both classes use d8s): Also, I would suggest amending your macro to: !longrest "@{selected|character_name}" since a space can cause the script to grab an incorrect character
1626729531

Edited 1626729971
Thanks Keith. I see some different behavior.  For multiclassed characters, tracking separate hit die per class, it also restores all expended hit dice on a long rest.  I checked on a single class, and it still restores all expended hit die (instead of only restoring half the expended hit dice).  Definitely weird behavior. I did use   !longrest "@{selected|character_name}" Before: After: Also, in your case it restored something more than half the expended hit dice, but not all.  (16-3)/2 = 6.5 (7 rounded up).  3+7=10.  Should have been 10 (not 11) after the Long Rest. I do also have D&D 5E - Short Rests, but would be interested in something else that handled both Short and Long rests better.  I will check out your D&D 5E - Rest and Recovery script.
1626730998

Edited 1626731127
The 5E Resting in Style seems to be what I'm looking for.  It handles all of the class resources, spells and hit points.  Except that it still doesn't handle regaining Hit Dice correctly.  It makes me wonder if there is a problem with the 5E OGL Sheet? In this case, I started with 10 hit dice, used 6.  Then when I used !long-rest, it says I regained 5 and I'm 9/10.  It should have been 3 restored, not 5.  But close enough I guess.  It makes me think it is doing the half recovery twice (half of 6 is 3.  Then half of 3 is 1.5, which is 2 rounded up).  Those together are 5 recovered.  Just guessing.
1626732002

Edited 1626732033
Hey Matt, it sounds like the correct amount of hit dice regained since the rules state that after a long rest ‘the character also regains spent Hit Dice, up to a number of dice equal to half of the character’s total number of them (minimum of one die). So if you started with 10 hit dice and expended 6 and then long rested the correct number regained would be 5 hit dice, totalling 9/10.  I hope this helps, that’s how I’ve interpreted the rules anyway :)
1626735014
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That's the behavior I was expecting and saw. It's half the total that gets added, not half the remaining or half the used. Also, the rule on rounding is: whenever you divide a number in the game, round down if you end up with a fraction, even if the fraction is one-half or greater.
Sam said: Hey Matt, it sounds like the correct amount of hit dice regained since the rules state that after a long rest ‘the character also regains spent Hit Dice, up to a number of dice equal to half of the character’s total number of them (minimum of one die). So if you started with 10 hit dice and expended 6 and then long rested the correct number regained would be 5 hit dice, totalling 9/10.  I hope this helps, that’s how I’ve interpreted the rules anyway :) Oh, wow.  Thanks for setting me straight.  I had misinterpreted the half, but upon rereading the PHB, p186, it's pretty clear.  You are correct.  
No problem. Glad I could help!
This is my macro for Long-Rest : !setattr --silent --sel --hp|@{selected|hp|max} !setattr --silent --sel --class_resource|@{selected|class_resource|max} !setattr --silent --sel --other_resource|@{selected|other_resource|max} !setattr --silent --sel --repeating_resource_$0_resource_left|@{selected|repeating_resource_$0_resource_left|max} !setattr --silent --sel --repeating_resource_$0_resource_right|@{selected|repeating_resource_$0_resource_right|max} !setattr --silent --sel --hit_dice|@{selected|hit_dice|max} !setattr --silent --sel --evaluate --exhaustion_level|(%exhaustion_level% > 0) ? %exhaustion_level% - 1 : 0 &{template:default} {{desc=**@{selected|character_name}** *Long Rest Taken* Reset HP, Hit Dice, Exhaustion Level, Spell Slots, @{selected|class_resource_name}, @{selected|other_resource_name}, @{selected|repeating_resource_$0_resource_left_name} @{selected|repeating_resource_$0_resource_right_name}}} !longrest @{selected|character_name}