Okay so I've run into some problems trying to have a query return a
specific macro to combine them. My example is having 3 macros for
rolling for melee, ranged, and cmb attack chance and having a fourth
macro to select a certain type of attack. my code as follows:
#AttackMelee
%{Bill|Melee-Attack-Roll}
#AttackRanged
%{Bill|Ranged-Attack-Roll}
#AttackCMB
%{Bill|CMB-Check}
#Attack
?{attack with what type?|Melee,#AttackMelee |Ranged,#AttackRanged |CMB,#AttackCMB }
I know this doesn't work for a number of reasons. Because of the way Roll20 parses the text, the text the macro represents can mess up the query and then the #Attack macro in turn. Also there is no way to make the query wait to handle the macro until after choice has been made. Does anyone know of a way to make this work without having to write the html out myself?
Note to Developers reading this:
#AttackMelee
%{Bill|Melee-Attack-Roll}
#AttackRanged
%{Bill|Ranged-Attack-Roll}
#AttackCMB
%{Bill|CMB-Check}
#Attack
?{attack with what type?|Melee,#AttackMelee |Ranged,#AttackRanged |CMB,#AttackCMB }
I know this doesn't work for a number of reasons. Because of the way Roll20 parses the text, the text the macro represents can mess up the query and then the #Attack macro in turn. Also there is no way to make the query wait to handle the macro until after choice has been made. Does anyone know of a way to make this work without having to write the html out myself?
Note to Developers reading this:
- You might want to introduce escape characters for symbols the next parser might use such as /} so that these characters can still be used for display purposes and the user can still specify where a macro begins and ends.
- You might instead want to bookend macros, abilities, queries etc with nonprintable characters. One's that won't be displayed by the editor but for the parser to know what to format and what not to format without waiting until a printable character that might be needed.
- You could also add another command character to reorder the order of operations if neccessary to call a query before a macro for example