I should be able to generate a chart for the normal distribution from 0-5 from here. Thanks so much Omnipact and Derakon.
Ring of speed range of values
Collapse
X
-
EDIT: ... and now I notice that there are two pages in this topic. Oh well.
My Vanilla Priest also found a +23.
Comment
-
The table I quoted would be compressed to have 6 columns instead of 11. So yes, there's a "different chart" for each possible max value. Except that there's no actual chart; the table is simply an example of what running the algorithm with a specific max tens of thousands of times generated. I quoted the table because it was easier than trying to explain the actual distribution used.Comment
-
Okay, from my reading of the actual code for m_bonus, it appears to be trying to generate a normal distribution with average value (max bonus * item level / 128) and standard deviation of (max value / 4). There's a lot of weird stuff in there to approximate floating point with integer math, but I believe that's broadly accurate. And of course, values are clamped to be between 0 and the max value.
Incidentally, I found this code by starting from the documentation in object.txt, which says:Code:# Some fields accept randomized numbers of the form "10+2d3M4" where # 10 is the non-variable base, 2d3 is a standard die roll, and # M4 uses the m_bonus function to generate a number between 0 and # 4 according to a normal distribution.
Comment
-
-
Is the item level the level on which the item is found?
If so, for a ROS at DL 128 the m5 enchantment should be a random # drawn from a normal distribution with mean = (5*128)/128 = 5 and std dev = 5/4 = 1.25
When I run this 1000 times in Excel using this function I found on the internet: =NORMINV(RAND(),5,1.25), I get 64.5% with a bonus of 5 or more.
For the Amulet of the Magi, I calculated means for the normal distribution of the following:
DL 50 = (3*50)/128 = 1.171875
DL 100 = (3*100)/128 = 2.34375
DL128 = (3*128)/128 = 3
Standard Deviation for each is 3/4 = .75
For 1000 random numbers these are the precentages I found for an Amulet of the Magi getting a +4 enchantment:
DL50 = 0%
DL100 = 7.1%
DL128 = 51.1%
0% doesn't mean it is impossible, just for that this run of 1000 numbers, none achieved the max enchantment at DL50.Comment
-
Only if the item is found on the floor outside of a vault. Items dropped by monsters use max(monster level, avg(monster level, dungeon level)), items dropped by chests use a hardcoded value depending on the type of chest, items in vaults get a boost applied to them depending on where they are in the vault, etc.Comment
-
If I'm doing everything correctly, chances of getting a ROS +23 at DL 128 IF the maximum of 10 is achieved from the d5m5 calculation are:
1/5(chances that rolling a 5 sided die results in a 5)*1/64.5(chances that the random number generated from the normal distribution with mean 5 std dev 1.25 is a 5)*1/8192(13 consecutive coin flips of the same result) = 1 in 2,641,920. To this must be added the chances of getting to +23 from each of the other possible results of the d5m5 check (1 through 9). This shouldn't add much to the total because the number of consecutive same coin flips required increases and those chances are small.Comment
-
Only if the item is found on the floor outside of a vault. Items dropped by monsters use max(monster level, avg(monster level, dungeon level)), items dropped by chests use a hardcoded value depending on the type of chest, items in vaults get a boost applied to them depending on where they are in the vault, etc.Comment
-
Nope, I didn't do everything correctly. +23 is not nearly that rare. I was counting 64.5% as 1/64.5, not 64.5/100. The revised chances for ROS +23 at DL128 are approx. 1 in 26702.
The numbers for the Amulet of the Magi should be correct. Sorry! I'm actually surprised we haven't seen higher then +23 with all the players out there (+24 is about 1 in 53407).Last edited by Nate; October 29, 2010, 15:06.Comment
-
My new number includes the chances for all the possible values (1-10) of the d5m5 calculation, i.e. d5m5=10, consecutive coin flips=13; d5m5=9, consecutive coin flips=14, and so on down to d5m5=1, consecutive coin flips=22. The addition of these contributed more than I expected to the total chances.Comment
Comment