Goryani
Diabloii.Net Member
Questions about Item Generation
I have a few questions about Item Generation:
1. Does D2 use integer division, real division, or rounding? I know that integer division is used in many places, but I'm not sure if integer division is used exclusively. In the following calculations, which steps, if any, use integer division?
I have a few questions about Item Generation:
1. Does D2 use integer division, real division, or rounding? I know that integer division is used in many places, but I'm not sure if integer division is used exclusively. In the following calculations, which steps, if any, use integer division?
2. What is a good way to deal with the probabilities of a wasted 7th drop from act bosses? Here is what I have so far:1) Find proper line in itemratio.txt.
2) Chance = (BaseChance - ((ilvl-qlvl)/Divisor)) * 128
3) if (we check for unique, set or rare quality) EffectiveMF=MF*Factor/(MF+Factor)
else EffectiveMF=MF
4) Chance= Chance* 100/(100+ EffectiveMF).
5) if (Chance 6) FinalChance=Chance-(Chance*QualityFactor/1024)
7) If (RND[ FinalChance ]<128) return Success
else return Fail
- If the NoDropRate = 0, then you just treat the mob as a pick 6 mob instead of a pick 7 mob: Chance of at least 1 item X = 1-(1-"Chance of 1 item X per pick")^6
- However, if NoDropRate > 0, the mob will attempt to drop 7 items (NoDropRate)^7 percent of the time (it's in decimal form, not % form). During these cases, we should also treat the calculations as a pick6 mob instead of a pick7 mob. Am I off my rocker or wouldn't the expected value formula apply here? For NoDropRate^7 percent of the time we use the pick6 formula and for 1-(NoDropRate^7) percent of the time we use the pick7 formula. In other words, for NoDropRate > 0: Chance of at least 1 item X = (1-(NoDropRate^7))*(1-(1-"Chance of 1 item X per pick")^7) + (NoDropRate^7)*(1-(1-"Chance of 1 item X per pick")^6).