d2jsp
Log InRegister
d2jsp Forums > Diablo II > Diablo 2 Discussion > Strategy & Guides > Rerolling Magic Items > 3 Perfect Gems + 1 Magic Item
123Next
Add Reply New Topic New Poll
Member
Posts: 25,580
Joined: May 20 2006
Gold: 822.00
May 18 2009 02:21pm
Rerolling Magic Items





Contents
Basics
Affix Level
Affix Chances
Cube Charms



Basics

Consider the recipe,


3 Perfect Gems (any type and mixture) + Magic Item (any type) --> New Magic Item (of the same type)


listed on the Arreat Summit Horadric Cube page: http://classic.battle.net/diablo2exp/items/cube.shtml. Rerolling a magic item with 3 perfect gems is sometimes referred to as cubing.

ilvl and Properties
The above recipe preserves ilvl (ilvl of output = ilvl of input). Hence, given a sufficient supply of perfect gems, you can keep rerolling a magic item and always have the exact same odds of rolling what you want. Notice how this is fundamentally different from recipes in which the ilvl is either fixed at a lower value or degraded with each roll.


Only the ilvl of the Magic Item matters when rerolling with perfect gems.

The New Magic Item will acquire random properties, determined by item type and ilvl.


Character level, difficulty, player count etc. do not matter. The game was not designed to obey your rumours; it does not care what you like or how you think it should be. Horadric Cube recipes are explained in CubeMain.txt (download and install ATMA V to view this and other game files) and the above recipe explicitly states to use 100 % of the ilvl.

The ilvl, while not visible in-game, may be determined, depending on how the item was obtained (dropped, gambled, shopped).
  • Monster drops: ilvl = mlvl (monster level).
    For monster levels, check the Treasure Classes guide, sections: "Monster TCs" (subsection: "Monster Level (mlvl)") , "SuperUniques and Bosses".
  • Gambled items: ilvl = clvl - 5 + rnd(10) (character level). That is, from clvl - 5 to clvl + 4, uniformly distributed (10 % chance of each).
    The ilvl of gambled items is capped below at 5 and above at 99.
    Maximum resell value in Gold (Act 1, ... , Act 5),
    - Normal: 5k, 10k, 15k, 20k, 25k
    - Nightmare: 30k
    - Hell: 35k
    The results of gambling are unaffected by vendor. Gamble in Hell.
Chest and rack drops, both of which are hardly ever used in practice: ilvl = Alvl or ilvl = Alvl - 1 (area level).


Affix Level

When an item with affixes is generated, in this case a magic item, the item's affix level (alvl) is calculated from ilvl and qlvl (base item quality level, see below). Based on alvl and item type, the game looks up the available affixes. Every affix has a level, the minimum alvl which the item must meet to have a chance of acquiring that affix. Higher alvl ~ larger affix pool. Magic items receive 1 prefix, 1 suffix, or 1 of each. Due to differences in affix frequencies, some affixes are more likely to spawn than others.

Check my profile: Diablo II Resources --> Item Statistics --> Affix Tables.

Affix Level Calculation

Code
IF(magiclvl > 0)

  (1) THEN alvl = max{ilvl,qlvl} + magiclvl

ELSE IF(max{ilvl,qlvl} < 99 - int(qlvl/2))

  (2) THEN alvl = max{ilvl,qlvl} - int(qlvl/2)
  (3) ELSE alvl = 2*max{ilvl,qlvl} - 99

; ilvl and alvl are capped at 99

Ref: Basin Wiki, D2 Affix Level Chart, http://wiki.theamazonbasin.com/index.php/D2_Affix_Level_Chart

Only Circlets, Sorceress Orbs, Staves, and Normal + Exceptional Wands have magiclvl > 0,
  • Circlet (qlvl 24): magiclvl = 3
  • Coronet (qlvl 52): magiclvl = 8
  • Tiara (qlvl 70): magiclvl = 13
  • Diadem (qlvl 85): magiclvl = 18
  • Sorceress Orbs + Staves: magiclvl = 1
    Normal + Exceptional Wands: magiclvl = 1
Quality levels (qlvl) are listed as Quality Level on the Arreat Summit Weapons and Armor pages: http://classic.battle.net/diablo2exp/items/weaponsandarmor.shtml.

For Jewelry (values from Misc.txt),
  • Amulet, Ring, Jewel: qlvl = 1
  • Small Charm: qlvl = 28
  • Large Charm: qlvl = 14
  • Grand Charm: qlvl = 1
Let's state some key results derived from the affix level formulae above.

Amulet, Ring, Jewel, Grand Charm
Since these have qlvl 1, the term, int(qlvl/2) is 0 and hence, if ilvl < 99, (2) alvl = ilvl, otherwise (ilvl = 99): (3) alvl = 2*ilvl - 99 = 99 = ilvl. Thus, alvl = ilvl no matter what.


Amulet, Ring, Jewel, and Grand Charm: alvl = ilvl.


Each of the +2 to [class] Skill Levels / Skills prefixes on Amulets are level 90 (highest affix). Which means you cannot gamble a +2 to [class] Skill Levels / Skills Amulet before clvl 86. And just 3 monsters in the game are mlvl 90 or higher: Hell Diablo {mlvl 94}, Nihlathak {mlvl 95}, and Baal {mlvl 99}.

The latter also applies when we consider the Grand Charm suffix, "of Vita": +41-45 to Life (level 91). On a related note, each of the +1 to [skilltab] prefixes on Grand Charms are level 50. The first area in the game having level 50 regular monsters is the Nightmare Great Marsh (Act 3). At this level, the GCs can even get as much as +26-30 to Life.

Circlet, Coronet, Tiara, Diadem
Since these have magiclvl > 0, we get (1) alvl = max{ilvl,qlvl} + magiclvl. Suppose again, we look at the +2 [class] Skill Levels / Skills prefixes (level 90, highest affix on Circlets). We obtain the following results,


Any Circlet, Coronet, or Tiara of at least ilvl 87, 82, or 77, respectively, may acquire any affix.

Since max{ilvl,85} + 18 > 99, any Diadem will have alvl 99, regardless of ilvl
.


Monarch (qlvl 72)
Suppose we want a Jeweler's Monarch of Deflecting (JMoD),
  • "Jeweler's" (level 55)
    Socketed (4)
  • "of Deflecting" (level 11)
    +30 % Faster Block Rate
    +20 % Increased Chance of Blocking
We need to know the minimum ilvl corresponding to at least alvl 55. According to the affix level formulae, it is first checked whether max{ilvl,qlvl} < 99 - int(qlvl/2). Inserting qlvl = 72, we get max{ilvl,72} < 63. This is impossible, so (3) is used. Since we want alvl >= 55,

2*max{ilvl,72} - 99 >= 55 <=> max{ilvl,72} >= 77

Hence, we need a Monarch of at least ilvl 77 to have even the slightest chance of rolling a JMoD.


Affix Chances

In practice, we may want a range of sufficient ilvls rather than restricting ourselves to one value. For instance, when cubing for the +41-45 to Life suffix ("of Vita", level 91) on a Grand Charm, it makes no difference if the charm is ilvl 94 (Hell Diablo), ilvl 95 (Hell Nihlathak), or ilvl 99 (Hell Baal); each one satisfies ilvl >= 91, and there are no higher affixes.

Depending on item type and desired affix(es), in some cases using an ilvl greater than necessary means that we expand the affix pool and thus risk rolling higher (unwanted) affixes. To have the best possible odds, we should use at least the required minimum ilvl, but less than the ilvl corresponding to a higher affix if we want to prevent it from spawning.

Aside from this, we rely solely on the Wheel of Fortune.

Affix Frequencies
When a magic item is generated, the game has to determine if it gets a prefix only, a suffix only, or both. In doing so, it uses the following probabilities,
  • Prefix (P) only: 25 %
  • Suffix (S) only: 50 %
  • Prefix + Suffix (P+S): 25 %
Next, it picks affixes accordingly, as either P, S, or P+S has been selected,
  • Affixes are picked from the pool corresponding to the alvl
  • If P+S was chosen, P and S are selected independently of each other
  • Each affix has its own affix frequency (weight), the relative likeliness to be chosen
  • When an affix has several possible values which may spawn, the game picks one at random
  • The chance to pick a certain affix is the affix frequency divided by the sum of affix frequencies (P or S)
Refer to the Affix Tables for affix frequencies (see the reference in the previous section).

Code
Affix chances

   (4) Prob_P = 1/4 * frequency_P / sum_P
   (5) Prob_S = 1/2 * frequency_S / sum_S
   (6) Prob_P+S = 1/4 * frequency_P / sum_P * frequency_S / sum_S

; frequency_X: the sum of affix frequencies corresponding to the desired affixes (prefixes or suffixes).
; sum_X: the sum of all affix frequencies (prefixes or suffixes available for the given ilvl, respectively).

Use the option calculate Affix-Chances in the Affix Tables to confirm the results below. DON'T FORGET to set the Item-Level (ilvl).

Grand Charm
Suppose we had one drop from a regular monster in the Nightmare Great Marsh. Since ilvl = mlvl = Alvl = 50 and alvl = ilvl, this charm has alvl 50, just sufficient to generate any of the +1 to [skilltab] prefixes (level 50), which, according to the Affix Tables, have frequency 1 each. Let's determine the odds of rolling any of the +1 to [skilltab] ([class] Only) prefixes.

ilvl 50: sum_P = 230. A prefix can spawn either alone or combined with a suffix. With 21 (7 x 3) desired prefixes, frequency_P = 21, and no suffix (or any), (4) and (6) yield,
  • Chance = Prob_P + Prob_P+S = (1/4 + 1/4) * frequency_P / sum_P = 1/2 * 21/230 = 21:460 ~ 4.57 %
If we further demand a specific +1 to [skilltab] prefix, the odds are 21 times lower: 1:460 ~ 0.22 %. Don't be too surprised if you have to spend hundreds of perfect gems rolling for a specific "skiller".

Monarch
Here is an excellent opportunity to effectively waste your perfect gems: Jeweler's Monarch of Deflecting (JMoD). Assume we were fortunate enough to come by an ilvl 77 Monarch, granting us the best possible odds. Using the Affix Tables, we get

ilvl 77: sum_P = 158, sum_S = 135; "Jeweler's": frequency = 1, "of Deflecting": frequency = 6.

From (6),
  • Chance = Prob_P+S = 1/4 * 1/158 * 6/135 = 1:14220 ~ 0.00703 %
Kickass odds, eh ? :wacko:
Member
Posts: 25,580
Joined: May 20 2006
Gold: 822.00
May 18 2009 02:21pm
Cube Charms

If you demand only a prefix or a suffix and are not too restrictive about either one, the odds are at least reasonable (e.g. ~ 4-5 % for a random skilltab on a Grand Charm). But as soon as you want a specific prefix and suffix, chances are discouragingly poor. Cubing for specific results, such as a JMoD, a "Jeweler's ... of the Whale" (Body Armor), or one of those 6/40 Amazon javelins, is not likely to pay off.

The table presents affix chances for select item types and affixes.

Code

                                                                 Small Charm

Prefix(es)                   Suffix                  ilvl  1)    ProbMin (%)  2)       ProbMax (%)  2)      Prob300   Prob3000   Prob30000  3)

                             "of Vita"               61-91        1:23    (4.3478)      3:65    (4.6154)     98.83     100.00     100.00
{unspecified}                +16-20 to Life                                                                  99.11     100.00     100.00

"Fine"                       "of Vita"               61           4:8349  (0.0479)      4:6045  (0.0662)      4.68      38.07      99.17
+1-3 to Maximum Damage       +16-20 to Life                                                                   6.40      48.41      99.87
+10-20 to Attack Rating

"Ruby" / ... / "Emerald"     "of Balance"            54           8:8349  (0.0958)      8:5005  (0.1598)      9.14      61.66      99.99
[element] Resist +10-11%     +5% FHR                                                                         14.78      79.80     100.00

"Ruby" / ... / "Emerald"     "of Vita"               61           8:8349  (0.0958)      8:6045  (0.1323)      9.14      61.66      99.99
[element] Resist +10-11%     +16-20 to Life                                                                  12.40      73.40     100.00

"Shimmering"                 "of Balance"            51-52        1:8349  (0.0120)      1:4235  (0.0236)      1.19      11.29      69.81
All Resistances +3-5         +5% FHR                                                                          2.33      21.03      90.57

"Shimmering"                 "of Vita"               61           1:8349  (0.0120)      1:6045  (0.0165)      1.19      11.29      69.81
All Resistances +3-5         +16-20 to Life                                                                   1.64      15.25      80.88

"Serpent's"                  "of Balance"            62-70        4:8349  (0.0479)      4:6565  (0.0609)      4.68      38.07      99.17
+13-17 to Mana               +5% FHR                                                                          5.91      45.64      99.77

"Serpent's"                  "of Vita"               62-70        4:8349  (0.0479)      4:6565  (0.0609)      4.68      38.07      99.17
+13-17 to Mana               +16-20 to Life                                                                   5.91      45.64      99.77

"Toxic"                      "of Anthrax"  4)        77           1:33396 (0.0030)      1:27560 (0.0036)      0.30       2.95      25.88
+100 PD over 5 s             +50 PD over 6 s                                                                  0.36       3.56      30.43

"Pestilent"                  "of Anthrax"  5)        94           1:33396 (0.0030)      1:31740 (0.0032)      0.30       2.95      25.88
+175 PD over 6 s             +50 PD over 6 s                                                                  0.31       3.10      27.03


                                                                 Grand Charm

Prefix(es)                   Suffix(es)              ilvl  1)    ProbMin (%)  2)       ProbMax (%)  2)      Prob300   Prob3000   Prob30000  3)

"...'s"                                              50-54       21:484   (4.3388)     21:460   (4.5652)     98.82     100.00     100.00
+1 to [skilltab] {any}       {unspecified}                                                                   99.07     100.00     100.00

"...'s"                      "of ..."                91-99        1:184   (0.5435)     21:3025  (0.6942)     42.01      99.57     100.00
+1 to [skilltab] {any}       +X to Life                                                                      50.17      99.91     100.00

"...'s"                      "of Sustenance"         61-66       21:24200 (0.0868)      7:6864  (0.1020)      8.32      58.03      99.98
+1 to [skilltab] {any}       +31-35 to Life                                                                   9.70      63.95     100.00

"...'s"                      "of Vita"               77-90       21:24200 (0.0868)      7:7744  (0.0904)      8.32      58.03      99.98
+1 to [skilltab] {any}       +36-40 to Life                                                                   8.65      59.52      99.99

"...'s"                      "of Vita"               91-99       21:24200 (0.0868)     21:24200 (0.0868)      8.32      58.03      99.98
+1 to [skilltab] {any}       +41-45 to Life

"...'s"                      "of Balance"            50-54       21:24200 (0.0868)      1:920   (0.1087)      8.32      58.03      99.98
+1 to [skilltab] {any}       +12% FHR                                                                        10.30      66.30     100.00

For a specific skilltab, divide ProbMin, ProbMax by 21.


                                                                   Monarch

Prefix                       Suffix                  ilvl  1)    ProbMin (%)  2)       ProbMax (%)  2)      Prob300   Prob3000   Prob30000  3)

"Jeweler's"                  "of Blocking"           77-78        7:91932 (0.0076)      7:85320 (0.0082)      0.76       7.33      53.30
Socketed (4)                 +15 % FBR                                                                        0.82       7.88      55.98
                             +10 % ICB

"Jeweler's"                  "of Deflecting"         77-78        1:15322 (0.0065)      1:14220 (0.0070)      0.65       6.32      47.94
Socketed (4)                 +30 % FBR                                                                        0.70       6.79      50.50
                             +20 % ICB


                                           Maiden / Ceremonial / Matriarchal Javelin (Amazon Only)  6)

Prefix                       Suffix                  ilvl  1)    ProbMin (%)  2)       ProbMax (%)  2)      Prob300   Prob3000   Prob30000  3)

"Lancer's"                   "of Quickness"          71 / 77 /   5:335712 (0.0015)     5:317376 (0.0016)      0.15      1.48       13.84
+3 to J & S Skills           +40% IAS                                                                         0.16      1.56       14.58
                                                     80-83       5:335712 (0.0015)     1:63684  (0.0016)      0.15      1.48       13.84
                                                                                                              0.16      1.56       14.53

1) Range of ilvl for maximum affix chances (ProbMax).
2) Min and max chance of rolling the specified affix(es). For a specific value, divide chance by the number of values possible for that affix.
3) Chance of rolling the specified affix(es), having spent at most 300, 3000, or 30000 perfect gems (100, 1000, or 10000 rerolls).
   Values based on ProbMin, ProbMax. Rounded to 0.01 accuracy (the odds are less than 100% in a finite number of rerolls).
4) 313 PDSC ("+313 Poison Damage over 11 seconds").
5) 451 PDSC ("+451 Poison Damage over 12 seconds").
6) In short, the chance to roll either 4/40, 5/40, or 6/40.

Notice, a Grand Charm from Hell Diablo, Nihlathak, or Baal is statistically the best for "skillers" with a random amount of + to Life. And it is the only one that might get the elusive +41-45 to Life suffix ("of Vita", level 91).

Finally, a little non-trivial contest: which of these is the rarest (given proper base items) ?
  1. Fortuitous Amulet of Luck: 50 % Better Chance of Getting Magic Items
  2. Shimmering Small Charm of Vita: +20 to Life, All Resistances +5
  3. Harpoonist's Grand Charm of Vita: +1 to Javelin and Spear Skills (Amazon Only), +45 to Life
  4. Jeweler's Monarch of Deflecting: Defense: 148
Assume the worst case: as many affixes available as possible. If you think this is silly, remember that if we pick the ilvl range giving maximum odds, we freeze out several other useful affixes on the Amulet and the Small Charm. The Grand Charm leaves no choice anyway. And the difference between ilvl 77-78 and 99 is hardly noticeable for a Monarch (see the previous table). Having several outs is preferred over slightly higher odds of just one specific affix combination.

The results are graphed below (notice: 100 * 10^3 = 100 000 rerolls ~ 300 000 perfect gems).




Finishing order: a, d, b, c. Yeah, have fun rolling either one :wacko:

This post was edited by Faelwen on May 18 2009 02:26pm
Member
Posts: 10,688
Joined: Mar 8 2008
Gold: 32,590.00
May 18 2009 04:23pm
gj as usual..kinda ruined any fun cubing ever had tho :D

oh one thing..

add a section bout cubing items with 3 + skill bonusses such as javelins, trap claws, pelts..barb helms

what if you wanna cube a 6/40 can a java without 3 skills that arent added through a prefix get the + 3 skills after cubing..etc etc etc



This post was edited by impiousbe on May 18 2009 04:45pm
Banned
Posts: 7,411
Joined: Feb 23 2009
Gold: 1,362.40
Warn: 10%
May 18 2009 04:45pm
Nice Guide :)
Member
Posts: 127,924
Joined: Aug 28 2005
Gold: 3,012.71
May 19 2009 01:54am
Yay!
Member
Posts: 25,580
Joined: May 20 2006
Gold: 822.00
May 19 2009 04:28am
Quote (impiousbe @ Tue, 19 May 2009, 00:23)
gj as usual..kinda ruined any fun cubing ever had tho :D

oh one thing..

add a section bout cubing items with 3 + skill bonusses such as javelins, trap claws, pelts..barb helms

what if you wanna cube a 6/40 can a java without 3 skills that arent added through a prefix get the + 3 skills after cubing..etc etc etc

That would have made the guide much too long. Staffmods (the random skill bonuses) in particular are anything but easy to explain in detail.

I do not have any data on auto prefixes, as they are not included with ATMA. There are references to them in Armor.txt and Weapons.txt, but the target file describing them is missing.

At best, +1-3 to Javelin and Spear Skills (Amazon Only) is uniformly distributed, so the odds of 6/40 are at most 1/3rd of the total (4-6/40). That is, ~ 1:200 000.

Quote (RaBBit3x @ Tue, 19 May 2009, 09:54)
Yay!

:thumbsup:

This post was edited by Faelwen on May 19 2009 04:41am
Member
Posts: 6,872
Joined: Mar 14 2009
Gold: 2,300.00
May 30 2009 02:07pm
damn this guide is good dude, i have to read more times to udnerstand all lol, but gz :)
Member
Posts: 14,304
Joined: Jan 4 2009
Gold: 0.00
May 30 2009 02:29pm
thx, I leaned something today.. I never knew baal charms are best for any skillers, always thought their only advantage is the chance for 41-45 life.. :)

This post was edited by DarkforceH on May 30 2009 02:29pm
Member
Posts: 20,806
Joined: Dec 23 2008
Gold: 4,250.69
May 30 2009 02:31pm
could that possibly be any more confusing...?
Member
Posts: 10,688
Joined: Mar 8 2008
Gold: 32,590.00
May 30 2009 02:57pm
Quote (dr_deranged @ Sat, May 30 2009, 09:31pm)
could that possibly be any more confusing...?


yes
Go Back To Strategy & Guides Topic List
123Next
Add Reply New Topic New Poll