Item Creation in D1
#1
Hi i;m an experienced Diablo player, and i;ve just been mulling to Jarulf's Guide again, in the Item creation section, chapter 3.

I want to know if i understood this correctly, in how to create an item.

The idea is that i for instance want to know from which monsters and up i will be able to find a certain item. (let's for instance take an Awesome Tower Shield of the Tiger)


If i'm correct there are several values that matter to item creation for a monster,
first the mlvl, which is the level of a monster as described in chapter 5 of the guide. altered by +15 for nightmare and +30 for hell difficulty.
second there's qlvl, a value for each base item, suffix, unique, etc.

Now if i understand things correctly when you beat a monster, there's a certain chance for it to drop a magical item (10.7%=item, of which (11+0.89*(ilvl+1)) is magical, (with ilvl in this case being the mlvl, because it's a monster), of which 84% is not unique, of which 16.7% has both a pre and suffix.)
If this monster is one of those to drop a magical pre&suffix item, the base item, prefix and suffix will be chosen from a range of mlvl/2 - mlvl of the monster (with +4 for bosses) (thus a mlvl 28 monster would drop any qlvl between 14-28).
Anything that can be dropped as such, should have a qlvl lower or equal to the mlvl of the monster it drops from.

In my example an Awesome Tower Shield of the Tiger, the Awesome has qlvl 28, the Tower Shield qlvl 20 and the Tiger qlvl 21.
Am i correct then that this item can drop from any monster of mlvl 28 and up (thus a Steel Lord, Blood Knight, Cabalist, Advocate, Hell Spawn or Soul Burner on normal, anything from mlvl 13 (familiar) and up on nightmare, and any monster on hell difficulty)?
Or should i add up all qlvl of the item for a total of qlvl 69, and as such not droppable (since the highest mlvl is Lazarus on Hell, 65) by monsters?

In the same vein, if i look for a Full Plate (qlvl 25), do i simply need to bash some Stone Clans on nm (mlvl 10) or anything on hell difficulty?
I'm not sure, but i think i've never seen a FPM drop on the 2nd dungeon level of Hell difficulty. Am i wrong on this?

If i deducted things from Jarulfs guide correctly, i understand that items dropped are always in a range of mlvl/2 to mlvl. So a normal Magma Demon will drop between 6 and 13, a hell succubus will drop between 27 and 54, etc.
Is this correct? and what items will the succubus be able to drop, since it's low value is 27, which is higher than the qlvl of the highest base item.

Furthermore, i understand correctly that i should search for an item at the first monster that can drop it. for instance if i want a qlvl13 item, i should look for mlvl13 monsters, since they have a range of 6-13, while a mlvl16 monster would have a range of 8-16. (including the 13, but with less chance of actually 'rolling' it)

As such for the example Awes TS of Tiger i should search for it with mlvl 28 monsters, since that's the smallest domain in which it can appear?

If this whole lot is incorrect i'd like to know how to find out which places a certain base item or affix can be found.
Did i also understand correctly that for droppings of uniques there is no range of what drops, it's simply the mlvl? (and the luck of getting a unique item)
I'm also interested in that low range of items, since it seems very well possible to
drop a qlvl item of less then half of the mlvl, especially on NM and Hell difficulty.


Something else i'd find interesting is how to calculate the occurence of a certain prefix, as has been done in the guide for uniques?
(this should be something like NumberofMonsters*(0.107*(11+0.89*(averageMlvl+1))*0.84*wantedNoaffixes)/DropRangeAverageMonster ?)
(for monsters only that is)
for instance, on dlvl 14, average mlvl is around 26 for normal, what would mean
(185 average monsters as by Jarulf guide) (i want a pre&suffix item)
(185*0.107*(11+0.89*(27))*0.84*0.167)/(26-13)=97.3/13=7.48
7.48% of the monsters will drop a magical item with a pre and suffix of qlvl 13-26?
and as such a Tower Shield (with 2 affixes) drop will be 1/13th of those (qlvl 20 rolled between 13 adn 26) being 0.575 % of the monsters. it being Saintly (24) and Tiger (21) would be another 1/13 and 1/13, becoming 0.0034 % of your monsters on dlvl14 will drop a Saintly Tower Shield of the Tiger on normal?
(as such finding a Saintly Tower Shield of the Tiger would happen 1 in 29361 games, when clearing dlvl14 of monsters on normal difficulty?)

hope anyone can clear this somewhat up for me ;)

Characters: Standard Diablo Rogues: 'Paardenpoep' l36, 'Purechocolade' l31; Sorcerers 'Toverkol' l40, 'Zwarte Piet' l32, 'ZureHaring' l28 (no fb), Warrior 'Klotebeest' l29, LoL characters: rogues 'Roggebrood' l26 and 'Ironvrouw' l7, sorcerer ToverLol l20, warrior LolleBolleGijs l16 ironman character name 'Ironlady', read Toverlol's journey log
Reply
#2
Toverkol,May 23 2005, 02:23 PM Wrote:In my example an Awesome Tower Shield of the Tiger, the Awesome has qlvl 28, the Tower Shield qlvl 20 and the Tiger qlvl 21.
Am i correct then that this item can drop from any monster of mlvl 28 and up (thus a Steel Lord, Blood Knight, Cabalist, Advocate, Hell Spawn or Soul Burner on normal, anything from mlvl 13 (familiar) and up on nightmare, and any monster on hell difficulty)?
Or should i add up all qlvl of the item for a total of qlvl 69, and as such not droppable (since the highest mlvl is Lazarus on Hell, 65) by monsters?

In the same vein, if i look for a Full Plate (qlvl 25), do i simply need to bash some Stone Clans on nm (mlvl 10) or anything on hell difficulty?
I'm not sure, but i think i've never seen a FPM drop on the 2nd dungeon level of Hell difficulty. Am i wrong on this?[right][snapback]78316[/snapback][/right]

A couple of quick notes to set you on the right path: enchantments have qlvls; base items have ilvls. qlvl is determined by the monster's base mlvl (i.e. always 1 for Skeletons), whereas ilvl is determined by the monster's difficulty-modified mlvl (i.e. 31 for a Hell difficulty Skeleton). Thus, you should be able to get an FPM from anything in Hell difficulty, but if you want quality enchantments on it, you need to fight high level enemies. Boosted church monsters tend to drop really low grade stuff like FPM of Health (-1 damage from enemies). I'm pretty sure I have seen FPMs dropped on dlvl 2 of Hell difficulty, but they're never worth recovering. :)

Therefore, while you could get a tower shield from any monster in Hell difficulty, you must fight something of mlvl 28 or better to have it be an Awesome/Tiger tower shield.

Note: I'm assuming your ilvl / mlvl numbers are correct and just applying my understanding of item generation to the data you've given.
Reply
#3
ah, so that's it, thanks.

I also discovered a miss of my own in the calculation of the chance of ending up with a saintly TS of tiger (in the end of my post)
When it's decided there is an item to be dropped it's not yet sure it's a base item it seems, there must also be a chance to end up in the other table, icluding potions, books and jewelry.

Another point i'd like to bring up, if the ilvl is only for base items and the mlvl for the available suffixes, then you'd never find any 'of slaughter' items since it has a qlvl of 60, which i'd sya is only reachable on hell mlvl30 monsters or?

