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 .
×

Checking roll result before making an action Macro

Hello, My brain quite going on fire so i can't find out the answer to this really easy question: i want to make a macro like this: If jump check higher than x, roll 2d6; if jump check lower than x, write "jump failed" Can anyone help me? Thanks in advance
1602525296
GiGs
Pro
Sheet Author
API Scripter
Thats not possible in roll20. You cant have different outcomes from the same roll (an output of 2d6, and an output of "jump failed").
1602541521
Oosh
Sheet Author
API Scripter
It's not at all pretty, but you can do this if you really want: &{template:default} {{name=Jump Check}} {{[0](#)=Rolling 2d6... [[2d6]]}} {{[1](#)=Jump check failed}} {{[[[1d20>10]]](#)=}}
1602548784
GiGs
Pro
Sheet Author
API Scripter
When I say, "that's not possible in roll20," I'll have to start adding, "until Oosh comes along."
1602558307
Oosh
Sheet Author
API Scripter
I mean... it looks a bit awful. So it's possible, but is it worthwhile? :)
1602558414
GiGs
Pro
Sheet Author
API Scripter
lol, you're right there - I wouldn't use it.
1602587093

Edited 1602587432
Oosh said: I mean... it looks a bit awful. So it's possible, but is it worthwhile? :) Fixing the template will be a later problem ... however, I had a look but as GiGs said, i can't choose an output after a dice roll right? I'm quite upset becouse i can't understand what type of syntax is used to make these type of queryes
Just one more question ... is there at least the possibility to open a dialogue window to insert a value before a roll? so I can make macros to check if a complex action is completed, I would like my input to be a number called x System will make a roll called y My output (fixed one) will be --> You have to do more than x to pass, you dice roll is y
1602588874
Oosh
Sheet Author
API Scripter
You can do something like this, if I'm understanding what you want correctly: /r 1d20>?{Difficulty|10} Or, if you wanted to do something like the 2d6 roll above, you can use nested rolls and $[[0]] references to get a bit more information displayed from the dice roller: &{template:default} [[ [[{[[1d20]],0}>?{Difficulty|10}*2]]d6 ]] {{name=Roller}} {{d20 result=$[[0]]}} {{Difficulty=?{Difficulty}}} {{2d6 result=$[[2]]}} Is this kind of what you're talking about? This is just using some tricks to get around the fact that you can't actually do conditional statements.
1602593292

Edited 1602594321
Oosh said: You can do something like this, if I'm understanding what you want correctly: /r 1d20>?{Difficulty|10} Or, if you wanted to do something like the 2d6 roll above, you can use nested rolls and $[[0]] references to get a bit more information displayed from the dice roller: &{template:default} [[ [[{[[1d20]],0}>?{Difficulty|10}*2]]d6 ]] {{name=Roller}} {{d20 result=$[[0]]}} {{Difficulty=?{Difficulty}}} {{2d6 result=$[[2]]}} Is this kind of what you're talking about? This is just using some tricks to get around the fact that you can't actually do conditional statements. Yeah the second one is very close to what i had in mind, i'll work to fix the template and then it'll be fine for the use, thanks a lot. I've completed it will template like this: &{template:DnD35StdRoll} {{skillflag=true}} [[ [[{[[1d20 + 5]],0}>?{Immetti la difficoltà del salto|10}*2]]d6 ]] {{name=Claw at the Moon}} {{Difficoltà salto:=?{Immetti la difficoltà del salto}}} {{Risultato salto:=$[[0]]}} {{Danni bonus:=$[[2]]}} I can't call the parameter [[@{Moloch|jump}]] instead of +5, but i'll work on it, otherwise, i'll just remember to change it