Over the last week or so I decided to put together a dice roller and standard dice notation parser in PHP, it's very basic right now, but it's also a great little program that you can put into almost any other system that uses PHP. I'm effectively done with this part of it and I'm going to work on a ShadowRun Dice Roller based on this one and then maybe work on a PHPBB3 Dice Roller from this as well.
Current Feature list for 1.0 (Completed and Ready for Download)
4 Math Modifiers of your choice (addition, subtraction, multiplication, and division)Modifiers are applied as they are written in notationKeep High and Low function (keep is defaulted to high)Compare and Threshold (Threshold only counts the number of die that return true)Average of Rolls before Modifiers (with rounding options of up, down, and normal)Fudge Results rolling option (FUDGE works on a -x...+x scale instead of a 0 or 1... +x scale)a rolling option to add modifiers directly to die instead of the total (this doesn't throw off Average)Almost any time you can put a static number, you may put a dice rollKeep High is k# or kh#, while Keep Low is kl#, you can have both keeps in a dice notation.
Compare use the greater than, less than, or equal to symbols. Less than and greater than or equal to act like less/greater than or equal to.
How to Use in most basic form.
$dice = new Dice();
$dice ->parseDice("StringOfDiceNotation");
$dice->printDice();
I would give examples of Standard Notation, but for some odd reason Blogger doesn't like the some of the symbols used in it...
For those who wish to download this dice roller for your own testing by all means.
Download MZ's Dice Roller (5.51kb) MediafireComments are Welcomed and hopefully they can give me ideas for my dice roller and maybe give me some help on any bugs you find (I hope you don't find any!)