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

Selectable Additional Effects

I'm curious as to if there is a way to write a Macro that will output additional text based on the result of a modifier To put things into perspective better. I'm playing a character with the Combat Medic prestige class so I get an ability called Healing Kicker that lets me add a bonus benefit to my healing spells selectable from either a 1 round Sanctuary effect, 1 round bonus to Reflex saves, or 1 minute of Temporary HP I thought I could make 4 macros labeled HealingKicker0 to HealingKicker3 and use the syntax #{HealingKicker?{Healing Kicker|0}} to output the selected effect where 0 = no additional effect and 1-3 = bonus effects, but the result was that the spell macro would output the name of the Healing Kicker macro selected rather than the contents of it appended to the end of the spell effect. What I expected to see output: Cyra casts Cure Light Wounds, restoring [14] heath to herself and wards herself with Sanctuary through her Healing Kicker ability, for 1 round attackers must succeed on a Will save DC:[24] or lose their action and be unable to attack the warded creature for the duration of the effect (Attacking while under the effects of Sanctuary immediately ends the effect) What I actually saw output: Cyra casts Cure Light Wounds, restoring Rolling [14] heath to herself #{HealingKicker1} I even tried wrapping the bonus text in brackets like an in-line roll thinking it might function like a roll-table... but that only resulted in error (the macro failed to output anything at all)
1407853994
The Aaron
Roll20 Production Team
API Scripter
There is no logic in macros where it can make a decision about what to do based on the result of the row. That said, I've never thought of trying to call a macro by name based on constructing it from the return of another macro. I allow for the possibility that someone might know how to get that to work, but I'm pretty certain it won't... Those kinds of things are generally done with the API. =/
1407854247
Lithl
Pro
Sheet Author
API Scripter
Aaron said: That said, I've never thought of trying to call a macro by name based on constructing it from the return of another macro. I allow for the possibility that someone might know how to get that to work, but I'm pretty certain it won't... It won't work, simply due to the order of operations. Macros are expanded before roll queries are executed, and macros are only expanded once, not multiple times.
1407854550
The Aaron
Roll20 Production Team
API Scripter
Yeah, I kind of figured that's the way it would go.
1407855050

Edited 1407855330
Well it was worth asking anyway... I guess I'll just have to remember to roll the macros after any heal that I want to use the class ability with. It would have been nice to be able to just have it appended to the end of the spell macro so it all looked like one message rather than broken into 2 messages. It's not a major issue, I just like to have my macros look clean and don't like using multiple messages for a single ability/spell. that said... if someone does by some chance figure out a way to do this I'd still love to know.