Affecting the Seeding of Hidden Shrines?
#1
According to Jarulf's Guide:

"There exist a bug that will cause any shrine with a random effect to at times not be random and instead have a specific result. This bug is most noticeable in the first games you play without exiting Diablo completely (decreasing in probability for each dungeon level you enter, including reentering of a level). For the most time, the shrines will be random however. The end effect of
the bug is that the randomness of those shrines favor a certain result. The favored results are summarized in the table below."

And as far as the Hidden Shrine is concerned:

"Hidden Shrine--Shield(left hand slot) losing durability"


Now, also according to Jarulf (this from the DSFCommunity site):

"When you start a program all of its memory space will typically be set to all 0, when you enter the first level, and create a shrine but forgot to write a specific value to its seed, it will thus get a value 0 for the seed. Now, when you leave the level, it and the shrine will be stored away. The next level be be
generated overwriting whatever data existed from the first level. Since the shrine code does not write ANY value to the seed, it will remain whatever it was on the previous level. However, the slot occupied by a shrine on level 2, might have been some other object on level 1, like a chest, if so, the value would no longer be the 0, but a true random seed that was correctly assigned to the chest and we will have a random shrine. If we are "unlucky" (depending on how we look at it), the shrine might occupy a slot that was alos a shrine on the previous level, or perhaps some object with no random effect and thus does not need a seed, we can then end up with a 0 again.

The more levels we enter, the higher are the chances that the slot we will put a shrine in will have had some object that has had a seed initialized correctly.

By the way, I don't think the game store away the actual seeds for each shrine, thus entering level 1, then 2, then 3 and then comming back to level 1 might actually have randomized the shrine there which was not randomized the first time. note that by 1, 2 and 3 I don't mean the 3 first levels of church but rather the 3 dungeon levels you first visit."



Now it seems to me that this theory should be able to be tested; the idea that “The more levels we enter, the higher are the chances that the slot we will put a shrine in will have had some object that has had a seed initialized correctly.”

To this end, to test to see if entering further levels changed the Hidden Shrine seed, I created a Single Player mage, levelled him to a point where he could purchase the Teleport spell, then created new games, over and over, until a Hidden Shrine was located on dlevel One. Then the game would be saved, loaded, and the mage wearing a weapon, shield, hat, and armor,
would touch the shrine. The affected item would be noted. The game would be reloaded to the point just before the mage touched the shrine, and the item that _was_ hit the previous time was removed. Then the shrine was touched again, and the item affected noted. Then the game was reloaded and BOTH the prior items that were affected by the Hidden Shrine were removed, and then the Shrine was touched one final time, and the item affected noted, and the entire order of items affected noted.

By doing this I discovered that this Hidden Shrine on dlevel one was hitting items in the following order:

Left slot(shield), Hat, Right slot, Armor.

Interesting. So this Shrine must somehow have been properly randomly "initialized" in that it didn’t use the L-A-R-H standard.

Now reload the game to the time prior to the Hidden Shrine being touched at all.

Went and found the stairs to dlevel two and entered dlevel two.
Returned to level one. Saved game just before testing the Shrine again.
Ran through the shrine test again.
Afterwards, reloaded the game and go from dlevel two to dlevel three and then returned to level one. Ran through the shrine test again.
Repeated until all 16 levels had been entered, and the Hidden Shrine revisited after each level was entered.

Results:
Dlevel Shrine effect
1 L-H-R-A
2 L-H-R-A
3 L-H-R-A
4 L-H-R-A
5 L-H-R-A
6 L-H-R-A
7 L-H-R-A
8 L-H-R-A
9 L-H-R-A
10 L-H-R-A
11 L-H-R-A
12 L-H-R-A
13 L-H-R-A
14 L-H-R-A
15 L-H-R-A
LAZ RM L-H-R-A
16 L-H-R-A

For every single dungeon level I entered, there seemed to be no effect on the order in which the Hidden Shrine affected items. Remember too that I visited each dlevel deeper than dlevel two TWICE before hitting the shrine: i.e., went to 2, exited 2, tested the shrine, went BACK to 2 a SECOND time, then went to 3, exited 3, tested the shrine, went BACK to 3 a SECOND time, etc.

