Is there a way to extend that to work with a nested query? I've been struggling for a couple of weeks (ever since deciding to upgrade to Pro) to come up with a macro for potions of healing (using the 5eOGL template). I'd like to give my players the option to select which type of potion they're drinking and use the same dice result for both !token-mod (or !setattr - whatever it takes to actually update the character's hit points) and the chat log.
I've tried everything I can think of as well as numerous permutations of everything I've found online but I think I'm missing something about how inline rolls work... This is how I tried to modify Silvyre's code:
!token-mod --set bar3_value|+?{Potion type|healing,[[2d4+2]]|greater healing,[[4d4+4]]|superior healing,[[8d4+8]]|supreme healing,[[10d4+20]]}
&{template:default} {{name=@{selected|token_name}}} {{Amount healed=?{Potion type} HP}}
I'm pretty sure that what I'm seeing is the second "?{Potion type}" is being re-rolled rather than using the value from the original roll. I think that because I've encapsulated the value in [[ ]], it's rolling it again for the chat log. Is that the expected behavior when using [[ ]] in that manner?
So then I tried this but it doesn't update bar3.
!token-mod --set bar3_value|+[[?{Potion type|healing,2d4+2 |greater healing,4d4+4 |superior healing,8d4+8 |supreme healing,10d4+20 }]]
Can an inline roll be "re-used"? Am I going about this all wrong?
/first post!