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

Marco - Target number and maths

Hi Roll20, I'm trying to achieve a macro that gives me a result of 1 or 0. The query within the macro ask the player if he will roll 1D3, 1D4, etc. and then compare that result to give a 1 or a 0 compared to my target number. This might be simple but my bird-brain doesn't seems to understand it this morning! Right now, it looks like this (thanks to GiGs) : [[?{Ammo consumption?|1 d3|1d4|1d6|1d8|1d10}<1 ]] This macro either gives me a 0 or a 1, which is perfect. What i need is to input a modifier to the roll. If the player shoot in full auto mode, the result of the dice should be -1 (or even -2 for some weapons). I've tried something like this : [[?{Ammo consumption?|1 d3|1d4|1d6|1d8|1d10}+?{Mod?|-1|-2}<1 ]] But it doesn't work. The macro seems to go over the *|-1|-2 <1* part before anything else and I'm now coming up with an output higher than 1. Can anybody help me?
1572271062
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try another set of curly brackets to group the roll: [[{?{Ammo consumption?|1d3|1d4|1d6|1d8|1d10}+?{Mod?|-1|-2}}<1 ]]
Perfect, it works A1. Thank a lot!