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

Troubleshoot Macros stored on the Character Sheet

I am trying the character sheet trick to store macros. I cannot get the following macro to fire correctly. I can't figure out the correct command button syntax? I'm guessing that is the problem. It makes calls to magic item tables - which do work. The treasure macros pull from roll tables. The macro works if I copy them to the collections tab and replace the ~ with a # symbol. This of course does not work (using the # symbol) when it is on the character sheet. Any suggestions? The character sheet macro /w gm &{template:default} {{name=Magic Item Tables}} {{Tables=[Table A](! ,~Magic-Items-Table-A) [Table B](! ,~Magic-Item-Table-B) [Table C](! ,~Magic-Items-Table-C)  [Table D](! ,~Magic-Items-Table-D) [Table E](! ,~Magic-Items-Table-E)}} This is what it does: Magic Item Tables Tables Table A Table B Table C Table D Table E When I click on any of the command buttons, I get this: Eddy M. (GM): ,~Magic-Items-Table-A ,~Magic-Item-Table-B ,~Magic-Items-Table-C ,~Magic-Items-Table-D ,~Magic-Items-Table-E
1587575589
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can find a wealth of syntax options in the Stupid Trick entry on  Chat Menus . Here is the relevant portion: To make a Chat Menu, use a Roll Template. Because the formatting of Roll Templates, the appearance of a Chat Menu can vary widely from game to game. In general, though, the code is remarkably similar: [command name](#macro to call) Default button syntax to reference a Macro in the collections tab—You probably don't need to use this for a Chat Menu. Use one of the versions below. If you use the macro character tip posted above, the format is: [command name](~macro to call) Button syntax to reference an Ability on the same sheet ... with "macro to call" being another ability on the same sheet. By keeping your macros on a sheet along with the Chat Menu macro itself, you not only gain the advantage of transportability to new campaigns, you also ensure that nothing breaks once you transport it. The macro it's calling comes right along with it. If you want to reference a macro that is on a character sheet (an "Ability"), but you are not writing the macro on the same sheet, you can reference the ability with this format (Assuming that your referenced sheet is called "Macros"): [command name](~Macros|macro to call) Button syntax to reference an Ability on  another  character sheet, such as a Macro Character Sheet. If your macro is a loose, global macro, the code is a little more arcane, since you need to use HTM replacements: [command name](!
#macro to call) Button syntax to reference a Macro in the collections tab. Try to use only in Abilities, not Macros, since Macros will revert the HTML replacement if you need to edit. Note also, that you can embed a Roll Command into the API button instead of a macro, if you simply have a bit of code you use over and over, but a better practice (at least I have found) is to keep as much code in macros as possible, so that if you use the same command in different places, you only have to edit the original if you later decide to change how something works. If it's just an API call (a script call, beginning with "!"), it's pretty safe to pop in as-is.
Thank you! I read that post over dozen times yesterday and didn't get it.  Now I get it. /w gm &{template:default} {{name=Magic Item Tables}} [Table A](~Magic-Items-Table-A) [Table B](~Magic-Items-Table-B) [Table C](~Magic-Items-Table-C) [Table D](~Magic-Items-Table-D) [Table E](~Magic-Items-Table-E)
1587585852
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Great! I'd suggest this: /w gm &{template:default}{{name=Magic Item Tables}}{{=[Table A](~Magic-Items-Table-A) [Table B](~Magic-Items-Table-B) [Table C](~Magic-Items-Table-C) [Table D](~Magic-Items-Table-D) [Table E](~Magic-Items-Table-E)}} or if you are using the D&D 5th Edition by Roll20, this: /w gm &{template:npcaction}{{rname=Magic Item Tables}}{{description=[Table A](~Magic-Items-Table-A) [Table B](~Magic-Items-Table-B) [Table C](~Magic-Items-Table-C) [Table D](~Magic-Items-Table-D) [Table E](~Magic-Items-Table-E)}}
I don't fully understand the macro syntax. What do the curly brackets do or represent?