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

The new D&D 2024 sheet is now available!

Create a free account

HTML Character Codes in Macros

1470880431

Edited 1470882472
Corin S.
Sheet Author
So, I recently realized that I could use API Buttons in Macros. Joy of joys! My immediate thought was to work on an in-chat interface for navigating character sheet rolls, for those who would rather not clutter their screen with character sheets. Naturally, this requires multiple macros which reference each other. And here my problem showed up. See, to do this you need to use certain HTML character codes. You can see this in  the documentation's example at the bottom of the page. This doesn't seem to be much of a problem, so I type away, throwing these in as I work on my Macros. Then I closed and reopened the Macro-editing window. Giving this: [Macro](! #MacroName) which, I assure you, does not actually work as a Macro. I should mention, the same issue pops up in the API editor when including Macros and Sheet Abilities. While I managed to work around this quirk by careful copying and pasting from external editors, I still would like to know: Why is this? Is it something on my end? Is it Roll20-side? I apologize if I've simply not done my search-fu well enough, but an answer would be appreciated. EDIT: Welp. Turns out the nature of the entities also messes with the formatting of this post, so you'll have to look on the documentation page if you need to see what the Macro's supposed to look like.
Those ability buttons need to be saved on the Abilities tab of a character sheet. They will not work when saved in the macro area of the settings page. As you have found they HTML entities are parsed once the macro is opened a second time. 
1470903201
Ziechael
Forum Champion
Sheet Author
API Scripter
As Ed states the secret to this is to use the abilities tab on journals as this will not parse the html like the forums does. Alternatively save the macro in the settings tab and the NEVER open it again (like you I keep an external list of all my macros (~1118 at last count) so that I can fix my universal macros if I accidentally open them.
1470930706
Silvyre
Forum Champion
You can open Macros with HTML entities, just don't save them again until you've fixed them.