member, 599 posts
 Pretty, witty, and gay
 (married since 2011!)
Fri 8 Dec 2017
at 08:38
Dice Roller: Deck Of FATE?
Would it be possible to program a new custom special/system roller to emulate Evil Hat's Deck Of FATE? In addition to the 4dF result (+4 to -4), it also includes from one to three special icons (stars, moons, and eclipses) and two brief text blurbs which serve as inspiration for framing the outcome.

An example of five results, the sole +4 and the four +3s, with the order of the dice (as + and - on the physical cards), the number of special icons, and the text from each. (The colors are just to make the individual lines here more uniquely visible and have nothing to do with the actual desired output.) Icons are indicated by a numeral showing the quantity, followed by a letter showing the type (e.g 1M is one moon. 2S is two stars. 1M 1S is one moon and one star; eclipses only occur alone and in quantities of one).

+++++4 : 1E : Perfect Form / Incredible Luck
+++ +3 : 3M : All Lined Up / Sublime & Subtle
 ++++3 : 3S : Bullseye / A Good Day
+ +++3 : 2S 1M : Top Of The World / Got It Surrounded
++ ++3 : 2M 1S : Moment Of Truth / Eureka!

The simplest route would be to code it as a variant on the Magic 8-Ball, using 81 canned results rather than 20. Like other 'decks' already coded, there is no way to account for 'cards' previously drawn, but that's not a big deal. (It'd be too much of a pain to code, else I imagine you'd have done it already.) I don't know if the dice roller can accommodate as many characters as the longest output (above, the longest is ~50 characters; I don't know the longest result from the actual deck).
 member, 343 posts
 Wayfarer of the
 Western Wastes
Sat 30 Dec 2017
at 04:28
Dice Roller: Deck Of FATE?
In reply to Alyse (msg # 1):

No takers on this?

Incidentally, 4d3-8 has the same distribution of results as 4dF, if that helps any.

is a useful reference for checking out dieroll statistics.

The challenge in emulating a deck of cards with a roll of dice is that pulling from a deck usually implies sampling without replacement.  (If cards drawn are shuffled back into the deck before each succeeding draw, then that does not apply.)

If sampling without replacement is desired in this particular case, the best way to go is to make an array holding the 81 total possible results (ranging in this case the over the integer values from -4 to +4) as separate values, and just roll a d81, looking up the result.

This array could even include both the numerical result and the separate values for the faces of each die rolled (or symbols that would represent them).

Keep a log of successive d81 dierolls, excluding duplicate results by comparison to all previous dierolls, and re-rolling until the roll does not match any previous ones.

Seems like this would be simple enough to do in php, javascript, or C.  The trick would be integrating it into RPoL.

Huh.  There are Android and iPhone apps for this deck!
 member, 346 posts
 Wayfarer of the
 Western Wastes
Sat 30 Dec 2017
at 17:47
Dice Roller: Deck Of FATE?
Further noodling on this may have uncovered a way to emulate it, but it's a bit klunky:

Go ahead and set up a lookup table somewhere to interpret results.  This table should have 81 rows and six columns, and look something like:

d81 Result     FATE Dice Result   Symbol 1   Symbol 2   Symbol 3   Symbol 4
    1               ----            Moon       Moon       Moon       Moon
    2               0---           Eclipse     Moon       Moon       Moon
    3               -0--            Moon      Eclipse     Moon       Moon
    4               --0-            Moon       Moon      Eclipse     Moon
    5               ---0            Moon       Moon       Moon      Eclipse

und so weiter.  (Symbols may not be correct and are purely for illustrative purposes.)

Now, set up the dice roller like this, where N is replaced with the number of players:  [dice=Nd81 unique=yes record=yes reason="Draw N Cards from the Deck of Fate"]

This code will create a link that points to the dice roller and configures it to roll N unique d81 dice (no two with the same result) and display all dice.

For example, if you had four players who needed to pull from a Deck of Fate, you would set up the link as:

[dice=4d81 unique=yes record=yes reason="Draw 4 Cards from the Deck of Fate"]

You have to be a GM in the game where you create this link, though.