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

[5e OGL | Free] Calling macros from attacks/spells

Is there a way to call a macro from an attack/spell action on a character sheet?  Specifically, I'm trying to add automatic fx to a character's actions.
%{selected|repeating_attack_$0_attack} That would be the call for the first item in the attacks and spellcasting section. Change the $0 to $1 for the second one and so one.
Thanks, Ed!  So I would need to make new macros for each attack/spell, then?  There's no way to add something to the attack/spell to call a macro?  (So, what you've provided is macro->attack rather than attack->macro, but will work with a bit more duplication.)
If you are looking to add FX or something along those lines then yes. There is no way with the OGL sheet to add code to the attacks within the sheet itself. So make a macro on the abilities tab like this: %{selected|repeating_attack_$0_attack} /fx ... For each separate attack on the characters sheet. I know that the Shaped sheet has a place for such things in the sheet, but the OGL does not.
1557867181
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I think I see what you are asking. The answer depends on the character sheet. I use the Shaped Sheet, which allows for calling a macro when you click on an attack fairly trivially. I don't know if the OGL sheet has the equivalent of "attachers" or "freetext", which allow this sort of behavior. If the OGL sheet allows you to put in regular text, you can do something similar with an Ability Command Button. If you have an Ability (macro) on your character sheet just put "[Button Name](~Ability-Name)" into the text at any point. this will generate a clickable button in the output. The syntax is slightly different for calling a collections macro. More info here . As for running the macro automatically, that can get tricky.
Thank you!