Help with the dice command? - Myth-Weavers


Site Discussion

Do you have questions, suggestions, feedback, bug reports or other concerns? Post them here!

Help with the dice command?

Help with the dice command?

My Browser Information: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

Relevant Links: (Copy and paste links to what it is you're talking about here)

Message: Going by the wiki I should be capable of generating a dice result and then multiplying it or dividing it by some number. What I'm trying to make it do is modify a given number to 75-125% of the entered value and then displaying the result. If I try entering say
Dice Roll: 1d51+74*0.08z
d51 Results: 44 (Total = 118)
Test which seems correct it will generate the random number and then not modify it in anyway when the intended behavior would be showing a number between 6-10, inclusive. I've also tried multiplying by 8 and then dividing by 100 and using various combinations of spaces and not spaces, it still ignores everything after the 1dx+y. Am I just botching the formatting in some way or do those commands not work anymore?

The dice code is really only made to handle one arithmetic operation; it's not a full-on expression parser. Also, it's designed around integer math, so decimal points don't work at all, which can be seen by testing 1d99/100 (always == 0 for the dice roller). There is a quirk that will allow you to do two operations, which takes advantage of how sheet dice support circumstantial modifiers within the post, but that second operation can only be addition/subtraction (of an integer).

If I try
Dice Roll: 1d51+74*8
d51 Results: 26 (Total = 100)
it also ignores the * 8 even though that is only one operation and an integer though.

In your example, the first operation is the addition of 74; the second operation to multiply by 8 is ignored. You could in theory do it the other way around (1d51*8+592) to take advantage of the quirk mentioned above, which would give you a result 100-fold bigger than your target range.

I see. That works but takes more of a manual process than just doing the 75-125% check and then manually modifying the number and manually sorting. That's unfortunate but I'll find another way of expediting the math on that.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Last Database Backup 2018-07-18 09:00:11am local time
Myth-Weavers Status