- Mar 13, 2019
- 1,189
- 1,308
- 113
[Guide] The Super- and Sparkly Chest Reference (1.07-1.14d)
Welcome to what will hopefully be the definite resource on regular, special and sparkly chests!
Some of the information here has been known for a long time whereas some is brand new (at least I could not find it elsewhere). The first to provide accurate information about chests was Jarulf whose knowledge was compiled into a guide by Urlik_Skarsol . The additional information I provide here is due to @Fruit who went through the code relating to (chest) drops thoroughly once more and provided a myriad of details that were never made public and extend our understanding of chests significantly.
Thanks go out to @Jarulf who started all this over 15 years ago and to @Fruit who revived it all and shared a staggering amount of information on game mechanics with the SPF!
Throughout the terms superchest and special chest are used interchangeably, they should not be confused with sparkly chests.
Initialization (Seeding)
When an object is spawned it may be 'initialized', i.e. it is assigned a random seed which is then used to carry out calculations related to that object. There are multiple initialization algorithms specified in the code but the ones of interest to us are InitFn3 and InitFn57 both of which assign a 16 bit seed to an object. Sparkly chests use InitFn57 while regular and special chests use InitFn3 in particular basically all chests use a 16 bit seed to determine what they drop.
Both initfn3 and initfn57 take a 64 bit seed as an input (which is different each game and each time you open a chest) and do a random roll of 0 to 65533. The result of this roll is incremented by 1 and then used as the new seed. So there are a total of 65534 seeds or 2^16-2 if we want to display it with powers of 2. This means there are no 'truncations' of a 64 bit seed happening, rather a random roll (albeit with a large range) is done, just like the game would roll for the stats on an item.
Now the game stores all its seeds as pairs of 32 bit integers so that in theory it is capable of handling 64 bit seeds. However after initfn3 or initfn57 did their job of creating a 16 bit seed the first 32 bit is filled with the seed just created while the second 32 bit seed is set to 0x29A which is the hexadecimal representation of 666.
Drop Cycles
In the next sections it will be explained how a chest drops and one term that will be used repeatedly is that of 'drop cycle'. When we say that a 'drop cycle' happens that just means that the game calls on one of the chest TCs to perform a drop. All expansion patches have the same chest TCs, Classic 1.00-1.06b however has completely different chest TCs.
This scheme applies to all chest TCs with the exception of 'Act 1 Chest C' and 'Act 2 Chest C' where the weights are slightly different. Here y refers to difficulty and x is the number of the Act. Also note that for all acts and difficulties from normal act 4 onwards the chest TCs B and C are actually identical.
Which Chest TC is selected?
The chest TC the game calls is determined via a routine which is the same in every patch but uses area level as well as a few hardcoded values which change through the patches. To understand what is happening we need to know this about the areas of the game:
Now all areas of the act will be assigned a Chest TC based on the 'third' of the level range they fall into:
Also there is a blunder in act 5 where in some patches instead of the first non-Town area the game looks up the town ID for the lower alvl. However this level is 0 which means that the level range the game determines is much too big and as a consequence the first two chest TCs are never used.
Fruit went through the trouble of compiling a list of chest TCs for each area in each patch:
Another oddity of chests related to this is the way that quality selection works (if it is used at all). Once a chest TC has been chosen the game will falsely pass the chest case (i.e. A, B or C) on to the quality selection instead of the ilvl (which is equal to the level of the area the chest spawned in). To be more precise it will pass 0, 1 or 2 for A, B or C respectively.
Furthermore he group and level column of TreasurclassEx.txt are NOT used to determine which chest TC is used, they are purely decorative.
What Chest TC can drop which runes?
The highest rune a chest may drop is the same across the same act and difficulty and after Act 4 Normal is incremented by two each time the next difficulty or act is reached until it reaches Cham in Act 4 Hell.
How do Chests drop?
Each non-sparkly chest is assigned a flag which determines whether it is special or not and depending on that executes either the special chest code or the regular chest code. In both cases it is vital to the drop procedure whether the chest was locked.
The chance for a chest to be locked is [monlvl1/2]+8 % where monlvl1 is an area dependent variable stored in levels.txt. For all intents and purposes this number is actually the level of the area in normal difficulty of Classic Diablo 2. For the current patch this value can for example be found on the basin wiki on the area overview pages of the respective acts in the first column, e.g. here for act 1:
Regular Chests:
The game checks whether the chest is unlocked and if so there is a 75% chance for a drop cycle to occur. If it is locked instead the game will perform two cycles unconditionally. In both cases the quality of the drops is determined just as with a monster drop, i.e. it goes through the lengthy quality selection, taking into account magic find and testing for each quality in order.
Special Chests:
The first main difference to regular chests is that for special chests the quality selection is completely skipped and instead a random roll is done based on which all items are assigned either magic quality or rare quality. The chance for magic quality is 95% while that for rare quality is 5%. Two important facts about this:
Now the drops start with one drop cycle in the unlocked case and two drop cycles in the locked case and after these have occured the game will check the first item in each cycle to see whether it has a quality of magic or above, i.e. whether it is magic or rare which we will shorten to just magic+. If this test is positive the drop algorithm will terminate and there are no further drops. Two important notes on this:
This means that a superchest may perform up to eleven or twelve cycles and has the potential to drop a total of 44 or 48 items if unlocked or locked respectively.
Sparkly Chests:
First off their drops are unaffected by their locked status but rather the game does a random roll to determine one of six cases into which the sparkly chest algorithm may go. As with superchests the game uses forced quality drops and magic+ tests only that here only some drop cycles are affected by them.
Case 1, 2 and 3: The cases 1, 2 and 3 occur with a chance of 2%, 4% and 6% respectively and apart from that only differ in what quality they force on their first two drop cycles. To make it easy on ourselves we use the shorthand X for the quality in question with X = Unique, Set or Rare for case 1, 2 or 3 respectively.
The game starts each of these cases by making a drop cycle with forced quality X. If it passes a magic+ test the algorithm stops but if it fails another drop cycle with forced quality X is performed and once again the algorithm stops if it passes the magic+ test.
If both magic+ tests fail, the algorithm will call case 6.
Case 4: This case occurs with a chance of 20% and will attempt to do up to 10 drop cycles with a forced quality of magic. After each cycle is completed a magic+ test is performed and once at least three magic+ tests returned a positive result the remaining drop cycles are cancelled.
If all drop cycles fail to produce an item, i.e if there are 40 consecutive nodrops, the game will call case 6. It should be noted that this event is extremely unlikely. At players 1 the chance for it is merely 1 in 1234621.
(This special case of no items dropping at all and the subsequent call to case 6) seems to be missing from Jarulf's description)
Case 5: This case occurs with a chance of 30% and like case 4 it will attempt up to 10 drop cycles with a forced quality of magic. After each cycle is completed a magic+ test is performed and once at least two magic+ tests returned a positive result the remaining drop cycles are cancelled.
If the very first two cycles pass the magic+ test the game will perform another drop cycle without forced magic quality. This will be followed by 7 gold drops if the last cycle dropped nothing and by 6 gold drops if it did.
If the algorithm does not terminate after the first two cycles it will not do such an extra cycle and instead follow up the series of forced magic cycles by a number of gold drops equal to max{0;7-# of failed magic+ tests}.
Case 6: This case occurs with a chance of 38% and like the two cases before it will attempt up to 10 drop cycles with a forced quality of magic. After each cycle is completed a magic+ test is performed and once at least one magic+ test returns a positive result the remaining drop cycles are cancelled.
After that happens it will perform a number of drop cycles without forced quality equal to max{0;4-# of failed magic+ tests} followed by 5 gold drops, 2 health potions and 2 mana potions.
***
In consequence a sparkly chest will drop either very few items (as little as one item if e.g. case 1 starts with a unique followed by three nodrops) or a staggering amount of items that fails to fit on the screen. Cases 1, 2 and 3 may drop up to 57 items, cases 4 and 6 up to 49 items and case 5 up to 40 items, all of which are above the limit of how many items can be displayed at once, which is 32.
Where are all the sparkly and special chests?
Following is a list of all confirmed super chests, i.e. all those chests that fruit popped and which subsequently executed the superchest algorithm instead of the regular one.
Beforehand here is a short list of some general facts on identifying chests:
Act 1
There are a total of 13 different cottages, some very similar to the above houses. When in doubt whether one of them really houses a superchest you should compare closely to the above screenshots.
It is my (and fruit's) current understanding that the cottages which house superchests may only spawn in the Blood Moor, the Stony Field and the Black Marsh. For some elaboration look at the spoiler:
The three crypt superchests may spawn in the Crypt, the Mausoleum as well as the first four levels of the Tower Cellar.
Act 2
The chests in the dead ends of the maggot lair are unique in that they have a 51% chance to be a superchest and are otherwise regular. This is rerolled EVERY game, so don't bother trying to reroll a map with a 'double superchest' layout.
The dead end of the Arcane Sanctuary facing to the upper left corner of the screen is the only such dead end with two instead of three superchests. The regular chest is encircled in red.
The only outdoors tile with a superchest is ruin3 and it is exclusive to the Lost City.
Act 3
The sewers treasure chamber is full of chests but only three of them are actually superchests.
The areas Lower Kurast (LK), Kurast Bazaar (KB) and Upper Kurast (UK) are titled slums, burbs and metro when it comes to tiles. So slums16x16 is LK, burbstemple3 is KB and metro16x08, metro16x16 and metrotemple3 are UK, i.e. there are 1, 1 and 3 tiles with superchests in LK, KB and UK respectively.
Act 4
There are no superchests outside the River of Flame and both of these tiles may spawn on the same map, see this video by @Brak :
and the video itself should the old site go down:
Act 5
The golden chest on Bonesaw Breaker's platform and in the Halls of Anguish/Pain are special whereas the chests found in the Icy Cellar, the Drifter Cavern as well as the three red portals are sparkly chests.
The Frigid Highlands are the only other area with superchests in act 5 and they can spawn them on both the layout facing upper left and the one facing upper right. (upper right - NorthHouse8 ; upper left - WestHouse4a / WestHouse5a)
WestHouse5a screenshot missing as of right now. At his point I'm not even sure I ever saw this superchest tile in the game. If you find it in-game, please share a picture of it!
Sparkly Chests
Since sparkly chests are easy to identify I will just list all the areas that can spawn them:
There are no sparkly chests in act 4.
Regular Chests
Due to the overcomplicated way that object spawning is set up it is currently too much of a hassle too verify which objects that are dynamically placed on the maps are 16 bit or use regular chest code. Potentially some 'fixed' object spawns might be verified as 16 bit objects in the future.
Patterns
Even though regular, special and sparkly chests are only given a range of 65534 seeds there are actually more patterns than that. Namely:
This in effect means that chests superchests have 65534 unlocked as well as 65534 locked patterns while sparkly chests have six times 65534 patterns, one time 65534 patterns for each chest case. Furthermore each difficulty, area, player setting or patch might have different patterns as well.
The rolls on the stats of items dropped (including gold) are NOT part of the pattern, they are rolled independently.
For superchests this is everything that affects them and we will proceed with explaining how the locked patterns look in relation to the unlocked patterns. This will be followed by a closer look at sparkly and regular chests which are affected by MF as well as all the above factors. In essence they might have different patterns for each and every different value of magic find.
Unlocked vs. Locked patterns
This section is trying to explain how locked patterns for a given seed may look in relation to the unlocked pattern for the same seed.
The short version is very easy: Every locked pattern for a seed is a superset of the unlocked pattern for the same seed, in particular there at least as many locked patterns for a given rune as there are unlocked patterns for it.
For the long explanation we first remember that the game used a 64 bit seed (realized as a pair of 32 bit seeds) to do a random roll of 1 to 65534 and then it saves that number into the first 32 bit seed and sets the second seed to 0x29A (=666). Now whenever the game uses a seed to do a random roll it will update it in the process to keep things 'random'. This update executes a few arithmetical operations on the 64 bit seed but it does so in a static way. That is to say the same starting seed will always result in the same sequence of subsequent 'updated seeds'.
Now the seed is only used (and hence subsequently updated) when the chest algorithm has to make decisions during a drop cycle. Every seed that is active when the drop cycle is started determines that cycle completely (# of decisions/seed updates, types of items drops, number of nodrops) and hence leads to a unique updated seed after the cycle is finished. Hence for our purposes we only care about the seeds after each drop cycle but the last (and of course the starting seed) so that there are only a maximum of twelve seeds we are interested in.
To understand the difference between locked and unlocked patterns we first name the cycles, namely the up to two cycles preceeding the potential series of ten cycles will be called guaranteed cycles while the ten following ones will be called bonus cycles. We label the starting seed x_0 and its sequence of updated seeds x_1 to x_11.
Proceeding we note that if the seeds are used at all they are used in this 'shape':
That means there are three cases:
Regular and Sparkly Chests
For both regular and sparkly chests some of the drop cycles are affected by the amount of magic find the player is wearing so there are different versions of the patterns for all values. The explanation for this is easy: If for example at 25% MF an item passed the unique test whereas it failed it at 24% then in the case of 24% MF additional seed 'updates' have to be made in the course of the remaining quality selection. So while the item may be the same its quality might change and the seed after the quality selection is finished will be differ between the 24% and the 25% case.
All sparkly chest cases can go into a magic find dependent cycle but it should be noted that this is extremely unlikely for case 4 since that would necessitate a total of 40 nodrops to occur. Needless to say this means that MF will play a very minor roll for this case. (The chance for 40 nodrops at p1 is 1 in 1234621)
Cases 1, 2 and 3 do not actually differ in terms of what items (including runes) are dropped. The forced quality selection in the first two cycles will not matter at all for the item selection: if the game chose unique, rare or set the forced item will either be magic+ or white/grey. For this reason when it comes to runes these three cases are actually identical.
Lastly the relation between locked and unlocked patterns we found in the previous section also holds for regular chests. The locked patterns are always supersets of the corresponding unlocked patterns. However here the locked case will have about twice the 'volume' of items that the unlocked case has so will be a lot more profitable by comparison.
Counting Patterns
One needs the amount of patterns for a given item in order to gauge how likely it is to obtain it by popping chests. The problem with this is that there is no apparent way of determining whether a pattern was unlocked or locked (or case 1-6 for sparkly chests). Considering the fast paced nature of chest runs this leads to a situation in which people report patterns without the important information of their 'locked/unlocked' or 'case' status. As a consequence the chances for a rune to drop may be overestimated if a locked pattern is erroneously counted as an unlocked pattern. To illustrate this we only need to look at the locked chance for LK which is 19%, so the chance at any one locked pattern is less than 1 in 65334*5 which is quite a bit more rare than 1 in 65334.
The practice of reporting patterns is also useful in that it makes runes potentially easier to spot in patches where they are still white (anything pre 1.13 basically) and hences reduces the risk of missing a Ber for example.
The pattern generator
@Fruit used his knowledge of the game mechanics to recreate the drop process in a C-program which is capable of generating a full list of drops for each regular, special and sparkly chest in each act, difficutly and version of the game. By default it just lists a summary of the number of runes but on demand it can also create a .txt listing those patterns with all their items. (slightly more time intensive)
Since it is unclear whether the program may be posted here the only way to obtain it right now is to ask fruit or me about it or be lucky and find it on the one website fruit has posted it to.
While most bugs have been ironed out there might still be some small ones hidden away, especially for sparkly chests. Fruit verified some patterns ingame (including a very remarkable pattern from the 1.09 Drifter Caverns on p3) but it is impossible for him to test each and every high rune pattern since there are simply too many. So if you use this program it would be appreciated if you reported whether the patterns you find match with what the program predicted.
Welcome to what will hopefully be the definite resource on regular, special and sparkly chests!
Some of the information here has been known for a long time whereas some is brand new (at least I could not find it elsewhere). The first to provide accurate information about chests was Jarulf whose knowledge was compiled into a guide by Urlik_Skarsol . The additional information I provide here is due to @Fruit who went through the code relating to (chest) drops thoroughly once more and provided a myriad of details that were never made public and extend our understanding of chests significantly.
Thanks go out to @Jarulf who started all this over 15 years ago and to @Fruit who revived it all and shared a staggering amount of information on game mechanics with the SPF!
Throughout the terms superchest and special chest are used interchangeably, they should not be confused with sparkly chests.
Initialization (Seeding)
When an object is spawned it may be 'initialized', i.e. it is assigned a random seed which is then used to carry out calculations related to that object. There are multiple initialization algorithms specified in the code but the ones of interest to us are InitFn3 and InitFn57 both of which assign a 16 bit seed to an object. Sparkly chests use InitFn57 while regular and special chests use InitFn3 in particular basically all chests use a 16 bit seed to determine what they drop.
Both initfn3 and initfn57 take a 64 bit seed as an input (which is different each game and each time you open a chest) and do a random roll of 0 to 65533. The result of this roll is incremented by 1 and then used as the new seed. So there are a total of 65534 seeds or 2^16-2 if we want to display it with powers of 2. This means there are no 'truncations' of a 64 bit seed happening, rather a random roll (albeit with a large range) is done, just like the game would roll for the stats on an item.
Now the game stores all its seeds as pairs of 32 bit integers so that in theory it is capable of handling 64 bit seeds. However after initfn3 or initfn57 did their job of creating a 16 bit seed the first 32 bit is filled with the seed just created while the second 32 bit seed is set to 0x29A which is the hexadecimal representation of 666.
Drop Cycles
In the next sections it will be explained how a chest drops and one term that will be used repeatedly is that of 'drop cycle'. When we say that a 'drop cycle' happens that just means that the game calls on one of the chest TCs to perform a drop. All expansion patches have the same chest TCs, Classic 1.00-1.06b however has completely different chest TCs.
This scheme applies to all chest TCs with the exception of 'Act 1 Chest C' and 'Act 2 Chest C' where the weights are slightly different. Here y refers to difficulty and x is the number of the Act. Also note that for all acts and difficulties from normal act 4 onwards the chest TCs B and C are actually identical.
Which Chest TC is selected?
The chest TC the game calls is determined via a routine which is the same in every patch but uses area level as well as a few hardcoded values which change through the patches. To understand what is happening we need to know this about the areas of the game:
- All areas are listed in levels.txt where they are identified by a number from 1 to 136 called the area ID.
- Each area is assigned a level for each difficulty in the columns 'MonLvl1' to 'MonLvl3' and 'MonLvl1Ex' to 'MonLvl3Ex' for early patches and later patches respectively.
- Up to 1.09d the area levels are roughly ascending as you are progressing through the acts. With 1.10+ and the introduction of alvl 85 areas this is no longer the case.
Now all areas of the act will be assigned a Chest TC based on the 'third' of the level range they fall into:
- If alvl is less than a_0+Step, then use 'Act x ( y ) Chest A'.
- If alvl is at least a_0+Step but less than a_0+2*Step, then use 'Act x ( y ) Chest B'
- If alvl is at least a_0+2*Step, then use 'Act x ( y ) Chest C'
Also there is a blunder in act 5 where in some patches instead of the first non-Town area the game looks up the town ID for the lower alvl. However this level is 0 which means that the level range the game determines is much too big and as a consequence the first two chest TCs are never used.
Fruit went through the trouble of compiling a list of chest TCs for each area in each patch:
Diablo_II_2_-_Chest_quality_Letters
Sheet1 1.13d,1.10,1.09b,1.07-1.08 hex,#,name,N,Nm,H,N,Nm,H,N,Nm,H,N,Nm 0,A,A,A,A,A,A,A,A,A,A,A 1,Rogue Encampment,A,A,A,A,A,A,A,A,A,A,A 2,Blood Moor,A,A,A,A,A,A,A,A,A,A,A 3,Cold Plains,A,A,A,A,A,A,A,A,A,A,A 4,Stony Field,A,A,A,A,A,A,A,A,B,A,A 5,Dark Wood,B,B,A,B,B,A,B,B,B,A,A 6,Black Marsh,B,B,B,B
docs.google.com
Another oddity of chests related to this is the way that quality selection works (if it is used at all). Once a chest TC has been chosen the game will falsely pass the chest case (i.e. A, B or C) on to the quality selection instead of the ilvl (which is equal to the level of the area the chest spawned in). To be more precise it will pass 0, 1 or 2 for A, B or C respectively.
Furthermore he group and level column of TreasurclassEx.txt are NOT used to determine which chest TC is used, they are purely decorative.
What Chest TC can drop which runes?
The highest rune a chest may drop is the same across the same act and difficulty and after Act 4 Normal is incremented by two each time the next difficulty or act is reached until it reaches Cham in Act 4 Hell.
How do Chests drop?
Each non-sparkly chest is assigned a flag which determines whether it is special or not and depending on that executes either the special chest code or the regular chest code. In both cases it is vital to the drop procedure whether the chest was locked.
The chance for a chest to be locked is [monlvl1/2]+8 % where monlvl1 is an area dependent variable stored in levels.txt. For all intents and purposes this number is actually the level of the area in normal difficulty of Classic Diablo 2. For the current patch this value can for example be found on the basin wiki on the area overview pages of the respective acts in the first column, e.g. here for act 1:
Regular Chests:
The game checks whether the chest is unlocked and if so there is a 75% chance for a drop cycle to occur. If it is locked instead the game will perform two cycles unconditionally. In both cases the quality of the drops is determined just as with a monster drop, i.e. it goes through the lengthy quality selection, taking into account magic find and testing for each quality in order.
Special Chests:
The first main difference to regular chests is that for special chests the quality selection is completely skipped and instead a random roll is done based on which all items are assigned either magic quality or rare quality. The chance for magic quality is 95% while that for rare quality is 5%. Two important facts about this:
- If an item can't spawn as rare it will spawn magic instead. This applies to all charms.
- This quality determination is independent of the drops, i.e. it does NOT use the same seed as the chest. In particular there is no such thing as a 'rare' or 'magic' pattern.
Now the drops start with one drop cycle in the unlocked case and two drop cycles in the locked case and after these have occured the game will check the first item in each cycle to see whether it has a quality of magic or above, i.e. whether it is magic or rare which we will shorten to just magic+. If this test is positive the drop algorithm will terminate and there are no further drops. Two important notes on this:
- If there are no drops in a cycle it will simply count this as a failed magic+ test.
- Which items may spawn as magic+ is mostly constant across patches with one important difference for patches 1.00 to 1.06b: Throwing weapons can not spawn magic+ in these versions; as well as for 1.07-1.08: Circlet type headgear is magic+ by default.
This means that a superchest may perform up to eleven or twelve cycles and has the potential to drop a total of 44 or 48 items if unlocked or locked respectively.
Sparkly Chests:
First off their drops are unaffected by their locked status but rather the game does a random roll to determine one of six cases into which the sparkly chest algorithm may go. As with superchests the game uses forced quality drops and magic+ tests only that here only some drop cycles are affected by them.
Case 1, 2 and 3: The cases 1, 2 and 3 occur with a chance of 2%, 4% and 6% respectively and apart from that only differ in what quality they force on their first two drop cycles. To make it easy on ourselves we use the shorthand X for the quality in question with X = Unique, Set or Rare for case 1, 2 or 3 respectively.
The game starts each of these cases by making a drop cycle with forced quality X. If it passes a magic+ test the algorithm stops but if it fails another drop cycle with forced quality X is performed and once again the algorithm stops if it passes the magic+ test.
If both magic+ tests fail, the algorithm will call case 6.
Case 4: This case occurs with a chance of 20% and will attempt to do up to 10 drop cycles with a forced quality of magic. After each cycle is completed a magic+ test is performed and once at least three magic+ tests returned a positive result the remaining drop cycles are cancelled.
If all drop cycles fail to produce an item, i.e if there are 40 consecutive nodrops, the game will call case 6. It should be noted that this event is extremely unlikely. At players 1 the chance for it is merely 1 in 1234621.
(This special case of no items dropping at all and the subsequent call to case 6) seems to be missing from Jarulf's description)
Case 5: This case occurs with a chance of 30% and like case 4 it will attempt up to 10 drop cycles with a forced quality of magic. After each cycle is completed a magic+ test is performed and once at least two magic+ tests returned a positive result the remaining drop cycles are cancelled.
If the very first two cycles pass the magic+ test the game will perform another drop cycle without forced magic quality. This will be followed by 7 gold drops if the last cycle dropped nothing and by 6 gold drops if it did.
If the algorithm does not terminate after the first two cycles it will not do such an extra cycle and instead follow up the series of forced magic cycles by a number of gold drops equal to max{0;7-# of failed magic+ tests}.
Case 6: This case occurs with a chance of 38% and like the two cases before it will attempt up to 10 drop cycles with a forced quality of magic. After each cycle is completed a magic+ test is performed and once at least one magic+ test returns a positive result the remaining drop cycles are cancelled.
After that happens it will perform a number of drop cycles without forced quality equal to max{0;4-# of failed magic+ tests} followed by 5 gold drops, 2 health potions and 2 mana potions.
***
In consequence a sparkly chest will drop either very few items (as little as one item if e.g. case 1 starts with a unique followed by three nodrops) or a staggering amount of items that fails to fit on the screen. Cases 1, 2 and 3 may drop up to 57 items, cases 4 and 6 up to 49 items and case 5 up to 40 items, all of which are above the limit of how many items can be displayed at once, which is 32.
Where are all the sparkly and special chests?
Following is a list of all confirmed super chests, i.e. all those chests that fruit popped and which subsequently executed the superchest algorithm instead of the regular one.
Beforehand here is a short list of some general facts on identifying chests:
- If it can spit out a quest object then it is a quest chest and thus neither sparkly nor special.
- If it sparkles and isn't located in act 5 then it is a sparkly chest.
- If it sparkles, is located in act 5 and doesn't appear on the below list of superchests it must be a sparkly chest as well.
- The levels are made up of (mostly) rectangular tiles which fit together to form either an outdoor or a maze level. (Some tiles are also standalone, e.g. Duriel's Lair)
- Some tiles are close matches of each other, only differing in minor details. For example one tile might look like another, only that a superchest spawns on it while the other tile doesn't get a superchest.
- There seems to be a limit to how often a certain tile may be used in the same maze/outdoor area but we don't know exactly. The most famous instance of this is Lower Kurast where people have rolled tens of thousands of maps and only ever had at most two campfire tiles.
Act 1
It is my (and fruit's) current understanding that the cottages which house superchests may only spawn in the Blood Moor, the Stony Field and the Black Marsh. For some elaboration look at the spoiler:
First off when fruit teleported through the various outdoor areas of act 1 the Cold Plains, Dark Woods and Tamoe Highlands never set off his debugger, meaning that he did not find any superchests there.
Now why do I think that it is those three areas specifically? Well, the game 'groups' tiles into so called presets consisting of similar tiles. Then instead of tiles being assigned to certain areas it assigns presets to them. So if the game wants to create a map it will use a list of presets for this and pick random tiles from each preset to fill the map.
There are only three presets involving cottages and they are called 'Act 1 - Cottages 1', 'Act 1 - Cottages 2' and 'Act 1 - Cottages 3'. The last one contains just one tile, it's the burned down house with a fallen shaman in it, we all know it well.
The first preset contains cottages cott1, ..., cott6 while the second contains cott1A, ...,cott6A. Now cott1A is a replica of cott1 and the same is true for the other cottages. The only difference between the 'plain' and the 'A' version are some objects/monsters which spawn on one but not the other. In particular cott1, cott2 and cott5 have superchests while no other cottages do.
Now when I looked through the outdoor areas of act 1 I noticed that Cold Plains, Dark Woods and Tamoe Highlands only spawned cottages from the second preset while the remaining three areas spawned cottages from the first preset.
This is not definitive proof because neither I nor Fruit have any clue what goes on exactly in the map generation but it is a very solid theory at least.
Now why do I think that it is those three areas specifically? Well, the game 'groups' tiles into so called presets consisting of similar tiles. Then instead of tiles being assigned to certain areas it assigns presets to them. So if the game wants to create a map it will use a list of presets for this and pick random tiles from each preset to fill the map.
There are only three presets involving cottages and they are called 'Act 1 - Cottages 1', 'Act 1 - Cottages 2' and 'Act 1 - Cottages 3'. The last one contains just one tile, it's the burned down house with a fallen shaman in it, we all know it well.
The first preset contains cottages cott1, ..., cott6 while the second contains cott1A, ...,cott6A. Now cott1A is a replica of cott1 and the same is true for the other cottages. The only difference between the 'plain' and the 'A' version are some objects/monsters which spawn on one but not the other. In particular cott1, cott2 and cott5 have superchests while no other cottages do.
Now when I looked through the outdoor areas of act 1 I noticed that Cold Plains, Dark Woods and Tamoe Highlands only spawned cottages from the second preset while the remaining three areas spawned cottages from the first preset.
This is not definitive proof because neither I nor Fruit have any clue what goes on exactly in the map generation but it is a very solid theory at least.
The three crypt superchests may spawn in the Crypt, the Mausoleum as well as the first four levels of the Tower Cellar.
Act 2
The dead end of the Arcane Sanctuary facing to the upper left corner of the screen is the only such dead end with two instead of three superchests. The regular chest is encircled in red.
The only outdoors tile with a superchest is ruin3 and it is exclusive to the Lost City.
Act 3
The areas Lower Kurast (LK), Kurast Bazaar (KB) and Upper Kurast (UK) are titled slums, burbs and metro when it comes to tiles. So slums16x16 is LK, burbstemple3 is KB and metro16x08, metro16x16 and metrotemple3 are UK, i.e. there are 1, 1 and 3 tiles with superchests in LK, KB and UK respectively.
Act 4
1.13 RoF Superchest Patterns
Some of you are going to HATE me for this : confirming jah # 1 you know it.
www.diabloii.net
Act 5
The Frigid Highlands are the only other area with superchests in act 5 and they can spawn them on both the layout facing upper left and the one facing upper right. (upper right - NorthHouse8 ; upper left - WestHouse4a / WestHouse5a)
WestHouse5a screenshot missing as of right now. At his point I'm not even sure I ever saw this superchest tile in the game. If you find it in-game, please share a picture of it!
Sparkly Chests
Since sparkly chests are easy to identify I will just list all the areas that can spawn them:
Cave Level 2
Underground Passage Level 2
Hole Level 2
Pit Level 2
Crypt
Mausoleum
Underground Passage Level 2
Hole Level 2
Pit Level 2
Crypt
Mausoleum
Stony Tomb Level 2
Ancient Tunnels
Tal Rasha's Tomb (only the false ones)
Ancient Tunnels
Tal Rasha's Tomb (only the false ones)
Arachnid Lair
Great Marsh (can spawn at least two)
Swampy Pit Level 3
Sewers Level 1
Great Marsh (can spawn at least two)
Swampy Pit Level 3
Sewers Level 1
Abaddon
Pit of Acheron
Infernal Pit
Drifter Cavern
Icy Cellar
Pit of Acheron
Infernal Pit
Drifter Cavern
Icy Cellar
Regular Chests
Due to the overcomplicated way that object spawning is set up it is currently too much of a hassle too verify which objects that are dynamically placed on the maps are 16 bit or use regular chest code. Potentially some 'fixed' object spawns might be verified as 16 bit objects in the future.
Patterns
Even though regular, special and sparkly chests are only given a range of 65534 seeds there are actually more patterns than that. Namely:
- Whether a chest is locked or not is rolled independently (does not apply to sparkly chests)
- Which sparkly chest case is called is rolled independently
This in effect means that chests superchests have 65534 unlocked as well as 65534 locked patterns while sparkly chests have six times 65534 patterns, one time 65534 patterns for each chest case. Furthermore each difficulty, area, player setting or patch might have different patterns as well.
The rolls on the stats of items dropped (including gold) are NOT part of the pattern, they are rolled independently.
For superchests this is everything that affects them and we will proceed with explaining how the locked patterns look in relation to the unlocked patterns. This will be followed by a closer look at sparkly and regular chests which are affected by MF as well as all the above factors. In essence they might have different patterns for each and every different value of magic find.
Unlocked vs. Locked patterns
This section is trying to explain how locked patterns for a given seed may look in relation to the unlocked pattern for the same seed.
The short version is very easy: Every locked pattern for a seed is a superset of the unlocked pattern for the same seed, in particular there at least as many locked patterns for a given rune as there are unlocked patterns for it.
For the long explanation we first remember that the game used a 64 bit seed (realized as a pair of 32 bit seeds) to do a random roll of 1 to 65534 and then it saves that number into the first 32 bit seed and sets the second seed to 0x29A (=666). Now whenever the game uses a seed to do a random roll it will update it in the process to keep things 'random'. This update executes a few arithmetical operations on the 64 bit seed but it does so in a static way. That is to say the same starting seed will always result in the same sequence of subsequent 'updated seeds'.
Now the seed is only used (and hence subsequently updated) when the chest algorithm has to make decisions during a drop cycle. Every seed that is active when the drop cycle is started determines that cycle completely (# of decisions/seed updates, types of items drops, number of nodrops) and hence leads to a unique updated seed after the cycle is finished. Hence for our purposes we only care about the seeds after each drop cycle but the last (and of course the starting seed) so that there are only a maximum of twelve seeds we are interested in.
To understand the difference between locked and unlocked patterns we first name the cycles, namely the up to two cycles preceeding the potential series of ten cycles will be called guaranteed cycles while the ten following ones will be called bonus cycles. We label the starting seed x_0 and its sequence of updated seeds x_1 to x_11.
Proceeding we note that if the seeds are used at all they are used in this 'shape':
That means there are three cases:
- If x_0 passes the magic+ test the unlocked pattern consists of one cycle whereas the locked pattern gets one extra cycle using seed x_1. It will abort after that second cycle since the first cycle passed the magic+ test.
- If x_0 and x_1 don't pass the magic+ test then the unlocked and locked patterns both attempt the bonus cycles which will agree up until the eleventh cycle (which is the maximum in the unlocked case). However the locked case has the potential for a twelth cycle using x_11.
- If x_0 doesn't pass the magic+ test but x_1 does then both the locked and the unlocked pattern abort after the second cycle and hence they agree.
Regular and Sparkly Chests
For both regular and sparkly chests some of the drop cycles are affected by the amount of magic find the player is wearing so there are different versions of the patterns for all values. The explanation for this is easy: If for example at 25% MF an item passed the unique test whereas it failed it at 24% then in the case of 24% MF additional seed 'updates' have to be made in the course of the remaining quality selection. So while the item may be the same its quality might change and the seed after the quality selection is finished will be differ between the 24% and the 25% case.
All sparkly chest cases can go into a magic find dependent cycle but it should be noted that this is extremely unlikely for case 4 since that would necessitate a total of 40 nodrops to occur. Needless to say this means that MF will play a very minor roll for this case. (The chance for 40 nodrops at p1 is 1 in 1234621)
Cases 1, 2 and 3 do not actually differ in terms of what items (including runes) are dropped. The forced quality selection in the first two cycles will not matter at all for the item selection: if the game chose unique, rare or set the forced item will either be magic+ or white/grey. For this reason when it comes to runes these three cases are actually identical.
Lastly the relation between locked and unlocked patterns we found in the previous section also holds for regular chests. The locked patterns are always supersets of the corresponding unlocked patterns. However here the locked case will have about twice the 'volume' of items that the unlocked case has so will be a lot more profitable by comparison.
Counting Patterns
One needs the amount of patterns for a given item in order to gauge how likely it is to obtain it by popping chests. The problem with this is that there is no apparent way of determining whether a pattern was unlocked or locked (or case 1-6 for sparkly chests). Considering the fast paced nature of chest runs this leads to a situation in which people report patterns without the important information of their 'locked/unlocked' or 'case' status. As a consequence the chances for a rune to drop may be overestimated if a locked pattern is erroneously counted as an unlocked pattern. To illustrate this we only need to look at the locked chance for LK which is 19%, so the chance at any one locked pattern is less than 1 in 65334*5 which is quite a bit more rare than 1 in 65334.
The practice of reporting patterns is also useful in that it makes runes potentially easier to spot in patches where they are still white (anything pre 1.13 basically) and hences reduces the risk of missing a Ber for example.
The pattern generator
@Fruit used his knowledge of the game mechanics to recreate the drop process in a C-program which is capable of generating a full list of drops for each regular, special and sparkly chest in each act, difficutly and version of the game. By default it just lists a summary of the number of runes but on demand it can also create a .txt listing those patterns with all their items. (slightly more time intensive)
Since it is unclear whether the program may be posted here the only way to obtain it right now is to ask fruit or me about it or be lucky and find it on the one website fruit has posted it to.
While most bugs have been ironed out there might still be some small ones hidden away, especially for sparkly chests. Fruit verified some patterns ingame (including a very remarkable pattern from the 1.09 Drifter Caverns on p3) but it is impossible for him to test each and every high rune pattern since there are simply too many. So if you use this program it would be appreciated if you reported whether the patterns you find match with what the program predicted.
Last edited: