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

Clickable menu calling other macros

Hi guys, me again. I am trying to make a clickable chatmenu performing attacks. the code for it looks like this: /w gm &{template:default} {{name=Probe}} {{Typ=[Stab](!#AT-Stab) [Schwert](!#AT-Schwert)}}  The "AT-Stab"-being called above looks like this: /w gm &{template:default} {{name=Angriff Stab}} {{ ?{Variante| Normal,Erfolg:[[1d20<[[@{NKW_AT_typ1}+@{NKW1ATMod}]]]]=[[1d6+1]]SP| Wuchtschlag,Erfolg:[[1d20<[[@{NKW_AT_typ1}+@{NKW1ATMod}]]]]=[[1d6*2]]SP| } }}  If I now click the macro-button that opens the menu, the menu appears and I can click eg "AT-Stab" and then nothing happens, eg the dropdownmenu doesn't appearand the whole action stops without any output or error-message. If I replace the "AT-Stab"-macro with another macro with multiple dropdown-querys such as this one: /w gm &{template:default} {{name=test}} {{Zielwert=[[[[round((?{Grundwert 1|[MU]@{selected|MU}|[KL]@{selected|KL}|[IN]@{selected|IN}|[CH]@{selected|CH}|[FF]@{selected|FF}|[GE]@{selected|GE}|[KO]@{selected|KO}|[KK]@{selected|KK}}+?{Grundwert 2|[MU]@{selected|MU}|[KL]@{selected|KL}|[IN]@{selected|IN}|[CH]@{selected|CH}|[FF]@{selected|FF}|[GE]@{selected|GE}|[KO]@{selected|KO}|[KK]@{selected|KK}}+?{Grundwert 3|[MU]@{selected|MU}|[KL]@{selected|KL}|[IN]@{selected|IN}|[CH]@{selected|CH}|[FF]@{selected|FF}|[GE]@{selected|GE}|[KO]@{selected|KO}|[KK]@{selected|KK}})/3)]]+?{Mod|0}]]}} {{Würfelwert=[[1d20cs1cf20-[[round(?{TaW|0}/3)]]]] }} The dropdowns show up but I still don't get any output or error-message. The macros being called work just fine for themselves, but there must be something going wrong if I call them into the clickable menu. Can anyone help me? Greez and happy Easter, Chris
1617449148
Ziechael
Forum Champion
Sheet Author
API Scripter
/w gm &{template:default} {{name=Probe}} {{Typ=[Stab](! 
 #AT-Stab) [Schwert](! 
 #AT-Schwert)}}  That should do it, it's a tricky subject to master but you can read all about it here :)
That's what happens when I change the codeto your suggestion and click "Stab"
1617476928
Kraynic
Pro
Sheet Author
Is the macro you are trying to trigger on your character sheet (Attributes & Abilities tab)?  If so, then the button should be: [Stab](~characternamehere|AT-stab) The character name needs to be inserted exactly as it is on the sheet. If the macros you are trying to trigger from the buttons aren't on a character sheet as Ability macros on the Attributes & Abilities tab, I would recommend moving them there.  The syntax is pretty simple and that method doesn't require any html replacements.
Hey Kraynic, thanks for your answer! tinkering around I found out, that (~selected|ability) works as well, which makes me really happy, because I don't have to sript the same menu for each character individually. *jumping with joy*  @Ziechael I read the article and was a little confused, because it said the command you mentioned should word in the API as well as in macros. Maybe that's a PRO-feature, and since I've been a free-user, that might not quite be true. But non the less thank you for your answer as well.
1617482340
Andreas J.
Forum Champion
Sheet Author
Translator
This page has some more examples on how to do Chat Menus, and think it's easier to understand than what Ziechael linked: <a href="https://wiki.roll20.net/Chat_Menus" rel="nofollow">https://wiki.roll20.net/Chat_Menus</a>
Hi Andreas, I start to become confused with all the input arround scripting macros the last days. Aren't there API-scripts referred to as well?
1617487882
Andreas J.
Forum Champion
Sheet Author
Translator
some of the examples on the page I linked are there are for APIs, but it's not required. Although implied by the wiki, and used by many API scripts , Chat Menus are very easy to make using API buttons (which do not actually use the API—anyone can make and use them). "API button" is essentially what's used, but they can be used by any macros, as said by the page, and shown by the examples.