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

Query nested inside an Ability

Hey all! I'm trying to make a general-purpose skill check macro for my players, and I've encountered a bit of a wall. I have this macro: %selected|npc_?{Ability |Acrobatics,acrobatics|Animal Handling,animal_handling|Arcana,arcana|Athletics,athletics|Deception,deception|History,history|History,history|Insight,insight |Intimidation,intimidation|Investigation,investigation|Medicine,medicine|Nature, nature|Perception,perception |Performance,performance|Persuasion, persuasion|Religion,religion|Sleight of Hand,sleight_of_hand|Stealth,stealth|Survival, survival} It *almost* works properly. If I select acrobatics, it outputs the text "%selected|npc_acrobatics". Instead of simply outputting this text, I'd like it to execute that ability. Is there some functionality to make this work, or should I approach the task from a different angle?
You're missing the curly brackets needed for ability rolls try %{selected|npc_?{Ability |Acrobatics,acrobatics|Animal Handling,animal_handling|Arcana,arcana|Athletics,athletics|Deception,deception|History,history|History,history|Insight,insight |Intimidation,intimidation|Investigation,investigation|Medicine,medicine|Nature, nature|Perception,perception |Performance,performance|Persuasion, persuasion|Religion,religion|Sleight of Hand,sleight_of_hand|Stealth,stealth|Survival, survival}} instead.
1508285990

Edited 1508286032
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
While Kyle's post is technically correct, the macro still won't work for you. This is due to the order of operations which says that abilities are expanded to 99 levels deep, then attributes to 99 levels deep, then roll queries to 99 levels deep with html entities being parsed at each level of roll query. I'm guessing that these are sheet generated abilities, and from the name syntax form one of the 5e sheets. These are not editable, so you won't be able to replace the problem characters in them to put the ability calls inside the roll query. I would recommend looking into  ability command buttons to make chat menus to select which one to use. The 5e Shaped and the Neceros Pathfinder sheet already have these built in.