Also, I thought that inventory setup might somehow affect the seed of the Shrine, so every time I tested it I re-arranged items in my inventory so that nothing was ever exactly the same twice. I moved items from place to place, or simply dropped items out of the inventory altogether. Or BOTH.

On all the other dungeon levels I was having to fight my way to find the stairs down, so monsters were being encountered and chests were being opened on every level -- to see if this was to have any effect on the seed initialization/randomization of the Hidden Shrine on dlvl one.

I also used Shrines such as Quiet and Abandoned Shrines that were encountered in deeper levels of the dungeon.



SUMMARY OF THE TEST

Data suggests that the Shrine is seeded/initialized ONCE and ONE TIME ONLY in Single Player Diablo.

Data suggests that this initialization is done at the GAME START.

Data also indicates that in Single Player Diablo visiting other dungeon levels, opening chests, battling monsters, re-arranging inventory, touching other Shrines, NONE of these things can CHANGE the order in which a Hidden Shrine affects your items.

This would suggest that for those persons trying to avoid bug exploitation and "randomize" the Hidden Shrine effect by entering further dungeon levels before touching the shrine, this doesn't work for Single Player Diablo. By extension, perhaps then not in Multiplayer either.

The question on whether it also does not work for Multiplayer Diablo could be tested by doing this exact same test but using a clockfreeze program and locating a Hidden Shrine on dlvl One.

A clockfreeze program would also be able to check on whether the INITIAL seed and FURTHER seeds are affected by entering multiple dungeon levels.

Now I'm not exactly sure WHAT sets the initial Hidden Shrine seed, but whatever it is, it seems that in Single Player (and thus, perhaps Multiplayer also), once a Shrine is seeded/initialized a single time at the game start THAT'S IT! Entering further dungeon levels (and opening chests and breaking barrels and using Shrines) seems to have NO EFFECT on the order of items that the Hidden Shrine hits.

Attika

PS I have this Single player game saved, and all levels still have active monsters, barrels, and chests (except for the Lair of the Vile Betrayer[cleared] and of course no barrels/chests on sixteen). If you have suggestions for further testing trying to affect the results of the Hidden Shrine, I'd be willing to try them.
Reply
#2
Interesting. To me, it seems possible that the shrine you found was actually being seeded by garbage produced by some other feature of the first level. Otherwise, one would expect the SAWH pattern from a hidden shrine on level one. If it were being seeded by something on the same level, then that memory block would be overwritten with the same data every time that level was loaded, so the shrine would always produce the same result.

The question then is whether one could find a hidden shrine on level 1 of a different single player game which initially follows the SAWH pattern, but changes after a specific other level is loaded. If I recall correctly, Sourceror did something very much along those lines during the sequence of events surrounding Jarulf's DSF post about unitialized shrines. If that is true and can be repeated, then the only thing new about your observations is that a shrine could be "seeded" by garbage from the same level as the shrine itself. This means that even on level 1 a person is not guaranteed to know what shrine they will get (although the 'educated guess' is going to be right the vast majority of the time). It also makes me wonder whether other occasional glitches in level generation may be caused by multiple features using the same block of memory for different things.
Reply
#3
How I understand it, a shrine will only become ramdomly seeded when you enter a new level and there is something to change the seed from 0 (barrel, decapitated body, weapon/armor rack, chest, shrine) that spawns in the same absolute postition of the shrine. It this is correct, it is quite possible that out of the 16 dlvls that you entered, not one of them had a random fixture that spawned in the same tile as the shrine on level 1 existed. I am not sure exactly how large the dungleon layout is in actual dimensions (you can get an idea by using a secluded shrine), but there are always areas where dungeons don't even spawn. Based on the size on the layout and the relatively few fixtures that can actually randomize the seed, the probability of one of those spawned in the exact tile that the hidden shrine occupies is fairly small.

