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 .
×

How to take a Long Rest w/5e OGL by Roll20?

Hello All,&nbsp; I found a previous topic (link here:&nbsp; <a href="https://app.roll20.net/forum/post/5338392/how-to-take-a-long-rest-w-slash-5e-ogl-by-roll20" rel="nofollow">https://app.roll20.net/forum/post/5338392/how-to-take-a-long-rest-w-slash-5e-ogl-by-roll20</a>) &nbsp;that I'd like to add something to, but can't seem to figure it out. I'd like to have it when I use the longrest to have the macro talk to the script and roll dice for something that gains xdx roll charges back at dawn. Staff Charges, ring charges, etc, but can't seem to get it to work. Instead of having the value to go max, how can I make it roll and add to what the value is currently? Example: Kaz has a ring with 2 charges and gains 1d4 charges back at dawn. This does not work: !setattr --silent --sel --repeating_resource_$1_resource_right|@{selected|repeating_resource_$1_resource_right|1d4} What I have:&nbsp; !longrest @{selected|character_name} !setattr --silent --sel --class_resource|@{selected|class_resource|max} !setattr --silent --sel --other_resource|@{selected|other_resource|max} &amp;{template:atk} {{desc=**@{selected|character_name}** *Long Rest Taken* Reset HP, Spell Slots, @{selected|class_resource_name}, @{selected|other_resource_name}, @{selected|repeating_resource_$0_resource_left_name}, @{selected|repeating_resource_$1_resource_left_name}, @{selected|repeating_resource_$1_resource_right_name}}} !setattr --silent --sel --repeating_resource_$0_resource_left|@{selected|repeating_resource_$0_resource_left|max} !setattr --silent --sel --repeating_resource_$1_resource_left|@{selected|repeating_resource_$1_resource_left|max} !setattr --silent --sel --repeating_resource_$1_resource_right|@{selected|repeating_resource_$1_resource_right|max} Thanks!
Try: !modbattr --sel --repeating_resource_$0_resource_right|[[1d4]] The caps the attribute at max (modb), however has the downside of having each selected character have the same d4 roll. Not sure if there's an easier way, but I would get around this by doing one line for each char: !modbattr --name Char Name1 --repeating_resource_$0_resource_right|[[1d4]] !modbattr --name Char Name2 --repeating_resource_$0_resource_right|[[1d4]] !modbattr --name Char Name3 --repeating_resource_$0_resource_right|[[1d4]]
Hey Geoff thanks for the reply!&nbsp; Yours did work, I got another hit on another post that gave the same results of yours above, but a little cleaner if you are interested.&nbsp; /desc At dawn, your magic item recovers its spell slots... !modbattr --fb-from The DM --fb-header Increasing charges --name CHARACTERNAMEHERE --fb-content The charges in XXXX increases by _TCUR0_ to a total of _CUR0_. --name CHARACTERNAMEHERE --repeating_resource_$0_resource_right|+[[1d4+1]] Replaced CHARACTERNAMEHERE with the character exactly as is in the sheet.&nbsp; Replaced XXXX with the recharged resource name Apply correct Dice Ended up with this for my specific code:&nbsp; /desc At dawn, your magic item recovers its spell slots... !modbattr --fb-from The DM --fb-header Increasing charges --name Daziss --fb-content The charges in Staff of Power Charges increases by _TCUR0_ to a total of _CUR0_. --name Daziss --repeating_resource_$0_resource_left|+[[2d8+4]] /desc At dawn, your magic item recovers its spell slots... !modbattr --fb-from The DM --fb-header Increasing charges --name Daziss --fb-content The charges in Yuan-Ti Staff Charges increases by _TCUR0_ to a total of _CUR0_. --name Daziss --repeating_resource_$0_resource_right|+[[1d6]] /desc At dawn, your magic item recovers its spell slots... !modbattr --fb-from The DM --fb-header Increasing charges --name Beverly Struck --fb-content The charges in RoR (1d3 Dawn) increases by _TCUR0_ to a total of _CUR0_. --name Beverly Struck --repeating_resource_$0_resource_left|+[[1d3]] /desc At dawn, your magic item recovers its spell slots... !modbattr --fb-from The DM --fb-header Increasing charges --name Kaz Al'Kage --fb-content Ring Charges increases by _TCUR0_ to a total of _CUR0_. --name Kaz Al'Kage --repeating_resource_$1_resource_right|+[[1d4+1]] Gives this in the chat (test numbers):&nbsp; Credit to godthedj on this post:&nbsp; <a href="https://app.roll20.net/forum/post/7309944/how-to-take-a-long-rest-w-slash-5e-ogl-by-roll20/?pageforid=7314605#post-7314605" rel="nofollow">https://app.roll20.net/forum/post/7309944/how-to-take-a-long-rest-w-slash-5e-ogl-by-roll20/?pageforid=7314605#post-7314605</a> &nbsp; Thanks!