[Feature] Dice roller

Furs do love their dices. Implementing a dice roll command would be neat.

Examples:
roll 1d20
roll 4d6+2
roll :eggplant:

2 Likes

I am not sure what this one does! :wink:

Hehe, but yeah. Fun to have feature. High priority? Not really. But eventually, Iā€™ll give it to you!

/Accipiter

1 Like

Iā€™d also love this feature, but may I request support for Fudge/Fate dice? These are six-sided dice where two sides are blank, two sides are marked -, and two sides are marked +. The blank sides are worth a value of 0, the - sides are worth -1, and the + sides are worth +1. Fate dice are typically used with such systems as Fate Core, and emphasize a characterā€™s skills over random chance. Typical notation for Fate dice elsewhere online is usually ā€œ4df+cā€ (with c being whatever modifier you add on).

Iā€™ve only ever heard of rolling four Fate dice at a time, so I was wondering if it would be possible to display the four die results before the sum. For example: [+, 0, -, +] or something along those lines.

Another helpful feature might be to have the ability to declare what your roll is for in the command for rolling, such as with a comment function at the end, say something along the lines of #Athletics or the like.

The Fate die you described would easily be represented by a normal dice roll command, represented as 1d3-2. Iā€™ve heard of them somewhere before, so I assume they probably built around d6 because theyā€™re cheaper to mass-produce. I love the idea of having a comment section on the roll, though! One of the problems my D&D group run into in Discord using a dice roll bot is actually when people are rolling multiple dice quickly and the DM isnā€™t sure what roll is what, or which attack is aimed at which enemy, etc.

The thing with using 4df, however, is that itā€™s flavored for the fudge dice-based system (such as Fate). Youā€™re right that I canā€™t rationalize using 1df versus 1d3-2, except that if we look at AnyDice.com, 4df isnā€™t equal to 4d3-2. Now, 4d3-4d3 might get you the correct resultant values, but not at the same odds.

Either way, to calculate the standard xdy+c notation, the system still needs to isolate the y variable to determine the number of sides on each die. Sure, it would require a couple of extra lines in the code to account for a y value of ā€œfā€, but Iā€™m unconvinced that the justification for Fate dice necessitates a position of pure logic.

I think what people would like about the Fate dice is the simulation of the same faces on the dice, to help immerse them into the system of their choice. I donā€™t pretend by any stretch of the imagination that Fate would win in a popularity contest, but its rules are freely available to all, simple and easy to comprehend, and all it requires for implementation is its one unique style of die.

At the very least, I hope Iā€™ve been a sufficient proponent for this dice system. If anyone has further questions regarding it, Iā€™d be happy to try my best to elucidate. Thank you for your time!

Soā€¦ 4d3-8? That should provide the exact same odds.

Indeed, though itā€™s easier to not mistype the modifier if you donā€™t have to remember ā€œ3-8ā€.

Ah, I see what youā€™re saying. So youā€™d want it to display what each die rolled as -1, 0 or 1, instead of 1, 2 or 3. That part makes sense, I guess. Do you need to know the individual dice rolls for the mechanic, or is that just personal preference?

It can be personal preference, but in some instances, people like to further fine-tune the quality of an outcome based on how many + or - display, as seen in the Fate Deck of cards. Itā€™s not strictly essential, but other than that, as itā€™s only ever meant to be 4 dice (that Iā€™ve seen in my years of experience), itā€™s never really a long string to display.

Iā€™ve been trying to poke at JavaScript all evening to hash out what a diceroll function might look like, but my JavaScript just is not up to speed. This is as far as Iā€™ve gotten (line 19ā€™s not even finished):

` /* A function to decipher standard xdy+c notation for dice rolling mechnaics. /
function diceroll(die) { /
Accept a required string parameter in the xdy+c format. */

/* Initializing three variables. */
let quantity = 0; /* How many dice to roll. */
let sides = 0; /* The number of sides each die should have. */
let modifier = 0; /* A constant value to be added to or subtracted from the total. */
let result = ""; /* A string variable to construct and display output. */

if (die !== null && die !== undefined) { /* Determine if the user properly submitted a valid string. */
	let dice = die.toString(); /* Implement the parameter as a string value. */
	dice = dice.toLowerCase(); /* Set the dice string to all lowercase. */
	
	if (dice.indexOf("d") !== -1) {
		/* Extract the number of dice from the string. */
		quantity = dice.slice(0, dice.indexOf("d")).valueOf();
		
		/* Extract the number of sides per die from the string. */
		sides = dice.slice(dice.indexOf("d") + 1, 
		
	} else { /* Report to the user that a valid string was not specified. */
		result = "A valid xdy+c dice roll notation was not specified.";
	}
	
} else { /* Report to the user that a valid string was not specified. */
	result = "A valid xdy+c dice roll notation was not specified.";
}

print result; };`

