thinking cap
#41
Vandiablo,Apr 7 2003, 08:56 AM Wrote:combining their posts, not them

Reading Pete's layout of his/our confusion, he talks about the seed being stored as "zero" but reading Jarulf it looks like the value stored for a shrine seed may be a NULL, which is different (or at least can be). If you copy a zero to a memory location, you overwrite the old value there. If you copy a null, you don't copy anything, and you do no overwriting. (Depending on the language, and that may be wrong for assembler, I don't know assembler.)

So, my understanding, from reading Jarulf's post:

1. Game created-- all shrines created -- all seeds for shrines have memory space allocated but have no value assigned to them (NULL).

2. The character enters the dungeon. The memory for "current level" is filled in with the previously created "dlevel" 1, 5, 9, or 13. For this initial level, all shrines seeds will be null, which is read as zero, if I'm right. This level will cut yer shield, cut yer CL, or raise yer dex at the 3 shrines we've mentioned.

3. The character enters another dungeon level. State flags are saved for the dungeons (except for trap doors, due to the Van Trappe Fanomaly as pointed out by Thecla) somewhere for later retrieval. The "new level" is pulled into the "current level" memory area. The memory space for the shrine seeds on this level is not overwritten. This memory space is most likely at a different address than the shrines for the previous level. This memory space still contains whatever it did for the last level, which was not necessarily a shrine seed. It can contain either "junk" or "null junk". If the junk is null, you will still have the shield/CL/dex effect. Otherwise, the shrine will pretty much be random.

4. The character returns to the first level (which was dlevel 1, 5, 9, or 13). A shrine that was previously "null" seeded may now have a somewhat-"random" seed, though there is still a chance for the null effect. This is because there is still "junk" from the second level that was not overwritten when the first level is brought back. If the "junk" was null, you still have the effect.

5. Evidently, given the number of ppl who claim that the shrines were random for them, the odds of a null-seeded shrine continues to descend with successive levels. However, I am thinking that there shouldn't be that much difference between 2nd and beyond. It would depend on how much non-zero data is typically stored in the "current level" memory area, and if there is other "null copying" than shrine seeds.

This information (as I think we realized years ago) could be used to cheat. If you find one of those shrines in the first level you do, you know what will happen.

It's kinda funny though that you will get different shrine  effects from the same shrine depending on what your previous dungeon level was. Also, it's funny that it could vary from player to player, since they could have different histories. Ah, if only my testing apparatus were still assembled....

-V
Yes, that is as far as I know a correct description on how it works. As for what can occupy the shrine "location" in memory, well, anyobject on a dungeon level. That would be chests, sarcophagus, decapitated bodies, bodies on poles, barrels, book shelves, skeleton tomes and so on. That is, anything you find in the dungeon that is not a monster or an item or part of the dungeon itself :) All those that can have items droped or some effect attached to them will have a seed correctly saved, others will not. No real idea on the ratio about the ones with a seed and those not though.
There are three types of people in the world. Those who can count and those who can't.
Reply
#42
Hi,

Whenever you enter a new level, the current level is stored away in a compressed form somewhere else and the new level is initialized . . . (emphasis mine)

That was my error. I was under the mistaken impression that the initialization of the level occurred when the game was started and the results of that initialization where stored away. Having it re-occur each time a level is *entered* explains why visiting other levels eventually "randomizes" the effects.

Thanks,

--Pete

Aside to Van. Null and zero are indeed different. In principle null means (none, empty, etc.) However, a memory location must contain some bit pattern. So, for instance, when a pointer is allocated as pointing to "null", it does not mean that it points nowhere (a literal implementation of the mathematical "null"). The pointer points to whatever location happens to be the address of the bit patter that resides in it's allocated storage. Now, this may be a valid location, it may be a "hole" in memory, it might be some ROM, or it might be something used by a memory mapped I/O device.

When a copy or move operation is performed, the contents of registers assigned to pointers that are pointing to "null" are copied. Whatever random information was in those locations before the copy/move will be in the image locations after. "Nulls" are moved just like everything else.

