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 .
×

Calling Different Macro Based On Attribute?

Is it possible to call one of a set of possible macros based on an attribute in a character sheet? For example: June the Fighter makes an attack. If her condition is 0 she calls #roll0 + her attack bonus. Let's say this is 1d20 + @{June|Attack} If her condition is 1 she calls #roll1 + her attack bonus. Let's say this is {2d20}kh1 + @{June|Attack} If her condition is 2 she calls #roll2 + her attack bonus. Let's say this is {1d20+{1d12+8}}kh1 + @{June|Attack} If her condition is -4 she calls #roll-4 + her attack bonus. Let's say this is {1d20+1d12}kl1 + @{June|Attack} I'd like June's player to be able to modify her Condition once (probably on her token) and then have all the abilities on her sheet automatically call different macros based on it. If I need to go to the scripting API for this, that's fine. I'm already subbed because I plan to make custom character sheets. I just want to make sure I'm not reinventing the wheel first. Thanks!
It is possible #roll@{June|Condition} Just make sure there is a space after the attribute call otherwise the macro won't expand.
Fantastic! It turns out my pseudocode was correct, but I'd screwed up the actual code with an extra set of brackets. >_< Thanks so much. That's going to be a huge help with playtesting now, and actual play later.