Another thing is how to find books of teleport, their ilvl seems connected to the dungeon lvl but i wonder if the difficulty is added up here, because as such you'd be able to find them on bookcases everywhere in higher difficulties (qlvl 14).
If this doesnt happen it could only drop from monsters dlvl14 and mlvl14 and up, is that the case?
Characters: Standard Diablo Rogues: 'Paardenpoep' l36, 'Purechocolade' l31; Sorcerers 'Toverkol' l40, 'Zwarte Piet' l32, 'ZureHaring' l28 (no fb), Warrior 'Klotebeest' l29, LoL characters: rogues 'Roggebrood' l26 and 'Ironvrouw' l7, sorcerer ToverLol l20, warrior LolleBolleGijs l16 ironman character name 'Ironlady', read Toverlol's journey log
Reply
#4
Toverkol,May 24 2005, 01:50 PM Wrote:Another point i'd like to bring up, if the ilvl is only for base items and the mlvl for the available suffixes, then you'd never find any 'of slaughter' items since it has a qlvl of 60, which i'd sya is only reachable on hell mlvl30 monsters or?

Another thing is how to find books of teleport, their ilvl seems connected to the dungeon lvl but i wonder if the difficulty is added up here, because as such you'd be able to find them on bookcases everywhere in higher difficulties (qlvl 14).
If this doesnt happen it could only drop from monsters dlvl14 and mlvl14 and up, is that the case?
[right][snapback]78425[/snapback][/right]

I don't normally quote documents at people, on the theory that they've already read it and still have a question. However, in this case, the section below addresses your first question perfectly: no, you cannot get "of slaughter" from any dungeon beast.

Quote:Restrictions in the dungeon
As explained in chapter 3.8, prefixes and suffixes are assigned to items based on a monsters unmodified mlvl. This means that no prefix or suffix with a qlvl higher than 30 (34 when a unique monster drops it as they have a +4 bonus) can be found in the dungeons, except from Diablo and Na-Krul in Hellfire, which have a maximum limit of 45 and 44. This rules out quite a few of the best prefixes and suffixes such as a godly plate of whale, even if they would be possible according to what was said above under occurrences and level differences.  Similarly, items from non monsters have a limit of 30 in Diablo and 34 in Hellfire (2·dlvl). Note, this is true for any version of Diablo, even 1.00. Wirt (but not Griswold) can still sell those prefixes and suffixes impossible to find in the dungeons
-- page 54 of 172, Jarulf's Guide PDF v1.62

The one reference to book generation I found while searching indicates that bookcases do not take difficulty into account. A more thorough reading is recommended if you're really curious.
Reply
#5
Toverkol,May 24 2005, 02:50 PM Wrote:Another point i'd like to bring up, if the ilvl is only for base items and the mlvl for the available suffixes, then you'd never find any 'of slaughter' items since it has a qlvl of 60, which i'd sya is only reachable on hell mlvl30 monsters or?
[right][snapback]78425[/snapback][/right]

Aye, you cannae find such high affixes (> 34, IIRC) in the dungeons. Wirt is your only source for higher level affixes, and even then he is limited by his price cap.

EDIT: Late crosspost. :whistling:
"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
hmmmk, that rules out quite a number of items...

Can i deduct from all this that for finding good items it does not matter which difficulty you play, as long as you're in hell you're ok (excpet fro the change in base items)

read trough that chapter with extra notes on creation btw, and it notes there right below the quote you copied to me, that wirt and Adria will not sell above qlvl 30 either. (and then goes on about the price of those).
I am sure this is a mistake or some, i have crowns of the mammoth and maces of carnage on my chars, which they have bought from wirt (with lowerqlvl prefixes)...
i think it might at least be stated here that the actual range is from ilvl-ilvl*2 (in this case ilvl=clvl), and as such being able to get qlvl 60 affixes. (apart from the price cap)

there seems to be an exception to the max monster qlvl of 34 (31) being diablo, having a mlvl of 45.

The item creation guide still does not state anything about the possibilities of a monster dropping a book, which is possible, i'm very interested in how that would work. (the only option fromt he guide seems that both tables in the top of 3.13.1 are avtually one table and as such a qlvl 8 item could be just as well an amulet or book as a broad axe or helm.), and if so the dropping of books would be affected by difficulty, the spell on the book wouldnt.
As for books in town it's pretty easy to figure out (clvl 24-25 allows qlvl 14 (teleport) items)
(ill read trough the magic section soon to find out if that states something)

thanks for the help given already
Characters: Standard Diablo Rogues: 'Paardenpoep' l36, 'Purechocolade' l31; Sorcerers 'Toverkol' l40, 'Zwarte Piet' l32, 'ZureHaring' l28 (no fb), Warrior 'Klotebeest' l29, LoL characters: rogues 'Roggebrood' l26 and 'Ironvrouw' l7, sorcerer ToverLol l20, warrior LolleBolleGijs l16 ironman character name 'Ironlady', read Toverlol's journey log
Reply
#7
Toverkol,May 24 2005, 08:25 PM Wrote:Can i deduct from all this that for finding good items it does not matter which difficulty you play, as long as you're in hell you're ok (excpet fro the change in base items)
.
.
.
there seems to be an exception to the max monster qlvl of 34 (31) being diablo, having a mlvl of 45.[right][snapback]78478[/snapback][/right]
Hi!

May I suggest chapter 3.11 "Probabilities of finding unique items" to you? While It may not be exactly what you wanted (it only lists uniques), it may help to clarify that not for all items the odds to find them increase with difficulty level, for example the torn flesh of souls: on average 13/19/19 games in dlvl 2/15/15 of normal/nightmare/hell until you got one.

As to what concerns your second statement (excerpt of chapter 3.8.3 "Item properties"):
Quote:the prefix and suffix with the highest qlvl you will ever find in the dungeon has qlvl 34. There is no prefix or suffix in the range of 32-34, so qlvl 31 is the highest one you will find, and only emerald has that qlvl. In Hellfire (but not Diablo), Diablo is level 45, so he can drop items with prefixes and suffixes of qlvl up to 45. Similarly, Na-Krul can drop items with prefixes and suffixes of qlvl up to 44 as he is level 40, and the +4 bonus for being a unique monster applies to him.
I think that makes it clear. Only if you play Hellfire does there exist a case where items with affixes up to level 45 (or 44 respectively) can be dropped in the dungeons.

Greetings, Fragbait
Quote:You cannot pass... I am a servant of the Secret Fire, wielder of the Flame of Anor. The Dark Flame will not avail you, Flame of Udun. Go back to the shadow. You shall not pass.
- Gandalf, speaking to the Balrog

Quote:Empty your mind. Be formless, shapeless, like water. Now you put water into a cup, it becomes the cup. You put water into a bottle, it becomes the bottle. You put it in a teapot, it becomes the teapot. Now water can flow, or it can crash! Be water, my friend...
- Bruce Lee

Quote: There's an old Internet adage which simply states that the first person to resort to personal attacks in an online argument is the loser. Don't be one.
- excerpt from the forum rules

Post content property of Fragbait (member of the lurkerlounge). Do not (hesitate to) quote without permission.
Reply
#8
Toverkol,May 23 2005, 09:23 AM Wrote:Something else i'd find interesting is how to calculate the occurence of a certain prefix, as has been done in the guide for uniques?
(this should be something like NumberofMonsters*(0.107*(11+0.89*(averageMlvl+1))*0.84*wantedNoaffixes)/DropRangeAverageMonster ?)
(for monsters only that is)
for instance, on dlvl 14, average mlvl is around 26 for normal, what would mean
(185 average monsters as by Jarulf guide) (i want a pre&suffix item)
(185*0.107*(11+0.89*(27))*0.84*0.167)/(26-13)=97.3/13=7.48
7.48% of the monsters will drop a magical item with a pre and suffix of qlvl 13-26?
and as such a Tower Shield (with 2 affixes) drop will be 1/13th of those (qlvl 20 rolled between 13 adn 26) being 0.575 % of the monsters. it being Saintly (24) and Tiger (21) would be another 1/13 and 1/13, becoming 0.0034 % of your monsters on dlvl14 will drop a Saintly Tower Shield of the Tiger on normal?
(as such finding a Saintly Tower Shield of the Tiger would happen 1 in 29361 games, when clearing dlvl14 of monsters on normal difficulty?)

