D20 Source

Updated whenever

Bones: Ruby IRC Dicebot

Bones is a new IRC-based dicebot allowing you to play dice-based roleplaying games online. Bones responds to complex dice notation including multiple sets of rolls, and adding or subtracting dice. Bones is written in Ruby, and released here for free.

Bones works by joining the channel and listening for Dungeons & Dragons style dice notation. For example, if you type “1d20+1 attack roll”, Bones may reply “attack roll: 10 [1d20=9]“. It’s about as simple as it looks. You can use Bones with any roleplaying game that uses normal dice.

[Download Bones v0.0.3]


  • Complex rolls: Bones can interpret complex dice notation, including multiple dice, multiple sets of dice, adding or subtracting any number of dice or integers, and comments.
  • Show ‘natural’ rolls: When rolling any number of dice, the original die rolls are also shown, just as real dice would. No more baffling over natural twenties!
  • Private rolls: In addition to responding to public rolls, Bones allows game masters to make rolls privately via /msg or /notice.
  • Character generation: Bones supports elementary D&D chargen.
  • Multiple channels: Bones can be configured to join multiple channels or networks at once.
  • Randomness algorithm: Using a modified Mersenne twister algorithm with a period of 2**19937-1, Bones’ output is about as random as is computationally feasible in real-time without specialist hardware.
  • Free: Like most IRC bots, Bones is open source and released free of charge.

Bones still has a few bugs, and hasn’t been tested on every IRC network.


Bones will run on any Ruby-equipped computer or server.

  1. If you don’t already have Ruby installed, download it here (you probably want Ruby on Windows: One-Click Installer)
  2. Download and extract Bones to a folder somewhere, and edit “bones-go.rb” to set your bot’s name, the server you’d like it to join, and the channels.
  3. Setup complete! Double-click “bones-go.rb” and if all went well, Bones will connect.


Q: What is the dice notation?
I’ll illustrate the dice notation used with a few examples.

  • 1d20 – Roll one twenty-sided die.
  • 2d6 – Roll two six sided dice, add the result.
  • 2#1d6 – Roll two six-sided dice separately.
  • 1d20+5 – Roll 1d20 and add 5. You can also subtract.
  • 1d20+1d6+4 – Dice can be added or subtracted.
  • 1d20+4 attack roll – Roll 1d20+4, designated “attack roll”.
  • 1d20;2d6 – Make two rolls in the one line.

You can compound these effects. A complex roll line might go, “2#1d20+7 attack roll; 1d20+2 secondary attack; 2#1d8+4 primary damage; 1d8+2 secondary damage”.

Q: Why another dicebot? Aren’t there dozens already?
Yes. I’ve used other dicebots, but every bot I tried I found lacking. One didn’t support adding dice to other dice, another only allowed you to add one digit but not two, and another didn’t show the original rolls so you couldn’t straightforwardly tell when someone rolled a natural 20, and so on.

After putting up with imperfect dicebots for a year, I decided I would write my own. Several months of procrastination later, I succeeded. It’s not perfect, either, but it has all the features that my exacting players demand.