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

Complex Macro Help for Nested Macro Calls (and their subsequent complex macros)

1499121223

Edited 1499121496
Hi, I've been reading the Useful Macros, Advanced Usage for Roll Queries, and other Macro-specific wiki pages as well as some other threads where people asked for help with macros, but my problem remains unsolved and I'm tired of banging my head against it alone. The problem is thus: I am trying to set up macros for a game of Fragged Empire. The game has over 15 actions a player can take on their turn, 10 of which require rolls. I want to set up macros for each of these rolls. However, I don't want the whole page bogged-down with macro buttons. So instead of just making them all visible, I want to collapse the "Melee" macros into a single button that, when clicked, will prompt a drop-down list of other macros to choose from. This has worked out all well in theory, but when I try to make the actual macro work, I get so far and it just stops doing what I want, and either not working or displaying some really weird text when I try to "roll" that macro. The most common error being that when I press the "Melee-Attack" macro button, the drop down list shows "Strike / 1" when instead it should show "Strike / Charge / Block / Impair / Escape". Further, when I click "1" it reads parts of the Charge - Escape macros in words, and other parts parses as numbers, and the "Strike" option gives me a jumbled mess as well. I understand how to call macros, with #Block (Being sure that my "Block" macro also has the capital, I'm a stickler for case-sensitivity) and such. However, I know that sometimes nested queries have problems parsing certain symbols, and those must be replaced with their HTML variants. However, I also know you should NOT replace symbols in calls like #Block for due to order of operations they are parsed first. This is my problem, as no symbol-to-HTML switches seem to work, and I'm out of ideas for this drop-down, macro-call list. All Macros work as intended on their own. The Melee-Attack drop down macro works fine until I attempt to #Call any other macro with it. It looks like this: Melee-Attack Macro ?{ Choose an Action | Strike, #Strike | Charge, #Charge | Block, #Block | Impair, #Impair | Escape, #Escape } With each macro linked being rather complex, like this: Strike Macro /me attempts to **Strike** /r {2d6 + ?{Rate of Fire|1}d6 + [[{@{selected|cur_ref}}]] + ?{Modifier|0}} Move [[@{selected|cur_mov}-2]] Any help I could get would be appreciated. I had trouble with this before, and resorted to just inserting the formula into the nest, rather than the macro calls, but when I try that here it breaks as well (probably something to do with symbol v.s. HTML parsing again).
1499122764

Edited 1499122910
vÍnce
Pro
Sheet Author
It does sound like you're having a special character substitution problem (as you've guessed...). I believe you have to make the proper subs in all the macros that are included in your query.  So even though #foo works fine on it's own, when you call #foo from within another query it will choke once it encounters a comma, pipe, or right curly bracket.  So I would start with making the proper subs in one macro, and try out your query macro with only one macro, then continue adding the additional macros one at a time. I'm sure you've read it, but for reference: Advanced Usage for Roll Queries Another option may be to use  Ability Command Buttons to whisper a "menu" of roll choices. Try creating a macro using [BUTTON NAME](!
#MACRONAME)