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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Need Help Writing a Macro Involving Ability Calls within a Query

Hi! I would really appreciate some help in trying to write this macro I want made. I, currently, am new with macros, but I have understood most of what I've done so far. Mainly referencing ability calls and making initiative rolls with adv./disadv. However, this certain macro I've been trying to make has stumped me. My character is a Battle Master Fighter in DnD 5e, and I want to have a query to help sort my maneuvers. I am trying to make a macro that, when pressed, opens up a query with the drop down menu that lists my maneuvers, and then I can select one to use and it pulls up the ability call for it. This is my current macro which doesn't work: /r ?{ Type of Maneuver | Maneuvering Attack, %{Aufstin "Bridge" Bjorimir|repeating_attack_$2_attack} | Precision Attack, %{Aufstin "Bridge" Bjorimir|repeating_attack_$3_attack} | Trip Attack, %{Aufstin "Bridge" Bjorimir|repeating_attack_$4_attack} } I know how to do queries and I know how to do ability calls, but combining them isn't working. If I try using the @ symbol for a character attribute, that works, but if I use % it doesn't. I've also tried making the maneuvers separate macros and referencing them with the # symbol, but that doesn't work either (I suspect because the referenced macro has the % symbol in it). I've also read  Advanced Usage for Roll Queries and several other posts about this, but I guess I'm just not getting it. If someone could help me with this real quick I would be so thankful. I don't need an in-depth explanation, just a brief summary and the code would be great! Thank you!
So the problem that you are running in to is that your ability calls most likely have '}' in them. Queries end at the first '}' they come across, which is why the Advanced Usage suggest that you replace these characters with their HTML equivalent. You are more than welcome to create a separate ability (a macro but in the Attributes & Abilities tab of the character sheet) for each manuever you know and replace all of the '}', ',', and '|' with their HTML equivalents and your query should work like you want, but this is a lot of work. Instead, you could use print a list of  API Command Buttons (they are called API, but aren't actually API so even non-pro members can use them) representing your maneuvers to the chat and then pick the maneuver you want. It does tend to clog up the chat window, but you can whisper them to your self so that only you are impacted. This method also means that you don't have to mess with the HTML equivalents to get it to work properly.
1498940549

Edited 1498940915
One of these days, I ought to draft up a more concise and comprehensible explanation of why Abilities/Macros typically don't play nice with Roll Queries and add it to Advanced Usage for Roll Queries . I just threw this together for the time being (click to enlarge): And here are some links to a few of the many helpful posts/discussions on this topic: <a href="https://app.roll20.net/forum/post/4609048/selecting-an-ability-based-on-user-input/?pageforid=4612105#post-4612105" rel="nofollow">https://app.roll20.net/forum/post/4609048/selecting-an-ability-based-on-user-input/?pageforid=4612105#post-4612105</a> <a href="https://app.roll20.net/forum/post/4755878/still-failing-to-understand-macros-and-templates/?pageforid=4756102#post-4756102" rel="nofollow">https://app.roll20.net/forum/post/4755878/still-failing-to-understand-macros-and-templates/?pageforid=4756102#post-4756102</a> <a href="https://app.roll20.net/forum/post/3954894/nesting-macros/?pageforid=3991640#post-3991640" rel="nofollow">https://app.roll20.net/forum/post/3954894/nesting-macros/?pageforid=3991640#post-3991640</a> <a href="https://app.roll20.net/forum/post/2165711/script-powercards-3-thread-3/?pageforid=2982392#post-2982392" rel="nofollow">https://app.roll20.net/forum/post/2165711/script-powercards-3-thread-3/?pageforid=2982392#post-2982392</a>
Well, it's a shame that Roll20 doesn't support that perfectly. Thank you guys for helping out though! I guess I know now to just use the API buttons when I need to do more complex rolls like this.&nbsp; Kyle G. said: Instead, you could use print a list of&nbsp; API Command Buttons (they are called API, but aren't actually API so even non-pro members can use them) representing your maneuvers to the chat and then pick the maneuver you want. It does tend to clog up the chat window, but you can whisper them to your self so that only you are impacted. This method also means that you don't have to mess with the HTML equivalents to get it to work properly. I also tried making the maneuver for the Fighter a complete Roll Template, but screwing around with calculating the DC for the Strength Save is taking to long and I'm just gonna give up and use the API buttons. Thank you for the links Silvyre btw! I was kinda hoping you'd pop on here and help me eventually. I see you a lot on these forums and I really appreciate the work and patience you give to others. You too Kyle G.! So, I'll go ahead and write up the API buttons. I'll make a final reply by posting my final results and then this thread can be closed. Thank you guys so much for all this!
Well, API Buttons are much easier than what I tried to do with all that nesting with queries and abilities. Here is what I made using this&nbsp; video : Main Macro: Maneuvers (NOTE: Every "!" is actually a&nbsp;! & # 1 3 without the spacing between.) /w gm &{template:desc} {{desc=**Maneuvers** ____________________________ [Maneuvering Attack](!#maneuvering) [Precision Attack](!#precision) [Trip Attack](!#trip)}} First Sub-Macro: maneuvering &{template:dmg} {{rname=Maneuvering Attack}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d8]]}} {{dmg1type=Bonus Damage}} {{desc=Add the bonus to your damage roll and choose an ally. They are given a reaction to move away from the target for half their movement speed.}} Second Sub-Macro: precision &{template:dmg} {{rname=Precision Attack}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d8]]}} {{dmg1type=Bonus Attack Roll}} {{desc=Add superiority die to attack roll either before or after initial roll.}} Third Sub-Macro: trip &{template:dmg} {{rname=Trip Attack}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d8]]}} {{dmg1type=Bonus Damage}} {{save=1}} {{saveattr=Strength}} {{savedesc=Fall prone}} {{savedc=[[8+@{Aufstin "Bridge" Bjorimir|npcd_dex_mod}+@{Aufstin "Bridge" Bjorimir|pb}]]}} {{desc=Add superiority die to damage roll and if enemy is Large or smaller, must succeed on a strength saving throw or fall prone}} So, this setup uses a main macro which has the API buttons and three other hidden macros which contain all the information needed for the maneuvers, and are able to auto-update with changing proficiency bonuses and dexterity modifiers so I never have to go into all of this again. :D If someone wants to use this, just replace the&nbsp; Aufstin "Bridge" Bjorimir &nbsp;'s in the "trip" Sub-Macro to your own name, and it'll work fine. If someone wants to close this thread now, they can go ahead. I got all the help I needed. :)