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

Healing potion macro

I'm looking for help understanding what's going on with this... I'm running 3.5 and using Diana's character sheet.  I'm trying to set up a macro that has you select the type of healing potion, makes the corresponding roll, and applies that number to the character using TokenMod. &{template:DnD35StdRoll} {{spellflag=true}} {{name=Healing Potion}} {{@{selected|token_name} drinks a healing potion and recovers ?{Potion|Cure Minor Wounds,[[1]]|Cure Light Wounds,[[1d8+1]]|Cure Moderate Wounds,[[2d8+3]]|Cure Serious Wounds,[[3d8+5]]|Cure Critical Wounds,[[4d8+7]]} hit points!}} !token-mod --ids @{selected|token_name} --set bar3_value|+?{Potion} When I run this, the number rolled is not the number applied to the bar 3 field.  Any ideas?
1488348879

Edited 1488349731
Tetsuo
Forum Champion
The problem I see is that the value of ?{potion} is rolled for each instance of ?{potion} in the macro. Resulting in you getting a different result applied to your bar than what is displayed via the macro. As seen here:   This was the following macro: &{template:DnD35StdRoll} {{spellflag=true}} {{name=Healing Potion}} {{@{selected|token_name} drinks a healing potion and recovers ?{Potion|Cure Minor Wounds,[[1]]|Cure Light Wounds,[[1d8+1]]|Cure Moderate Wounds,[[2d8+3]]|Cure Serious Wounds,[[3d8+5]]|Cure Critical Wounds,[[4d8+7]]} hit points!}} ?{Potion} ?{Potion} ?{Potion}
1488350014
Tetsuo
Forum Champion
One potential work around is this: Create these two macros on your character sheet. This one named potion: !token-mod --ids @{selected|token_name} --set bar1_value|+?{Potion|Cure Minor Wounds,[[1]]|Cure Light Wounds,[[1d8+1]]|Cure Moderate Wounds,[[2d8+3]]|Cure Serious Wounds,[[3d8+5]]|Cure Critical Wounds,[[4d8+7]]} /w @{selected|token_name} [Heal](~@{selected|token_name}|Heal) and this one named Heal: &{template:DnD35StdRoll} {{spellflag=true}} {{name=Healing Potion}} {{@{selected|token_name} drinks a healing potion and recovers @{selected|bar1} hit points!}} !token-mod --ids @{selected|token_name} --set bar3_value|+@{selected|bar1} --set bar1_value|0 When you run potion, it will set bar1 (Change this as needed) to your potion's value, and whisper a Heal button to you, which you then click to display the your original macro and apply the healing to bar3.
I'm pretty sure Aaron has a method for this in his TokenMod thread. You might go read through there and see what you can find.
P M. said: I'm looking for help understanding what's going on with this... I'm running 3.5 and using Diana's character sheet.  I'm trying to set up a macro that has you select the type of healing potion, makes the corresponding roll, and applies that number to the character using TokenMod. &{template:DnD35StdRoll} {{spellflag=true}} {{name=Healing Potion}} {{@{selected|token_name} drinks a healing potion and recovers ?{Potion|Cure Minor Wounds,[[1]]|Cure Light Wounds,[[1d8+1]]|Cure Moderate Wounds,[[2d8+3]]|Cure Serious Wounds,[[3d8+5]]|Cure Critical Wounds,[[4d8+7]]} hit points!}} !token-mod --ids @{selected|token_name} --set bar3_value|+?{Potion} When I run this, the number rolled is not the number applied to the bar 3 field.  Any ideas? In your TokenMod call you use --ids, but then supply it with @{selected| token_name } try changing it to token_id and see if that helps. You might also consider changing it to use the selected method (I believe it is --sel but I don't remember exactly).
1488377010
The Aaron
Pro
API Scripter
Actually, if you don't specify --ids, it operates on the selected tokens by default.