Ok, I'm still a little confused. This should have output something
like:
rand(16)+3 rand(16)+3 rand(16)+3
Okay, that output is bogus. However, it is not rand(16) at all. It's:
(1..3).inject(0) { |sum, ii| sum + (rand(6) + 1) }
The fact that it is three 6-sided dice rolled is important (and is
perhaps more important in a PRNG) because the weighting is a little
different. With rand(16) + 3 you're just as likely to get 3 as you are
18. With three rand(6) + 1 values, you're going to get much closer to a
bell curve than a straight probability line. This is a good thing,
because in D&D, 10 is described as absolutely average and 12 is the
high-end for most people. Adventurers, of course, can go to 18, but even
16 is good. Gandalf would be an 18 INT; Sam might be an 11 INT (INT =3D=3D
"intelligence").
What is the -4 and the /d4 do?
(5d5-4)=09=3D> Roll a 5-sided dice 5 times and take the sum, subtract 4.
=09=09=09=3D> Result will be between 1 and 21.
(16 / d4)=09=3D> Roll a 4-sided dice and divide 16 by the result.
=09=09=09=3D> Result will be 4, 5, 8, or 16.
d=09=09=09=3D> Roll a [4, 5, 8, or 16]-sided dice 1-21 times and total.
=09=09=09=3D> The total result will be between 1 and 336.
+3=09=09=3D> Add three to the result.
=09=09=09=3D> The final result will be between 4 and 339.
Does the +3 apply to (5d5-4)d(16/d4) or to (16/d4) only, assuming it
matters since I don't know what this stuff does.
d binds tighter than addition.
So d100 =3D=3D d% =3D=3D d00
Yes.
100 =3D=3D 00
No. d00/d%/d100 all refer to values from 1 to 100. It should be
considered impossible to get a value of 0 from dice. Strictly speaking,
d100 should be a special case simulated where you are rolling two d10
values and treating one of them as the 10s and one of them as the 1s.
Again, it results in a slightly different curve than a pure d100 result
would be. One gaming system developed by Gary Gygax after he was ousted
from TSR in the mid-80s used what he termed d10x, which was d10*d10,
resulting in values from 1 - 100 with a radically different probability
curve than a normal d100.
The "natural" dice created are:
d4, d6, d8, d10, d12, d20
Novelty dice created in the past include:
d30, d100
The latter is quite unwieldy.
Strictly speaking, it is not possible to make a die (polyhedron) with an
odd number of faces, but d5 can be simulated by doing a rounded d10/2 or
d20/4.
-austin