What we know:
1) Loot is determined at mob spawn.
2) WoW uses a PRNG, IBAA to be specific, as of last information.
3) The PRNG is seeded with a timestamp.
4) Each server process has it's own PRNG.
Now, from here on out, it's speculation.
|
1) Loot is determined at mob spawn.
|
This we've been told, and have to accept as truth. However, we do not know if loot is created on mob spawn, nor do we know that respawning a boss mob actually creates a new mob, or merely reinitializes the existing one. Just because the GUID you see on your client changes doesn't mean the underlying structure on the server is a new one.
For instance, when a creature is spawned, it's "loot list" could be populated with item IDs that are randomly pulled from it's loot table. Given that these are only the item's ID, the item itself has not been generated, and therefore does not appear in the server's cache. This would save on resources, as an item ID is only a single 32-bit integer. Do not confuse this with an item's GUID, which from what I know is a combination of the item's ID and attributes.
Lemme pause here to elaborate on this from some stuff I learned back when I used to play with a previous Blizzard game, Diablo II. Blizzard was nice enough to provide us with a copy of a large portion of their server code, including that for item generation and for the storage of item structures. The item as you see it on the client was referenced by a GUID, that referred to that particular item. People assumed this was an item's global identifier, but it was not. Future patches and the release of the dupe-removal system implied that items actually contain a separate, unique identifier (we'll call it a UID) that determined an item no matter where it went (though the code for this was not included in the local server code). Because the duplication methods in place usually involved the same item being "copied" from place to place (as in buying it from a vendor multiple times), each copy of the item retained this UID no matter where it went.
So, back to WoW items and the GUID that you see. This is most likely NOT the UID of the item. This would be generated on upon the actual creation of the item itself, and stored only on the server, where you can't see it. If they learned anything from D2, they would know that this is invaluable in detecting duplicate items that result from certain strains of duplication methods.
My theory on this is that for every item created, it follows a 3-step process. First, the item ID is determined when the mob spawns. Second, when the mob is killed, this ID is retrieved and looked up in the server's item cache. If the item exists in the cache, it spawns a copy of that item with a new UID, and this is the loot you receive. If the item does not exist, it pulls it from it's database, inserts it into the server's cache, and then spawns a copy of the item as loot. With this model, you could think of the item cache as being a server's "template" for an item, and each particular item being an "instance" of the item. The item "master" would be the database from which the server pulls the template for the first time.
Unfortunately, I can't prove this is how item creation works. It's just a working theory based on what I've seen. Disproving this would be (relatively) easy. If you isolate an item that does not exist in the server's cache, and then cause it to appear in the server's cache by resetting an instance repeatedly, then you have proved that the item is actually pushed to the cache on mob spawn.
You could
possibly prove this theory by getting lucky with loot drops: Determining that an item does not exist in the server's cache, and then receiving that item upon that particular kill of the boss. You would have to ensure that this item still was unlinkable prior to every boss attempt, in the case that the mob's loot table is actually regenerated upon respawn.
A third test could be used to determine if resetting a boss does indeed refresh it's loot cache, but it would be dependant upon disproving the 3-step method of item creation. If you can indeed link loot after repeatedly resetting an instance, the next step would be to reset the boss without resetting the instance in an attempt to determine if different loot is now linkable.
|
2) WoW uses a PRNG, IBAA to be specific, as of last information.
|
Not much to say on this point, it's relatively self-explanatory.
|
3) The PRNG is seeded with a timestamp.
|
Again, mostly self-explanatory, but this timestamp could be epoch time, system tick count, some combination or variation of the two, or something else completely.
|
4) Each server process has it's own PRNG.
|
The exact quote from the blue post was "Each server process has it's own unique random number generator..." Unfortunately, This could mean a few things, as well. For one thing, we don't know if an instance is a single process with multiple threads, or multiple processes AND multiple threads. This could imply that at any given moment in a raid, you could either have one or many PRNGs affecting the outcome of your actions.
Edit: We also do not know if a soft-reset of an instance creates a new process or not. I would assume that any instance with no players inside would be suspended for a while, and then it's state archive and the process terminated after a half-hour (hence soft-reset time of a half-hour). If the process it terminated after a certain length of time, when the instance is reopened (entered by a player), the server would have to create a new process for this instance, and load the state from it's cache to repopulate the instance. If it indeed does create a new process to do this, the assumption would be that a fresh RNG is created.
How much information is cached is applicable to the first point: Perhaps only the state of bosses is saved, meaning that a soft-reset could actually create an entirely new loot table for every remaining boss/creature in the instance. Signs may actually point to this: Take an instance that crashes just after a player loots a mob. The player knows the loot that was on that mob, but when he loads back in, the instance has soft-reset (or even just partially rolled back). Upon killing that mob again, the mob drops something else. There could be special cases for bosses, but this could also be verified on a bosskill/reset before loot distribution, followed by a rekill of the boss with a different loot set.
Just my thoughts. I really enjoy the math things, and considering I used to play with this sort of thing back in my D2 days, it brings back good memories
