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

Macro? Token mod? Or impossible... Little help?

I'm wanting to make a macro for my Druid player that would calculate the difference between his current and max hit points of his animal form token, and subtract the amount from his druid token. To be clear these are 2 different character sheets with different IDs. I was thinking some creative use of token mod and multiple targets... Anyone have suggestions? 
1450558355
The Aaron
Pro
API Scripter
So effectively: [Druid Current HP] = [Druid Current HP]- ( [Animal Max HP] - [Animal Current HP] ) This will work: !token-mod --set bar3_value|[[0@{selected|bar3}-(0@{target|Animal Form|bar3|max}-0@{target|Animal Form|bar3})]] --ids @{selected|token_id} Some notes: This is assuming bar3 is your hit points, but feel free to change it to whatever. The selected is necessary because the @{target} syntax causes the current token to be deselected when the command runs.  That means you'll have to turn on PlayersCanIds in the help so your player can run it. Prefacing attributes with 0 prevents an error when the bar happens to be blank for some reason. You can put this as an ability on the Druid character and set it as a Token Action, then they can just select the Druid and click the button on the Token Action bar. There isn't any feedback about what happens currently, but in this case, you could just add an additional command to tell what happened: /em feels [[0@{target|Animal Form|bar3|max}-0@{target|Animal Form|bar3}]] hit points drain away, leaving [[0@{selected|bar3}-(0@{target|Animal Form|bar3|max}-0@{target|Animal Form|bar3})]].
1450559676

Edited 1450559727
I think this is close to what I want, but I'm not home to test it... What I'm trying to do is use the wild shape rules in 5e. It says roughly that if a druid is in an animal form that has more HP than his druid form and shifts back to druid form, any damage the animal took transfers to the druid HP. So if the druid was in bear form and was 25 out of 50 HP, when he shifted to druid form he'd lose 25 from his max.
After looking again I think this is exactly what I need, I've not messed to much with the bar commands in token mod but I love it. So many fun things you can do,  Thanks again Aaron!
1450562294
The Aaron
Pro
API Scripter
You're talking about from the Player's Handbook page 67: • When you transform, you assume the beast’s hit points and Hit Dice. When you revert to your normal form, you return to the number of hit points you had before you transformed. However, if you revert as a result of dropping to 0 hit points, any excess damage carries over to your normal form. For example, if you take 10 damage in animal form and have only 1 hit point left, you revert and take 9 damage. As long as the excess damage doesn’t reduce your normal form to 0 hit points, you aren’t knocked unconscious. [Druid Current HP] = [Druid Current HP] - [Animal Amount less than 0] That might instead be: !token-mod --set bar3_value|[[@{selected|bar3}-{0, -1*(@{target|Animal Form|bar3})}kh1]] --ids @{selected|token_id} /em feels [[{0,-1*(@{target|Animal Form|bar3})}kh1]] hit points drain away, leaving [[0@{selected|bar3}-({0,-1*(@{target|Animal Form|bar3})}kh1)]].
Wow ok thanks, I interpreted that so wrong thank you again for writing a script that I actually needed  instead of what I thought I needed. I guess that's what happens whenever you're trying to make everybody's character sheet and trying to implement API scripts for everything all at the same time thanks again Aaron you're the man
1450573663
The Aaron
Pro
API Scripter
Not 'the man', just The Aaron!  =D  hehehehehe Anyway, no worries!  Glad to get it working for you either way. =D