hope anyone can clear this somewhat up for me ;)
[right][snapback]78316[/snapback][/right]

This would be very ambitious to do correctly. I doubt very much that Jarulf calculated the unique item odds by hand... almost certainly he wrote a short computer program to do it. Even then, I'm not sure how rough his estimates are. Your first problem is that you assume every monster on dlvl 14 has an mlvl of 26. Obviously this isn't right... you have to consider each monster type which means that for maximum accuracy you would have to actually consider each combination of monsters and the probability of that combination occuring. You also have to consider the bosses and their probability of showing up on the level: since bosses always drop magic items they are pretty significant. There are also chests, barrels, etc. to consider.

Still, we could ignore all of that and just try to get the case of a single, non-boss, mlvl 26 monster right. So you start with .107 as the odds of the monster dropping an item, which seems to be correct. From there, Jarulf's Guide says we determine the base item. Bows count twice. We can take any base item with qlvl between 1 and 26, which I believe is all of them. By my count, 114 (including bows twice, and not including Hellfire items) with tower shield being one of them. So we now have (.107/114) odds of the monster dropping a tower shield. Then we get your step for determining if the item is magical, but don't forget that this is a percentage: (11+ .89*27)/100. Since a tower shield could be a Stormshield, we'll also have to multiply by .98 to exclude the 2% chance that a magical item could actually be unique. This gives us about one magical, non-unique tower shield for every 3100 regular, mlvl 26 monsters. Now, there is only a 1/6 chance of that tower shield having *both* a prefix and a suffix, so we are up to roughly 18600 monsters.

Now we look at the possible prefixes and suffixes on a shield, between qlvl 13-26. For suffixes, we've got 1)wolf , 2)tiger, 3) ages. That's it, 1/3 chance! So your odds of getting the right suffix with any prefix now have us up to roughly 55800 monsters. For prefixes we have 1+2) glorious (double chance), 3)crimson, 4)ivory, 5)lapis, 6)jade, 7+8)blessed, 9)cobalt, 10)crystal, 11)garnet, 12) obsidian, 13+14) saintly, 15)diamond, 16)ruby, 17) sapphire. So, 2/17 chance.

Then if my calculations are correct, the odds of getting a saintly tower shield of the tiger from a mlvl 26, non-boss, monster (on any difficulty, since the possible base items are the same) is roughly 1 per every 474,300. So if we take your original assumption of 185 mlvl 26 monsters on a level, with no bosses, chests, etc., we would get roughly a 1/2563 chance of finding it on the level.

That said, bosses are very significant because they can't drop things like scrolls or potions, and they always drop a magical item. They aren't as significant in this case as they are in the unique item case, but you would certainly want to take them into consideration.
Reply
#9
Diablo is mlvl30 in Diablo and mlvl45 in Hellfire.

Too lazy to look it up in JG to quote, but Wirt definitely sells items up to qlvl60. Adria and Griswold do not. Wirt, that bastard does not sell staves though, which leaves prefixes like Wyrm's and Hydra's out since they are too high qlvl to sell at Adria and they only were made to exist on staves. A little off topic and a bit less information, but still somewhat useful I hope :blush:
-Cytrex
Reply
#10
@Nystul
seems a pretty good calculation, except i believe the guide states that for a magical item from a monster to be unique is 16% and for a magical item from a chest to be unique is 2%, which would actually lower the chance of finding the example on a monster.
As for the mlvl i considered an average mlvl for a certain dlvl, i dont know if 26 would come out of it, but from the tables in chapter 5, assuming that number of monster is divided evenly among the 185, you can calculate an average from the appearance percentages per dlvl table.

@Cytrex
whoops i was mistaken about my saying that the guide said wirt couldn't get above qlvl30, the restriction i mentioned only applies to Gris and Adria... my mistake
Characters: Standard Diablo Rogues: 'Paardenpoep' l36, 'Purechocolade' l31; Sorcerers 'Toverkol' l40, 'Zwarte Piet' l32, 'ZureHaring' l28 (no fb), Warrior 'Klotebeest' l29, LoL characters: rogues 'Roggebrood' l26 and 'Ironvrouw' l7, sorcerer ToverLol l20, warrior LolleBolleGijs l16 ironman character name 'Ironlady', read Toverlol's journey log
Reply
#11
Toverkol,May 25 2005, 08:59 PM Wrote:seems a pretty good calculation, except i believe the guide states that for a magical item from a monster to be unique is 16% and for a magical item from a chest to be unique is 2%, which would actually lower the chance of finding the example on a monster.
As for the mlvl i considered an average mlvl for a certain dlvl, i dont know if 26 would come out of it, but from the tables in chapter 5, assuming that number of monster is divided evenly among the 185, you can calculate an average from the appearance percentages per dlvl table.
[right][snapback]78623[/snapback][/right]

I think 16% chance that an eligible magic item is unique is for unique (aka boss) monsters only. It's 2% for everything else. It always takes me a bit by surprise when something other than a boss drops a unique item, because it doesn't happen all that often.

My point with mlvl is that "average mlvl" is pretty useless. In this particular example it probably gives a rough approximation of the truth, but in some cases it would be very deceiving. Each monster type has it's own level, and to be accurate you have to consider them individually instead of as an average. The occurance percentages that Jarulf has calculated for us give us a better idea. Those percentages (assuming Jarulf calculated them correctly, anyway ;) ) are perfect to use for determining the chance of running into a certain boss. The problem with using those percentages in the case of the base monsters is that the number of monster types on a level is not always the same. For example, lava maw are more likely to show up than balrogs, but when lava maw do show up, they often are accompanied by 2 other monster types. When balrogs show up, it will just be one other monster type. So I would expect the actual ratio of lava maw to balrogs to be smaller than the ratio of levels with lava maw to levels with balrogs, if that makes any sense.

Someone who paid attention during statistics class can probably come up with a streamlined formula to determine the average distribution of monsters on each level (that is, not the chance of finding snow witches on level 14, but the average number of snow witches you would find per level if you played level 14 an infinite number of times). Otherwise, the brute force method would be easy with a computer program but not fun at all to do by hand.
Reply
#12
Some comments. Yes, I used a program to calculate the probabilities for unique items. It can also calculate the probability for any magical item. The reason there is no such info though si that there exist so many different types of magical items and I didn't want to pick out a few specific. However, have still have some data files for it I can post here (don't have access to my homepage to upload it from here though).

The program (which I seem to also have) will use the data for monster occurance as found in my guide (also calculated by another program) and normalize the probability of monsters for the desired level (so it sums up to 100%) and then divide the total number of monsters on the level according to that. Basically calculating for an "average" level. I might be wrong here thoug since I have not looked at the code for the program now. It will also factor in the bosses that can occur when the base monster occur.

In addition, it factors in an average number of chests, decapitaded bodies, barels and sarcophagus on the level. It does not handle racks or items directly on the floor since I never got arround to find that part of dungeon generation so can't tell how often one finds racks on specific levels. Here is a snipet of the code that handle such non monsters sources.

The program is an old one written in Turbo Pascal. For magical items it can geerate probabilities for a specific item but also for the probability of perfect such items.

Here is the sample code for calculating the number of items (note it multiply by the chance for the item to actually be an equipable items and hence to be magical/unique). This infromation is not to be found in my Guide in any way.

Code:
procedure doother(dlvl:word; var xprob:real);
var
 itemsonlevel : real;
