Thread: Loottables
View Single Post
  #7  
Old 06-06-2011, 11:11 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Yeah, that explanation pretty much covers it all. The only correction I would make is about this:

Quote:
Originally Posted by image View Post
These should order as they are in the DB (so the first lootdrop_entries entry for this lootdrop in the db is the first item entry we check).
To help decrease favoritism for items earlier in the DB order, we instead pick a random point in the total list to start at and then iterate until we get a successful roll. So, if we have 10 items in the same lootdrop_id, we would random 1 to 10 and (or 0 to 9 whatever) and start at the random spot that was picked, then continue to the next and so on.

On the question of multiple drops; that is set in the lootable_entries table with the multiplier and probability fields. So, if you want 0 to 2 possible drops from your lootdrop_id, you can set the multiplier to 2, then the probability to anything from 1 to 99 depending on how often you want 1 or 2 to drop. The multiplier is the max possible items from the lootdrop_id that can be dropped, and the probability is the chance for each multiplier to drop. If you set the multiplier to 10 and the probability to 10%, you would probably average about 1 drop per kill (in theory anyway), but could be anywhere from 0 to 10 at any time.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 06-06-2011 at 11:18 PM..
Reply With Quote