Also, from what I gather, you would visit a different dungeon level, such as dlvl 2, and return to one, THEN save the game and test from there. This of course would require you to reload the game a few times after visiting the other level. It is possible that when the game is reloaded, everything is once again initialized to 0 just as if the diablo session was closed and started again. This may have caused it to get set back to 0 and behave just as it had been. I say this because this is what happens to the monster count when you load a game. You notice that between multiplayer games however many monsters of a given type you have killed in one game gets transfered to the next and the game continues to count from that point. When you reload a single player game, however, the number of kills per enemy is overwritten with whatever value was saved with the SP file. For instance, kill 5 monsters with a SP game, save it, then kill more monsters in another muliplayer or new single player game. No matter how many you have killed, it will be replaced by 5 when you reload the original SP game. Perhaps something similar is happening with the initialization of the shrine.

I suggest beginning on level 1 and visiting every dungeon level in the same session and then checking the shrine (if you haven't already). It might also be a good idea to create several new games in a row just to visit many different levels to increase the percentage of tiles that have spawn with a random effect. It would be interesting to note if the second shrine followed the same order as the first.
--Lang

Diabolic Psyche - the site with Diablo on the Brain!
Reply
#4
Attika, was all of this testing done during a single session of Diablo? If so, I'd like you to go back and check the shrine again at the start of a session... it may have been "seeded" by one of the previous games you had played during the session while hunting for shrines, which would explain the new pattern. If the new pattern exists at the start of a session, then I think we'd be looking at either your conclusion or my first conclusion.
Reply
#5
This Hidden Shrine was found on about the fourth game I was running through dlevel ones, which could explain its odd seed.

However, I want the OTHER aspect of the seed explained, the fact that it did not change no matter HOW MANY dlevels I entered subsequently. Others have suggested that doing this will "randomized" the Shrine seed -- it certainly doesn't in Single Player, and I doubt it does so for Multi then.

I went back today (first time playing Diablo today) and hit the Shrine again:

L-H-R-A

Nystul, is that what you were asking for?

Lang, I don't think the Shrine has to occupy the same physical spot in each game in order to change the seed/initialization. If all you need to do is create a random number generator, why then ALSO insist that it only work when two shrines/objects occupy the exact same physical spot? That seems bizarre even for Blizzard.

I think Jarulf is speaking of the Shrine seeds occupying the same "slots" in the game's _memory_, not in the physical layout.

Of course, Jarulf himself could clear this up too. Jarulf?

Attika
Reply
#6
Hello Attika,

Nice testing, but I wonder how much the saving in SP spoiled your efforts. It could be that the first-used seed *was* saved, somehow.

"I think Jarulf is speaking of the Shrine seeds occupying the same "slots" in the game's _memory_, not in the physical layout"

So do I. Dungeon objects have their info place in a table in memory, the slots mentioned are the entries in that table.
Reply
#7
I believe that starting games after each other also increases the chance to get a seed from a previous game. Hence your starting "experience" with no 0 seed. As for it not changing, perhaps there was no overwriting from a deeper dungeon. Try playing a lot of games and then reloading and see what happens.

In general, I thing saving stores away the same data as for an inactive level and thus should not save a seed to restore it (you can always test by saving on a different level than the one with the shrine). As a side note, does saving save missiles and such? Most easilly tested with a firewall I assume, is it saved? If so, the game might save an active level more fully and thus possibly also seeds. But I doubt this.

And yes, it is an issue of slots in the table for "objects" on the dungeon level, not a physical location in the3 dungeon. Not that dungeon levels has many non interactible objects. Basically anything you see in a dungeon is an object except for the walls (well, doors are objects despite being part of a wall).
There are three types of people in the world. Those who can count and those who can't.
Reply
#8
Jarulf,Jul 17 2003, 12:31 PM Wrote:I believe that starting games after each other also increases the chance to get a seed from a previous game.
I believe that I've posted the MP answers on the DSF - about 3 years ago IIRC.

The 'randomizing' of shrine seeds is accomplished by entering dungeon levels in any game - but the probability for a change of the initial seed (when NO game has been created yet!) is pretty low, about 1:20 (WAG here) but likely even less. Thus, in the first game created after starting Diablo the seed is pretty much non-random (I did too few tests to know you'll ever find a "non-zero" seed in the first dungeon level you enter in the first game).

The legit's shrine hunt rule therefore are
- do NOT quit Diablo between games
- visit as many different dungeon levels as possible (even just popping your head in and out is sufficient - no need to kill critters or follow some weird ritual)

HTH


-Fin
Reply
#9
What does "HTH" refer to? I plead ignorance.
Cry 'Havoc' and let slip the Men 'O War!
In War, the outcome is never final. --Carl von Clausewitz--
Igitur qui desiderat pacem, praeparet bellum
John 11:35 - consider why.
In Memory of Pete
Reply
#10
or sumfin... ;)
Reply
#11
Finnan, thanks. First let me see if I get what you are saying right.

If a Hidden Shrine is found in the very first game of the very first level that you enter of Diablo, chances are the shrine seed is NOT random and should be L-A-R-H.

By entering further levels or further games, the shrine seed (_whatever_ it is) has a chance of 1 in 20 of actually changing.

So far, did I get that right?

I ask because in the Single Player game I entered levels beyond dlevel one (where the Hidden Shrine was found) at least 40 times (32 due to popping in and out of levels 1-16, 8 others due to losing a TP and having to walk 8 levels) and still the seed was exactly the same. Admitted, the chances are 1 in twenty of a change, but with the seed proving to be so immutable in Single Player I am wondering . . . perhaps it is "set" (at game start) and unchangeable?

I would assume that either you had a clockfreeze program or did the same as I, entering a single player game and trying to affect the seed. Or you decompiled the entire program and analyzed that specific data. Which one was it?

Did you actually personally experience the shrine seed changing in the game? If multi, how was this possible without a clockfreeze program? If single, you repeated this test often enough to be able to state with assurance that it occurs 1 in 20 times? I would assume you ran the test at least a minimum of 400 times to be able to make this claim.

So, if I enter and exit dungeon levels at least 400 times (20 x 20) in my single player game, I stand a pretty darn good chance of changing the shrine seed on that level one Hidden Shrine? I'd be willing to try it. Should I save the game off-level or on-level one after each attempt? Will doing 20 level changes, saving the game, and then turning off the machine affect the results? (And if it does, how in the world did you run your test?)

Or did you simple decompile the code and analyze it? If you did that, then why is the 1:20 WAG necessary? The math involved should be self-evident. If you did decompile the program and discovered the code regarding Hidden Shrine seeds, could you share your results again?

Thanks a bunch.

Att
Reply
#12
Quote:If a Hidden Shrine is found in the very first game of the very first level that you enter of Diablo, chances are the shrine seed is NOT random and should be L-A-R-H.

Definitely not random. But my sample size was too small to say if you have a microscopic chance of NOT getting LARH under this condition.

Quote:By entering further levels or further games, the shrine seed (_whatever_ it is) has a chance of 1 in 20 of actually changing.

Yep, but that 1:20 is a very wild guess, this might be off one order of magnitude or so (again, sample size was minimal).

Quote:I entered levels beyond dlevel one (where the Hidden Shrine was found) at least 40 times (32 due to popping in and out of levels 1-16, 8 others due to losing a TP and having to walk 8 levels) and still the seed was exactly the same.

It doesn't matter how often you re-visit a particular level in a particular game, the total number of DIFFERENT levels does (i.e. going to just level 5 in 10 subsequent games is likely just as 'efficient' as visiting levels 5-14 in a single game). So in a single game you can have at most 16 chances for 'randomization'.
Also, all my tests were done in multiplayer - the game might behave differently in single player mode, I simply don't know.

Quote:I would assume that either you had a clockfreeze program or did the same as I

I frown upon using hacks in a game - I prefer to play it. :)
I had two PCs right next to each other (sync'd by a time server) and simply started games on each synchronously (AFAIK the 'game master seed' is identical when started within the same second) - eventually I managed to get a 'double' game where I found that having visited only level 8 'randomized' the hidden shrine in it (on level 1), while visiting all levels EXCEPT 8 in its 'twin' did not. I did tell you that my sample size was pretty small, right? :unsure:

Quote:1 in 20 times? I would assume you ran the test at least a minimum of 400 times to be able to make this claim.

*ahem* Heh, I wouldn't have said 'WAG' then...
My goal was to find what's best to AVOID the non-random shrine seed bug, but I never wanted to define some (necessarily more or less artificial) 'rule' of how many different levels you'd have to visit before you may consider touching a Hidden Shrine 'sufficiently legit' - decide this for yourself.


Have Fun!

-Fin "The Legit"
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)