Dice & D&D

Dice & D&D

Tabletop dice rolling, in the notation Avrae uses.

16 commands

Dice notation

Everything r!r (and /dnd roll’s expression field) understands. The slash command can build most of this for you from its options, but the notation is faster once you know it, and it is the same syntax Avrae uses.

Basics

1d20
One twenty-sided die. The leading 1 is optional; d20 works too.
4d6
Four six-sided dice, summed.
1d20+5
A flat modifier. Negatives work: 1d20-2.
1d20 + 1d4 + 2
As many terms as you like.
(1d4+1)*2
Parentheses and arithmetic: *, /, // all work.

Keep & drop

4d6kh3
Keep the highest 3, the classic ability-score roll.
4d6kl1
Keep the lowest 1.
4d6ph1
Drop the highest 1.
4d6pl1
Drop the lowest 1.
4d6k>3
Keep every die above 3 (k< and p> also work).
4d6k1
Keep only the dice that rolled exactly 1.

Rerolls

4d6rr1
Reroll 1s, repeatedly, until none are left.
4d6ro<3
Reroll anything below 3, once each, whatever it becomes.
4d6ra<2
Reroll below 2 and add the new die to the old one.

Exploding

4d6e6
Roll an extra die for every 6.
4d6e>4
Explode on 5 and up.

Bounds

1d20mi2
Treat anything below 2 as a 2 (Elven Accuracy, Reliable Talent).
1d20ma19
Treat anything above 19 as a 19.

Rolling your character

r!c stealth
Skill check, using the modifier your sheet worked out.
r!c dex
A raw ability check: the ability modifier alone, no proficiency.
r!c stealth str
That skill under a different ability, keeping your training. The PHB’s optional rule.
r!c perception adv
With advantage. Use dis for disadvantage.
r!c athletics +2
A one-off bonus. Order doesn’t matter: r!c athletics +2 adv.
r!s dex
Saving throw. Full names work too: r!s wisdom.
r!init
Initiative, from your sheet. Takes adv and a bonus like the rest.
r!a rapier
Attack and damage together; crits double the dice.
r!a greatsword -5 dmg+10
Great Weapon Master and Sharpshooter. A crit never doubles the flat bonus.
r!hp -7
Damage. r!hp +5 heals, r!hp full resets, r!hp temp 8 sets temporary.
r!cast fireball at 4
Rolls the save DC and the damage, upcast, and spends the slot.
r!cast fire bolt
Rolls the spell attack and the damage, scaled to your level.
r!slots
What’s left, per level.
r!death
A death saving throw, tallied. The naturals are counted for you.
r!spell misty step
The reference card, with no slot spent.
r!item chain mail
Cost, weight, armour class, properties.
r!rest
Long rest: hit points, every slot, half your hit dice.
r!rest short +2
Spend two hit dice to heal. Pact Magic slots come back too.
r!res
Ki, Rage, Superiority Dice: whatever your sheet lists, and what’s left.
r!use ki 2
Spend two. r!res ki +1 gives one back.
r!sheet
Your active character at a glance.

Labels & advantage

2d6[fire] + 1d8[cold]
Annotate parts of a roll: damage types, sources.
8d6 fireball
Trailing text becomes the roll’s title.
r!r 1d20+5 adv
Advantage. Use dis for disadvantage.

/dnd

group
Raven-chanOmni-chan

Tabletop dice rolling, in the same notation Avrae uses.

Arguments
  • expressionoptional string Dice to roll as notation. Supports keep/drop (kh, kl, p), rerolls (rr, ro, ra), exploding (e), bounds (mi, ma), [annotations] and a trailing comment. Leave blank to use the builder options instead.
  • dieoptional choice d4, d6, d8, d10, d12, d20 or d100. The builder alternative to writing notation.
  • diceoptional integer How many of that die (1–100, default 1).
  • modifieroptional integer Flat bonus or penalty, e.g. 5 or -2.
  • keepoptional choice Keep highest / Keep lowest / Drop highest / Drop lowest.
  • keep_countoptional integer How many dice to keep or drop (default 1).
  • reroll_belowoptional integer Reroll any die below this, once.
  • explodeoptional boolean Roll an extra die for every maximum face.
  • minimumoptional integer Treat any die lower than this as this.
  • maximumoptional integer Treat any die higher than this as this.
  • advantageoptional choice Advantage or Disadvantage. Rolls the leading d20 twice.
  • timesoptional integer Roll the same thing up to 20 times, with high/low/average (rolling stats).
  • labeloptional string Name the roll. Shown as the title.
  • secretoptional boolean Show the result only to you.
