Dice roller ahoy!

Who are these twenty characters?

2 Likes

They are a bunch of garrulous bouzeaux who insist on suppressing succinctness.

3 Likes

Right, the new version has been tested on my toybox, so it’ll go live next time I restart the forum software.

3 Likes

…and it is now live.

1 Like

The next version of the dice roller fixes some parsing bugs, cleans up more of the inherited code, and adds Genesys/Star Wars RPG dice. This will go live next time I restart the forum software.

4 Likes

@Benkyo asked for a die roll:
Just testing:

5d6: 5 + 5 + 5 + 2 + 5 = 22

1 Like

@lalunaverde asked for a die roll:
Hey is the mic on? 5d6: 2 + 1 + 6 + 3 + 1 = 13

@GeeBizzle asked for a die roll:
d6: 2

[roll7d6]

Two reasons that didn’t work:

  • written in the new editor so the square brackets were escaped “\[” and “\]”
  • no space between the “roll” command and the die specification
1 Like

To add to Roger’s point, to switch between the new and old editors you need to click on the “A” in the top left of the input window:


It should change to M↓, which indicates you are using the old editor and can type square brackets as the dice roller expects.

2 Likes

@Benkyo asked for a die roll:
d6: 3

@GeeBizzle asked for a die roll:
7d6: 3 + 5 + 2 + 6 + 3 + 6 + 2 = 27

@Phil asked for a die roll:
d12: 1

@Phil asked for a die roll:
d99: 74

@Phil asked for a die roll:
d6: 1

@Phil asked for a die roll:
d1: 1

What are the chances!

3 Likes

When [foo] is a valid dice roll request, can [foo][ and [foo]( be ignored, to avoid clashes with links ala Your Last Played Game Volume 3 - #1295 by system ?

Failing that (if the code in question cannot see what follows), perhaps extra validation is possible, such that invalid inputs result in no modification taking place? (In that example, it was looking for battle N where N was an integer, and when it didn’t match that it did the roll with a default N=1, whereas “ignoring the request entirely” would have been a more desirable outcome in that case.)

I’ll give it a go. I agree, a markdown link is a reasonable thing to exclude from processing.

I really ought to rewrite from scratch rather than keep modifying the code that I originally got from someone else.

Also I think I’ll just remove all the “special dice” for now since nobody has used them for a while. I’ll leave in the custom faces option so that if anyone wants a weird die it can be done that way.

3 Likes