JG and uniques' probabilities
#1
Greetings, Lurkers:

Some time ago, I tried to calculate the probability of finding gold prefixed jewlery in D1, but at some point, the calculations required for it got so COMPLEX that I had to abandon my idea.

Since then, I've felt curious about those unique items' probabilities tables at the JG, about HOW did Jarulf made them.

Did he, for every unique item in the game, for every level, for every normal monster, etc... applied and then calculated the rules for item generation in his own guide (I've tried some of this myself and if he did so, it is an INMENSE work), or... as he (she?) has good programming skills (I guess), he did a program that would introduce maaany seeds in the D1 program's level generator and then tell him later where (dlvl) the uniques had been generated first (or more often). I'm just curious.

TIA
"La espada de la divina justicia no hiere prematura ni tardíamente, aunque una u otra cosa parezca a los que la deseen o la temen".

Dante Alighieri
Reply
#2
I think Jarulf basically looked into the MPQ files of the Diablo content and then those were where he derived his equations. Although I may be wrong, it's just a suggestion.
Reply
#3
>Did he, for every unique item in the game, for every level, for every normal monster, etc...
>applied and then calculated the rules for item generation in his own guide (I've tried some
>of this myself and if he did so, it is an INMENSE work),

Yes, that is how I did it :)

I didn't calculate by hand though but made a program that calculated it all. It could without much addition also calculate the probability for ANY type of magic item (including specific stats in it). The "problem" with adding such info to the guide would be in picking out what one should present since there is almost an infinite ammount of possible items. I decided against puting up tables with just a few "good" items, like for example king's (bastard) sword of speed (with perfect stats/with any stat) just since there would be som many items that would still be good or common among players. I think I still have the program somewhere but I am not sure. It was written in Turbo Pascal. I have since rewritten part of it into C but no the probability calcs.

And yes, it is quite a bit of calcs, but for a computer program that doesn't really matter :) By the way, I did the same for D2 which was slightly more compicated due to the TC system, but it too calculated all probabilities for all monsters and so on. Unfortunately Blizzard rewrite the game every patch and I got tired looking through the code each time to spot changes :(
There are three types of people in the world. Those who can count and those who can't.
Reply
#4
Wow! Jarulf himself replied...

Jarulf, 3 Aug 2003, 04:33 PM Wrote:I didn't calculate by hand though but made a program that calculated it all. It could without much addition also calculate the probability for ANY type of magic item (including specific stats in it). The "problem" with adding such info to the guide would be in picking out what one should present since there is almost an infinite ammount of possible items. I decided against puting up tables with just a few "good" items, like for example king's (bastard) sword of speed (with perfect stats/with any stat) just since there would be som many items that would still be good or common among players. I think I still have the program somewhere but I am not sure.

Now that my curiosity has been pleased, and if it wouldn't be much annoyance, may I have a copy of that program?. I'm still interested in my old proyect of calculating the probabilities of finding gold prefixed jewlery.

I must say that I started with it because like gold is (roughly) a prefix of "medium" quality (qlvl 12 and the maximum in the dungeons can be qlvl 30, IIRC), I thoght it would be interesting (at least it is for me) to check if a qlvl like that would be more frequent in the deeper lvls of the dungeon (where there are much monsters capable of throwing it, but also more prefixes that can pop out...) or it if it would begin to "fade away" dlvl after dlvl, anf in so, in which dlvl exactly it would reach its "peak of appearance": maybe in dlvls 8 or 9...? (just before qlvls of better quality appear in the game...), or in the caves? (where more monsters can throw jewlery...) or maybe in dlvl 15?.

Oh well, I admit that I'm also interested in this because gold prefixed jewlery is the only chance for a warrior to wield unique items (like CC... ;) ) and other weapons without +To Hit adders (like emerald swords, if you can find/buy one...).

Notice that I'm not a programmer, so if that program happens to be too much complicated to handle for the medium/veteran computer user... well, lets forget it and I'll try to continue and solve this myself with the only rational method that I have at my hands (apart from paper and pen...): the Excel 97 spreadsheet.

I placed every prefix and base item in a spreadsheet (looong typing), and let the computer do all the ugly calculations... until I had to write the formulae for ALL the normal monsters, where the thing just became... MASSIVE (I never figured I would need to write a formula too much long for the Excel to accept it...) (see guys, it is difficult playing at "being Jarulf" even in a small scale such as this...).

