And now for something completely different

Posted: September 3, 2010 in Uncategorized

Sorry for not posting anything on Wednesday. I’ve been really busy with homework and stuff. Plus my card that gets me into the game dev lab that has the game I’m working on a review of broke. So, I come bearing something a little different. I come bearing my first piece of open source, gaming supplement. I’m a big fan of the World of Darkness setting White Wolf games. I’m currently playing in a Mage: The Ascension game that one of my friends is running. For that, I ended up spending a little bit of free time working on making a command-line dice rolling program that can handle World of Darkness mode. In the World of Darkness systems, only 10-sided dice are rolled. All rolls are made against a difficulty. If you can beat this difficulty, it counts as a success. On a roll of 10, the die is said to explode, meaning that it counts as a success and you roll it again. A roll of 1 subtracts from the total successes. For example, lets say I’m rolling 4 dice at a difficulty of 6 and I rolled 10 8 4 1. Well, that 10 gets rolled again. This becomes a 6. So, you’ve got 3 successes and a 1. That’s a total of 2 successes. Pretty simple. So I made a program that can roll dice normally or go into World of Darkness mode and calculate success and reroll 10s. So, here you go!

The code in full is available at diceroller and is a bashscript program. Save it as a program called diceroller with no  extension. Here is the proper usage:

diceroller 10 d 10 –wod    (to roll 10 10-sided dice in World of Darkness mode)

diceroller 1 d 20      (to roll 1 20-sided die in normal mode)

Any numbers can be put in as arguments. The ‘d’ is merely there for my own sanity. Feel free to add anything to this program that you would like or to ask for additions if you’d like me to develop them myself. I’m more than happy to continue developing this program if there are things people would like.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s