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 for other macros

Hello, I’m not very experienced in macros, the only command that I know everything about is the ? Command, however please hear me out because I don’t think this issue has to do with other commands. im playing a campaign in which we are using physical character sheets. I inputted all my attacks and spells as macros, and I noticed my macro bar was getting really long, so I tried to make a macro that would combine macros. I would click a macro called “spells” and it would give me a drop-down menu of all my attacks, something like this: /em casts ?{What spell are you casting?|Cure Wounds,#Cure-Wounds|Sleep,#Sleep|Vicious Mockery,#Vicious-Mockery} After I tested this, i selected sleep, and all it did was put #sleep into the chat. How can I fix this? I already tried putting spaces in certain places and replacing #sleep with my actual sleep command.
1596402343
Kraynic
Pro
Sheet Author
There problem with putting entire macros into queries is that you end up needing to use html replacements due to the order of operations with a query.&nbsp; A lot of us have instead taken to using chat menus.&nbsp; They are found in the Stupid Roll20 Tricks thread.&nbsp; The first post is an index.&nbsp; The chat menu trick is under the macros heading. <a href="https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pagenum=1</a>
1596403253

Edited 1596403547
Thanks, however&nbsp; I didn’t really understand that very well, but I think what I have to do is: /em casts ?{What spell are you casting?|[Sleep]( !&amp;#13; #Sleep)|(my other spells with the same format)} or is it: /em casts ?{What spell are you casting?|[Sleep]( !&amp; #Sleep)|(my other spells with the same format)}
1596404181

Edited 1596404235
I just tested it with the second way, and it worked with only one option, the moment I added 2, to make it a drop-down menu, it put “Atticus Gamwich casts (!&amp;#Cure-Wounds)” into the chat
1596406275
Kraynic
Pro
Sheet Author
First of all, you generally put chat menu macros on a character sheet (Attributes &amp; Abilities tab).&nbsp; Then you would drag your Sleep spell to the quick macro bar at the bottom of the screen (you may need to turn that bar on in the collections tab), and roll it from there.&nbsp; Then put your cursor in the chat window and hit the up arrow.&nbsp; That will give you a command that is something like %{character_name|long_ability_name}.&nbsp; You copy and paste that into an ability named Sleep (or whatever). Then assuming you are still building this as an attribute instead of a macro in the collections tab, your button would look like [Sleep](~Sleep).&nbsp; Actually, you might be able to paste the bit you copied from chat in place of the ~Sleep. If this is for 5E, I think there is a ready made macro for stuff like this.&nbsp; I think there is a spell list macro in here, although I don't know if it works for a PC like it does for an npc.&nbsp; I don't play 5E, so I'm not sure how the PC/NPC divide works with that sheet.
1596415218
GiGs
Pro
Sheet Author
API Scripter
Kraynic describes one way to do it, but you dont have to use a character sheet - you can use the macro method you are trying. The key thing to understand is that chat menus replace the query. You don't use the "What spell are you casting query." Instead you have a macro looking something like /w "@{selected|character_name}" &amp;{template:default} {{name=What Spell Are You Casting?}} {{ [Cure Wounds]( !&amp;#13; #Cure-Wounds) [Sleep]( !&amp;#13; #Sleep) [Vicious Mockery]( !&amp;#13; #Vicious-Mockery) }} The character sheet method Kraynic suggests is better, but this is probably easier for you to understand. Note the /w part at the start: this means you have to have a token selected to use this macro, and the chat menu gets whispered to the token's owner. It will appear in chat, just for that person, so it doesnt clutter chat up for everyone. And then you can click a button to launch the desired spell. If you want to try it for yourself, this is a simple alternative: /w GM &amp;{template:default} {{name=What Spell Are You Casting?}} {{ [Cure Wounds]( !&amp;#13; #Cure-Wounds) [Sleep]( !&amp;#13; #Sleep) [Vicious Mockery]( !&amp;#13; #Vicious-Mockery) }} This just whsipers the menu to you - so you can see what it will look like for the players. The big problem with the macro approach is that once you save and close the macro, you cannot reopen it, or those special characters (!&amp;#13;) will vanish. This is why the character sheet method is prefered - that doesnt happen with character sheet Abilities. But if you can restrain yourself from opening the macro, the above works perfectly well.
Thank you both so much! I do have a question, however, with the second method. When I hit send on that command, it also put into the chat “(To GM):” Does this mean that the box that appeared on my screen prompting me to choose a spell, also showed up in my dm’s chat? Also, just wondering why that macro breaks if you reopen it (not that it’s really important or anything, just wondering). Again, thanks so much guys, I believe my problem is solved!
1596515763

Edited 1596515972
Oosh
Sheet Author
API Scripter
I think GiGs assumed you were GM - the /w GM at the start will whisper to the GM. Change the "GM" to either your player name or character name to whisper yourself only. Using " " around the name is good practice, as it will prevent errors from names with spaces and other characters. Then again, if you don't have another Aldin in your group, /w aldin will work just fine. To stop macros with HTML replacement from breaking, save them under the Attributes and Abilities tab of your character sheet as Ability macros. If you only save the Menu macro in the character sheet, and leave the others in Collections, everything stays the same. However, if you want to move them all onto the Abilities section of your character sheet the syntax for the buttons will change: [Cure Wounds]( !&amp;#13; #Cure-Wounds) would become: [Cure Wounds]( ~ Cure-Wounds) The irony here being that if you move them all out of Collections and onto the character sheet to preserve the HTML between edits, you don't actually need the HTML replacement any more. More info on character sheet macros here .
1596548304

Edited 1596548468
Thanks Oosh, Could I possibly just start &amp; end the command with&nbsp;/talktomyself on &amp;&nbsp;/talktomyself&nbsp;off,&nbsp;respectively? Just to avoid any accidents with duplicate names and stuff (I’m also in a different campaign with two Owens). If I do save my macros under abilities, will I have to switch everything to a character sheet? As I said before, I’m using this Macro for a game in which we are using physical character sheets, because we started this game in person, but later couldn’t meet.