When is loot generated?

1 Blood Elf Warrior
0
There's a random drop item specific to an instance. You can clear the whole place in, say, 60 minutes or skip some far away/annoying/dead end trash and finish 10-15 minutes faster (more kills/time). Should you pick the latter version, does that mean you're potentially missing out on a drop?

It would be great to know if the monsters' loot table is generated when you zone-in/reset the instance or upon killing them. If you have more insight on this stuff, help me out please.
Reply Quote
100 Orc Warrior
15685
Why would killing it faster make you potentially miss out on a drop? It doesn't matter if loot is generated the moment you kill it, the moment you zone in, the moment the instance is created, the moment the servers come online, or the moment the universe comes to be.
Edited by Rallik on 11/19/2012 10:59 AM PST
Reply Quote
100 Pandaren Monk
8610
Mob dies, script runs determining what it drops. In that order.
Reply Quote
90 Goblin Mage
14915
I don't know how Blizzard actually does it, but as a programmer I can tell you that it doesn't make any sense to generate drops before the mobs are killed. To do that, you'd have to waste CPU cycles to do the rolls and memory to store the information about what was dropped, for mobs that may never actually be killed. And what does it get you? Nothing. From a player's perspective, there's no difference at all.

And when I say no difference at all, I mean that you're wrong to think that the answer to this question should affect your strategy in any way at all. Suppose the loot tables are generated when the instance is created. The optimal strategy is still to maximize the number of trash mobs you can kill per hour. If the drop rate is 0.1%, then all you need to know is that each mob you kill and loot gives you a 0.1% chance to get the item. Whether the roll is done before or after you kill the mob doesn't matter if you have no way of getting that information without actually killing and looting it.
Reply Quote
1 Blood Elf Warrior
0
11/19/2012 10:59 AMPosted by Rallik
Why would killing it faster make you potentially miss out on a drop? It doesn't matter if loot is generated the moment you kill it, the moment you zone in, the moment the instance is created, the moment the servers come online, or the moment the universe comes to be.


What I mean is: (scenario no1) loot is pre-generated when you enter the instance, and the mob(s) with the drop is zillion miles away from the rest - you take the faster route to maximize kill/time, skipping that one dude who carries the stuff you want.

11/19/2012 11:00 AMPosted by Somaliu
Mob dies, script runs determining what it drops. In that order.

11/19/2012 11:08 AMPosted by Keeblik
I don't know how Blizzard actually does it, but as a programmer I can tell you that it doesn't make any sense to generate drops before the mobs are killed. To do that, you'd have to waste CPU cycles to do the rolls and memory to store the information about what was dropped, for mobs that may never actually be killed. And what does it get you? Nothing. From a player's perspective, there's no difference at all.


Thanks for the answers
Edited by Maggot on 11/19/2012 11:18 AM PST
Reply Quote
90 Troll Hunter
11450
Back in Classic (or even TBC) there was a lot of talk about loot seeding.

Drysc:

" Loot is generated upon creation.
As soon as you step into an instance, or a mob is created in the world, the loot that's going to drop has already been determined."

What are the variables in the random generator's kernel, is it based on some attribute of the players in the raid, or the raid leader?

"Heh no, I believe it uses a time stamp to seed the generator. So, there's nothing you can influence within the game that would alter or coerce the generator.


http://www.sk-gaming.com/content/15628-Loot_generation_clarified
Reply Quote
100 Tauren Druid
9990
11/19/2012 10:59 AMPosted by Rallik
or the moment the universe comes to be.


This.

I have studied the excact position, velocity and spin, adjusted for quantum flux, of every particle in the universe, and know exactly what raid nights I will win loot. So now I don't log in unless I know I'm getting loot.
Reply Quote
90 Human Paladin
9970
11/19/2012 11:13 AMPosted by Maggot
Why would killing it faster make you potentially miss out on a drop? It doesn't matter if loot is generated the moment you kill it, the moment you zone in, the moment the instance is created, the moment the servers come online, or the moment the universe comes to be.


