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

Macro Help: If/Than

Hello I was trying to make a macro looks a little cleaner and was wondering if there was a way to make a certain digit, or digit range to result in a specific word being written. The exact thing I'm trying to accomplish is a check to see if players discovery something during travel. Here's what I'm using now: &{template:default} {{name=Making a Discovery}} {{Discovery on 1=[[1d20>17]]}} {{Location on 1-10 Encounter on 11-20=[[1d20]]}} What I'd like to do to make it look a little cleaner is to have you roll the macro and after the roll is made 17-20 it would display a message, "Something was Discovered!" or something to that effect, and then the on the location roll for it to display "You found a new Location!" on a 1-10, and "You have made an Encounter!" on a 11-20.
There is no practical way of doing this short of api. That being said, it is possible to create fake if/then, using [[d100<xx]] but only if the xx is not an auto calculated variable. But you use the roll template's show/hide mechanics. Which means every thing does occur in the background and can potentially create enormous spaghetti code roll templates. I use it to create iterative attacks based on BAB on my character sheets, its rather nasty and inelegant, furthermore it becomes hard coded into the character sheet. I suppose it might be possible to link it to roll templates somehow, but I've never really tried. Perhaps, Aaron, Manvetti or Lance can help more. If I find something, along these lines I'll let you know.
There are roll template helpers for greater than, less than, and between now. I don't know much about them since I use powercards instead of roll templates.
If you're just rolling a dice and looking for text back (not caring what the dice roll was, so long as it returns correct text), then setting up a Rollable Table is exactly where you want to be. <a href="https://wiki.roll20.net/Card_Decks_and_Rollable_Ta" rel="nofollow">https://wiki.roll20.net/Card_Decks_and_Rollable_Ta</a>...