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 .
×
Why do rogues wear leather armor? Because it’s made of hide. 🥷

Is it possible to make a variable macro call?

1395773529

Edited 1395773868
I have macros for each skill check in 4e, but placing them all as token actions clutters the screen. Is it possible at this time to have a macro #check that would call the specific skill check macro depending on input (i.e. #history-check)? The way I thought may work was #?{check}-check, but due to the current order of operations (which makes full sense), first the macro tries to call, finding no macro "?{check}-check" and then the query is run, allowing input, and then printing to chat "#history-check". Though this is cool as a way to show other people what to type to call macros, this is not my desired outcome here. The reason for this is simple: if a macro expands to have a roll query, that query needs to be called, and the simplest way to do this is call all queries after expanding macros (and much of advanced macro/ability usage relies on the expand-before-activating principle). Is there any way to achieve the desired effect within the current system? ----------------------------- Assuming there isn't (I've tried a good bit), some rambling about possible ways to implement: A possible way to change this is to change the order of operations to -Queries are carried out -Abilities are run (the order of operations are run locally on the content of the ability) and output cached -Macros are run (the order of operations are run locally on the content of the macro) and the output cached -Variables are substituted -Inline rolls run -Remaining roll is executed (and outputs put) The only possible problem I see with this solution is inability to do something like #roll + #modifier, but I haven't tested or done anything with this system. I fully understand the order of operations as it is currently, and it allows for some really cool things. Looking again at the above system there may be more flaws than the main draw (query-able macros) due to localized abilities and macros and the current system's focus on non-localized benefits (just expanding, not yet running). A brute-force way to allow this to happen would be just to add a run for queries onto before expanding of abilities/macros. Another way would be to add a specific syntax for queried macros (possibly something like ?# or ?@ to signify a query within the macro/ability. My example/problem above would then be done by ?#?{skill}-check which would parse the ?# as meaning to check the macro name for queries, resulting in the macro #<input>-check being run).
Simply put? No. You unable to use a Query function to call a Token action or Macro. The simplest method I've found; esp. with PF, 3.5, and 4e; is to cluster my skillchecks into a few related macros/actions. My 'Athletics' macro rolls for acrobatics,jump,swim, ride, etc. My 'Skulduggery' macro rolls for stealth, escape artist, hide, disable device, etc. It cuts down on the interface clutter and still does what it needs to. In one-shot games, I can create encompass nearly everything my character needs to roll for in about 8-9 macros that are quick and easy to setup.
With no pun intended, I would suggest you post any suggestions in the 'Suggestions' forum.
1395786676
Lithl
Pro
Sheet Author
API Scripter
Note that such a macro is possible with the API, which requires that the campaign owner be a Mentor. (You could, for example, create a script which is able to handle "!check ?{Ability}")
Thanks for the answer! Just another reason towards getting Mentor I guess xD I meant this to just be a use question but then kept rambling, I'll copy the suggestion over to Suggestions at some point to see what is said there.