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

[Help] 5e D&D Short Rest automation

I'm trying to automate short rests for 5th edition dungeons and dragons using the OGL sheet, specifically hit dice.&nbsp; My problem is that short rest healing is based on a player choice, the number of hit dice spent. This one choice determines the number of dice rolled, as well as what your con modifier is multiplied by. While I can use a roll query for one or the other, I can't seem to figure out a way to access the number a second time, and I don't want to have to ask the same question twice for the macro.&nbsp; In addition, I'm planning on using a nifty little script from Kevin to handle adding health and reducing hit dice attributes in accordance with the numbers chosen.&nbsp; The best solution I've been able to come up with far is to use a macro to simply use a hit dice macro X times, based on player input, each of which should be picked up by Kevin's script. Problem is, you don't seem to be able to use a macro X times using the default system. Does anyone have a script that would allow me to do so, or a better solution? <a href="https://app.roll20.net/forum/post/5581501/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/5581501/slug%7D</a>
1516455010
The Aaron
Pro
API Scripter
Are you asking for a script (API written in JavaScript, executed on the server API server) or are you just looking for a macro/ability/chat command that lets you use the same queried value twice: /em uses ?{Number|1} hit dice. heal: [[?{Number}d8+(?{Number}*2) ]]
1516459641

Edited 1516459698
Here is the character ability I give to each my players to use multiple hit dice at once @{wtype}&{template:simple} {{rname=^{hit-dice-u}}} {{mod=?{How Many|0}(D@{hitdie_final}+[[@{constitution_mod}[CON]]])}} {{r1=[[?{How Many}d@{hitdie_final}+[[?{How Many}*@{constitution_mod}]][CON]]]}} {{normal=1}} @{charname_output} This macro will condense all of the hit-dice into a single number and should still be picked up by Kevin's script since I use the internationalization keyword ^{hit-dice-u} . Let me know if you have any problems with it. This should also work for multiclass characters if I did it right. I haven't had a multiclass player yet to test it :)
1516464092

Edited 1516465483
The Aaron said: Are you asking for a script (API written in JavaScript, executed on the server API server) or are you just looking for a macro/ability/chat command that lets you use the same queried value twice: /em uses ?{Number|1} hit dice. heal: [[?{Number}d8+(?{Number}*2) ]] Thanks! This will work! Kyle G. said: Here is the character ability I give to each my players to use multiple hit dice at once @{wtype}&{template:simple} {{rname=^{hit-dice-u}}} {{mod=?{How Many|0}(D@{hitdie_final}+[[@{constitution_mod}[CON]]])}} {{r1=[[?{How Many}d@{hitdie_final}+[[?{How Many}*@{constitution_mod}]][CON]]]}} {{normal=1}} @{charname_output} This macro will condense all of the hit-dice into a single number and should still be picked up by Kevin's script since I use the internationalization keyword ^{hit-dice-u} . Let me know if you have any problems with it. This should also work for multiclass characters if I did it right. I haven't had a multiclass player yet to test it :) Thank you. This is basically the same as what I ended up with, although I added another&nbsp;?{How Many} to multiple the con mod under mod, to more accurately reflect the actual number being added. Also set it up to work as a button for the selected character.&nbsp; @{selected|wtype}&{template:simple} {{rname=^{hit-dice-u}}} {{mod=?{How many hit dice would you like to spend?|1}D@{selected|hitdie_final}+[[@{selected|constitution_mod}*?{How many hit dice would you like to spend?}[CON]]]}} {{r1=[[ ?{How many hit dice would you like to spend?}d@{selected|hitdie_final}+[[@{selected|constitution_mod}* ?{How many hit dice would you like to spend?}]][CON]]]}} {{normal=1}} @{selected|charname_output} {{charname=@{selected|token_name}}} Now all that's left to do is adjust Kevin's scriptlet to work with the macro. Hrm.&nbsp;
How did you end up adjusting Kevin's script to work with the macro. Have to admit I have no clue what I am looking at when looking at the API scripts.