10
\$\begingroup\$

Is there a command or macro that would help me roll 5d11 until I get no duplicate values?

At the beginning of each session I roll 5d11 and if there are any repeating numbers I roll again until there aren't any. I can't seem to find anything on repeating numbers in the wiki that would let me automate this. If I've missing something I will happily accept the page and read through it. Or if there's like a drop duplicate numbers that would also be great.

\$\endgroup\$
  • \$\begingroup\$ just to make sure I understand, this problem could also be exemplified as: having numbers 1-11 in a bag (on stones, let's say). You then draw out 5 "stones"/numbers? \$\endgroup\$ – goodguy5 Mar 30 '18 at 15:17
  • \$\begingroup\$ And followup: Are you trying to get probabilities, or are you looking for a tool that you can easily use to get these 5 numbers? \$\endgroup\$ – goodguy5 Mar 30 '18 at 15:24
  • 16
    \$\begingroup\$ It may help to understand WHY you are doing this in order to determine HOW it can best be done. What is the goal for this and what does it signify? \$\endgroup\$ – NautArch Mar 30 '18 at 15:27
  • 4
    \$\begingroup\$ @Kmnder If you're looking for unique stones, then why would you put any stones back? You'll just risk re-drawing them. \$\endgroup\$ – MikeQ Mar 30 '18 at 16:54
  • 2
    \$\begingroup\$ @MikeQ because if he draws them again he can just put them back again! :P \$\endgroup\$ – David Coffron Mar 30 '18 at 16:56
18
\$\begingroup\$

to the question "Can I use roll20 to get a sample of 5 numbers from 1-11, without replacement?"

You cannot use Roll20 to manipulate dice in this way (as far as I know)

Since "roll 1d11 until I get 5 unique numbers" is the same as "randomly select 5 numbers out of a set of 11, without replacement"

A better tool to use, is some "online tool sampling without replacement" (what I used in my google search). I used this dcode site. Enter the range of the numbers (minimum 1 and maximum of 11) and how many to choose (5).

The first two tries, I got [5,9,11,4,6] and [11,10,6,8,4].

Another online tool that I found.

\$\endgroup\$
  • 2
    \$\begingroup\$ Yep this works, the GM gave the OK for it too. \$\endgroup\$ – Kmnder Mar 30 '18 at 18:06
  • \$\begingroup\$ @nitsua60 That was the first thing I thought when I read this answer, but I can't find the command. \$\endgroup\$ – Longspeak Mar 31 '18 at 0:00
  • \$\begingroup\$ @Longspeak check the top-voted answer \$\endgroup\$ – nitsua60 Mar 31 '18 at 0:47
  • \$\begingroup\$ @nitsua60 mild edit to make my statement technically correct. Ya learn something new every day. (for what it's worth, I hope they come back and tag the other answer) \$\endgroup\$ – goodguy5 Mar 31 '18 at 3:22
48
\$\begingroup\$

Draw cards instead

The result you want, randomly choosing 5 of the numbers between 1 and 11, can easily be accomplished in roll20 by creating a custom deck, or "Collection," with 11 cards ranked 1 through eleven.

Then just shuffle the cards and draw 5.

Roll20 documentation: https://wiki.roll20.net/Collections

Example

I dummied the following up in roll20, in about 15 minutes.

I duplicated the standard deck and deleted the cards except for Ace (low) through Jack of hearts. Then it was ready to use:

  1. Click “Show” on the deck.
  2. Click “Deal,” enter the number of cards, your user name, and
  3. Select the options in the dialog box (see image)
  4. View the dealt cards.
  5. When done, click "Recall,” select “Shuffle after recalling?” and click “Recall All”

enter image description here

Here are the results:

enter image description here

One nuisance is the dealt hand can appear behind the floating toolbar if you are GM and have a large avatar. You may want to show smaller avatars, or names only.

\$\endgroup\$
  • 2
    \$\begingroup\$ It's worth noting (in this comment) that Ace-through-Jack functions as "1 through 11", as well. \$\endgroup\$ – goodguy5 Mar 30 '18 at 19:02
  • 12
    \$\begingroup\$ +1 This should be the answer. Any time one is thinking "random + remove duplicates" the path is wrong. It's, as stated here, shuffle, draw X from 'deck'. \$\endgroup\$ – Reginald Blue Mar 30 '18 at 20:00
  • \$\begingroup\$ I'm surprised it took 15 minutes, though. I don't use non-dice on roll20 much so I guess I don't have the experience. \$\endgroup\$ – goodguy5 Mar 31 '18 at 3:24
  • \$\begingroup\$ @goodguy5, about the 15 minutes, the click-click-scroll-click to delete the unneeded cards was a little tedious. Then the results were appearing behind the floating toolbar, so investigated that at bit. \$\endgroup\$ – Tim Grant Mar 31 '18 at 10:36
7
\$\begingroup\$

You can emulate it by rolling 1d11, 1d10, 1d9, 1d8 and 1d7.

On each roll after the first, add +1 for every earlier roll that is less than or equal to the current roll. If this causes the current roll to equal or exceed even more earlier rolls, add +1 for those too.

So, for example, if you first rolled a 7 and then an 8, the 8 would become a 9 (because it's greater than the first roll). If you then rolled another 8, it would first become a 9 (because it's also greater than the first roll) and then a 10 (because it's now equal to the second roll). So your first three rolls (natural 7, 8, 8) would become 7, 9 and 10 after the increments.

If you now got lucky and rolled a natural 8 on your fourth roll (1d8), it would get bumped all the way up to 11. If you rolled a natural 7, it would only get bumped to 8, and any roll of 6 or less would stay unchanged.

\$\endgroup\$
  • \$\begingroup\$ I tried to edit your answer a bit to clarify it, and ended up rewriting it quite substantially. Feel free to revert my edits if you don't like them, and/or to make any improvements to them you can think of. Thanks, and sorry for putting words in your mouth. \$\endgroup\$ – Ilmari Karonen Mar 30 '18 at 19:45
  • 1
    \$\begingroup\$ Another way of wording it: write out the numbers 1 through 11. Every time you roll, count off the number you got, skipping any circled number. Circle the number you got. So if you first roll a 7, circle the 7. If you then roll an 8, then count off 8 numbers, but skip the 7. This will bring you up to 9, so circle that. Etc. \$\endgroup\$ – Acccumulation Mar 30 '18 at 20:05
  • \$\begingroup\$ @Max I think you did something wrong. Did you miss the "If this causes the current roll to equal or exceed even more earlier rolls, add +1 for those too." part? \$\endgroup\$ – Acccumulation Mar 30 '18 at 20:07
  • \$\begingroup\$ @Acccumulation yeah, that's what I missed \$\endgroup\$ – Max Mar 30 '18 at 20:21
  • 1
    \$\begingroup\$ @accc yes, that is a good way to show why this works; each roll uniformly picks from the unpicked values. So it emulates drawing cards. \$\endgroup\$ – Yakk Mar 30 '18 at 23:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.