Page 2 of 3
Re: Loot System Revamp Discussion
Posted: Tue Apr 09, 2013 7:06 pm
by Jabantiz
Well it was planned to be like adding a quest step, so the quest loot would not drop for any one unless they were on that quest step, also not including the quest item in the loot table would make it easier to bypass the level restriction (killing a grey mob). However this will not work for overriding the chest drop, as you would need to be on a quest and lore and legend as well as language drops can drop whenever.
Overriding the chest an item drops in will probably have to be in the db, as for the lua function haven't planned it all out yet and would prefer it to match how other quest steps work, however I haven't looked to deeply into quests so I am not sure how they work, assumed they were mostly lua driven.
Re: Loot System Revamp Discussion
Posted: Tue Apr 09, 2013 7:45 pm
by John Adams
Look into Milestone 1's `quest_details` table. All the rewards are in the table. I believe those rewards are initialized with the quest script.
Jabantiz wrote:Well it was planned to be like adding a quest step, so the quest loot would not drop for any one unless they were on that quest step, also not including the quest item in the loot table would make it easier to bypass the level restriction (killing a grey mob). However this will not work for overriding the chest drop, as you would need to be on a quest and lore and legend as well as language drops can drop whenever.
I was unaware that EQ2 Live treats chest drops as "quests". I thought loot was just loot, like any other loot (crab meat, bear pelt) but because of their "tier" (rare, legendary, rockin), they popped out in a more uber chest-type thingy. Unless I missed a post somewhere... likely.
Granted, I am not an expert EQ2 player, and why I ask for explanations. I'd rather it work Live-like than not at all. I'm just not a fan of offloading everything into text files, as you know.
Re: Loot System Revamp Discussion
Posted: Tue Apr 09, 2013 8:04 pm
by Jabantiz
My understanding of live quest drops is the item will only drop if you are on that step of the quest, if in a group only those on that quest step will see the loot in the chest. You can also get the quest item even if you shouldn't get the rewards from the encounter (killing a grey) the quest drops mostly follow the rules of other drops so if it is a fabled item you get an exquisite chest. The only area I really remember it working like this was in kunark zones, don't remember this type of system before those, was usually an automatic update on killing an NPC if I remember correctly.
Again this is just my understanding of it, any one feel free to correct me if I am wrong.
Re: Loot System Revamp Discussion
Posted: Tue Apr 09, 2013 8:18 pm
by thefoof
I can't remember ever getting anything higher than a small chest from a grey mob, I'm pretty sure with quest items they would make the item available on either body/small chests for everything, with maybe a couple exceptions I'm not thinking of.
Re: Loot System Revamp Discussion
Posted: Tue Apr 09, 2013 8:42 pm
by John Adams
I'm even more confused now. I thought this was about Loot... as in, killing a mob, group of, or boss, etc... and getting a loot drop off a body. Yes, if it's a Quest Step, then of course it should be as you explained. I must have missed a change in the convo somewhere.
The current Quest System (forget kill Loot a second) already does this, as Scatman coded it that way. Only spawns and/or items for the player on the given step. I cannot say it was 100% complete, or accurate to current EQ2 Live since it was done in 2008, which was the RoK/TSO era, maybe even close to SF. At least I'm fairly sure that's what he did.
In that case, I'm not going to freak out about LUA since that's currently how we do it anyway

Sorry for the confusion. I didn't consider quest stuff as "Loot/SmartLoot" in this revamp, I was just thinking this was Kill Loot.
Re: Loot System Revamp Discussion
Posted: Tue Apr 09, 2013 9:01 pm
by thefoof
The problem with it is if an item is treasured - and then gets defaulted to a normal treasure chest, which a grey mob can't drop, you have to mentor or something to get the item to drop. Some quests you have to physically have the item and examine it ect.
I'm assuming because we didn't have treasure chests before (I think?

) that this wasn't an issue that came up because all loot was handled through bodies anyway. For the sake of it probably needing to be this way anyway though might as well make it where it's easy

