Funky dice (was Re: Generating Random numbers to conform a distribution)
Quentin Long
cubist at aol.com
Wed Jun 8 18:06:10 EDT 2022
From: Richard Gaskin <ambassador at fourthworld.com>
> When I was making a game for a friend last summer I fell in love with
> the Royal Game of Ur (RGoU)…> The dice used in RGoU are binary in range, tetrahedra with the faces
> blank and two of the four points painted.
> …> If you ever need to plot dice probabilities, this tool handles nearly
> any number of any type of dice you can think of (except Ur dice, it
> turns out, but oh well):
>> https://anydice.com/
Ur dice are functionally synonymous with coin-flips—basically, D2s with nonstandard markings. Rather than a 2-sided die marked "1" and "2", an Ur die is effectively a 2-sided die marked "0" and "1". So if you want to implement Ur dice in LiveCode, you have a couple of options:
any char of "01"
(the random of 2) - 1
Or, if you want to play with Ur dice in anydice.com:
output 1d2 - 1output 4d2 - 4
There are various nonstandard uses of dice in the roleplaying game hobby.
Example: The FATE rolegame uses six-sided dice, but they aren't marked with the first six integers. Instead, two faces are marked with minus signs; two faces are blank; and the final two faces, with plus signs. When you roll FATE dice, any die that comes up with a minus sign is counted as negative one, any die that came up blank is counted as zero; and any die that came up with a plus sign is counted as positive one. The standard FATE die-roll uses four FATE dice, hence has a range of -4 (if all four dice came up minus) to +4 (if all four dice came up plus). To implement FATE dice in LiveCode, this will do the trick:
(the random of 3) - 2
Or the anydice.com equivalent:
output 1d3 - 2output 4d3 - 8
Example: The Shadowrun rolegame (basically a mashup between cyberpunk and high fantasy) uses normal six-sided dice, but rather than adding up all the dice, you instead count the quantity of dice which came up either 5 or 6. That is, you have a 1/3 chance of getting a 1, and a 2/3 chance of getting 0. To implement Shadowrun dice in LiveCode, the following one-liner will do:
any char of "001"
I *think* anydice.com *ought to* be able to handle Shadowrun dice, but at present, I don't know what sort of syntax is required to make that happen.
"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the webcomic at [ http://www.atarmslength.net ]! If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ].
More information about the use-livecode
mailing list