Activate Defiant Drops
Hey guys, here is an SQL that will activate the Defiant drops. I wrote this when I realized the Defiant gear was not dropping. It is set to allow all mobs a 4% chance of dropping Defiant gear based on the mob level and required level of the item. In other words a level 10 mob will have a chance at dropping Simple Defiant gear and not Ornate Defiant. As always, back up your database before running. Make sure you do not have any lootdrop ids over 100000 since that is the id I am using. if you do just edit these numbers as you see fit.
Code:
#add defiant drops |
thanx for the code it worked geat!
|
Just keep in mind that
1. many mobs dont even got a loottable (id) 2. some mobs share the same loottable so there may be duplicate entries after your sql commands ( maybe "distinct" is preventing that, i am no sql expert ;) ) |
Quote:
I actually encountered a forest drakeling with a crude defiant spear. You could see the spear graphic along his side and it looked like it was jousting. Wish I had captured the jpg. I was working to make it more intuitive by insuring that only humanoid mobs drop the items but got sidetracked. I will resume at some point. I am a C++/SQL developer and have been spending more time looking at the code lately. |
I think the idea behind defiant gear is that almost every mob can drop it.
And I thought animal mobs cant show equipped gear, I am really surprised about your story. |
Animal mobs all over show equipped gear
|
This is great werebat. Thank you! Dumb question; but just to be sure, if i wanted to change the drop percentage would I just change the 4 in the last line of each group to reflect that?
|
Quote:
I have a bunch of sql's to do various things like preventing aggro from gray mobs (the ones that dont give experience anymore), setting the OOC combat regen values and corpse rules. Pretty much things I would have liked to have seen in live. |
Quote:
And regular weapons dont show on the animal mobs, but the defiant spear did, really weird but it would have made a great screenshot. If I see it again I will screenshoot it, F9 I think. To be specific it was a Thorn Drakeling with a Crude Defiant Spear in Misty Thicket. |
I only played EQ up to about level 53 on live, and that was a long time ago. (I love running my own server, glad this stuff exists.)
So I am just wondering what Defiant armor is. I can look it up on Zam just fine, but I gather there's more to it that just a bunch of similarly named items. Does it have some sort of progression or levels or something? |
Quote:
For me, its ok, cause my mobs drop them only at a 1/100 chance, so you wont see them too often. If only humanoids carry all the good stuff, why fight animals at all? I like the idea that even a simple spiderling could drop uber gear. ;) |
Would anything lower than 1 percent work in terms of a drop rate? Does the system recognize decimals?
I like the idea of Defiant dropping but making it oober rare. |
Unfortunetely no. The algorithm uses integers for random numbers, so probabilities are 1-100.
Only item chances per lootdrop table can be larger numbers, but that means you have to put some dummy drops in the same defiant lootdrop to make them rarer than 1/100. |
Defiant not dropping
Thanks Werebat - but I can't seem to get this to work. I'm hoping someone can help. To test out the code on my server, I took the first section (pasted below) and put it into a SQL file and sourced it in. Things went fine. I reloaded the world, killed about 20 mobs under lvl 5 and never saw 1 drop of Defiant armor. I then opened George's NPC/Loot tool (just started using), selected several random lvl 1-4 mobs in various zones and I see that they have a Lootdrop_ID listed for the entry I just imported (ie: 100001) with a 20% chance. However, on the right pane where Item_Id, Equipped, Chance, etc is listed in the tool, I see no entries for the armor. Did I miss a step to get that in there? I see other loot entries for mobs - ie - for a bat I see bat fur, etc. I made certain I had no Lootdrop_IDs above 90,000. I can however, simply go in game and do a #fi Crude Defiant and I get a listing of the various armor/weapons. Any thoughts on what might be wrong?
Here's the code I sourced in as a test: #add defiant drops insert into lootdrop values (100001, 'Crude Defiant'); insert into lootdrop_entries select 100001, id, 1, 1, 2 from items where name like 'Crude Defiant%' and nodrop = 0; insert into loottable_entries select distinct loottable_id, 100001, 1, 20 from npc_types where loottable_id > 0 and level between 0 and 4; Any help is appreciated - looking forward to having defiant in. Thanks in advance! |
The sql looks for the Defiant items that are set to nodrop of 0. Are they still 0? if they were changed to 1 then it wont find them. I used a fresh database when I created it so check to see if anything has changed with the defiant items.
|
Hmm trying this again with the pasted code below. You had nodrop = 1 above. However when I look at Crude Defiant items in the database they are marked as tradeable. I'm trying this again with:
#add defiant drops insert into lootdrop values (100005, 'Crude Defiant'); insert into lootdrop_entries select 100005, id, 1, 1, 2 from items where name like 'Crude Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 100005, 1, 4 from npc_types where loottable_id > 0 and level between 0 and 4; |
Yep that did it - thanks Werebat. That's what I get for modifying the code :) I had changed the nodrop to 0 instead of 1. It populated fine this time. Now I just need code to remove nodrop from items :) I'll look that up thanks again!
|
Pardon my asking, but what would be the easiest way to completely remove a Lootdrop_ID from all NPCs from lvl 1-4? For example, I had created the Lootdrop_ID of 100001 for those level ranges, but now that I no longer need it (and it is in every mob lvl 1-4's loot table), I'd like to remove it. I'm guessing it's a SQL query - I'm just a tad new to those.
Thanks! |
Quote:
Code:
update variables set value=1 where varname='DisableNoDrop'; |
Thanks bud.
|
Anyone find a work around to get these drops rates lower ? I too like the idea of any mob having the potential to drop something, but 1% seems way too high. I can already tell from a week of killing that 1% global will be too high. Maybe .05 would be a good number. What about maybe a filler item that is nothing ? I guess that would not work either though.
|
You could "dilute" it. For example, if you have a lootdrop made up of a crude defiant bracer set at 1%, then it will have a 1% chance of dropping. Now if you add a ration or some other item to that lootdrop, then there is a 1% chance of dropping either one based on their pcts.
Ration 50% Defiant Armor Piece 50% Lootdrop at 1% means there is a .05 (half a percent) chance of dropping the defiant piece. Ration 90% Defiant Armor Piece 10% Lootdrop at 1% means there is a .01 (tenth of a percent) chance of dropping the defiant piece. That is how I understand it. I have a solo server so when a defiant drop occurs it usually not usable by my class so it is still rare for me to find one I can actually use. I also did the same with the Melee Augments and Gloomingdeep items since I dont use the tutorial. |
In another post, the same thing was suggested. I think I am going to do that.
|
Would anyone have an update to this code? In the most recent database this code doesn't work anymore. I get an error of:
* SQL Error: Column count doesn't match value count at row 1 */ Thanks! |
Quote:
Code:
#add defiant drops |
Quote:
Thanks! |
I am also getting the same error:
SQL Error: Column count doesn't match value count at row 1 */ |
The recent loot system changed the table structures. I fixed it to match the new table structures but have not posted yet.
|
For anyone still looking for a working Defiant Loottable, try this, it should all be good.
Code:
#add defiant drops |
Quote:
|
For the new loot system:
Code:
insert into lootdrop values (100001, 'Crude Defiant'); |
Has anyone noticed if you add defiant based on these scripts you'll sometimes find mobs that are dropping defiant gear that's out of their range? For example, if i only want Elegant Defiant to drop by using this:
Code:
insert into lootdrop values (300007, 'Elegant Defiant'); |
I noticed that too shiny, I first thought it was a bug. Upon closer inspection it appears that there may be a loottable shared that is getting the same application of the loottable_entry. I havnt found a good fix yet, but i hope this info helps
|
I wonder if there's some sort of exclusion we can apply to the sql that if any mob tied to a table is lower than the the required range of the defiant gear that it doesn't add any defiant to the table. I'd prefer that option rather than having to clean up all the loot tables.
|
you'd have to compare the loottable assigned to the mob to any other mob with the assigned loot table.
Someone who knows more about SQL than I would have to help you out, though. Theorycrafting: Compare loottable assigned to any mob with all other mobs who have the same loottable if any of them are lower than X, don't add it, otherwise, add it. maybe something like this for starters (assuming these are the right table and column names) Code:
select * from lootdrop INNER JOIN npc_types on lootdrop.id = npc_types.lootdrop_id; |
I'm not versed well enough to figure this one out; I'm only slightly dangerous with sql. Perhaps you and werebat can put your heads together and figure this one out. Seems like you're on the right path though.
Quote:
|
For to me any of the scrips posted in this thread works for me at peqdb 2506 , anyone can make defiant works ??
|
I try differents scripts and finally i got one wich work with db rev2506 /Cheers !!!! Then i will share with you all.
insert into lootdrop values (200002, 'Crude Defiant'); insert into lootdrop_entries select 200002, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Crude Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 200002, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 1 and 4; insert into lootdrop values (200003, 'Simple Defiant'); insert into lootdrop_entries select 200003, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Simple Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 200003, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 5 and 14; insert into lootdrop values (200004, 'Rough Defiant'); insert into lootdrop_entries select 200004, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Rough Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 200004, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 15 and 25; insert into lootdrop values (200005, 'Ornate Defiant'); insert into lootdrop_entries select 200005, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Ornate Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 200005, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 26 and 36; insert into lootdrop values (200006, 'Flawed Defiant'); insert into lootdrop_entries select 200006, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Flawed Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 200006, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 37 and 47; insert into lootdrop values (200007, 'Intrincate Defiant'); insert into lootdrop_entries select 200007, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Intrincate Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 200007, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 48 and 58; insert into lootdrop values (200008, 'Elaborate Defiant'); insert into lootdrop_entries select 200008, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Elaborate Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 200008, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 59 and 69; insert into lootdrop values (200009, 'Elegant Defiant'); insert into lootdrop_entries select 200009, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Elegant Defiant%' and nodrop = 1; insert into loottable_entries select distinct loottable_id, 200009, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level >= 70; And this is all folks !!! |
what do i edit to increase drop rate? the 10 or something els?
|
I wanted to remove defiant and the googles brought me here.
So here is what i just ran on my db if anyone wants to remove the chance for these to drop Code:
UPDATE peq.loottable_entries |
All times are GMT -4. The time now is 05:54 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.