What I mean is: (scenario no1) loot is pre-generated when you enter the instance, and the mob(s) with the drop is zillion miles away from the rest - you take the faster route to maximize kill/time, skipping that one dude who carries the stuff you want.

That might happen, but if you pick the other way, you might waste a lot of time killing guys that don't have the drop you want. And there's no way to know ahead of time which it is. So it doesn't matter: even if it's already decided internally, you as a player might as well treat it like drops are not determined until you kill the target.
Reply Quote
1 Blood Elf Warrior
0
I guess that would be the smartest thing to do.
Reply Quote
90 Human Paladin
16345
11/19/2012 11:08 AMPosted by Keeblik
I don't know how Blizzard actually does it, but as a programmer I can tell you that it doesn't make any sense to generate drops before the mobs are killed. To do that, you'd have to waste CPU cycles to do the rolls and memory to store the information about what was dropped, for mobs that may never actually be killed. And what does it get you? Nothing. From a player's perspective, there's no difference at all.


If you have a large enough of database, then you don't need to run any loot generation script at all besides the initialization of the database...

When you load an instance, it generates a "key" to an instance table. The table contains all mobs in the instance and items each mob it will drop when killed. When a mob is killed, it just do a database query based on the "key" (instead of a rng script) and retrieve the drop... Nowadays storage is cheap and database queries are fast... so if it helps performance and lessening on-demand computation power (database query vs running the rng script) then it's a perfectly viable option...

edit:

scenario:

Beginning of time: generate a HUGE instance database. Each entry contains a key (instance id), every npc in the instance, item that each npc WILL drop when killed.

Entering the instance: Randomly generate an instance key for the group/raid.

When a mob is killed: Do a database query to retrieve the item based on the instance key. Everyone roll need on it and whoever lost the roll post on forum... etc.

Not saying that's how they do it, but it's a plausible scenario nevertheless...
Edited by Emmey on 11/19/2012 11:54 AM PST
Reply Quote
90 Blood Elf Priest
0
I don't know how Blizzard actually does it, but as a programmer I can tell you that it doesn't make any sense to generate drops before the mobs are killed. To do that, you'd have to waste CPU cycles to do the rolls and memory to store the information about what was dropped, for mobs that may never actually be killed. And what does it get you? Nothing. From a player's perspective, there's no difference at all.

And when I say no difference at all, I mean that you're wrong to think that the answer to this question should affect your strategy in any way at all. Suppose the loot tables are generated when the instance is created. The optimal strategy is still to maximize the number of trash mobs you can kill per hour. If the drop rate is 0.1%, then all you need to know is that each mob you kill and loot gives you a 0.1% chance to get the item. Whether the roll is done before or after you kill the mob doesn't matter if you have no way of getting that information without actually killing and looting it.


They probably don't generate all the loot, but they seed it when you zone in. Atleast for raid bosses.

I've heard a lot of theories (that it's based on class etc. we used to notice the same drops if our RL would be raid lead on zone in, and would give it to random people. seemed to work surprisingly well, but it was probably coincidence.), but it's probably just based on the millisecond of the current time or w/e. Anything else has the potential to be discovered.

11/19/2012 11:13 AMPosted by Maggot
What I mean is: (scenario no1) loot is pre-generated when you enter the instance, and the mob(s) with the drop is zillion miles away from the rest - you take the faster route to maximize kill/time, skipping that one dude who carries the stuff you want.


Assuming everything has an equal chance to drop something, and you know it's not something like "garunteed to drop alteast 1 per instance), you should maximise kills/time (make sure you factor in the fact that you can only do 5 instances /hr, if you're planning on doing long stretches at the same time)
Reply Quote
90 Draenei Shaman
15030
11/19/2012 11:34 AMPosted by Kerranggaroo
or the moment the universe comes to be.


This.

I have studied the excact position, velocity and spin, adjusted for quantum flux, of every particle in the universe, and know exactly what raid nights I will win loot. So now I don't log in unless I know I'm getting loot.


