The Shrining - Shrines Revisited

ResTTe

Well-known member
Jul 5, 2019
208
304
63
Hello guys!

I did some Gem Shrine farming with my UT barb recently and decided to make a write-up about Shrines overall, focusing on the Gem shrine. I am not an expert in that subject, i just gathered some info (didn't play with game files, no backwards engineering), so please be gentle XD There are some threads about shrines already, but they are old and don't include any experimental data. You can find good info there though (links to them in the sources at the end of that post).


General Rules

I checked some old forum posts, guides, videos and such and gathered some info about the shrines. First of all, shrines are divided into 3 types: Recharge, Booster and Magic. There are also 4 effect classes (you can see them in the picture below, together with other things). Magic type is effect class 1 and have various effects, Booster type is effect class 4 and changes your char's stats, Recharge type is in effect classes 2, 3 and 4 and affects your life/mana. There is also "None shrine" that i have no info about. Effect classes 2 and 3 spawn life or mana wells (those are made out of stones in act 1, contain red/blue liquid depending on the type and are different than "real" shrines). Each shrine has something called level min. Every area in the game has it's id, which starts with Rogue Camp being 1, Blood Moor being 2, Cold Plains 3 etc. You need area's id to be at least level min of the shrine to spawn it, so the rule is: id >= level min. Some say that this id number continues through all of the difficulties, so The Worldstone Chamber should have id 132 (you can check those numbers in levels.txt). However, my testing suggests that it does not continue through the difficulties and actually resets and starts over in each difficulty (at least works like that in Hell). I linked very interesting posts by @Hammermann and @Orphan in sources.

Id for some early game areas with added actual names (check levels.txt for more info)
Kt7vhv4.png


Shrines.txt (check effect class and level min here). What's worth mentioning is that "reset time" is 1/5 times smaller in reality, cause blizzard calculated it assuming the game running in 20 fps. This is probably the reason why shrines have weird duration like 96, 144 or 192s, cause those values in frames were calculated assuming 20 fps to give round numbers, but the game runs in 25 fps, so the final numbers are different...
QxXk0X0.png



Rolling Procedure

When the map is created the game rolls the type of an object first. It goes to Objects.txt, column parm0 and picks a value between 0 and 3. It results in spawning specific object representing effect class of the shrine. If it rolls 0, it rolls something else, 1 is effect class 2, 2 is effect class 3 and 3 is effect class 1 or 4 (note that those two roll from the same value). After rolling 3 the chance for effect class 1 is 10% while the chance for effect class 4 is 90%. In effect class 2 and 3 we have life and mana wells that aren’t really shrines (you can clearly see the difference between those and typical shrines after running act 1 a little bit). What we are interested in are effect classes 1 and 4, cause they can roll Gem Shrine a spawn as the obelisk, dear head or horns (the „real” shrines) in act 1 which is the best place to farm btw. Every area from Blood Moor to Tamoe Highland can spawn up to 4 „real” shrines. What is interesting is the fact that when the game rolls a shrine and gets the one that can't spawn, because of too low id of the area, it will reroll 8 times and spawn whatever rolls last (similar to rolling Berserk on barb's helmet or Holy Shield on a scepter). This is why you can get light res shrine in stony field for example.


Gem Shrine

Gem shrine has lvl min = 4, so it can spawn as soon as Stony Field. What is worth mentioning is the fact that there is a shrine called Shrine of enirhs that was disabled in the files (it was switching your char's name backwards), but can still roll and the game spawns Gem Shrine if that happens (this is why you can get Gem Shrine in areas with id lower than 4, cause Shrine of erinhs has level min 1). I was not interested in shrines like health and mana refill etc. (effect class 2/3), only in those that are effect class 1 and 4. You have a small sample from a few Dark Wood runs in the picture below. Note that i didn't have a single combat or res shrine (except fire) which is a pretty strong proof against id being continuous through the difficulties. Dark Wood's id is lower than level min of those shrines, so they can't roll normally.

gw5Xi9V.png


The chances for effect class 1 and 4 are pretty close to those stated above and we can clearly see more frequent spawning of the shrines from effect class 4 comparing to effect class 1 (check the "frequency" column). Let's talk about the chance of rolling Gem Shrine in different areas. As i said, we are interested in the "real" shrines, so effect classes 1 and 4. Let's check Cold Plains first. We can only get Gem Shrine there if the game picks Shrine of enirhs. We can roll 4 shrines form effect class 1 total there and the chance for that class is 10% if we check a shrine that is the obelisk, dear head or horns. Our answer is 10% * 1/6 = 1,67% which is the chance of rolling Gem Shine in Cold Plains. Let's do Stony Field now. We can roll both Gem Shrine directly there and also Shrine of enirhs, so our total effective number is 2 out of 7 (cause we can roll 7 shrines from class 1 there). The chance for effect class is still 10%, cause it is a fixed value. Our answer is 10% * 2/7 = ~2,86%, so we are 71,43% more likely to find a Gem shrine in Stony Field comparing to Cold Plains. Note that there are no effect class 1 shrines that have higher level min than 4, so ~2,86% chance is relevant for Stony field and any area above. I checked over 16k shrines with my barb and got the chance for Gem Shrine around 2,86% in every series of runs (slightly lower when farming Cold Plains too). Don't have any spreadsheet or anything, cause i was doing it mainly for my own use. I included a few posts by @Gripphon in sources. He was getting chances pretty close the calculated one.

More data:
ksN5dJf.png

My Run Counter says i did over 2,5k various shrine runs and if i include how many shrines i hit in every run and the fact that i got around 500 perfect amethysts that way, it turns out that my final chance for a gem shrine was about 3% (i spent over 13 hours doing this XD).

You can check my video with a few Shrine runs:


Sources:
https://www.diabloii.net/forums/threads/shrines-and-associated-odds.576006/post-5712254
https://www.diabloii.net/forums/threads/shrines-and-associated-odds.576006/post-5717656
https://www.diabloii.net/forums/threads/anything-goes-d2-lounge.839624/post-8710453
https://www.diabloii.net/forums/threads/anything-goes-d2-lounge.839624/post-8710532
https://www.diabloii.net/forums/threads/anything-goes-d2-lounge.839624/post-8716629
MrLlama's video about shrines is worth checking. Can't post it here for obvious reasons ^^

Hope you understood anything from this post XD

Feel free to ask questions.

***
 
Last edited:
It turned out i made a mistake when calculating the chance for a gem shrine in cold plains XD Was talking about shrines with my friends and reanalyzed the thread.

Cold Plains is id 3 area, so it can spawn all shrines that have lvlMin <= 3. That's 6 shrines from effect class 1, not 4 as i said above. The chance for a gem shrine is 10% for effect class 1 (which is constant) times 1/6 which is the chance for a specific shrine from that effect class, so 10% * 1/6 = 1,67%, not 2,5% as it was before.

The number i posted is actually the chance of getting a gem shrine in Blood Moor, not Cold Plains. It's id 2 area, so it can only spawn 4 shrines from effect class 1 (there is no lvlMin 2 shrines). The chance for that is 2,5%.

I fixed the original post of course, so it is correct now ^^
 
  • Like
Reactions: CaseyJones
Hey ResTTe, been calcing some shrine numbers for my lvl 97 hdin, using this thread as a reference so I thought I'd post these results here. Thanks again for making this thread!
kTPzdmr.png

So in this case, I'm more interested in experience shrines (though I am toting amethysts around for when I see a gem shrine and have upped several already). My initial conclusions for myself are, since I'm barely getting better exp/hr checking shrines as compared to not checking shrines, I can't imagine any shrines that aren't on the way and that are less than 18% chance are worth it. So I will just check my 3 shrines on the way and my 3 shrines in cold plains, and leave my shrine in black marsh and travincal alone.
 
Last edited:
PurePremium
Estimated market value
Low
High