Subcommands
  • /dnd roll Roll dice: 1d20+5, 4d6kh3, 2d6[fire], 8d6 fireball.
Examples
/dnd roll expression: 1d20+5/dnd roll die: d6 dice: 4 keep: Keep highest keep_count: 3 times: 6/dnd roll expression: 8d6 fireball/dnd roll expression: 1d20+7 advantage: Advantage label: Stealth

Two ways to roll, and they are mutually exclusive: write notation in expression, or build it from die/dice/keep/explode and the rest. The builder compiles to notation and the result always shows what it rolled, so it doubles as a way to learn the syntax. Powered by the MIT-licensed d20 library, the same dice parser Avrae uses. Natural 20s turn the embed gold, natural 1s red. Restrict it to a channel with /blacklist add dnd. Not to be confused with /roll, which is the gambling command.

c

prefix
Raven-chanOmni-chan

Roll a skill or ability check for your active character.

Aliases: check skill

<prefix>c <skill|ability> [ability] [adv|dis] [+N]
Examples
r!c stealthr!c dexr!c stealth strr!c perception advr!c sleight of hand +2

Reads the modifier your character sheet already worked out. Build one at /dnd and set it active. Three things it takes: a skill (r!c stealth), an ability on its own for a raw check with no proficiency (r!c dex), or both, which is the Player’s Handbook’s optional rule for rolling a skill under a different ability. You keep your training and swap which score it rides on, so r!c stealth str is shoving through a crowd rather than sneaking past it. Either order works. Skill names match loosely: stealth, sleight, animal and perc all land, but an ability has to be named in full, which is what keeps r!c int an Intelligence check and r!c intim Intimidation. adv/dis and a one-off bonus can come in either order.

s

prefix
Raven-chanOmni-chan

Roll a saving throw for your active character.

Aliases: save

<prefix>s <ability> [adv|dis] [+N]
Examples
r!s dexr!s wisdom dis

Takes str/dex/con/int/wis/cha or the full ability name.

init

prefix
Raven-chanOmni-chan

Roll initiative for your active character.

Aliases: initiative

<prefix>init [adv|dis] [+N]
Examples
r!initr!init advr!init +5

Uses the initiative bonus on your sheet, which the builder works out from your Dexterity plus anything you added. Takes adv/dis and a one-off bonus like every other roll.

a

prefix
Raven-chanOmni-chan

Roll an attack and its damage from your character sheet.

Aliases: attack

<prefix>a [weapon] [adv|dis] [+N] [dmg+N]
Examples
r!ar!a rapierr!a shortbow advr!a greatsword -5 dmg+10

Rolls to hit and damage together. A critical doubles the damage dice and not the modifier; a natural 1 rolls no damage. Weapon names match loosely, and no name at all uses your first attack. dmg+N adds to the damage only, which is how Great Weapon Master and Sharpshooter are typed: -5 dmg+10. It is a choice you make per swing rather than a number on your sheet, and a crit never doubles it.

hp

prefix
Raven-chanOmni-chan

Track your character’s hit points.

<prefix>hp [-N | +N | temp N | full]
Examples
r!hpr!hp -7r!hp +5r!hp temp 8r!hp full

Temporary hit points soak damage first. Dropping below zero keeps the negative rather than clamping, since it matters for death saves. Current HP lives outside the sheet, so editing your character on the site never resets it.

death

prefix
Raven-chanOmni-chan

Roll a death saving throw, and keep the tally.

Aliases: ds deathsave

<prefix>death [reset]
Examples
r!deathr!death reset

Rolls one d20 against DC 10 and remembers where you are, which is the whole point: the two rules a table gets wrong are the two naturals, and they are not symmetrical. A natural 20 is not a success, it puts you back up on 1 hit point and wipes both tallies; a natural 1 counts as two failures, which is what makes dying to one unlucky roll possible. Three successes is stable, which is not awake: you are still unconscious at 0 and come round on 1 hit point after 1d4 hours, or the moment anybody heals you. Taking damage while already at 0 is an automatic failure rather than a roll, two from a critical hit, and damage of your whole hit point maximum kills outright whatever the tally says, so r!hp -6 keeps the count for you. Any healing at all clears both sides, and so does a long rest.

