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

Foraging Roll Help

Running ToA. Each day, a character may make a DC 10 survival check. On a success, they find 1d6+WIS mod food, and another 1d6+WIS mod worth of water. I have written the following macro to automate this: [[ {{ [[1d20+@{target|survival_bonus}]],0 }>9 }*([[1d6+@target|wisdom_mod}]]) + 0]] as well as the advantage/disadvantage versions. However, this only give me the first 1d6+WIS mod roll and I don't know how to get it into a form that should say "@{target|character_name} finds X food and Y water!" I need to reuse the success/failure (0 or 1) from the 1d20 roll for both. So how do I do this?
The Aaron
API Scripter
There isn’t a way to do that without the API, a Pro subscriber perk.  The closest you can get at plus or below is playing some math games to get something like 6.07 to mean 6 food and 7 water: [[ {{ [[1d20+@{target|survival_bonus}]],0 }>9 }* ( ([[1d6+@{target|wisdom_mod}]])*100 + [[1d6+@{target|wisdom_mod}]])*1.01]] Food.Water
I figured it might not be possible and went to plan B: Breaking up the rolls so there's one check for each. *I think I fixed it. &{template:npcaction}{{rname=**Foraging Roll**}}{{name=}}{{description= @{selected|character_name} found [[ {{ [[?{Advantage? | Normal,1d20 | Advantage,2d20kh1 | Disadvantage,2d20dh1}+@{selected|survival_bonus}]],0 }>10 }*({[[1d6+@{selected|wisdom_mod}]],1}kh1)]] food and [[ {{ [[?{Advantage? | Normal,1d20 | Advantage,2d20kh1 | Disadvantage,2d20dh1}+@{selected|survival_bonus}]],0 }>10 }*({[[1d6+@{selected|wisdom_mod}]],1}kh1)]] water!}}