Typically, most dice bots use k or kh for keep highest, and kl for keep lowest.
4d6kh3 / 4d6k3 would let you keep the highest three dice of four rolled, whereas rolling 2d20kl1 would be rolling twice and taking the lowest.

1 Like

I think kh or kl would be easiest to use as well.
@valentine.195 I like the pipe method as well.

Do you have a plugin for creating random tables that a user can fill? Perhaps something like your dice roller where you can click a button and the results change? Just a thought. Thank you.

1 Like

Not yet, but that’s on my list too.

2 Likes

Great! I’m really enjoying the Dice roller. I’m going to try it in my upcoming game.

For this vault, I’m imagining a customizable DM screen that’s like a Control panel full of useful information and interactive tables and menus.

I need to figure out your maps leaflet plugin next.

I wonder if anyone has made any generic PC Sheets too.

Thanks for the great plugin. I’ll keep looking for more updates.

1 Like

2.0.0 released!

Added several dice modifiers. More are planned, including conditional modifiers / pass & fail conditions.

If a modifier has a parameter, it will default to 1 if not provided.

Available modifiers at the moment:
Min/Max: Xd[Y, Z] - Roll a dice with minimum Y, maximum Z.
Keep Highest:k{n}/kh{n} - Keep highest {n} dice.
Keep Lowest: kl{n} - Keep lowest {n} dice.
Drop Lowest: d{n}/dl{n} - Drop lowest {n} dice.
Drop Highest: dh{n} - Drop highest {n} dice.
Explode - !{n}, !i - Explode dice {n} times. If i is provided, will explode “infinitely”
Explode & Combine: !!{n}, !!i - Exploded dice are summed in the display
Re-roll: r{n}, ri - Re-roll a minimum dice {n} times. If i is provided, will re-roll “infinitely” (capped at 100).

3 Likes

Nice. This is a pretty amazing plugin.

I haven’t had the need to use dice like this for a good many years. This plugin is so awesome I had to install it just for fun!

It’s amazing to see what kinds of things people come up with. Well done @valentine.195 !!

@Erisred, I’m using this plugin for the sessions I’m running, for prep and play.

Also, there’s a type of play option called solo play for ttrpgs (table top rpgs). Look it up. There’s two main reddits devoted to it. It’s pretty cool. I’ve actually been using the solo play tools in my games and to test my homebrew ruleset and adventures.

You might like it if you have any systems you enjoy playing, but not a gaming group.

@valentine.195 Keep up the good work. Thanks for the 2.0 update. It’s working pretty well.

1 Like

@valentine.195
Is there a way for this plugin to work on the obsidian publish site via web?

It works in obsidian desktop and mobile, but not when I publish it and view it on obsidian publish.

Thank you!

Not sure–I don’t have Obsidian publish. Do other plugins work on publish?

Hello! I just released 3.0.0, which added support for the following:

  1. Fudge/fate dice (XdF)
  2. Percentile dice (Xd%)
  3. Negative dice (Xd-Y or Xd[-Y, Z])
  4. Chainable conditions on explode and re-roll modifiers:
    • This allows you to change what is exploded or re-rolled. For example, instead of re-rolling minimum values, you can use 1d2r=2 to re-roll rolls equal to 2.
    • Supports =, != (or =!), <, >, <=, and >=

The last few features I’m currently thinking about adding are a way to add pass/fail states to both the dice-roll results and the overall total, and a side-bar dice roller or command so you don’t have to put everything in the text of a note to roll it.

Let me know if there’s any other features you’d like to see added!

2 Likes

Hi Valentine, thank you for this plugin! I’m having fun playing with it.

I think there may be a bug. I have a page with the content:

`dice: 3d4 + 3`

and rendering the page crashes with the following error:

Error: Unexpected character at index 4: 3
    at Lexer.defunct (eval at <anonymous> (app.js:1), <anonymous>:53:11)
    at Lexer.lex (eval at <anonymous> (app.js:1), <anonymous>:135:41)
    at DiceRoller.parse (eval at <anonymous> (app.js:1), <anonymous>:1628:36)
    at DiceRoller.parseDice (eval at <anonymous> (app.js:1), <anonymous>:1548:14)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:1352:53)
    at NodeList.forEach (<anonymous>)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:1345:26)
    at Function.t.postProcess (app.js:1)
    at t.postProcess (app.js:1)
    at p (app.js:1)

A dice phrase without addition works fine, e.g. dice: 3d4

Mine is broken as well. I have addition in most of mine for custom rolls. Without addition, it works fine. :frowning: Let us know what you find. Thank you.

Update: It’s broken on mobile (android) as well.
Obsidian Publish: is not working as well.

All: Do i need to add any code to the top or bottom of a note to make it work on obsidian publish.

@valentine.195 Since you are developing plugins, perhaps Obsidian will give you a free publish account to test your plugins? It might be worth inquiring.

Thank you again. :slight_smile:

Looks like it could be an update related to 3.0.0 if it just broke. Sorry about that. I’ll try to fix it ASAP.

For now if you need it, you can downgrade to 2.0.0 manually from the GitHub releases page.

No worries. Thank you. I’ll wait for the next push. If not, I’ll pull it from github.

3.0.1 released

  • Fixed bug related to static number parsing.

Should work now. Let me know if you run into any other issues - v3.0.0 was a pretty big structural re-write to make it easier to handle chained modifiers and conditions, but I obviously missed some stuff in my testing.

1 Like

It works on win10 and android mobile. Thank you for the quick updates!

Hello everyone!

Hope the plugin has been working well for you.

I had a little bit of time today, so I sat down and integrated a feature I really wanted for my DnD games: random tables!

Update to version 4.0.0 and refer to the documentation here on how to use this new feature.

Happy rolling!

1 Like

Hi valentine.195, thank you for making this! I’ve been eagerly looking forward to table-based rolling!

Unfortuantely I get a bug when I try to use it. For this page “Untitled”:

| 1d6 | Fruit     | Color  |
| --- | --------- | ------ |
| 1   | Apple     | Red    |
| 2   | Orange    | Orange |
| 3   | Banana    | Yellow |
| 4   | Lime      | Green  |
| 5   | Blueberry | Blue   |
| 6   | Grape     | Purple |
^fruit-and-color-table

`dice: [[Untitled^fruit-and-color-table]]`

I expected to see a random row from the table. Instead I got this exception in the console:

lexer.js:4 Uncaught (in promise) Error: Unexpected character at index 0: [
    at Lexer.defunct (eval at <anonymous> (app.js:1), <anonymous>:53:11)
    at Lexer.lex (eval at <anonymous> (app.js:1), <anonymous>:135:41)
    at DiceRoller.parse (eval at <anonymous> (app.js:1), <anonymous>:1964:36)
    at DiceRoller.eval (eval at <anonymous> (app.js:1), <anonymous>:1852:45)
    at Generator.next (<anonymous>)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:31:71)
    at new Promise (<anonymous>)
    at __awaiter (eval at <anonymous> (app.js:1), <anonymous>:27:12)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:1849:53)
    at new Promise (<anonymous>)