begin
 itemsonlevel:=0;
 if dlvl in [1..15] then begin
   itemsonlevel:=itemsonlevel+0.5*7/8*1/4*7;        { small chest  5-9     }
   itemsonlevel:=itemsonlevel+1.0*7/8*1/4*4;        { medium chest 3-5     }
   itemsonlevel:=itemsonlevel+1.5*7/8*1/4*2.5;      { large chest  1-4     }
 end;
 if dlvl in [1..15,17..24] then
   itemsonlevel:=itemsonlevel+4/5*2/10*2/3*1/4*5*6; { barrel  (3-7)*6      }
 if dlvl in [1..4,21..24] then
     itemsonlevel:=itemsonlevel+3/10*1/4*14.5;      { sarchophagus 10 - 19 }
 if dlvl in [13..15] then
   itemsonlevel:=itemsonlevel+1/4*3.5;              { decapitated 2-5      }

 if itemsonlevel>0 then
   xprob:=xprob*pot(1-oneoprob(dlvl),round(itemsonlevel+0.5));
end;  { doother }

Here is a small snipet of codes that handle the actual calculations for a single monster/boss/other item. Just for your comparison. Unfortunately there is no comments and there is some calls to custom functions to determine certain properties like if an affix is cursed and so on. Since all calcs is for a specific item (and the program then loop for all desired items) there is a few global variables used to keep track of the items levels, such as the quality levels (of base item, qlvli, preffix, qlvlp and suffix, qlvls). It also access the data tables of the game directly in some cases, such as "mdata^[mslot,86]", this might not be obvious (and hard coded with no obvious way to understand) but for example extract the mlvl of the monster at position "mslot" (the current monster looked at) and at position 86 in that table, the agem stores the level of that monster type. I hope it is not too hard to dechifer. The program was never meant for distribution and tossed togetther in a sort of ad-hoc maner for various tasks I wanted. If you have questions about any other function call, please tell, I can eventually upload the whole program shoudl anyonwa want it.

Code:
function onemprob(dlvl,mslot:word):real;
var
 lvl   : word;
 tprob : real;
begin
 lvl:=mdata^[mslot,86];
 tprob:=0;
&nbsp;if ((lvl+diff*15)>=qlvli) and (lvl>=qlvlp) and ((lvl div 2)<=qlvlp) and (lvl>=qlvls) and ((lvl div 2)<=qlvls) then begin
&nbsp; &nbsp;tprob:=41/100*26/100*1/ipossiblemonster(lvl+diff*15)*4/24*1/ppossible(lvl,islot,true)*1/spossible(lvl,islot,true);
&nbsp; &nbsp;case idata^[islot,56] of
&nbsp; &nbsp; &nbsp; &nbsp; 23 : tprob:=tprob*1/4;
&nbsp; &nbsp; &nbsp;25,26 : tprob:=tprob*jpossible(lvl+diff*15,islot);
&nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp;tprob:=tprob*(11+0.89*(lvl+1))/100;
&nbsp; &nbsp;end;
&nbsp; &nbsp;if perfect then
&nbsp; &nbsp; &nbsp;tprob:=tprob*1/irange(islot)*1/prange(pslot)*1/srange(sslot);
&nbsp;end;
&nbsp;onemprob:=tprob;
end; &nbsp;{ onemprob }


function onebprob(dlvl,bslot:word):real;
var
&nbsp;lvl1,lvl2 : word;
&nbsp;tprob &nbsp; &nbsp; : real;
begin
&nbsp;if pcursed(pslot) or scursed(sslot) then
&nbsp; &nbsp;onebprob:=0
&nbsp;else begin
&nbsp; &nbsp;if bdata^[bslot,12]=0 then
&nbsp; &nbsp; &nbsp;lvl1:=mdata^[bdata^[bslot,0],86]+5+2*diff*15
&nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp;lvl1:=2*dlvl+diff*15;
&nbsp; &nbsp;lvl2:=mdata^[bdata^[bslot,0],86]+4;
&nbsp; &nbsp;if (not dgame) and (bslot=10) then begin
&nbsp; &nbsp; &nbsp;lvl1:=26;
&nbsp; &nbsp; &nbsp;lvl2:=26;
&nbsp; &nbsp;end;
&nbsp; &nbsp;tprob:=0;
&nbsp; &nbsp;if ((lvl1)>=qlvli) and (lvl2>=qlvlp) and ((lvl2 div 2)<=qlvlp) and (lvl2>=qlvls) and ((lvl2 div 2)<=qlvls) then begin
&nbsp; &nbsp; &nbsp;tprob:=4/24*1/ppossible(lvl2,islot,false)*1/spossible(lvl2,islot,false);
&nbsp; &nbsp; &nbsp;case idata^[islot,56] of
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 23 : tprob:=tprob*1/4;
&nbsp; &nbsp; &nbsp; &nbsp;25,26 : tprob:=tprob*jpossible(lvl1,islot);
&nbsp; &nbsp; &nbsp;end;
&nbsp; &nbsp; &nbsp;if (not dgame) and (bslot in [10..12]) then
&nbsp; &nbsp; &nbsp; &nbsp;tprob:=tprob*1/ipossiblemonster(lvl1)
&nbsp; &nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp; &nbsp;tprob:=tprob*1/ipossibleboss(lvl1);
&nbsp; &nbsp; &nbsp;if perfect then
&nbsp; &nbsp; &nbsp; &nbsp;tprob:=tprob*1/irange(islot)*1/prange(pslot)*1/srange(sslot);
&nbsp; &nbsp;end;
&nbsp; &nbsp;onebprob:=tprob;
&nbsp;end;
end; &nbsp;{ onebprob }


function oneoprob(dlvl:word):real;
var
&nbsp;lvl &nbsp; &nbsp; &nbsp; : word;
&nbsp;tprob &nbsp;: real;
begin
&nbsp;lvl:=2*dlvl;
&nbsp;tprob:=0;
&nbsp;if (lvl>=qlvli) and (lvl>=qlvlp) and ((lvl div 2)<=qlvlp) and (lvl>=qlvls) and ((lvl div 2)<=qlvls) &nbsp;then begin
&nbsp; &nbsp;tprob:=41/100*26/100*1/ipossibleother(lvl+diff*15)*4/24*1/ppossible(lvl,islot,true)*1/spossible(lvl,islot,true);
&nbsp; &nbsp;case idata^[islot,56] of
&nbsp; &nbsp; &nbsp; &nbsp; 23 : tprob:=tprob*1/4;
&nbsp; &nbsp; &nbsp;25,26 : tprob:=tprob*jpossible(lvl+diff*15,islot);
&nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp;tprob:=tprob*(11+0.89*(lvl+1))/100;
&nbsp; &nbsp;end;
&nbsp; &nbsp;if perfect then
&nbsp; &nbsp; &nbsp;tprob:=tprob*1/irange(islot)*1/prange(pslot)*1/srange(sslot);
&nbsp;end;
&nbsp;oneoprob:=tprob;
end; &nbsp;{ oneoprob }
There are three types of people in the world. Those who can count and those who can't.
Reply
#13
yes i'm interested in downloading this tool :)

though if written in TP is there need of a certain encoding app or alike for TP?

i recently made a table with mlvls of monsters and corresponding first possible mlvls with affixes, i'll upload it some time soon (it also includes monster appearance lvls, hp, resist/immunity, xp and whether there's a boss of a certain type)

