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

Saving macros with special characters

1500375304

Edited 1500375808
When creating macros with nested queries, you need to use special characters (see  Wiki on advanced usage for roll queries ). However, if you save the macro and re-open it, the special characters replacements are replaced by the corresponding characters (e.g., the replacement & # 125 ; will be replaced by } ) and you have to manually undo this change. This makes editing macros with replacement characters very difficult. Example: Save and re-open the following macro. Make sure to remove spaces between the following characters (this forum also keeps destroying this character sequence):     & # 125 ; &{template:default} {{name=Initiative}} ?{Action|   Option A,{{Action A=[[1d20 &{tracker& # 125 ;]]|   Option B,{{Action B=[[1d10 &{tracker& # 125 ;]] } }} Also, minor suggestion: I would prefer having a monospaced font in the macro editor, this would make reading macros with special characters easier.
The character replacement only happens under the collections tab. What you can do is make the macros on the character sheet and use %{name|macroname} to call them.
Sky said: What you can do is make the macros on the character sheet How do you do that? I am using the "5th Edition OGL by Roll20" sheet and don't have a Pro account. I have ended up always editing non-trivial macros in an external text editor and then pasting them to roll20.net
In the Attributes and Abilities tab, top left of the sheet when you open it. Bio and Info > Character Sheet > Attributes and Abilities From here, you can enter special macros called Abilities on the right. These do not format html codes and will save them exactly as you write them
Thanks for the tip. I'm still considering it a bug that you can't edit certain valid macros in the macros tab. Also, this workaround is impractical as for introducing a new global ability ( Greyhawk Initiative rolls in my case), I'd need to add the same ability to all character sheets in the game.
1500558482

Edited 1500558737
Robert A. said: Thanks for the tip. I'm still considering it a bug that you can't edit certain valid macros in the macros tab. Also, this workaround is impractical as for introducing a new global ability ( Greyhawk Initiative rolls in my case), I'd need to add the same ability to all character sheets in the game. No, every character can reference the character sheet with the macros. Instead of using #MacroName they would use %{sheetname|macroname} instead. You only need to make the macros once, on one character sheet. In addition, this method has the benefit of being transmogrifiable to other campaigns unlike the macros in the collections tab. So for example... 1. Make a character sheet, name it GHI. 2. Add the GHI macros on the Abilities tab. 3. Players can then reference those macros with %{GHI|RangedAttack} for the d4 initiative.
1500558883
The Aaron
Pro
API Scripter
Here's some discussion about Greyhawk Initiative you might find handy:&nbsp; <a href="https://app.roll20.net/forum/post/5243461/5e-alter" rel="nofollow">https://app.roll20.net/forum/post/5243461/5e-alter</a>...
&gt;&nbsp;No, every character can reference the character sheet with the macros. Oh, I see. You're creating a new character (not a new character sheet as I first thought), and then calling its abilities. Has a slight disadvantage that I don't see the macro as a token action. So I'd need to create a macro in the collections tab that just calls&nbsp;%{character|ability} and add it as a generic token action, or use a chat-based multi-button table from the post liked above (which is very nice, by the way). In any case, depending on the use case, these workarounds are more work than just editing the macro in a&nbsp; gist and pasting the content into the macro editor. The point of this post was to point out an obvious flaw in the macro editor of the collections tab.