This experiment was prompted by a thread on RPoL Development at
Dice Roller: Deck of Fate
The subject was using dice rolls to simulate a draw from a deck of cards, specifically the Evil Hat Productions Deck of FATE.
I will not be covering how to do a Deck of Fate because I don't own one. I will instead use a shorter example that is in Public Domain for illustrative purposes.
Some Background:
There are two scenarios for which a deck of cards may be used: a single card may be drawn from the deck or two or more cards may be drawn on the same shuffle.
In the first case, only one result is needed, and the deck is re-shuffled before the next draw is made. This is referred to in Statistics as
sampling with replacement.
In the second case, all cards needed from the deck are drawn before the deck is re-shuffled. That is, the deck is sampled multiple times
without replacment.
Now dice rolls can be classed in two general types according to the distributions into which their results fall.
The Uniform Distribution:
The roll of a single die, or the roll of multiple dice interpreted as the "digits" of a result, produces a
Uniform Distribution. This is so called because each result has a uniform probability of occurence if the dice are fair (i.e., not misshapen, loaded, or irregularly spotted/numbered).
The Normal Distribution:
Any roll of two or more dice whose sum is taken as their result produces a
Normal Distribution. The roll of two six-sided dice used in many common board games is perhaps the most familiar example to non-gamers, and the roll of three six-sided dice is perhaps more familiar to those who play role-playing games.
In this type of distribution, there are one or two results which tend to occur more frequently because of the way the dice combine to produce those results. These more frequent results are referred to as
norms.
In a roll of two six-sided dice, for example, the norm is 7, and it can occur in the following ways (note that order of the two dice is significant):
1+6, 2+5, 3+4, 4+3, 5+2, 6+1
So a roll of 7 occurs six times out of the thirty-six possible
permutations of 2d6. A mathematician or statistician might reduce this 6:36 down to 1:6 and be numerically correct in stating these as the
odds (or the
probability) of a result of 7 on any one given roll of 2d6.
Simulating a Deck of Cards:
In simulating a deck of cards, the structure of the deck is usually represented by a table (or, if you're programming such a simulation, an array or similar data structure). We'll use a deck of Zener Cards to illustrate. The original Zener Deck was used to test for Extrasensory Perception back in the 1960s and has a rather generic symbol set: a Yellow Circle, a Red Cross, a set of Blue Wavy Lines, a Black Square, and a Green Five-Pointed Star. Five of each symbol is included in the deck to make a total of 25 cards. I chose this example as the symbols are suitably generic and the deck itself is small, but large enough for illustrative purposes.
Before we get into our example, the structure of the deck matters not one whit so long as all cards are represented. Just to prove the point, I'm going to modify this Zener Deck such that each symbol is represented in each of the five colors. This also makes it easier to see that each card is unique.
The First Step: Building a Reference Table
So, for our Modified Zener Deck, the table might look something like
Result | Symbol | Color | Message |
1 | Circle | Yellow | A Yellow Circle |
2 | Cross | Yellow | A Yellow Cross |
3 | Lines | Yellow | A Set of Wavy Yellow Lines |
4 | Square | Yellow | A Yellow Square |
5 | Star | Yellow | A Yellow Five-Pointed Star |
6 | Circle | Red | A Red Circle |
7 | Cross | Red | A Red Cross |
8 | Lines | Red | A Set of Wavy Red Lines |
9 | Square | Red | A Red Square |
10 | Star | Red | A Red Five-Pointed Star |
11 | Circle | Blue | A Blue Circle |
12 | Cross | Blue | A Blue Cross |
13 | Lines | Blue | A Set of Wavy Blue Lines |
14 | Square | Blue | A Blue Square |
15 | Star | Blue | A Blue Five-Pointed Star |
16 | Circle | Black | A Black Circle |
17 | Cross | Black | A Black Cross |
18 | Lines | Black | A Set of Wavy Black Lines |
19 | Square | Black | A Black Square |
20 | Star | Black | A Black Five-Pointed Star |
21 | Circle | Green | A Green Circle |
22 | Cross | Green | A Green Cross |
23 | Lines | Green | A Set of Wavy Green Lines |
24 | Square | Green | A Green Square |
25 | Star | Green | A Green Five-Pointed Star |
We could scramble these various cards around in any manner and not affect the validity of the outcomes one bit, but this is the arrangement I will use for my example. In effect, we're arranging first by color (analogous to suit in a more traditional deck of cards), then by symbol (value).
Step Two: Creating the Dice Roll for the RPoL Dice Roller.
Now that we have our table, we know what our die roll must look like: a Uniform Distribution with results ranging from 1 to 25. How do we know this? Each of the cards is unique (no duplicates), and there are 25 cards.
So, whether we draw a single card or multiple cards from the deck, the same basic die roll template can suffice. In the template below, N is the number of cards being drawn.
[dice=Nd25 record=yes unique=yes memo="Draw N cards from the Modified Zener Deck" text="Draw N cards from the Modified Zener Deck."]
For a single draw:
[dice=1d25 record=yes unique=yes memo="Draw 1 card from the Modified Zener Deck" text="Draw 1 card from the Modified Zener Deck."]
Try it out here:
Draw 1 card from the Modified Zener Deck.
To make four draws from the same deck before shuffling:
[dice=4d25 record=yes unique=yes memo="Draw 4 cards from the Modified Zener Deck" text="Draw 4 cards from the Modified Zener Deck."]
Try it out here:
Draw 4 cards from the Modified Zener Deck.
Using the Modified Zener Deck:
To use the deck, roll the die or dice needed (one for each player) and consult the table for the result shown on each die.
For example, if I draw four cards using the dice roller, I might get something like:
20:37, Today: Chief Tinker rolled 80 using 4d25, unique dice ((20,15,24,21)).
The "rolled 80" part is irrelevant. Look at the results in the double parentheses:
20 = "A Black Five-Pointed Star"
15 = "A Blue Five-Pointed Star" (those who remember
Galaxina feel free...)
24 = "A Green Square"
21 = "A Green Circle"
The numbers tell us immediately that all four results are unique, and our table results confirm it. Once this roll is cast, any new roll will result in a draw or draws from a fresh Modified Zener Deck.
NOTES:
I have not yet figured out how to make a deck persist over multiple dice rolls. That is, each time a roll is called, the "deck" will, in effect, have all its cards available. It is, therefore, important for the GM using this method to draw all cards for a given event or place in the adventure at one go, i.e. if six cards are needed, draw all six and keep them aside until needed.
The dice roller will come up with all the settings shown configured already, but it is possible using the rc= option to specify a character name in the link. Please don't forget to select a character to roll before attempting the roll, or it will fail with an error message.
Example:
Draw 1 Zener Card from the Modified Deck for Chief Tinker [dice=1d25 rc=299435 text="Draw 1 Zener Card from the Modified Deck for Chief Tinker"]
{For more information about the rc= option, see section 1000 - Basic Stuff under message no. 8, titled
1002.24 - Character-Related Options.}
A roll of this type might have the following output in the dice roller log:
22:08, Today: Chief Tinker rolled 5 using 1d25.
which would be the equivalent of the card
Yellow Star.
A color for the dice roll text can be selected prior to the roll. I have not seen ways to add this feature to dice roll links as yet.
This message was last edited by the GM at 14:05, Sat 04 Aug 2018.