Even if you knew the exact initial conditions of the universe (or any moment since then), you would never be able to solve for this because you'd need a computer at least as powerful as the entire universe, which won't physically fit inside the universe.
Reply Quote
90 Goblin Mage
14915
11/19/2012 11:46 AMPosted by Emmey
When you load an instance, it generates a "key" to an instance table. The table contains all mobs in the instance and items each mob it will drop when killed. When a mob is killed, it just do a database query based on the "key" (instead of a rng script) and retrieve the drop... Nowadays storage is cheap and database queries are fast... so if it helps performance and lessening on-demand computation power (database query vs running the rng script) then it's a perfectly viable option...


Storage costs aside, a database query still costs more than generating the loot on the fly. Rand() plus a lookup into the in-memory loot table is dirt-cheap. Aside from the fact that you have to go off-box, even the simplest database query involves overhead that dwarfs that, by orders of magnitude. I used to be a developer on one of the big-name database engines, so I've stepped through query execution in a debugger, and there's a lot going on in there.
Reply Quote
90 Blood Elf Priest
0
11/19/2012 01:18 PMPosted by Keeblik
When you load an instance, it generates a "key" to an instance table. The table contains all mobs in the instance and items each mob it will drop when killed. When a mob is killed, it just do a database query based on the "key" (instead of a rng script) and retrieve the drop... Nowadays storage is cheap and database queries are fast... so if it helps performance and lessening on-demand computation power (database query vs running the rng script) then it's a perfectly viable option...


Storage costs aside, a database query still costs more than generating the loot on the fly. Rand() plus a lookup into the in-memory loot table is dirt-cheap. Aside from the fact that you have to go off-box, even the simplest database query involves overhead that dwarfs that, by orders of magnitude. I used to be a developer on one of the big-name database engines, so I've stepped through query execution in a debugger, and there's a lot going on in there.


Perhaps only generate loot on bosses, not trash? No idea why it'd be different.

I think mobs in dungeons pop, right? (it's easier to see in empty zones. the mobs will hover for a sec then drop, as the game generates them. im pretty sure but not 100% i've seen it in dungeons). Then my guess would be loot is generated on spawn, or death. Death would explain the tiny delay when looting a corpse, atleast.
Reply Quote
88 Human Warrior
15645
Loot is generated when a mob spawns, though this doesn't apply to quest item drops as there is a dynamic system in play for those.
Reply Quote
90 Goblin Mage
14915
11/19/2012 01:32 PMPosted by Arianity
Death would explain the tiny delay when looting a corpse, atleast.


I'm sure that that's just network latency. Any reasonable method of selecting drops from the mob's loot table would be imperceptibly fast. A few microseconds, tops. But the client has to make a round trip to the server to find out what the mob dropped, and that's ~100 milliseconds for most people. Add in a random lag spike, and you can get a fairly significant delay.
Reply Quote
90 Goblin Mage
14915
Drysc:

" Loot is generated upon creation.
As soon as you step into an instance, or a mob is created in the world, the loot that's going to drop has already been determined."


Huh. If a blue said that's how they do it, I'll take their word for it, but I can't imagine why. Maybe they do it so that they can keep the whole instance in one contiguous block of memory, I guess.
Reply Quote
90 Human Paladin
16345
11/19/2012 01:18 PMPosted by Keeblik
Storage costs aside, a database query still costs more than generating the loot on the fly. Rand() plus a lookup into the in-memory loot table is dirt-cheap. Aside from the fact that you have to go off-box, even the simplest database query involves overhead that dwarfs that, by orders of magnitude. I used to be a developer on one of the big-name database engines, so I've stepped through query execution in a debugger, and there's a lot going on in there.


Yer my bad, I was thinking of some really complicated algorithms that may be easier to compute and store the results before hand... rand() should be much faster than a database query...
Reply Quote
90 Night Elf Druid
17755
Yer my bad, I was thinking of some really complicated algorithms that may be easier to compute and store the results before hand... rand() should be much faster than a database query...


Either way, a query has to go to actually record the events that came about. All you're doing here is the same thing, except instead of sending the loot results, you're sending "kill happened" and retrieving results. Keeps all events server side.
Edited by Slashlove on 11/19/2012 5:30 PM PST
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]