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

[Macro help] macro to run others

I been trying to make a macro that allows me to pick a option and it would run that macro but i cant get it to work i looked up online and it said to call the macro inside it with #namehere but instead of it running it just says the # in chat, this is what i got with one example macro its meant to run The macro that allows me to choose  ?{Choose an Outfit|Tea, #Tea |Cherry, #Cherry |Rose, #Rose |Oak, #Oak } One of the macros name "Oak" that are meant to run if picked from the pior macro &{template:default} {{name=Outfit Change}} {{Oak leaves}} if someone is able to help here i be much grateful 
1584480893

Edited 1584562093
&{template:default} {{name=Outfit Change}} {{Choose an Outfit [Oak Leaves](! #Oak)[Tea Leaves](! #Tea)[Cherry Leaves](! #Cherry)[Rose Leaves](! #Rose)}} Edit: I forgot the exclamation points so I added those in. Please note: this version does not need any HTML entities, as I have used real carriage returns. HTML entities disappear any time you edit a macro.
1584481178

Edited 1584481208
i tried that and instead of a option box appearing it posted it in chat and the clicking on the options still didnt run the macros
1584481609

Edited 1584481694
GiGs
Pro
Sheet Author
API Scripter
Try putting it all in one macro &{template:default} {{name=Outfit Change}} {{ ?{Choose an Outfit|Tea|Cherry|Rose|Oak} Leaves}} If they aren't all ending with leaves, just put the name in each query option &{template:default} {{name=Outfit Change}} {{ ?{Choose an Outfit|Tea Leaves|Cherry Blossom|Rose Whatever|Oak Whatever}}}
1584481832

Edited 1584483043
GiGs
Pro
Sheet Author
API Scripter
Gargamand's post didnt work because he didnt format the macro properly. i wonder if some cut/paste hijinx occurred. Edit:  ah, it was the html substitutions being processed. It should look like this: &{template:default} {{name=Outfit Change}} {{choose an outfit= [Oak Leaves]( !
# Oak) [Tea Leaves]( !
# Tea) [Cherry Leaves]( !
# Cherry) [Rose Leaves]( !
# Rose) }}
1584482052

Edited 1584482122
that would work if i cant get it to run the other macros as a last ditch effort. and the other one just opens web pages but the reason why i wont it to run other stuff is cause i want to link stats and rolls to each one cause they all do different things like tea is speed and oak is AC.
1584482104
GiGs
Pro
Sheet Author
API Scripter
See my edit on my last post. Maybe that'll help.
yer tried that and it opened webpages&nbsp; example&nbsp; <a href="https://app.roll20.net/editor/(!#Oak" rel="nofollow">https://app.roll20.net/editor/(!#Oak</a> &nbsp;
1584483187
GiGs
Pro
Sheet Author
API Scripter
My code had an extra open brackets - just fixed it. Something to be aware of when using code like this: [Oak Leaves]( !&amp;#13;# Oak) This part &amp;#13; is a html entity. If you put that in a macro, and then ever reopen the macro, it will be removed. So don't put this in a macro you intend to reopen - and keep a copy somewhere safe for when you do ever accidentally open it. Save it, close it, then&nbsp; run it without reopening it.
is it possible to have it show up like this instead of posting it in chat where others can see
1584484789
GiGs
Pro
Sheet Author
API Scripter
If you put "/w gm" at the start it will show up only for you, like so /w gm&nbsp;&amp;{template:default} {{name=Outfit Change}} {{choose an outfit= [Oak Leaves]( !&amp;#13;# Oak) [Tea Leaves]( !&amp;#13;# Tea) [Cherry Leaves]( !&amp;#13;# Cherry) [Rose Leaves]( !&amp;#13;# Rose) }} (replace gm with your character name if not a gm). You can go the drop down way, but it is far, far more complicated. You'll need to edit every single one of your macros, to replace a bunch of characters (any }, comma, |, and others) with their html entities, and they will then only work when used from the master macro - they wont work on their own any more. See the wiki for more information:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> The chat menu button approach is much simpler and easier to manage.
ok thank you think will work just fine for me if only i can see it thank you so much &lt;3
1584485163
GiGs
Pro
Sheet Author
API Scripter
You're welcome :)
1584485868

Edited 1584486135
Techs said: i tried that and instead of a option box appearing it posted it in chat and the clicking on the options still didnt run the macros I’m sorry. I forgot the exclamation points. Gargamond said: /w @{selected|token_name} &amp;{template:default} {{name=Outfit Change}} {{Choose an Outfit [Oak Leaves](! #Oak)[Tea Leaves](! #Tea)[Cherry Leaves](! #Cherry)[Rose Leaves](! #Rose)}} That should work.
1584486108
GiGs
Pro
Sheet Author
API Scripter
You're missing the html entities. I'm guessing they are in your original version, but they are being stripped out when you paste into roll20 and replaced with newline characters. Try creating a code block (top left of the edit post window, the dropdown that looks like a torch, select code), and pasting into that. But I've already posted a corrected version of this.
1584561610

Edited 1584561861
GiGs said: You're missing the html entities. I'm guessing they are in your original version, but they are being stripped out when you paste into roll20 and replaced with newline characters. Try creating a code block (top left of the edit post window, the dropdown that looks like a torch, select code), and pasting into that. But I've already posted a corrected version of this. I don’t use HTML entities. The HTML entities only replace the carriage return, which you don’t need if you put in an actual carriage return like I did. The OP wanted a drop down menu instead of a chat template which you provided as you stated. But I wanted to show how to do this without HTML for anyone else who reads this in the future, as HTML is still a bit wonky in Roll20 macros.
1584563155
GiGs
Pro
Sheet Author
API Scripter
Gargamond said: GiGs said: You're missing the html entities. I'm guessing they are in your original version, but they are being stripped out when you paste into roll20 and replaced with newline characters. Try creating a code block (top left of the edit post window, the dropdown that looks like a torch, select code), and pasting into that. But I've already posted a corrected version of this. I don’t use HTML entities. The HTML entities only replace the carriage return, which you don’t need if you put in an actual carriage return like I did. The OP wanted a drop down menu instead of a chat template which you provided as you stated. But I wanted to show how to do this without HTML for anyone else who reads this in the future, as HTML is still a bit wonky in Roll20 macros. Interesting. I didnt realise that would work. I just assumed you must have meant to use html entities, and they got replaced, since the forum used to erase them automatically. If that works, it looks like a good condidate for the Stupid tricks thread (if not there already), as anything that bypasses html entities is a good thing.