strange note btw, i've been playing trough cats for some time now, and noticed that 2 bosses don't always appear on nightmare, being the Dark One boss Shadowcrow on dlvl5 and the Mud Man boss Baron Sludge on dlvl8. Can anyone confirm on this? (i'd rather say didnt appear, twice for the Dark Ones and once for the Mud Man)
Characters: Standard Diablo Rogues: 'Paardenpoep' l36, 'Purechocolade' l31; Sorcerers 'Toverkol' l40, 'Zwarte Piet' l32, 'ZureHaring' l28 (no fb), Warrior 'Klotebeest' l29, LoL characters: rogues 'Roggebrood' l26 and 'Ironvrouw' l7, sorcerer ToverLol l20, warrior LolleBolleGijs l16 ironman character name 'Ironlady', read Toverlol's journey log
Reply
#14
Rarity App

I wrote this a little while ago based on Jarulf's guide. Any item it won't calculate can't drop from monsters. It has slightly different results than Jarulf's version, probably due to a slightly different monster distribution we each used.

I also included results for racks (because on some items like Awesome plates it influenced the overall odds significantly) assuming an average appearance of 1 rack per type per game. Since there are 14 levels a rack can appear on it becomes 1/14 chance for a rack per game per level.

If you have any questions about the statistics used by the calculator I will be happy to go into detail.
--Lang

Diabolic Psyche - the site with Diablo on the Brain!
Reply
#15
Toverkol,May 26 2005, 07:29 AM Wrote:though if written in TP is there need of a certain encoding app or alike for TP?
You need a compiler. Borland makes a good one (the one I use) but I don't know if they sell it anymore. My copy is almost 10 years old now. I don't know if free ones can be had on the internet. Turbo Pascal was a teaching language and most people prefer C (even if TP was easier to understand ;-) ) so it has sort of fallen out of favor with most people.
Reply
#16
the Langolier,May 26 2005, 07:40 PM Wrote:Rarity App

I wrote this a little while ago based on Jarulf's guide.&nbsp; Any item it won't calculate can't drop from monsters.&nbsp; It has slightly different results than Jarulf's version, probably due to a slightly different monster distribution we each used.&nbsp;

I also included results for racks (because on some items like Awesome plates it influenced the overall odds significantly) assuming an average appearance of 1 rack per type per game.&nbsp; Since there are 14 levels a rack can appear on it becomes 1/14 chance for a rack per game per level.

If you have any questions about the statistics used by the calculator I will be happy to go into detail.
[right][snapback]78654[/snapback][/right]


OK, Below is my total monster count and it seems I used 185 monster on a level (normal monsters), except on level 1, 2 and 15 were I use 180 (more bosses though typically, it is for multplayer by the way) and level 16 were I use 187. I also include the code for bosses and such (soon I have pasted the whole program here :) ).

Code:
procedure domonsters(dlvl:word; var xprob:real);
var
&nbsp;tprob : real;
&nbsp;mslot : word;
begin
&nbsp;tprob:=0;
&nbsp;for mslot:=0 to mlast do begin
&nbsp; &nbsp;if (mprob[mslot,dlvl]>0) and (not (mslot in [38..41,117])) then begin
&nbsp; &nbsp; &nbsp;tprob:=tprob+onemprob(dlvl,mslot)*mprob[mslot,dlvl]/mprob[totmprobpos,dlvl];
&nbsp; &nbsp;end;
&nbsp;end;
&nbsp;case dlvl of
&nbsp; &nbsp; 1 : xprob:=xprob*pot(1-tprob,170);
&nbsp; &nbsp; 2 : xprob:=xprob*pot(1-tprob,180);
&nbsp; &nbsp;15 : xprob:=xprob*pot(1-tprob,180);
&nbsp; &nbsp;16 : xprob:=xprob*pot(1-tprob,187);
&nbsp;else
&nbsp; &nbsp;xprob:=xprob*pot(1-tprob,185);
&nbsp;end;
end; &nbsp;{ domonsters }


procedure dobosses(dlvl:word; var xprob:real);
var
&nbsp;bslot &nbsp; &nbsp; : word;
&nbsp;blustslot : word;
begin
&nbsp;if dgame then
&nbsp; &nbsp;blustslot:=92
&nbsp;else
&nbsp; &nbsp;blustslot:=93;
&nbsp;for bslot:=(lastspboss+1) to blast do begin
&nbsp; &nbsp;if (dlvl=bdata^[bslot,12]) and (mprob[bdata^[bslot,0],dlvl]>0) then begin
&nbsp; &nbsp; &nbsp;if bslot=blustslot then &nbsp;{ Bloodlust }
&nbsp; &nbsp; &nbsp; &nbsp;xprob:=xprob*(1-onebprob(dlvl,bslot))
&nbsp; &nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp; &nbsp;xprob:=xprob*(1-onebprob(dlvl,bslot)*mprob[bdata^[bslot,0],dlvl]/100)
&nbsp; &nbsp;end;
&nbsp;end;
end; &nbsp;{ dobosses }

I also include the following to make it more complete:

Code:
procedure dolazroom(var xprob:real);
begin
&nbsp;xprob:=xprob*pot(1-onemprob(15,103),2); &nbsp;{ Hell Spawn &nbsp; &nbsp;}
&nbsp;xprob:=xprob*pot(1-onemprob(15,108),4); &nbsp;{ Advocate &nbsp; &nbsp; &nbsp;}
&nbsp;xprob:=xprob*(1-onebprob(15,4)); &nbsp; &nbsp; &nbsp; &nbsp; { Lazarus &nbsp; &nbsp; &nbsp; }
&nbsp;xprob:=xprob*(1-onebprob(15,5)); &nbsp; &nbsp; &nbsp; &nbsp; { Red Vex &nbsp; &nbsp; &nbsp; }
&nbsp;xprob:=xprob*(1-onebprob(15,6)); &nbsp; &nbsp; &nbsp; &nbsp; { Black Jade &nbsp; &nbsp;}
end; &nbsp;{ dolazroom }


