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

How to roll two dice and ensure that are different result?

I'm looking for a simple macro that throw 1d4 and 1d4 and ensure the second is different to de first to throw the powers of the spectator that throw two rays and must be different? I'm a beginner with roll20 macros and seems an entire world of possibilities... Thanks in advance!!!
1586528122
GiGs
Pro
Sheet Author
API Scripter
This isnt possible with a dice roll. Dice rolls dont allow for any conditional checking - you cant make the second die dependent on the first. You could simulate it with a rollable table with 12 entries, each with a weight of 1: 1 2 1 3 1 4 2 1 2 3 2 4 3 1 3 2 3 4 4 1 4 2 4 3 If you want to show them adding together, or some other operation, you could type that into the table entry, like so 1 + 2 = 3 1 + 3 = 4 1 + 4 = 5 2 + 1 = 3 2 + 3 = 5 2 + 4 = 6 3 + 1 = 4 3 + 2 = 5 3 + 4 = 7 4 + 1 = 5 4 + 2 = 6 4 + 3 = 7
1586532926

Edited 1586541912
If you use the following line, it will keep rolling 1d4s until two different 1d4s are rolled and added up: /roll 1d4r1r4 + 1d4r2r3 It does so by rerolling the d4s if they land on 1 or 4 (left part of the sum) or 2 or 3 (right part of the sum). You can also split these up into two rolls, if you want the separate numbers.  Edit: Also, check out the Dice Reference wiki page. Grasping their mechanics enables you to go much further with your macro's. Edit 2: Yeah, I didn't think about the odds. Using a rollable table for use in a macro is probably the smoothest solution to that problem, perhaps combined with two roll queries to output the relevant damage roll for the Spectator's eye rays.  
1586533393

Edited 1586533642
GiGs
Pro
Sheet Author
API Scripter
With that approach you cant roll 1 and 4, or 2 and 3, so the odds are not same. You only have 4 possible outcomes: 12, 13, 24, 34. If the system involves adding the dice together, you cant get a 5. The system proposed by OP has 6 possible results, 12, 13, 14, 23, 24, 34, each occurring twice in the 12 total outcomes. If they are added together, 5 is the most common total, occurring twice out of these 6 results.
1586533509

Edited 1586534523
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Could that method generate a 1,4 or a 2,3? Edit: sniped!
This isn't ideal (it still requires two die rolls) but you can try the following: /gmroll 1d4r?{Last Roll} ...which will prompt you for the result of the last roll and ensure it doesn't get rolled again.
Ohhh thanks to all, for today season I will use: /gmroll 1d4r?{Last Roll} But I promise you check the rollable tables method