I'd like to keep working on it, and I agree, thats a better way to implement it..
A new table, for example.. LOOTCLASS : Cloth Armor Cloth Shirt (Chance of Drop) Cloth Hat (Chance of Drop) Cloth Tunic (Chance of Drop) So you could make tables for all the classes. Then, you could just make the lootdrop_entries lootdrop id a specifier to the lootclass and you could randomly select 1 item out of the list on a successful roll, or randomly pick one and roll on it. I'd even throw in a extra random factor so on a 1/10 ~ 1/100 chance you get multiple drops out of the same LOOTCLASS table. I like it ! I'll work on implementing if anyone is interested.. |
I'll gladly test it out for ya Trumpcard when ya get it implemented. I'm really interested in this, and I learn a little more each time I'm exposed to the code. Anything I can do to help ya?
|
That's a really good idea.. many monster types drop identical types/ranges of equipment,
e.g rusty/bronze/FS weapons, various armour types, gems and jewellery of various values, runes/words, spell scrolls etc, as well as their "unique" loot like bone chips, so using shared tables for this would save a lot of time as well as a fair bit of memory. Maybe each NPC could be assigned a list of loot tables, instead of simply a loot table, so e.g for skeletons you'd assign the Rusty Weapons and Skeleton tables, and for orc legionnaires the Rusty Weapons, Bronze Weapons, Cloth Armour and Orc tables. |
Yep, thats exactly why we did it that way in "real eq". There are about a hundred (Well now, i'll bet there are several hundred) "standard" loot tables that NPCs roll on in "real eq". Tables like the various armor tables, weapon tables, gem tables, animal parts tables, etc.
Also some zones have the "zone tables".. those are those zones where any mob in the zone has a chance to drop any item from that zone. |
Lots of good ideas and info in this thread. Just wanted to mention where the numbers form the DBAddon came from, so some ideas oh what to do with the data can be pondered. All the loot info is from the Ethernalquest DB, they list the items droped, and times each item was collected. Therefore if the chance is 5 then the % is 5/total chance values for the lootdrop
For a scrawny gnoll to drop | 12417 | 6011 | 1 | 0 | 5 | is 5/242 (2%) acording to the collected data At the time I didn't wory too much about the numbers being right... loot was messed up then worse than now :/ Regarding coin, I just added coin to all mobs that didn't have some loot already. I just did some rough numbers based on level |
Actually, the loot numbers are probably pretty good.. obviously indivudual gm's can tweak them to taste, but they probably will work pretty well for the time being. Loot actually seems to be working good on my server with my updates so I'm not going to worry about the numbers. I really do like the idea of creating a loot category table, then making those the id referenced in lootdrops rather than specific item numbers, they can reference different classes of items as opposed to indidual ones. Just have to do an additional couple of rands and another mysql pull to get the data out.
So, how do you want to do it? All items in each lootclass table have an identical probability, then we can just roll a probablity of an item from the table, count the records in the lootclass table, then do a rand%<numrows> to determine what item you get. After that before bombing out, do an initial check for a zonelootdrop (which can be empty if you have no zone specific items) , and then take a chance on an item from that table. We can keep the original loot probablities for inidudual items tied to the table probability. IE, if we have a 5 for a rusty sword, we can just use 5 as the probability of a drop from the entire table which is then chosen randomly. |
Heh why are you making it so complicated? Giving me a headache :p
You have two factors involved. Item Tables, and Loot Tables. An Item Table contains a list of item IDs, as well as a low and high roll for decieding what drops. When choosing an item from the item table, a randomw value between 1 and 100 is chosen, and the item from the table which has a min/max value range covering that value is chosen. EG: Code:
table: item_table Assume you had a second item table with rusty weapons. Now the second part of this scheme, is the Loot Table, which is defined in the NPC itself. The loot table is 1 entry per item you want dropped. Each entry identifies the item table to roll against, as well as the % chance that you will roll. In otherwords, you can have an 80% chance of rolling against the cloth armor table. 20% chance you won't roll on that table (And thus not have a cloth drop, but you could still have a rusty dropm as it is seperate). This is how it is done in "real eq". |
Quote:
|
All times are GMT -4. The time now is 02:52 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.