Well, that's all for now. Whatever you decide, thanks in advance.
"La espada de la divina justicia no hiere prematura ni tardíamente, aunque una u otra cosa parezca a los que la deseen o la temen".

Dante Alighieri
Reply
#5
Sr.Juez,Aug 4 2003, 06:20 PM Wrote:I must say that I started with it because like gold is (roughly) a prefix of "medium" quality (qlvl 12 and the maximum in the dungeons can be qlvl 30, IIRC), I thoght it would be interesting (at least it is for me) to check if a qlvl like that would be more frequent in the deeper lvls of the dungeon (where there are much monsters capable of throwing it, but also more prefixes that can pop out...)
For what it's worth... Best gold items come from mlvl 25 monsters (maws, gold vipers and counselors), so they're probably your best source. Why 25? Because you can get a gold/heavens jewel, in addition to all other good ones (gold/perfection, gold/accuracy, gold/stars...).
"My doctor says that I have a malformed public-duty gland and a natural deficiency in moral fibre, and that I am therefore excused from saving Universes."
-- Ford Prefect
Reply
#6
>Notice that I'm not a programmer, so if that program happens to be
>too much complicated to handle for the medium/veteran computer
>user... well, lets forget it and I'll try to continue and solve this myself
>with the only rational method that I have at my hands (apart from
>paper and pen...): the Excel 97 spreadsheet.

Well, it IS quite a bit and it is basically completely uncommented code with not the best variable naming and such perhaps. So it might be a bit complicated to figure it out. However, I don't think it would be THAT hard if one really want it. I have posted the three files I found that seems to be related to it (I had tons of various files doing all sort of stranage things, these seemed to be probability related. In addition a "dcore" unit is referenced. It is basically a file that handle the loading of the game. It identifies the versions and load the tables from the correct offsets and such. Basically for each internal table, the data is loaded into one big array (think of it as 2 dimensional) which is then referenced to get data from the tables such as dungeon levels, qlvl and all other data. Important in this case would be what base items affixes can occur on, the levels of monstyers so that it can pick correct base item and affixes and such. I did not post the dcore unit since it is note that important ot usefull looking at it even though some variables are set there, it really has nothing to do with the probabilities.

http://www.bolina.hsb.se/hsidor/pedro/dprob.pas

This one do basic probability checks used to calculate over all probabilities. It has functions to check if an affix can occur on a base item for example. It checks if a monster is possible and other things. Can't remember and didn't check to much now.


http://www.bolina.hsb.se/hsidor/pedro/probu.pas
http://www.bolina.hsb.se/hsidor/pedro/probm.pas


These are two files (programs), one that calculate unique item probabilities and one for magic item probabilities. Note that they have the ability to calc for monsters only, for bosses only or for all, including chests and such. In addition there seems to be special "run" options that calculate for example a Laz run and so on. For magic items it seems to output files with probabilities for both perfect and non perfect probabilities.

Finally, the program will read two data files. One that takes the probability of each monster on each level (mprob.txt). It appears to be columns of values for each monster. The column holds 16 integer values, the chance for a monster to appear on level 1-16. The probabilities are the ones calculated by some other program and found in my guide. I just made a data file with the probabilities, it was easier than adding actual calcs for the monsters into that progam since it was a relatively compicated process (see other thread).

The other input file was for which magic item to actually calculate the probability. It is called fixfile.txt. Each line is an item and belo is an example of a few lines the current file on my hard disc had:

34 90 122 kings haste
34 89 122 kings speed
34 25 122 kings gore
34 46 122 kings heavens
34 81 122 kings vampires
34 83 122 kings blood
20 88 145 massive swiftness
64 88 145 jade swiftness
66 46 145 emerald heavens
65 46 145 obsidian heavens
64 46 145 jade heavens

Basically the numbers should equal the base item and the affixes (as the entry in the table). I think the text is just for display.

Hmm, complicated? Well, feel free to ask questions if you don't understand. It was not the most sofisticated programs, but it did the work I wanted and were written as I thought them up with no real design effort or usability put in. It was definately not meant for others to read and understand :)

Have fun!
There are three types of people in the world. Those who can count and those who can't.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)