The Dice module provides virtual dice rolling functionality with support for D&D style dice notation. Users can roll various types of dice with modifiers, exploding dice, and other advanced features.

Features

  • Standard polyhedral dice (d4, d6, d8, d10, d12, d20, etc.)
  • Dice modifiers (+/- values)
  • Exploding dice
  • Keep/drop highest/lowest dice
  • Fudge dice (dF)
  • ORE-style dice rolling
  • Configurable rate limits and throttling
  • Support for multiple platforms and networks

Usage

Send a message beginning with roll followed by dice notation to any channel where the bot is present (providing any platform prefix if required):

  roll 2d6
  

The bot will respond with the individual dice rolls and total:

  rolling 2d6 (3,5) 8
  

Standard Polyhedral

Roll X dice with Y sides, optionally adding or subtracting a modifier:

  roll 2d6        → rolling 2d6 (3,5) 8
roll 1d20+5     → rolling 1d20+5 (17) 22
roll 3d8-2      → rolling 3d8-2 (4,7,2) 11
  

Omitting the die count rolls a single die:

  roll d20        → rolling 1d20 (14) 14
  

Shorthand (Bare Number)

A bare number is shorthand for rolling a single die with that many sides:

  roll 20         → rolling 1d20 (14) 14
  

Exploding Dice

Append ! to make dice explode — when a die rolls its maximum value, roll it again and add the result. This chains as long as the max keeps coming up.

  roll 3d6!       → rolling 3d6! (6,2,6,4,3) 21
  

The explosion threshold equals the number of sides on the die. Each exploded die that hits max triggers another reroll, up to the configured maxDice limit.

Keep and Drop

Use keep/drop modifiers to select a subset of the rolled dice:

  • kN — Keep the highest N dice
  • kdN — Keep the lowest N dice (equivalently, drop the highest N)
  roll 4d6k3      → rolling 4d6k3 (2,5,4,6) 15
roll 2d20k1     → rolling 2d20k1 (8,15) 15    (advantage)
roll 2d20kd1    → rolling 2d20d1 (12,4) 4      (disadvantage)
  

Alternate Keep Syntax

You can also use the word keep instead of the k suffix:

  roll 4d6 keep 3 → rolling 4d6k3 (1,6,3,5) 14
  

Fudge Dice

Fudge dice (dF) have three faces: +, o (zero), and -. The result is the numeric sum, where + = 1, o = 0, and - = -1.

  roll 4dF        → rolling 4dF (+,o,-,+) 1
  

Fudge dice are commonly used in Fate-based RPGs. A typical roll is 4dF, producing results from -4 to +4.

ORE (One-Roll Engine)

Use the XoreY notation to roll One-Roll Engine dice. X dice are rolled with Y sides each, and the results are grouped into matching sets displayed as width×height (e.g., 3x7 means three dice showing 7).

  roll 9ore10     → rolling 9ore10 (3x7,2x4,1x2,1x6,1x9,1x3)
  

The number of dice is capped at the number of sides (rolling more dice than faces can’t produce wider sets). ORE is used in games like Wild Talents and Nemesis.

Notation Reference

NotationMeaning
XdYRoll X dice with Y sides each
XdY+ZRoll and add modifier Z
XdY-ZRoll and subtract modifier Z
XdY!Exploding dice (reroll on max)
XdYkNKeep highest N dice
XdYkdNKeep lowest N dice (drop highest)
XdY keep NAlternate keep syntax — keep highest N dice
XdFRoll X Fudge dice (+, o, -)
XoreYRoll X ORE-style dice with Y sides
NShorthand for 1dN

Configuration

The dice module reads its configuration from eevee’s shared module config system. No environment variables beyond the standard eevee ones are required.

Options

KeyTypeDefaultDescription
ratelimitRateLimitConfiglibeevee defaultRate limiting for the roll command
maxDicenumber64Maximum number of dice in a single roll
maxSidesnumber65535Maximum number of sides per die

Example Configuration

  botModules:
- name: dice
  spec:
    size: 1
    image: ghcr.io/eeveebot/dice:latest
    pullPolicy: Always
    metrics: true
    metricsPort: 8080
    ipcConfig: my-eevee-bot
    moduleName: dice
    moduleConfig: |
      ratelimit:
        mode: drop
        level: user
        limit: 10
        interval: 1m
      maxDice: 100
      maxSides: 1000
  

Environment Variables

VariableDefaultDescription
HTTP_API_PORT9000Port for metrics and health check HTTP server