08-04-2003, 07:45 PM
>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!
>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.