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

TokenMod macro help OGL 5e - Cure Wounds and other healing spells

So I have figured out most of tokenmod, or what I want to do with it except for one thing, players are asking if their healing spells can automatically heal the target token, play an FX (probably burn-holy) and query what level they want to cast the spell at and have token mod apply the correct spell and healing to the HP bar all while dragging the correct information from their character sheet to do this...and I am sure TokenMod CAN do all of this, I have no clue as to where to start, or even how to modify say a potion of healing macro that does similar. any help would be appreciated. Aaron...(not The Aaron that scripted TokenMod)
1591903687
The Aaron
Roll20 Production Team
API Scripter
Well, it can do some of that.  =D  It can do the adjusting of the bars, and the querying for the level can be done with a Roll Query.  it would look something like: !token-mod {{ --set bar1_value|[[{@{target|Whom|bar1|max},[[?{Level|1|2|3|4|5|6|7|8|9}d8+(?{Level}*@{bob|wisdom_mod})]]}kl1]] --report all|"Healed {name} for {bar1_value:abschange}hp, now at {bar1_value}" --ids @{target|Whom|token_id} }} Adjust as needed, but that's the idea off the top of my head.  People commonly use some other macros/api scripts to do the effects, which we can probably help with.
well I'll likely knock up a quick FX macro and drop it in above the token mod section, then try and figure out how to get the effect and the TokenMod to trigger of of one select. but this is awesome thank you very much
1591904865
The Aaron
Roll20 Production Team
API Scripter
No problem.  I just hacked that out from memory, so it might need some love before it works... The roll is messy to prevent healing to 58/50hp and such. =D
yeah I was just struggling to figure out how to get the up scaling of  the spell and dragging the required stat from the sheet.
So piggybacking off of this, I changed it to the following for simple 2d8 healing: !token-mod {{ --set  bar1_value|[[{@{target|Whom|bar1|max},[[2d8]]}kl1]] --report   all|"Healed {name} for {bar1_value:abschange}hp, now at {bar1_value}" --ids  @{target|Whom|token_id} }} If the healing stays under Bar1 max, it works. If it exceeds bar1 max, it performs some crazy math and turns 47/48 into 12 example:  Healed Marshall for 35hp, now at 12 I feel like there is a bracket or bar or something out of place, but I'm at a loss.
1592100190
The Aaron
Roll20 Production Team
API Scripter
Oh, it needs to add current: bar1_value|[[{@{target|Whom|bar1|max},[@{target|Whom|bar1}+[2d8]]}kl1]]
Awesome, thanks. My players will be so happy. Can this be integrated into a macro that uses a template? ie the 2e simple sheets template.
1592503647

Edited 1592503820
so the same happened to me with the first macro, the first time the healing went above the maximum value it seemed to subtract HP rather than heal and stop, how would one implement the fix that you applied to the 2d8 macro to the one asking for spell level.  bar1_value|[[{@target|whom|bar1|max},[@{target|whom|bar1},[[?{level1|2|3|4|5|6|7|8|9}d8+(?{level}*@{target|caster|wisdom_mod})]]]}kl1]] is the guess I made at it, but I didn't seem to work...ok saying it didn't seem to work was an understatement, it deleted the bar value and added a string of code instead of a number. full macro code !token-mod {{   --set    bar1_value|[[{@target|whom|bar1|max},[@{target|whom|bar1},[[?{level1|2|3|4|5|6|7|8|9}d8+(?{level}*@{target|caster|wisdom_mod})]]]}kl1]]   --report     all|"Healed {name} for {bar1_value:abschange}hp, now at {bar1_value}"   --ids     @{target|Whom|token_id} }}
1592504003
The Aaron
Roll20 Production Team
API Scripter
Something like this: !token-mod {{ --set bar1_value|[[{@{target|whom|bar1|max},[[@{target|whom|bar1}+?{level1|2|3|4|5|6|7|8|9}d8+(?{level}*@{target|caster|wisdom_mod})]]}kl1]] --report all|"Healed {name} for {bar1_value:abschange}hp, now at {bar1_value}" --ids @{target|Whom|token_id} }} Basically, you're using a group to select the lower of ( Max HP, Current HP + Healing ).  I typed all of this without testing, so breaking it down and testing it's component parts will help: [[@{target|whom|bar1}+?{level1|2|3|4|5|6|7|8|9}d8+(?{level}*@{target|caster|wisdom_mod})]]
Thank you, looking at what you put, next to what I guessed at I can see where i went wrong.