spell

prefix
Raven-chanOmni-chan

Look a spell up. No slot spent.

Aliases: sp lookup

<prefix>spell <name>
Examples
r!spell fireballr!spell misty stepr!spell counterspell

The same SRD 5.1 card r!cast prints, with the rolling and the bookkeeping left out. Checking a range or a duration mid-fight used to mean casting the spell and then putting the slot back by hand. No active character needed.

item

prefix
Raven-chanOmni-chan

Look an item up: cost, weight, damage, armour.

Aliases: gear

<prefix>item <name>
Examples
r!item longswordr!item chain mailr!item thieves tools

SRD 5.1 weapons, armour and gear. It prints only what the item actually has, so a longsword shows its damage and no armour class and a coil of rope shows neither. Costs come out as the coin you would be handed rather than as decimal gold. No active character needed, which is the point for a DM.

cast

prefix
Raven-chanOmni-chan

Cast a spell: rolls it, and spends the slot.

<prefix>cast <spell> [at N] [adv|dis] [+N]
Examples
r!cast fireballr!cast fire bolt advr!cast magic missile at 3r!cast cure wounds at 2

Looks the spell up in the bundled SRD 5.1 and rolls it. A spell that calls for an attack gets one, at your spell attack bonus; a spell that calls for a save prints your DC and which ability. Damage and healing are rolled, upcast when you cast from a bigger slot, and cantrips scale with your level at 5th, 11th and 17th. A critical doubles the dice. "at N" upcasts and casting from a slot below the spell’s level is refused; cantrips spend nothing. The dice come out of the spell’s own text, so the handful the SRD describes in a way that cannot be read (Delayed Blast Fireball, Guardian of Faith, Spiritual Weapon) print their description and roll nothing, exactly as before. When a bigger slot changes something other than dice, like Magic Missile’s extra dart, it rolls the base and says so rather than quoting a number it cannot stand behind.

slots

prefix
Raven-chanOmni-chan

Show your remaining spell slots.

<prefix>slots

rest

prefix
Raven-chanOmni-chan

Rest. Long by default, short on request.

Aliases: longrest

<prefix>rest [short [+N]]
Examples
r!restr!rest shortr!rest short +2

A long rest restores your hit points, every spell slot, and half your hit dice rounded down, which is the rule rather than all of them. A short rest is different in kind: nothing happens automatically, you choose how many hit dice to spend (r!rest short +2) and each rolls its die plus your Constitution modifier. Spell slots only come back on a short rest for Pact Magic, which the builder asks about rather than guessing from your class, because a multiclass Warlock has two pools and a sheet has one.

res

prefix
Raven-chanOmni-chan

Show your character’s resources and what is left of them.

Aliases: resource resources

<prefix>res [name] [+N|-N]
Examples
r!resr!res ki +1r!res rage -1

Anything with a number of uses that comes back on a rest: Ki, Rage, Superiority Dice, Channel Divinity, Second Wind, Bardic Inspiration. You list them in the builder with a count and which rest restores them, so the bot needs no per-class knowledge and homebrew works the same as anything else. With no name it shows them all; with one it adjusts, so r!res ki +1 hands a use back. Spending is r!use, because a signed number on a command called “use” reads both ways.

use

prefix
Raven-chanOmni-chan

Spend one of your character’s resources.

<prefix>use <resource> [count]
Examples
r!use kir!use ki 2r!use second wind

Names match loosely, the way skills do: ki, superiority and sup all land. An ambiguous name is refused rather than guessed at, because spending the wrong resource is not something you can undo from here. Asking for more than you have spends what is left and says so.

sheet

prefix
Raven-chanOmni-chan

Show your active character at a glance.

Aliases: mychar

<prefix>sheet

Abilities, AC, HP, initiative, save proficiencies, trained skills, attacks and spell slots.

r

prefix
Raven-chanOmni-chan

Roll dice by prefix, the same engine as /dnd roll.

Aliases: roll dice

<prefix>r <expression> [adv|dis]
Examples
r!r 1d20+5r!r 1d20+5 advr!r 4d6kh3

Notation only. The builder options are what the slash command is for. Add adv or dis on the end for advantage/disadvantage. Your command message is deleted once the result posts (where the bot can manage messages); a roll that fails to parse keeps it, so you can edit and retry. All the r! dice commands honour /blacklist add dnd.