Re: Loot System Revamp Discussion
Posted: Tue Apr 09, 2013 9:46 pm
by Jabantiz
The chest type dropped should now depend on the highest tier of loot items, also only uncommon+ items are put in a chest, the rest remain on the body. As of now grey mobs will still drop loot. Still debating how to override the chest type to be dropped for an item. Code on Dev SVN
Re: Loot System Revamp Discussion
Posted: Mon May 06, 2013 12:31 pm
by alfa
Chest spawn depend of drop type anything => "uncommon" (don't know if it is this name on US server) going into a chest.
There is small chest for uncommon so (like crafting volume, some trash loot)
There is medium chest for treasured
There is legendary chest for legendary
And (the best) Fabled chest for Fabled item
The bigger rank of items in loot list set the size of chest.
Gray mob never drop, except some quest item, like specific quest, lore and legend, language...
So easier to set chest drop as corpse loot and add specific loot for gray with LUA (and maybe a table for language / lore and legend quest [indexed by race type for example])
You need some table for loot I think:
- Racial loot -- Include all lore and legend, language...
- Zone loot -- On live each zone have drop list not depend of the mob you kill
- Mob Loot -- Specific loot for specific mob
Quest loot still handle by LUA.
Smart loot should be handle by loot engine, with for example a field in Mob / Zone loot like is_SmartLoot for enable or disabled it by zone. You need to take care of mob level for drop zone too, ex: in Kylong Plain, there is T7 and T8 mob, and you can drop a master from a level 68 or 69 mob and it will be a T7 and if you drop it on a 80+ it will be a T8 (it happend to me on live so)
Again that is just my opinion, hope it can be helpfull for you

Re: Loot System Revamp Discussion
Posted: Wed Apr 16, 2014 2:39 pm
by Jabantiz
Over the past several days I have been rereading this thread and in the end I am confused so I want to re think this and keep it simple, only the basic loot system that can be expanded later, no quest drops or smart loot at this time.
What we have works good for specific loot tables for specific mobs (named mobs) the only mod we need to do is add a field to `lootdrop` to override the default chest the item would produce.
I think we should add a new table `loot_global` that has an enum for the type of global loot table, for example zone, racial, or level. It would have a `loottable` linked to it and a couple fields for values that could have different meaning based on the type, like a type of racial the value would be for the racial id, for a zone one value could be the zone id, min level, and the max level.
Thoughts?
Re: Loot System Revamp Discussion
Posted: Wed Apr 16, 2014 7:07 pm
by thefoof
Jabantiz wrote:I think we should add a new table `loot_global` that has an enum for the type of global loot table, for example zone, racial, or level. It would have a `loottable` linked to it and a couple fields for values that could have different meaning based on the type, like a type of racial the value would be for the racial id, for a zone one value could be the zone id, min level, and the max level.
Yup I like it. LUA is also fine for quest loot, now that I've used it before

I was more noobish when I wrote that other post I guess lol. I also agree it's not really worth bothering with smart loot
right now. I would say if an item needs to be distributed in an odd way (different chest) we could even handle that through LUA. Since 99% of drops are going to use the standard system.
Re: Loot System Revamp Discussion
Posted: Wed Apr 16, 2014 7:25 pm
by Jabantiz
Here is a table I came up with quickly, if any one has suggestions on other types let me know, will look into adding code to support it tomorrow.
Code: Select all
CREATE TABLE `loot_global` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` ENUM('Level','Racial','Zone') NOT NULL DEFAULT 'Zone' COLLATE 'latin1_general_ci',
`loot_table` INT(10) UNSIGNED NOT NULL,
`value1` INT(10) UNSIGNED NOT NULL,
`value2` INT(10) UNSIGNED NOT NULL,
`value3` INT(10) UNSIGNED NOT NULL,
`value4` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
INDEX `FKLootTable` (`loot_table`),
CONSTRAINT `FKLootTable` FOREIGN KEY (`loot_table`) REFERENCES `loottable` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
)
COLLATE='latin1_general_ci'
ENGINE=InnoDB;
Also not sure if we need 4 value fields, zone will need 3, just leaving the option open for other types I haven't thought of yet.
Re: Loot System Revamp Discussion
Posted: Thu Apr 17, 2014 1:06 pm
by Jabantiz
Added the code, all you need to do to set it up is add a loot table into loot_global, like you would in spawn_loot.
Here is an example of a global level loot list
Code: Select all
INSERT INTO `loot_global` (`type`, `loot_table`, `value1`, `value2`, `value3`, `value4`) VALUES ('Level', 1, 5, 0, 0, 0);
Type = Level
Loot table ID = 1
Value1 = 5 (level in this case)
Now every time you kill a level 5 mob it can drop something from loot table 1.
For a zone loot list you need to set Value1 to the zone id, optionally you can set Value2 and Value3 for min level and max level, so for frostfang it would be 2 entries, the first would be level 1 - 10
Type = Zone
Value1 = 470
Value2 = 1
Value3 = 10
The second entry would be for levels 11-20
Type = Zone
Value1 = 470
Value2 = 11
Value3 = 20
Again Value2 and Value3 is optional, if not set any spawn despite its level has a chance to drop loot from the table, Also if a min level is set but not a max level then max level will default to the min level, not sure on that behavior though.
Racial loot lists are basically the same as level loot lists except Value1 = race id. This uses the new race types, but it will not use the base race type so for example undead will never come up if a spawn is set to skeleton.
EDIT: Forgot to mention I also updated the original database code for loot to use the database_new code, every thing seems to work but let me know if there is odd behavior
Re: Loot System Revamp Discussion
Posted: Sat Apr 19, 2014 9:22 am
by John Adams
Getting an error compiling with VS2010:
1>c:\svn\eq2\trunk\source\worldserver\World.h(554): error C3861: 'back_inserter': identifier not found
1>c:\svn\eq2\trunk\source\worldserver\World.h(557): error C3861: 'back_inserter': identifier not found
1>c:\svn\eq2\trunk\source\worldserver\World.h(560): error C3861: 'back_inserter': identifier not found
Code: Select all
if (spawn_loot_list.count(spawn_id) > 0)
copy(spawn_loot_list[spawn_id].begin(), spawn_loot_list[spawn_id].end(), back_inserter(ret));
if (level_loot_list.count(spawn_level) > 0)
copy(level_loot_list[spawn_level].begin(), level_loot_list[spawn_level].end(), back_inserter(ret));
if (racial_loot_list.count(racial_id) > 0)
copy(racial_loot_list[racial_id].begin(), racial_loot_list[racial_id].end(), back_inserter(ret));
Not sure this is loot, but all the lines freaking out say Loot in them
Edit: Solved by adding #include <iterator>
http://blogs.msdn.com/b/vcblog/archive/ ... eta-1.aspx
Re: Loot System Revamp Discussion
Posted: Sat Apr 19, 2014 1:26 pm
by Jabantiz
Sorry about that, VS2012 seems to like to include stuff for me automatically. And yes it is loot related, just copys the vector into the back (back_inserter) of another vector without having to loop over it.
Re: Loot System Revamp Discussion
Posted: Sat Apr 19, 2014 3:01 pm
by John Adams
I did not commit this, btw. Wanted you to check it out for yourself first.