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

Help with custom character sheet macro

When building my custom character sheet I've set up a button  to do the following: "&{template:default} {{name=Strength Check}} {{total=[[ [[@{char_dicemod}]]+[[1d@{char_strlvl}]] + [[@{char_strmod}]]  ]] }} {{ROLL=$[[0]]}} {{STR=$[[1]]}} {{MOD=$[[2]]}}" The full code being: <td><center><button type="text" value="&{template:default} {{name=Strength Check}} {{total=[[ [[@{char_dicemod}]]+[[1d@{char_strlvl}]] + [[@{char_strmod}]]  ]] }} {{ROLL=$[[0]]}} {{STR=$[[1]]}} {{MOD=$[[2]]}}" button style='font-size:12px' name'roll_strCheck'><b><p             style="color:#000000;">STR CHECK<i class='fas fa-dice'></i></button></td> This results in  Everything works perfect on the character sheet. However when moving this button from the char sheet to the macro bar by dragging I get this error: Why does my macro turn into a '% ability'  instead? Is there a way to make the macro stay the same/look for '@ attribute' when added to the quick bar aside from manually doing it? I'm still new to all this but I'm trying to set up automation. I appreciate the help.
1662135048

Edited 1662135282
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Your button is the wrong type and doesn't have a name attribute. I'm actually amazed it works at all. See the wiki for details on button requirements. Edit: Also, I notice you're using font-awesome classes for icons. There's no way to use those in character sheets as far as I know. If you look at your image, your button is using the default Roll20 d20 icon, and is not displaying anything for your  <i class='fas fa-dice'> . You can use material icons since they can be added via an @import  statement at the top of the css like any other font.
1662135068

Edited 1662135144
Kraynic
Pro
Sheet Author
The quick macro bar uses the ability call like that.  It isn't calling the macro directly, but triggering your roll button.  The problem is that you are missing the roll button name.  Just like you have value="macro text here", you need to have a name="name of the roll here".  That is why it is failing, because that name should be the part of the ability call after the character name and pipe.  In your screenshot, that part of the ability call is blank/missing. At least, that is what comes to my mind from a quick glance. Edit:  I didn't even notice the wrong type!
Awesome I got it working I appreciate the help. I'll work on using icons that are roll20 friendly as well.