Rolly - Dice rolling pluging

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.

2 Likes

Considering this thread is from 2018, I’m curious how the plugin has evolved over the years. Have you added more ‘nerd combos,’ or perhaps some other nifty features? Would love to hear more!

1 Like

I haven’t actually touched it since the original release; I moved on from the company where we were using Mattermost a year or so ago. Hopefully it still compiles/works!

1 Like

You mention that the number of dice per roll will be limited to 100, which seems like a fair safety measure against malicious usage. The 10-roll request limit also makes sense for the same reason. Overall, a well-thought-out plugin!
Since we’re on the topic of dice-rolling, I recently came across a site that offers a simple D20 roll among other types of rolls. It might not have the myriad features that your plugin boasts, but it’s quite handy for quick, simple rolls when needed. Perhaps you could even consider some of their UI elements for inspiration in future updates of your plugin.

This is awesome, @Taffer! Really nice work here, and it’s really cool to see interest in the plugin getting a resurgence here on the forums. :slight_smile:

I’m gonna go ahead and move this thread over to our “Community” forum category so that it doesn’t get super buried under a bunch of troubleshooting threads again. :game_die: