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

Macro Special Character Substitutions Broken

Hey all, I'm trying to have a nested roll query but every time I put the } to replace a } it actually replaces it when I save the macro. It works as intended when I press Test Macro but when I save, close, and then reopen the macro they've replaced all of the placeholders with their proper symbols and it no longer works. I'm wondering if this is an update to Roll20 or some extension I have on Chrome that's doing this (the only one I've added since this became an issue is Stylus). Any ideas for working around this to get my nested queries back would be great. 
1657578929

Edited 1657579023
GiGs
Pro
Sheet Author
API Scripter
The problem youre finding is that when you open the macro, the html entities are parsed and replaced with the characters they represent. It's not due to an extension - it's just the way roll20 has always worked. This only happens when the macro is opened : you can save a macro, and as long as you don't reopen it, the html entities will not be replaced. The two methods you have to deal with this are: Once you close a macro containing html entities, never ever reopen it. use a Macro Mule character, which means moving your macros to character abilities. This parsing doesn't happen with abilities.
1657707444
Ziechael
Forum Champion
Sheet Author
API Scripter
In addition to sound advice above, it is common practice and good sense to store your macros elsewhere for editing/pasting when needing to amend a saved collection macro. At least, that way, when you accidentally open a saved macro or need to update one you don't have to do all the pesky html replacement each time, just update/copy/paste/save... profit? :)
Ziechael said: In addition to sound advice above, it is common practice and good sense to store your macros elsewhere for editing/pasting when needing to amend a saved collection macro. At least, that way, when you accidentally open a saved macro or need to update one you don't have to do all the pesky html replacement each time, just update/copy/paste/save... profit? :) I do have it saved in a text document so I can edit it with Notepad++ easier. Thanks to GiGs (I'm not sure how to tag them) for the suggestions. I guess I never realized that all of my nested queries were breaking when I saved them, maybe I just accidentally never opened them again.
1657842009
GiGs
Pro
Sheet Author
API Scripter
Zeanoth said: Ziechael said: In addition to sound advice above, it is common practice and good sense to store your macros elsewhere for editing/pasting when needing to amend a saved collection macro. At least, that way, when you accidentally open a saved macro or need to update one you don't have to do all the pesky html replacement each time, just update/copy/paste/save... profit? :) I do have it saved in a text document so I can edit it with Notepad++ easier. Thanks to GiGs (I'm not sure how to tag them) for the suggestions. I guess I never realized that all of my nested queries were breaking when I saved them, maybe I just accidentally never opened them again. We can't tag people - just have to hope they are following the thread and notice :) Remember yur nested queries weren't breaking when you saved them. It's the act of opening them that breaks them.