How does this exist?
You might think the tool takes a similar approach to calculating your roll the same way OtherBill did, but that is actually not the case. Mostly because I’m pretty unfamiliar with statistics like that, and I’d rather not create an algorithm that solves some satanic integral involved with Bell Curves.
Instead, it takes the set of all possible rolls, calculates some meaningful numbers based on them (e.g. amount of ways to roll a value better than yours), and works from there.
This is done by reducing the rolling in realm as follows:
Think of the act as rolling a character, as throwing some dice.
Every individual die lands on some value, the values are added together, and that is your gain in the stat from level 1 to 20.
Take health for example: Every time you level, you throw a die that ranges from 20 to 30. (-5 to 5).
If I were to turn this into normal dice, to simplify the problem, then we get a die with 11 sides: from 1, to 11.
Leveling to 20 means leveling up 19 times, so I throw 19 dice with 11 sides each.
Is there a way to count the amount of ways n
, m
-sided dice add up to a given value?
The answer to this, naturally, is yes. And here’s how you do it:
(yikes)
Where S is the value you are shooting for, m is the amount of sides on your dice, and n is the amount of dice you got.
Additionally, these mathematicians use weird dice: The lowest value on theirs is 0.
(So our HP dice in this example have sides 0 to 10)
Unfortunately, I do not know exactly how those mathematicians got to the answer that’s there. I know they went from this post (specifically about directly calculating the value) to that formula, but I can’t figure out the details. . . @OtherBill might know?
One way or another, the above formula is a little less daunting, and much easier on the implementation.
(That greek symbol on the left is basically crazy math ppls way of doing a for-loop). The rest is basically just a lot of multiplication.
Now that the amount of ways to get any roll can be counted,
(for any amount of dice and sides, where dice is your level, sides is the range you can roll your stat in)
You just count whatever you want to know (e.g. counting rolls equal or better than yours), then divide the outcome of that by sides^dice (== total amount of rolls you can get), and you know your probability!
This is probably more computationally heavy than calculating the aforementioned satanic integral to get the surface of a bell curve, but fortunately computers nowadays are real fast and any answer using this solution is found within a second anyways!
why does this exist?
Over a year ago now, I got a pretty good roll. And I wondered just how likely it was.
I got pretty obsessed with trying to find an answer to this problem, because I was having a hard time figuring it out.
Really wish I knew about OBs post on rolling back then, but alas.
Eventually I was able to reduce the problem to something more generic and simple, which made me able to look up the solution. (the formula and link from earlier are what I found back then)
That was in the past until I saw a post about rolling really high here a few days ago.
I was writing up a post detailing how to calculate the solution and giving a likelihood for his/her roll.
…The post got closed while I was writing.
This unfortunate event motivated me to create a program that calculated any health roll’s likelihood and returned some statistics about it.
It was meant to bee just health but I quickly got obsessed (starting to see a pattern here?) with this tool.
As a result of that it expanded from a simple hack to get your hp roll into a ‘any possible roll anytime’ chonky piece of software. And just like that I ended up spending every waking moment of the last 5 days working on it.
At least it’s more productive than playing Realm, I guess.