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

Resetting resources on rests

First time poster here and new pro member,  I'm trying to set up macro's for rests for my players, as a couple struggle to remember what they get on a short or long rest,  I found this below script on the forum,  !longrest @{selected|character_name} !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} &{template:desc} {{desc=@{selected|character_name} Long Rest Taken, Reset HP, Spell Slots, @{selected|class_resource_name}, @{selected|other_resource_name}} This only resets his hp, hit dice and superiority dice and comes up with this error   Why has this only reset Superiority?  Also is there a way to specify only one resource for a short rest macro where someone might only have one resource reset on a short rest but other resources on a long rest I want to single out the individual resource gained?  Any response is appreciated David M   
1552148457

Edited 1552148499
GiGs
Pro
Sheet Author
API Scripter
I think these two lines !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} look like they have been copied through Word or similar, and the double hyphens have been converted into a long dash. They should be: !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}
GiGs said: look like they have been copied through Word or similar, and the double hyphens have been converted into a long dash. They should be: Thank you! not sure how that happened but thanks,  Is there a way to specify only one resource for a short rest macro where someone might only have one resource reset on a short rest but other resources on a long rest I want to single out the individual resource gained?  Also I'm using the ammo tracking script, but obviously it doesn't work with this as its trying to set the crossbow bolts to the max, which is empty, I think you can set the max as the current amount when running the macro to resolve this but guessing its not as simple as swapping the values as below? !setattr --silent --sel --repeating_resource_$0_resource_right|max|@{selected|repeating_resource_$0_resource_right}