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

Trying to create a nested macro to call other macros

1642595500

Edited 1642595580
Hello, I hope I'm posting this in the right portion of the forum; and I'm not sure if this has been asked before. Before anyone points me in the direction of: " <a href="https://wiki.roll20.net/Nesting#Roll_Query_Troubleshooting:_Nesting_Queries" rel="nofollow">https://wiki.roll20.net/Nesting#Roll_Query_Troubleshooting:_Nesting_Queries</a> "&nbsp;I have tried to use it as is shown in the macro. My friend plays a Barbarian and I'm trying to make a macro that would simplify his turns for him. But, I can't seem to get the macro to work as I want.&nbsp; I know that this macro should be calling other macros, as I have those calculating his roll to hit and all the effects of when he hits.&nbsp; He is using a homebrew weapon so, not a normal "roll to hit and do X damage" type of thing. The macro I am trying to create is: ?{Are you attacking with rage active?| No, ?{Non-rage attacks&amp;#124; Normal Attack&amp;#44; #Normal&amp;#124; Great Weapon Master&amp;#44; #Great-Weapon-Master&amp;#124; Reckless&amp;#44; #Reckless&amp;#124; Recklessly with Great Weapon Master&amp;#44; #Reckless-Great-Weapon-Master&amp;#125; | Yes, ?{Rage attacks&amp;#124; Normal Attack&amp;#44; #Rage-Normal&amp;#124; Great Weapon Master&amp;#44; #Rage-Great-Weapon-Master&amp;#124; Reckless&amp;#44; #Rage-Reckless&amp;#124; Recklessly with Great Weapon Master&amp;#44; #Rage-Reckless-Great-Weapon-Master&amp;#125; } The output of this is just the name of the macro I'm trying to get to to run, not the result of the macro.&nbsp; Here is what the non-raging normal attack has in it: Roll to Hit [[1d20+18]] Elemental Damage Types /r 2d10 Elemental Damage /r 4d6 Slashing Damage [[1d12+6]] I know that I could make each of these a separate macro and have him use them as needed, but I would like to be able to have him with only one macro on his macro bar.
1642600949
Andreas J.
Forum Champion
Sheet Author
Translator
did you make sure of this: <a href="https://wiki.roll20.net/Nesting#Nesting_in_a_Roll_Query" rel="nofollow">https://wiki.roll20.net/Nesting#Nesting_in_a_Roll_Query</a> If you are nesting a macro in a Roll Query , make sure there is a space after the macro name, and no space between the , and # so that it is properly recognized by Roll20.
1642651573

Edited 1642705012
It still only prints the #Normal which is the call for the macro.
1642764144
Ziechael
Forum Champion
Sheet Author
API Scripter
Have you tried setting the various macros up as abilities on the sheet and using this example from the wiki page linked: ?{Which ability?|Attack,%{Bugbear|attack} |Damage,%{Bugbear|damage} |Both,%{Bugbear|Both} } Macros in the collections tab are always finicky. Your macro was perfect in terms of the nested elements so should be easy enough to recreate in the above format but shout if you need any help and I'll be happy to take a look/run some tests :)
1642783574
Ziechael
Forum Champion
Sheet Author
API Scripter
With regards to the above option, it would look like this on the sheet: With the 'attacks' ability being the following: ?{Are you attacking with rage active?|No,?{Non-rage attacks&amp;#124;Normal Attack&amp;#44;%{selected|Normal} &amp;#124;Great Weapon Master&amp;#44;%{selected|Great-Weapon-Master} &amp;#124;Reckless&amp;#44;%{selected|Reckless} &amp;#124;Recklessly with Great Weapon Master&amp;#44;%{selected|Reckless-Great-Weapon-Master} &amp;#125;|Yes,?{Rage attacks&amp;#124;Normal Attack&amp;#44;%{selected|Rage-Normal} &amp;#124;Great Weapon Master&amp;#44;%{selected|Rage-Great-Weapon-Master} &amp;#124;Reckless&amp;#44;%{selected|Rage-Reckless} &amp;#124;Recklessly with Great Weapon Master&amp;#44;%{selected|Rage-Reckless-Great-Weapon-Master} &amp;#125;} And all of the others would just be copy/pasted from the collections macro tabs... remember to not tick the 'token action' box so that there is just the one button at the top when the characters token is selected ;)