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 community edition sheet roll spells in a macro

Does anyone know how to reference the spell cast button in a macro? I can't find it on the wiki, but the wiki also didn't have information on how to reference class action rolls which I was able to figure out and add to the wiki.
Figured it out!!! %{<character_name>|repeating_spellbook<cantrip|level1|etc>_<data-rprowid from inspect element>_spellcast} In my case I used this: /w "@{character_name}" [Charm Person](!
%{Nobody|repeating_spellbooklevel1_-Kf3OaypeSmyMHW7-iQa_spellcast})
You can also always pull a button down to the macro bar. Then when you click it go to the chant and press the up arrow to see the code for it. 
The stuff in chat is if you want to duplicate the code that is run, which is different than referencing the roll. However, dragging it down to the macro bar does list the reference that I need in the macro bar which makes things a lot easier.
Trust me, if you click on the button on the macro bar, it will output the % reference. When you do it from the sheet you get all the code, but from the macro bar it just spits out the roll reference. 
1489435703
Gen Kitty
Forum Champion
Ed S. said:  You can also always pull a button down to the macro bar. Then when you click it go to the chant and press the up arrow to see the code for it. This is how I set up my token actions for character-sheet'd games, so I can endorse that it works exactly as needed. :)
1489435936

Edited 1489435981
Indeed, Ed is describing how acquire the Ability call corresponding to a Sheet Roll button . Matthew K. said: In my case I used this: /w "@{character_name}" [Charm Person](!%{Nobody|repeating_spellbooklevel1_-Kf3OaypeSmyMHW7-iQa_spellcast}) It's great that you figured this out on your own; it's quite advanced. I would recommend using Ability Command Buttons in place of API Command Buttons when possible.