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

HTML Character Codes in Macros

Hello, 

I had a known trouble as my macros contains some } sequence that are automatically translated in } and makes the macro not working anymore (or never working for me).

I made a macro to manage the "Saving throws" request. This macro is a bit complex. 

I created it in the macro tab as I wanted to have it shared between all my characters. I don't want to copy paste the macro in all characters.

I also want to benefit of these macro immediatly. If someone want to transform in wolf, I want to upload a wolf and benefit from all the macro even if it's a new icon.

The problem was that I wasn't able to declare this macro in the general macro tab as the } sequence was always transformed into }

I searched during hours for a solution and do not found one.

As this works when it is done in the ability part of a character sheet, I had the following idea:

I have created a fake user not visible by anyone and I called it MyTemplateUserForMacro.

In the template character sheet's abilities tab I create a macro named SavingThrows.

This macro is based on selected so should work for anybody.

In the general macro tab I created a macro that call the macro I had created in the template character. 

%{MyTemplateUserForMacro|SavingThrows}

I check the box saying that I want this macro for all my users.

Done!


Hope it helps.

April 03 (5 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter

Collection macros can utilise the html replacements but as you found, they easily break if you open the macro again for editing. If you save a macro with html and NEVER open it again it will continue to work forever more. Using a character ability section is a great solution though as those html entities won't convert so you can edit to your heart's content without fear of losing all your hard work.

Thanks for sharing your journey, I'm sure it will help more than a few newer members :)