JDice: Java Dice Roller
JDice is a java program to roll dice, primarily intended for roleplaying.
It was desinged with d20 style gaming in mind, but is likely applicable
to other systems.
While many dice rolling programs exist, JDice can store a list
of common rolls that you will make. JDice also has buttons
for each of the common dice for rapid accessability.
Usage
When JDice is run with no arguments, it will open with a window that
looks like this:
Clicking on any of the dX buttons down the right will result in
rolling 1dX. The results are displayed in the list, with the most
recent roll at the top, highlited:
Note that the results list can be cleared with the "Clear"
button in the right pane.
JDice can roll more complicated sets of dice. To use this
feature, enter the dice you want to roll in the area at the
top of the window. Details of the input format can be found
in the dice strings section.
In case it matters, JDice reports the individual dice rolls as well
as the total result for each roll that it makes. The total is reported
in the middle, with the => and <= pointing at it, the individiual rolls
are reported in square brakcets, followed by any bonus or penalty.
As you may have noticed, this area is not just a text entry box,
it is also a drop down list. JDice can load a file with a list
of dice rolls to make. (This feature can be especially useful
for players who do not remember how many dice the various spells
their high level casters have). The use this feature, run JDice
with an argument specifying the file to load. The file should
have one entry per line of the format Name = Dice Info,
where Dice Info has the same format as would be entered
in the text box. The name may be anything you want, and is not
required. For example, if JDice were directed to load the following
file:
Scorching Ray = 3 x 4d6
Fireball = 10d6
Cone of Cold = 15d6
Energy Drain = 2d4
Time Stop = 1d4 +1
Shout = 5d6
then dice rolls for those spells would appear in the list,
allowing them to be rapdily selected and rolled:
JDice will roll the dice in the top area whenever you press ENTER in it,
select a new item from the drop-down list, or click
"Roll Selection".
Dice Strings
For those of you who like formality and understand BNF grammars,
JDice understands dice strings which correspond to the following
grammar:
roll::= xdice ; roll
| xdice
xdice::= num 'x' dice
| dice
dice::= die dtail
| die bonus dtail
dtail::= & dice
| /* nothing */
die::= 'd' num
| num 'd' num
bonus::= '+' num
| '-' num
num::= (a number)
For everyone else, the simplest dice strings JDice will accept
are ones like d20, 3d6, or
2d8+3. Dice strings like this specify exactly what you
would expect-roll 1d20, 3d6, or 2d8+3.
JDice also lets you combine together multiple types of dice in
one roll- for example, if you need to roll 2d6 and a d10, you can do that.
To do this, use & between the different dice- for example, 2d6 & d10 .
Another thing that you might want to do is have the same roll many times.
For example, suppose you want to roll 4 separate d20s, you can do
4xd20 This results in 4 separate rolls of a d20,
which are not added together (for example, 4 different checks).
Sometimes, you may want to have different types of independent rolls
grouped together. This can be accomplished with the semi-colon (;).
For example, suppose that you want to describe a fighter's full attack,
which has 3 attacks at different bonuses. You could specify the to-hit rolls
as d20+25; d20+20; d20+15.
Note that these features can be combined- for example, if the fighter
were hasted, and thus received an extra attack at her top attack
bonus, you could specify 2xd20+25; d20+20; d20+15
Another possiblilty would be 2x d6 & d4 +3 ; d10 -
which would mean that (d6+ d4+3) should be rolled twice, and then d10
should be rolled once, for a total of 3 results.
These more complicated dice strings are probably not as practical
when typing in dice strings interactively, but can be quite
handy if saved in a file for common tasks (full attacks, attack
damage, spell damage, etc).
Dice strings are case-insenstive and ignore white space.
Download
JDice is written in Java and is available under the terms of the
GPL.
Version 0.1 alpha
Source
Binary
This software is currently under development.
At present,
it has no useful error reporting on an incorrectly formatted
dice string, nor any in-program way to create/modify data
files.
These features may be included in future versions.
Copyright 2006, Andrew D. Hilton
a d h i l t o n@c i s . u p e n n . e d u
Last modified: Sat Jun 10 20:53:32 EDT 2006