procedure docompletedungeon(var xprob:real; var hdlvl:word);
var
&nbsp;dlvl,tdlvl &nbsp;: word;
&nbsp;tprob,hprob : real;
begin
&nbsp;hprob:=1;
&nbsp;tdlvl:=0;
&nbsp;for dlvl:=1 to lastlevel do begin
&nbsp; &nbsp;tprob:=xprob;
&nbsp; &nbsp;domonsters(dlvl,xprob);
&nbsp; &nbsp;dobosses(dlvl,xprob);
&nbsp; &nbsp;doother(dlvl,xprob);
&nbsp; &nbsp;case dlvl of
&nbsp; &nbsp; &nbsp; 2 : xprob:=xprob*(1-onebprob(2,9)); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ Butcher &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; 3 : xprob:=xprob*(1-onebprob(3,1)); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ Skeleton King }
&nbsp; &nbsp; &nbsp;15 : dolazroom(xprob);
&nbsp; &nbsp; &nbsp;16 : begin
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*(1-onemprob(16,110)); &nbsp; &nbsp; { Diablo &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*(1-onemprob(16,93)); &nbsp; &nbsp; &nbsp;{ Black Knight &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;
&nbsp; &nbsp; &nbsp;19 : if islot in [154,155] then
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*(1-onebprob(19,10)); &nbsp; &nbsp; &nbsp;{ Hork Demon &nbsp; &nbsp;}

&nbsp; &nbsp; &nbsp;{ ej helt korrekt }

&nbsp; &nbsp; &nbsp;24 : if islot in [124,143,145,150] &nbsp;then
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*(1-onebprob(24,12)); &nbsp; &nbsp; &nbsp;{ Na Krul &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp;end;
&nbsp; &nbsp;if (xprob/tprob)<hprob then begin
&nbsp; &nbsp; &nbsp;hprob:=xprob/tprob;
&nbsp; &nbsp; &nbsp;tdlvl:=dlvl;
&nbsp; &nbsp;end;
&nbsp;end;
&nbsp;hdlvl:=tdlvl;
end; &nbsp;{ docompletedungeon }


procedure docompletemonsters(var xprob:real; var hdlvl:word);
var
&nbsp;dlvl,tdlvl &nbsp;: word;
&nbsp;tprob,hprob : real;
begin
&nbsp;hprob:=1;
&nbsp;tdlvl:=0;
&nbsp;for dlvl:=1 to lastlevel do begin
&nbsp; &nbsp;tprob:=xprob;
&nbsp; &nbsp;domonsters(dlvl,xprob);
&nbsp; &nbsp;case dlvl of
&nbsp; &nbsp; &nbsp;15 : begin
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*pot(1-onemprob(15,103),2); &nbsp;{ Hell Spawn &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*pot(1-onemprob(15,108),4); &nbsp;{ Advocate &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;
&nbsp; &nbsp; &nbsp;16 : xprob:=xprob*(1-onemprob(16,93)); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ Black Knight &nbsp;}
&nbsp; &nbsp;end;
&nbsp; &nbsp;if (xprob/tprob)<hprob then begin
&nbsp; &nbsp; &nbsp;hprob:=xprob/tprob;
&nbsp; &nbsp; &nbsp;tdlvl:=dlvl;
&nbsp; &nbsp;end;
&nbsp;end;
&nbsp;hdlvl:=tdlvl;
end; &nbsp;{ docompletemonsters }


procedure docompletebosses(var xprob:real; var hdlvl:word);
var
&nbsp;dlvl,tdlvl &nbsp;: word;
&nbsp;tprob,hprob : real;
begin
&nbsp;hprob:=1;
&nbsp;tdlvl:=0;
&nbsp;for dlvl:=1 to lastlevel do begin
&nbsp; &nbsp;tprob:=xprob;
&nbsp; &nbsp;dobosses(dlvl,xprob);
&nbsp; &nbsp;case dlvl of
&nbsp; &nbsp; &nbsp; 2 : xprob:=xprob*(1-onebprob(2,9)); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ Butcher &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; 3 : xprob:=xprob*(1-onebprob(3,1)); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ Skeleton King }
&nbsp; &nbsp; &nbsp;15 : begin
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*(1-onebprob(15,4)); &nbsp; &nbsp; &nbsp; { Lazarus &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*(1-onebprob(15,5)); &nbsp; &nbsp; &nbsp; { Red Vex &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xprob:=xprob*(1-onebprob(15,6)); &nbsp; &nbsp; &nbsp; { Black Jade &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;
&nbsp; &nbsp; 16 : xprob:=xprob*(1-onemprob(16,110)); &nbsp; &nbsp; &nbsp; { Diablo &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp;end;
&nbsp; &nbsp;if (xprob/tprob)<hprob then begin
&nbsp; &nbsp; &nbsp;hprob:=xprob/tprob;
&nbsp; &nbsp; &nbsp;tdlvl:=dlvl;
&nbsp; &nbsp;end;
&nbsp;end;
&nbsp;hdlvl:=tdlvl;
end; &nbsp;{ docompletebosses }


procedure dolazrun(var xprob:real; var hdlvl:word);
var
&nbsp;dlvl,tdlvl &nbsp;: word;
&nbsp;tprob,hprob : real;
begin
&nbsp;hprob:=1;
&nbsp;tdlvl:=0;
&nbsp;for dlvl:=13 to 15 do begin
&nbsp; &nbsp;tprob:=xprob;
&nbsp; &nbsp;dobosses(dlvl,xprob);
&nbsp; &nbsp;case dlvl of
&nbsp; &nbsp; &nbsp;15 : &nbsp; dolazroom(xprob);
&nbsp; &nbsp;end;
&nbsp; &nbsp;if (xprob/tprob)<hprob then begin
&nbsp; &nbsp; &nbsp;hprob:=xprob/tprob;
&nbsp; &nbsp; &nbsp;tdlvl:=dlvl;
&nbsp; &nbsp;end;
&nbsp;end;
&nbsp;hdlvl:=tdlvl;
end; &nbsp;{ dolazrun }


procedure docustom(var xprob:real; var hdlvl:word);
var
&nbsp;dlvl : word;
begin
&nbsp;xprob:=xprob*(1-onebprob(15,4)); &nbsp; &nbsp; &nbsp; &nbsp; { Lazarus &nbsp; &nbsp; &nbsp; }
&nbsp;xprob:=xprob*(1-onebprob(15,5)); &nbsp; &nbsp; &nbsp; &nbsp; { Red Vex &nbsp; &nbsp; &nbsp; }
&nbsp;xprob:=xprob*(1-onebprob(15,6)); &nbsp; &nbsp; &nbsp; &nbsp; { Black Jade &nbsp; &nbsp;}
end; &nbsp;{ docustom }

The above is different routines for me to be able to calculate different "runs", like a typical Laz run, or full dungeon (game) or just some other specific case.

Below is the main function doing the calls. The "fixfile" is a file with list of specific magic items to do the calculations for, it lists prefix, suffix and base items. The mprob file is just a data file holding the same data for monster probability found in my guide for each level. I believe it is the output of the program that calculated those values which I then inserted into my Guide.

Code:
procedure domagicprob;
var
&nbsp;xprob &nbsp; &nbsp; &nbsp; : real;
&nbsp;many &nbsp; &nbsp; &nbsp; &nbsp;: boolean;
&nbsp;i,j &nbsp; &nbsp; &nbsp; &nbsp; : word;
&nbsp;fslot &nbsp; &nbsp; &nbsp; : word;
&nbsp;istart,iend : word;
&nbsp;hdlvl &nbsp; &nbsp; &nbsp; : word;
&nbsp;ok &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: boolean;
begin
&nbsp;readmprob(getpath+'mprob.txt');
&nbsp;readfixdata(getpath+'fixfile.txt');
&nbsp;writeheader;

{$IFDEF allrun}
&nbsp;for pslot:=0 to plast do begin
&nbsp; &nbsp;for sslot:=0 to slast do begin
&nbsp; &nbsp; &nbsp;islot:=255;
&nbsp; &nbsp; &nbsp;ok:=true;
{$ELSE}
&nbsp;if flast>0 then begin
&nbsp; &nbsp;for fslot:=1 to flast do begin
&nbsp; &nbsp; &nbsp;pslot:=fdata[fslot].pslot;
&nbsp; &nbsp; &nbsp;sslot:=fdata[fslot].sslot;
&nbsp; &nbsp; &nbsp;islot:=fdata[fslot].islot;
&nbsp; &nbsp; &nbsp;if not dgame then begin
&nbsp; &nbsp; &nbsp; &nbsp;case islot of
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;83..87 &nbsp;: islot:=islot+4;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;88..255 : islot:=islot+5;
&nbsp; &nbsp; &nbsp; &nbsp;end;
&nbsp; &nbsp; &nbsp;end;
&nbsp; &nbsp; &nbsp;if (pslot>plast) or (sslot>slast) or (islot>ilast) then
&nbsp; &nbsp; &nbsp; &nbsp;ok:=false
&nbsp; &nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp; &nbsp;ok:=true;
{$ENDIF}
&nbsp; &nbsp; &nbsp;qlvlp:=pdata^[pslot,16];
&nbsp; &nbsp; &nbsp;qlvls:=sdata^[sslot,16];

&nbsp; &nbsp; &nbsp;write(target,qlvlp:4);
&nbsp; &nbsp; &nbsp;writename(target,pname^[pslot],1,1);
&nbsp; &nbsp; &nbsp;write(target,qlvls:3);
&nbsp; &nbsp; &nbsp;writename(target,sname^[sslot],1,1);

&nbsp; &nbsp; &nbsp;if dgame then
&nbsp; &nbsp; &nbsp; &nbsp;case islot of
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;152..153 : islot:=151;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;155 &nbsp; &nbsp; &nbsp;: islot:=154;
&nbsp; &nbsp; &nbsp; &nbsp;end
&nbsp; &nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp; &nbsp;case islot of
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;157..158 : islot:=156;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;160 &nbsp; &nbsp; &nbsp;: islot:=159;
&nbsp; &nbsp; &nbsp; &nbsp;end;

&nbsp; &nbsp; &nbsp;if islot=255 then begin
&nbsp; &nbsp; &nbsp; &nbsp;istart:=startbitem;
&nbsp; &nbsp; &nbsp; &nbsp;iend:=ilast; end
&nbsp; &nbsp; &nbsp;else begin
&nbsp; &nbsp; &nbsp; &nbsp;istart:=islot;
&nbsp; &nbsp; &nbsp; &nbsp;iend:=istart;
&nbsp; &nbsp; &nbsp;end;

&nbsp; &nbsp; &nbsp;many:=false;
&nbsp; &nbsp; &nbsp;for islot:=istart to iend do begin
&nbsp; &nbsp; &nbsp; &nbsp;if prefixpossible(islot,pslot) and suffixpossible(islot,sslot) and ok then begin
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if many then
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;write(target,'':61);

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;qlvli:=idata^[islot,24];
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;write(target,qlvli:2);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;writename(target,iname1^[islot],1,1);

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;writeln(pname^[pslot]:25,sname^[sslot]:25,iname1^[islot]:25);

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;many:=true;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for run:=0 to lastrun do begin
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if runs[run]=1 then begin
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for diff:=0 to 2 do begin
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xprob:=1;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case run of
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 : docustom(xprob,hdlvl);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 : docompletedungeon(xprob,hdlvl);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2 : docompletemonsters(xprob,hdlvl);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3 : docompletebosses(xprob,hdlvl);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4 : dolazrun(xprob,hdlvl);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;writexprob(target,xprob,10);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if hdlvl<>0 then
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;writedlvl(target,hdlvl,3)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;write(target,' &nbsp;-');
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;write(target,' &nbsp;');
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;writeln(target);
&nbsp; &nbsp; &nbsp; &nbsp;end;
&nbsp; &nbsp; &nbsp;end;

&nbsp; &nbsp;end;
&nbsp;end;
end; &nbsp;{ domagicprob }

Below are some utility functions called in various places in code posted so far:

Code:
procedure readmprob(filename:string);
var
&nbsp;mprobfile &nbsp;: text;
&nbsp;mprobdata &nbsp;: real;
&nbsp;dlvl,mslot : word;
begin
&nbsp;assign(mprobfile,filename);
&nbsp;reset(mprobfile);
&nbsp;for dlvl:=1 to lastlevel do begin
&nbsp; &nbsp;mprob[totmprobpos,dlvl]:=0;
&nbsp; &nbsp;for mslot:=0 to (totmprobpos-1) do begin
&nbsp; &nbsp; &nbsp;read(mprobfile,mprobdata);
&nbsp; &nbsp; &nbsp;mprob[mslot,dlvl]:=round(mprobdata);
&nbsp; &nbsp; &nbsp;mprob[totmprobpos,dlvl]:=mprob[totmprobpos,dlvl]+mprob[mslot,dlvl];
&nbsp; &nbsp;end;
&nbsp; &nbsp;readln(mprobfile);
&nbsp;end;
&nbsp;close(mprobfile);
end; &nbsp;{ readmprob }


function prefixpossible(islot,pslot:word):boolean;
var
&nbsp;ok : boolean;
begin
&nbsp;ok:=false;
&nbsp;case idata^[islot,12] of
&nbsp; &nbsp;12,13 &nbsp; : ok:=pdata^[pslot,20] and &nbsp;1<>0; &nbsp;{ jewlery }
&nbsp; &nbsp;3 &nbsp; &nbsp; &nbsp; : ok:=pdata^[pslot,20] and 16<>0; &nbsp;{ bow &nbsp; &nbsp; }
&nbsp; &nbsp;10 &nbsp; &nbsp; &nbsp;: ok:=pdata^[pslot,21] and &nbsp;1<>0; &nbsp;{ staff &nbsp; }
&nbsp; &nbsp;1,2,4 &nbsp; : ok:=pdata^[pslot,21] and 16<>0; &nbsp;{ weapon &nbsp;}
&nbsp; &nbsp;5 &nbsp; &nbsp; &nbsp; : ok:=pdata^[pslot,22] and &nbsp;1<>0; &nbsp;{ shield &nbsp;}
&nbsp; &nbsp;6,7,8,9 : ok:=pdata^[pslot,22] and 16<>0; &nbsp;{ armor &nbsp; }
&nbsp;end;
&nbsp;prefixpossible:=ok;
end; &nbsp;{ prefixpossible }


function suffixpossible(islot,sslot:word):boolean;
var
&nbsp;ok : boolean;
begin
&nbsp;ok:=false;
&nbsp;case idata^[islot,12] of
&nbsp; &nbsp;12,13 &nbsp; : ok:=sdata^[sslot,20] and &nbsp;1<>0; &nbsp;{ jewlery }
&nbsp; &nbsp;3 &nbsp; &nbsp; &nbsp; : ok:=sdata^[sslot,20] and 16<>0; &nbsp;{ bow &nbsp; &nbsp; }
&nbsp; &nbsp;10 &nbsp; &nbsp; &nbsp;: ok:=sdata^[sslot,21] and &nbsp;1<>0; &nbsp;{ staff &nbsp; }
&nbsp; &nbsp;1,2,4 &nbsp; : ok:=sdata^[sslot,21] and 16<>0; &nbsp;{ weapon &nbsp;}
&nbsp; &nbsp;5 &nbsp; &nbsp; &nbsp; : ok:=sdata^[sslot,22] and &nbsp;1<>0; &nbsp;{ shield &nbsp;}
&nbsp; &nbsp;6,7,8,9 : ok:=sdata^[sslot,22] and 16<>0; &nbsp;{ armor &nbsp; }
&nbsp;end;
&nbsp;suffixpossible:=ok;
end; &nbsp;{ suffixpossible }


function pcursed(pslot:word):boolean;
begin
&nbsp;pcursed:=pdata^[pslot,32]=0;
end; &nbsp;{ pcursed }


function scursed(sslot:word):boolean;
begin
&nbsp;scursed:=sdata^[sslot,32]=0;
end; &nbsp;{ scursed }


function ipossiblemonster(lvl:word):word;
var
&nbsp;i &nbsp; &nbsp; &nbsp; &nbsp;: word;
&nbsp;possible : word;
begin
&nbsp;possible:=0;
&nbsp;for i:=startbitem to ilast do begin
&nbsp; &nbsp;if lvl>=idata^[i,24] then
&nbsp; &nbsp; &nbsp;possible:=possible+idata^[i,0];
&nbsp;end;
&nbsp;ipossiblemonster:=possible;
end; &nbsp;{ ipossiblemonster }


function ipossibleboss(lvl:word):word;
var
&nbsp;i &nbsp; &nbsp; &nbsp; &nbsp;: word;
&nbsp;possible : word;
begin
&nbsp;possible:=0;
&nbsp;for i:=startbitem to ilast do begin
&nbsp; &nbsp;if (lvl>=idata^[i,24]) and (idata^[i,0]>0) and (idata^[i,56] in [0,23..26]) then
&nbsp; &nbsp; &nbsp;inc(possible);
&nbsp;end;
&nbsp;ipossibleboss:=possible;
end; &nbsp;{ ipossibleboss }


function ipossibleother(lvl:word):word;
var
&nbsp;i &nbsp; &nbsp; &nbsp; &nbsp;: word;
&nbsp;possible : word;
begin
&nbsp;possible:=0;
&nbsp;for i:=startbitem to ilast do begin
&nbsp; &nbsp;if (lvl>=idata^[i,24]) and (idata^[i,0]>0) then
&nbsp; &nbsp; &nbsp;inc(possible);
&nbsp;end;
&nbsp;ipossibleother:=possible;
end; &nbsp;{ ipossibleother }


function jpossible(lvl,islot:word):word;
var
&nbsp;i &nbsp; &nbsp; &nbsp; &nbsp;: word;
&nbsp;possible : word;
begin
&nbsp;possible:=0;
&nbsp;for i:=151 to 160 do begin
&nbsp; &nbsp;if ((idata^[islot,56])=(idata^[i,56])) and (lvl>=idata^[i,24]) then
&nbsp; &nbsp; &nbsp;inc(possible);
&nbsp;end;
&nbsp;jpossible:=possible;
end; &nbsp;{ jpossible }


function ppossible(lvl,islot:word;curseok:boolean):real;
var
&nbsp;i &nbsp; &nbsp; &nbsp; &nbsp;: word;
&nbsp;possible : real;
begin
&nbsp;possible:=0;
&nbsp;for i:=0 to plast do begin
&nbsp; &nbsp;if (lvl>=pdata^[i,16]) and ((lvl div 2)<=pdata^[i,16]) and prefixpossible(islot,i) then begin
&nbsp; &nbsp; &nbsp;if pdata^[i,32]=1 then
&nbsp; &nbsp; &nbsp; &nbsp;possible:=possible+1
&nbsp; &nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp; &nbsp;if curseok then
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;possible:=possible+1/3;
&nbsp; &nbsp;end;
&nbsp;end;
&nbsp;ppossible:=possible;
end; &nbsp;{ ppossible }


function spossible(lvl,islot:word;curseok:boolean):real;
var
&nbsp;i &nbsp; &nbsp; &nbsp; &nbsp;: word;
&nbsp;possible : real;
begin
&nbsp;possible:=0;
&nbsp;for i:=0 to slast do begin
&nbsp; &nbsp;if (lvl>=sdata^[i,16]) and ((lvl div 2)<=sdata^[i,16]) and suffixpossible(islot,i) then begin
&nbsp; &nbsp; &nbsp;if sdata^[i,32]=1 then
&nbsp; &nbsp; &nbsp; &nbsp;possible:=possible+1
&nbsp; &nbsp; &nbsp;else
&nbsp; &nbsp; &nbsp; &nbsp;if curseok then
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;possible:=possible+1/3;
&nbsp; &nbsp;end;
&nbsp;end;
&nbsp;spossible:=possible;
end; &nbsp;{ spossible }


function irange(islot:word):word;
begin
&nbsp;case islot of
&nbsp; &nbsp;48..76 : irange:=idata^[islot,44]-idata^[islot,40]+1; &nbsp;{ AC }
&nbsp;else
&nbsp; &nbsp;irange:=1;
&nbsp;end;
end; &nbsp;{ irange }


function prange(pslot:word):word;
begin
&nbsp;case pslot of
&nbsp; &nbsp; 0..23 : prange:=pdata^[pslot,12]-pdata^[pslot,8]+1; &nbsp; &nbsp; &nbsp;{ range &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp;24 : prange:=26*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;25 : prange:=21*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;26 : prange:=16*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;27 : prange:=15*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;28 : prange:=15*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;29 : prange:=15*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;30 : prange:=15*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;31 : prange:=15*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;32 : prange:=15*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;33 : prange:=25*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp; &nbsp; &nbsp;34 : prange:=25*(pdata^[pslot,12]-pdata^[pslot,8]+1); { king's serie }
&nbsp; &nbsp;35..80 : prange:=pdata^[pslot,12]-pdata^[pslot,8]+1; &nbsp; &nbsp; &nbsp;{ range &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp;81..82 : prange:=1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { F/L damage &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp;84 : prange:=pdata^[pslot,12]-pdata^[pslot,8]+1; &nbsp; &nbsp; &nbsp;{ range &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp;85 : prange:=15*(pdata^[pslot,12]-pdata^[pslot,8]+1); { Doppel kolla }
&nbsp;else
&nbsp; &nbsp;prange:=1;
&nbsp;end;
end; &nbsp;{ prange }


function srange(sslot:word):word;
begin
&nbsp;case sslot of
&nbsp; &nbsp; 0..67 : srange:=sdata^[sslot,12]-sdata^[sslot,8]+1; &nbsp; &nbsp; &nbsp;{ range &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp;68..73 : srange:=1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { F/L damage &nbsp; }
&nbsp; &nbsp;74..75 : srange:=sdata^[sslot,12]-sdata^[sslot,8]+1; &nbsp; &nbsp; &nbsp;{ range &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp;76 : srange:=1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { thorns &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp;77..97 : srange:=sdata^[sslot,12]-sdata^[sslot,8]+1; &nbsp; &nbsp; &nbsp;{ range &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp;else
&nbsp; &nbsp;srange:=1;
&nbsp;end;
end; &nbsp;{ srange }

I believ now that I have posted about everything as far as the calculations goes. I still have not been home so I can upload the actual file to my website.
There are three types of people in the world. Those who can count and those who can't.
Reply
#17
never worked with TP, i had some java, haskell and prolog but since TP, basic and C are all java variants in that they are imperative i know some about them. Compiler was the word i searched for ;) no doubt i'll find one if i look around a little.
thanks for all the replies btw (although it mightnt be all for me ;))
Characters: Standard Diablo Rogues: 'Paardenpoep' l36, 'Purechocolade' l31; Sorcerers 'Toverkol' l40, 'Zwarte Piet' l32, 'ZureHaring' l28 (no fb), Warrior 'Klotebeest' l29, LoL characters: rogues 'Roggebrood' l26 and 'Ironvrouw' l7, sorcerer ToverLol l20, warrior LolleBolleGijs l16 ironman character name 'Ironlady', read Toverlol's journey log
Reply
#18
Toverkol,May 28 2005, 03:38 AM Wrote:never worked with TP, i had some java, haskell and prolog but since TP, basic and C are all java variants in that they are imperative i know some about them. Compiler was the word i searched for ;) no doubt i'll find one if i look around a little.
thanks for all the replies btw (although it mightnt be all for me ;))
[right][snapback]78784[/snapback][/right]

First off, C is not a Java variant. Java is a C++ variant, and C++ is derived from C. (Your timeline was backwards.) You may have some success with the GNU Pascal Compiler, which has a Windows port of version 3.2.2 linked from MinGW's download page. Note that I have not tested this binary, as Pascal is considered in most circles to be a language long dead - and rightfully so. The 3.2.x series of GCC is badly out of date (3.3, 3.4, and 4.0 are all released), but 3.2 is the newest GPC for Windows, as best I can tell.
Reply
#19
quote myself:
but since TP, basic and C are all java variants in that they are imperative i know some about them
/quote

meant that all these languages are imperative, that is the way in I which meant variant.

thanks for your help though :)
Characters: Standard Diablo Rogues: 'Paardenpoep' l36, 'Purechocolade' l31; Sorcerers 'Toverkol' l40, 'Zwarte Piet' l32, 'ZureHaring' l28 (no fb), Warrior 'Klotebeest' l29, LoL characters: rogues 'Roggebrood' l26 and 'Ironvrouw' l7, sorcerer ToverLol l20, warrior LolleBolleGijs l16 ironman character name 'Ironlady', read Toverlol's journey log
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)