
I'm setting up a lot of macros for my Tomb of Annihilation game. I've got most of them to work using the inline rolling API and having waaaay too many tables, but I've run into a bit of an issue.
for foraging, I'm using the following macro
&{template:npcaction}{{rname=**Foraging Roll**}}{{name=}}{{description= @{selected|character_name} found
[[ {{ [[?{Advantage? | Normal,1d20 | Advantage,2d20kh1 | Disadvantage,2d20dh1}+@{selected|survival_bonus}]],0 }>12 }*({[[1d4+@{selected|wisdom_mod}]],1}kh1)]] lbs of food and [[ {{ [[?{Advantage? | Normal,1d20 | Advantage,2d20kh1 | Disadvantage,2d20dh1}+@{selected|survival_bonus}]],0 }>12 }*({[[1d4+@{selected|wisdom_mod}]],1}kh1)]] gallongs of potable water!}}