So, in a real sense, "null" in computers is more like "unknown" than like "nothing".

BTW, my commiseration to your wife, sounds like she's got two "children" to raise ;)

--Pete

How big was the aquarium in Noah's ark?

Reply
#43
Ah, I was thinking that when something was not initialized, it was the pointed-to memory itself that was not cleared, and not that the pointer itself pointed awry. I thought the pointer was pointing to a valid shrine-seed spot, but that the memory at that spot was never reset. But, alas, why nullify a zero-bit willy-nilly, when it will void nothing? just hand me that empty ZIP disk, Zilcho, I must flush my buffers and be refreshed.
Reply
#44
Hello Vandiablo,

"I thought the pointer was pointing to a valid shrine-seed spot, but that the memory at that spot was never reset."

That is still the case, as far as I see.

The actual bit pattern in non initialized memory can be random (untouched) or NULL, depending on the compiler and operating system. NULL is when it is filled with binary zeroes. Random values may produce unexpected results, and nowadays initializing to NULL is common. Btw, some compilers initialize numerical values to mathematical zeroes, but only those.

A pointer is defined by the address of the memory location it points to. Both the address and the memory location hold "values" that can be NULL. If the address is NULL, it will produce a crash at run time. If the pointed value is NULL, the result will depend on the calculations done with it. In our case it limits the randomness until, like you said, the value is overwritten and no longer NULL.
Reply
#45
Someone please correct me if I am wrong, but I would think that if you have a TC (or any other item) that is below 10 durability remaining (9/21 for example) that it will always go *up* in Durability because the item is skipped for the loss because the game will not destroy it... correct?

I have only recently thought about this because when my warrior had 3 of 4 items that were under 10 durability and the shrine raised them all and hit my helm which was at something like 40... perhaps testing is in order. What would happen if all 4 items worn were under 10 durability, would all get raised or would 3 get raised and one remain as it were?

This could be one way to always ensure a piece of equipment were always raised... but I would think it would be rather dangerous to handle a really nice piece of equipment in such a manner...
Dix...

"Facta Non Grata"


[Image: dixen.gif]
Reply
#46
I think this sort of thing happened to me once. I relied on the "hidden shrine will never destroy a piece of equipment" note and touched a hidden at TC durability 7/31. Well, TC's durability got lowered, but it got lowered to 1/21. It was a couple of months ago though, so don't blame me if my memory is playing tricks on me. I'm definitely gonna try it with all items that are below 10 current durability to verify this. It would also be fun to try it on all items with max durability below 10 and see if one gets to 1/1 or something.
"My doctor says that I have a malformed public-duty gland and a natural deficiency in moral fibre, and that I am therefore excused from saving Universes."
-- Ford Prefect
Reply
#47
Actually the same thing goes for maximum dur. So any item that has 11 max dur or less will be lowered to 1/1.
-Cytrex
Reply
#48
So any item that has 11 max dur or less will be lowered to 1/1.

Just to note, < 11/11 dur includes 1/1. So, 1/1 dur won't force Hiddens to raise it.

[o: *LEMMING* :o]
Reply
#49
Quote: Someone please correct me if I am wrong, but I would think that if you have a TC (or any other item) that is below 10 durability remaining (9/21 for example) that it will always go *up* in Durability because the item is skipped for the loss because the game will not destroy it... correct?

NO.

If an item is "selected" for reduction, the other three slots will go up even if the "reduction" goes from 1/1 to 1/1. This is actually a good thing if you're building up dur for all slots, because you're +30 rather than the usual +20 total.

THERE IS NO WAY TO GUARANTEE (short of cheating) THAT A SLOT WILL INCREASE.

(You could deliberately take advantage of the shrine-seed bug, and maybe that would be "legit" but it would most definitely be very very high on the "cheese-o-meter".)

Of course, you CAN guarantee that a slot will decrease. Just clear the other slots. B)

-V
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)