
While working on some macros and abilities I ended up falling upon a useful little hack, and was wondering... how could I further make use of it?
You can create a series of macros/abilities... for example:
#Macro which has the content:
Somepart of the macro
#SubMacro@{CharName|level}
Another part of the macro
#SubMacro1
#SubMacro2
#SubMacro3
etc
When you use #Macro, it first expands the attribute "level" before calling the SubMacro, and will then call the matching SubMacro to your level. e.g. If the character has the attribute level which is equal to 2, #Macro will do whatever else you have it do, then expand and execute #SubMacro2
I was wondering... could we do that with some sort of math, comparison, or randomness that require rolls?
So I tried the easiest test
#Macro which now has text:
Somepart of the macro
#SubMacro[[1d3]]
Another part of the macro
But that doesn't work, instead it writes in chat "#SubMacro" with the roll result of whatever the die ended up.
Is it possible to, in the macro, convert the roll result value to plain text to have it call the correct SubMacro?