I really donā€™t know JavaScript very well at all.

I also managed to glean some good insight into the benefit of including dF as a valid dice type, and I quote from them thusly:

One important element of game design is to try and minimize unnecessary cognitive load on the players and GM so they can focus on more important parts of the game. (This doesnā€™t mean the tasks are hard, but any tasks add to the load.)
Math should be kept as simple as possible without compromising the benefits it provides.
Addition is better than subtraction is better than multiplication is better than division.
Keep the number of operations as small as practical.
One addition operation is better than one subtraction and one addition. (Or if you only have d6s on hand, one division, one subtraction, one addition.)

and:

Thereā€™s another question here of "is Fate a ā€˜validā€™ system?ā€™ The market dominant system, and all itā€™s copies, get a standard set of RNGs preprogrammed as single click icons, in most die rollers [d4, d6, d8, d10, d12, d20] implying that those are somehow ā€œnaturalā€. There is an implied legitimacy having the ā€œdfā€ in there, as VTTs are basically saying ā€œWe recognize you. You get something to make your life easier, too.ā€
Also, letā€™s not forget, there have been (and probably will be more) games that use variable quantities of Fate dice. So while 4df+c=4d3-8+c, to be open and versatile for all variants that may want to use more or less dice, youā€™d need to write it Xd3-(2X)+c where x is the number of dice being rolled.

[sic]

Maybe a silly question, but:

What do you use the dice for?

I have never used them myself, so I am ignorant to their function in this kind of setting. In a rule based D&D type of setting, yes. In MMORPG when rolling for loot, yes. For fun in an RP, playing some ā€˜spin the bottleā€™ game where you actually want a random element, yes.

But, you are talking about something else, and I would like to understand.

It would help answer questions such as: Should the roll be private, or broadcast to the room? Should you want to define events, rather than die results?

roll The bottle points at Accipiter. | The bottle points at Neira.

/Accipiter

Dice are used for a lot of things. From ā€œdice gamesā€ (spin the bottle like you mentioned, making a quick decision between things like who gets to wear Raeth like a hat, or deciding how many days the loser of a contest has to be your butler/maid) to more intense roleplay interactions. There are also many dice-based games that can be played exclusively using dice. In general, most people desire an xdy die system, where x determines how many dice to roll, and y is the size of the die, generating a random value from 1 to y. So 1d6 would be like rolling a 6-sided die, and would output the result. Usually you can combine these like 1d10+3+1d6 would yield a result like 11, (5 + 3 + 3)

Though I really like the idea you presented, where you can roll between discrete options and it will output one. nwn That would be very helpful later for scripting.

roll say Thanks, Accipiter! | pose pets Accipiter in thanks. | pose hugs Accipiter in appreciation.

2 Likes

Dice should definitely be broadcast to the room, so that everyone knows what was rolled in order to encourage honesty.

A lot of people use dice bots in a Discord voice chat for tabletop gaming. Because of the free-form nature of many tabletop systems, all players might require is a dice function, and they could use the environment to play out their campaigns on Wolfery if they like. They could use desc to describe NPC actions, for example, and so forth.

One such free-form tabletop system is Fate, which is completely free. You can even read all the rules right on its site. The bare minimum mechanic required is the ability to roll Fate/Fudge dice.

I mean, Iā€™m not saying itā€™s not a niche thing for the people who are already into that sort of thing, but it is certainly a nice touch.

Itā€™s probably worthwhile to have both ā€˜rollā€™ that broadcasts to the room and ā€˜qrollā€™ that doesnā€™t. I often use the latter to decide what morph to be in or pick other arbitrary stuff. Or when GMing.

3 Likes

This is a super good alias idea. sometimes the roll really just is meant for ones self after all.

Yeah, great idea! A ā€˜quiet rollā€™ or private roll is perfect.