# Rolly - Dice rolling pluging

**URL:** <https://forum.mattermost.com/t/rolly-dice-rolling-pluging/6180>\
**Category:** Uncategorized\
**Created:** [November 18, 2018, 7:07pm UTC](https://forum.mattermost.com/t/rolly-dice-rolling-pluging/6180 "2018-11-18T19:07:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taffer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/taffer/32/2460_2.png) [@Taffer](https://forum.mattermost.com/u/Taffer)\
**Post date:** [November 18, 2018, 7:07pm UTC](https://forum.mattermost.com/t/rolly-dice-rolling-pluging/6180/1 "2018-11-18T19:07:13Z")

</div>

I’ve written [a plugin to handle dice rolling](https://github.com/Taffer/ca.taffer.mm-rolly/releases), inspired by [moussetc/mattermost-plugin-dice-roller](https://github.com/moussetc/mattermost-plugin-dice-roller) and [DiceBot](https://dice-b.appspot.com/) for Slack.

Supports “any” [reasonable](https://en.wikipedia.org/wiki/Dice_notation) dice rolling request:

- _x_d_y_ or _x_D_y_ to roll a _y_ sided die _x_ times
- modifiers: _x_d_y_+_z_ (supported modifiers: +, -, x or \*, /)
- exploding dice (for every max value, roll and add): _x_d_y_!
- _x_d% - same as _x_d100
- _x_dF - roll [FUDGE](https://en.wikipedia.org/wiki/Fudge_%28role-playing_game_system%29) dice
- _x_d_y_\<_z_ - discards the lowest _z_ rolls (so 4d6\<1 would return a value between 3 and 18)
- _x_d_y_\>_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.

---

<div class="post-metadata">

**Author:** ![Smanxity](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Smanxity](https://forum.mattermost.com/u/Smanxity)\
**Post date:** [September 25, 2023, 11:37am UTC](https://forum.mattermost.com/t/rolly-dice-rolling-pluging/6180/2 "2023-09-25T11:37:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Taffer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/taffer/32/2460_2.png) [@Taffer](https://forum.mattermost.com/u/Taffer)\
**Post date:** [September 25, 2023, 4:16pm UTC](https://forum.mattermost.com/t/rolly-dice-rolling-pluging/6180/3 "2023-09-25T16:16:41Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Freexorck](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/freexorck/32/7225_2.png) [@Freexorck](https://forum.mattermost.com/u/Freexorck)\
**Post date:** [September 28, 2023, 10:07am UTC](https://forum.mattermost.com/t/rolly-dice-rolling-pluging/6180/4 "2023-09-28T10:07:56Z")

</div>

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](https://flipsimu.com/dice-roller/roll-d20/) 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.

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [October 5, 2023, 7:36pm UTC](https://forum.mattermost.com/t/rolly-dice-rolling-pluging/6180/5 "2023-10-05T19:36:36Z")

</div>

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. 🙂

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. 🎲
