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

Trying to add modifier to inline roll.

So, kind of simple here... but I've not been working with macros for a while since my other job started, so I've lost some knowledge and such from when I messed with macros regularly, but I'm trying to add an input modifier to an inline roll, and nothing I do with it seems to work. Here's what I'm trying to do: [[ 1d10?{If firing against a fighter, enter "-4"}cs>3cf<3 ]] So, essentially just roll a D10 and (if it applies that this roll is being used against a specific kind of enemy) enter "-4" as a modifier and just continue the roll as usual. I've gotten it, once, to a point where I could get numbers, but none of them would be red or green (to indicate success or failure just at a glance, so as to save time in-game). Anyone know what I'm doing wrong, or not doing? ;-;
1435117187
The Aaron
Roll20 Production Team
API Scripter
So, if I understand what you are trying to do, I think this is what you want: [[ 1d10cs&gt;3cf&lt;3+?{If firing against a fighter, enter "-4"} ]] cs and cf need to be modifies on the die, so I moved the modifier to the end. So it will be 1d10 or 1d10-4 (if they entered -4). If what you really want is 1d10 or 1d6, you could do it like this: [[ 1d(10?{If firing against a fighter, enter "-4"})cs&gt;3cf&lt;3 ]] You might find this easier to use: [[ 1d(10-(4*?{Firing against a fighter? 1/0|1}))cs&gt;3cf&lt;3 ]] Dice Reference: <a href="https://wiki.roll20.net/Dice_Reference" rel="nofollow">https://wiki.roll20.net/Dice_Reference</a>
1435117308
Diana P
Pro
Sheet Author
If you want to subtract 4 from the roll, try: [[ 1d10cs&gt;3cf&lt;3 ?{If firing against a fighter, enter "-4"} ]] if you want the die-size to be reduced, try: [[ 1d[[10?{If firing against a fighter, enter "-4"}]]cs&gt;3cf&lt;3 ]] The brackets around the 10?{If firing against a fighter, enter "-4"} have it calculate the die size before trying to roll the die.
1435117470

Edited 1435171670
The Aaron
Roll20 Production Team
API Scripter
The nested inline roll is a nice option, great suggestion!
1435121022
Diana P
Pro
Sheet Author
I like the nested inline rolls. They make it look so much cleaner/clearer. :D
This one ( [[ 1d(10?{If firing against a fighter, enter "-4"})cs&gt;4cf&lt;4 ]] ) works pretty much perfectly for what I need! Many thanks!