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

Way To Display Even or Odd Results?

Sorry if this is a simple question.  I'm not very good with macros and google has not been much help on this. I'd like a macro that displays test based on die roll results.  For instance "Even" "Odd", or "Works"  "Doesn't Work", or "Left" Right" etc. Is there a way to do this with a macro?
1606703582

Edited 1606704937
Oosh
Sheet Author
API Scripter
There are some creative solutions to "force" the die roller to do some simple logic, but otherwise there are no conditional statements available to standard macros. Hacky example: &{template:default} {{name=Logic test}} {{[0](#)=Roll is odd}} {{[1](#)=Roll is even}} {{[[[[[1d6]]%2]]](#)=$[[0]]}} Or setting a value to 0 on a certain die roll, say the second damage die is only applied on even rolls: &{template:default} {{name=Logic test}} [[abs([[1d6]]%2-1)*1d6[Evens]]] {{Attack Roll=$[[0]]}} {{Damage=[[1d6[Base]]] + $[[1]]}} It's very limited in scope, and requires a bit of tinkering. The API (and sheetworkers on custom sheets) use Javascript and have a range of proper programming logic available - if, and, or, loops etc. Both of these require a Pro game.
1606728669

Edited 1606829068
Finderski
Plus
Sheet Author
Compendium Curator
Or just set up a rollable table and roll on that. You could set up a rollable table with two entries for Odd/Even or Heads/Tails. For the Works/Doesn't work, another rollable table would be possible and those could be weighted if the odds aren't 50/50.
Rollable table is perfect!  Thank you much!