Mattermost Peer-to-Peer Forum

Rolly - Dice rolling pluging


#1

I’ve written a plugin to handle dice rolling, inspired by moussetc/mattermost-plugin-dice-roller and DiceBot for Slack.

Supports “any” reasonable dice rolling request:

  • xdy or xDy to roll a y sided die x times
  • modifiers: xdy+z (supported modifiers: +, -, x or *, /)
  • exploding dice (for every max value, roll and add): xdy!
  • xd% - same as xd100
  • xdF - roll FUDGE dice
  • xdy<z - discards the lowest z rolls (so 4d6<1 would return a value between 3 and 18)
  • xdy>z - keeps the best z rolls (so 4d6>1 would return a value between 1 and 6)

If x isn’t specified, it defaults to 1. If y is less than 2, it defaults to 2. If you specify a modifier, you must also specify a z value.

Nerd combos:

  • dnd - same as 3d6 six times (standard D&D or Pathfinder)
  • dnd+ - same as 4d6<1 six times (common house rule for D&D or Pathfinder)
  • open - roll d%, if it’s >= 95, roll again and add, repeating if necessary

Number of dice per roll will be limited to 100 so malicious users can’t flood the channel with dice output.

Number of rolls per request (/roll 1d6 2d6 ... n) will be limited to 10 so malicious users can’t flood the channel with dice output.