PDA

View Full Version : Drop rates


provocating
12-18-2011, 08:51 PM
I was adding the defiant drops. I currently have the drop rate of the lootdrop at 1%, with each loot at 1%, bringing the total percentage to around 45%. That is not an issue correct ? If the total percentage is under 100% it will not cause issues or will it ?

cavedude
12-19-2011, 01:06 AM
Long ago I remember we had a similar situation and it certainly caused issues. Unfortunately, I can't for the life of me remember what they were. It was years ago so it's possible things have changed, but I also can't remember a change to loot in some time.

trevius
12-19-2011, 05:15 AM
I think it depends on how you set that up exactly. If all of the defiant gear is in the same loot drop entry, and you have that set to 1%, then the total chance for any defiant piece to drop will be 1%. If you have multiple loot drop ids you are using in the same loot table and each set to 1%, then the total chance for a defiant to drop will be 1 X the number of loot drop ids you have in the loot table.

As far as chance for individual pieces in the same loot drop id goes, the total chance is always 100% no matter how many items there are or what chance you set for them. You could set 3 items all to 100% each and that would give each one a 33.3% chance to drop. You could also set those 3 items to 1% chance each and they would all still have a 33.3% chance to drop. Another example is if you had 3 items and they were set with 10, 15, and 25 chance each. Since the total for them is 50, they would then have 20, 30, and 50 chance to drop respectively.

Basically, it totals up the chances you set it randoms between 0 and the total chance for all items in that loot drop id. If the random is below the chance set for the item being rolled on, then that is added to the loot table and it stops looping to check the other items unless the multiplier is more than 1.

Here is the code from loottables.cpp that deals with adding loot to loot tables:
//non-pool based looting

int32 r;
int32 totalchance = 0;
for (r = 0; r < lds->NumEntries; r++) {
totalchance += lds->Entries[r].chance;
}
uint32 thischance = 0;
unsigned short k;
bool found = false;

k = MakeRandomInt(0, lds->NumEntries-1);

while(!found) {

if (k > (lds->NumEntries - 1)) {
k = 0;
}

thischance = lds->Entries[k].chance;
unsigned int drop_chance = MakeRandomInt(0, totalchance-1);
#if EQDEBUG>=11
LogFile->write(EQEMuLog::Debug, "Drop chance for npc: %s, total chance:%i this chance:%i, drop roll:%i", npc->GetName(), totalchance, thischance, drop_chance);
#endif
if ( totalchance == 0
|| thischance == 100
|| thischance == totalchance // only droppable item in loot table
|| drop_chance < thischance //can never be true if thischance is 0
) {
found = true;
int32 itemid = lds->Entries[k].item_id;

const Item_Struct* dbitem = GetItem(itemid);
npc->AddLootDrop(dbitem, itemlist, lds->Entries[k].item_charges, lds->Entries[k].equip_item, false);

break;
//continue;
} //end if it will drop
k++; //Cycle to the next droppable item in the list
}

provocating
12-19-2011, 09:23 AM
So is there any way to lower the chances below 1% ? I read in another post that 1% is the lowest you can put in. The reason i am asking is 1% of total mobs still seems too high to me. After killing for a week, maybe playing 2 hours a day I already have 3 drops. I guess I could narrow the insert down to maybe just certain 'types' of mobs, or other criteria.

trevius
12-20-2011, 04:40 AM
You can always add another item to the loot drop id and set it to whatever percentage you want so it drops in place of the defiant armor. For example, you could put a cloth cap with 90% chance of dropping in a 1% chance loot drop id, then have 10 defiant items set each to 1%. That would effectively make the cloth cap a 0.9% chance to drop and the defiant gear would be 0.1% chance or 1 in 1000 for any one of the 10 pieces to drop. That would make each defiant piece 0.01% or 1 in 10,000 chance to drop.

jsr
12-21-2011, 09:41 AM
You should be able to further decrease the probability of a loot table dropping by adding a dupliate mob to the spawn group without giving them the 'rare' loot table.

e.g. say you want to add a really rare drop from orcs

Spawngroup 1;
99% chance of orc with 50% chance of normal loot table
1% chance of orc with 50% chance of normal loot table, and a 1% chance of super rare loot table

Keep the mobs identical except for the loot table and it's invisible to the player. They just see an orc.

This would give you a 1/10,000 chance of the super rare loot table dropping. If you really want to go crazy, you could further decrease the probability of a single item dropping by making the super rare loot table virtually the same as the normal loot table, but add your rare as a 1% item. You could add an item with a 1 in a million chance of dropping this way.

Untested :)

provocating
12-21-2011, 09:43 AM
So I could add a "Sword of the Thousand Truths"

jsr
12-21-2011, 09:51 AM
I'd leave it on the flash drive ;-)

provocating
12-26-2011, 07:39 PM
Here we go, spent a minute and redid it today while I was tweaking some things. This adds a cloth cap at 56% and overall I guess the defiant is .01 percent.

#Defiant Drops - .01% Globally

delete from lootdrop where id >= 100001 AND id <= 100008;
delete from lootdrop_entries where lootdrop_id >= 100001 AND lootdrop_id <= 100008;
delete from loottable_entries where lootdrop_id >= 100001 AND lootdrop_id <= 100008;

insert into lootdrop values (100001, 'Crude Defiant');
insert into lootdrop_entries select 100001, id, 1, 1, 1 from items where name like 'Crude Defiant%' and nodrop = 1;
insert into lootdrop_entries select 100001, id, 1 , 1 ,56 from items where id = 1001;
insert into loottable_entries select distinct loottable_id, 100001, 1, 1 from npc_types where loottable_id > 0 and level between 0 and 4;

insert into lootdrop values (100002, 'Simple Defiant');
insert into lootdrop_entries select 100002, id, 1, 1, 1 from items where name like 'Simple Defiant%' and nodrop = 1;
insert into lootdrop_entries select 100002, id, 1 , 1, 56 from items where id = 1001;
insert into loottable_entries select distinct loottable_id, 100002, 1, 1 from npc_types where loottable_id > 0 and level between 5 and 14;

insert into lootdrop values (100003, 'Rough Defiant');
insert into lootdrop_entries select 100003, id, 1, 1, 1 from items where name like 'Rough Defiant%' and nodrop = 1;
insert into lootdrop_entries select 100003, id, 1 , 1 ,56 from items where id = 1001;
insert into loottable_entries select distinct loottable_id, 100003, 1, 1 from npc_types where loottable_id > 0 and level between 15 and 25;

insert into lootdrop values (100004, 'Ornate Defiant');
insert into lootdrop_entries select 100004, id, 1, 1, 1 from items where name like 'Ornate Defiant%' and nodrop = 1;
insert into lootdrop_entries select 100004, id, 1 , 1 ,56 from items where id = 1001;
insert into loottable_entries select distinct loottable_id, 100004, 1, 1 from npc_types where loottable_id > 0 and level between 26 and 36;

insert into lootdrop values (100005, 'Flawed Defiant');
insert into lootdrop_entries select 100005, id, 1, 1, 1 from items where name like 'Flawed Defiant%' and nodrop = 1;
insert into lootdrop_entries select 100005, id, 1 , 1 ,56 from items where id = 1001;
insert into loottable_entries select distinct loottable_id, 100005, 1, 1 from npc_types where loottable_id > 0 and level between 37 and 47;

insert into lootdrop values (100006, 'Intricate Defiant');
insert into lootdrop_entries select 100006, id, 1, 1, 1 from items where name like 'Intricate Defiant%' and nodrop = 1;
insert into lootdrop_entries select 100006, id, 1 , 1 ,56 from items where id = 1001;
insert into loottable_entries select distinct loottable_id, 100006, 1, 1 from npc_types where loottable_id > 0 and level between 48 and 58;

insert into lootdrop values (100007, 'Elaborate Defiant');
insert into lootdrop_entries select 100007, id, 1, 1, 1 from items where name like 'Elaborate Defiant%' and nodrop = 1;
insert into lootdrop_entries select 100007, id, 1 , 1 ,56 from items where id = 1001;
insert into loottable_entries select distinct loottable_id, 100007, 1, 1 from npc_types where loottable_id > 0 and level between 59 and 69;

insert into lootdrop values (100008, 'Elegant Defiant');
insert into lootdrop_entries select 100008, id, 1, 1, 1 from items where name like 'Elegant Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100008, 1, 1 from npc_types where loottable_id > 0 and level >= 70;

provocating
01-08-2012, 06:23 PM
I am still not happy with the drops at .01% which is roughly where they are at now. I think I am going to somehow only apply them to a specific type of mob, suggestions on narrowing that down ?

rullare
01-10-2012, 04:45 PM
hehe how epic is the item? just ask for 0.01% is to match.^^

provocating
01-10-2012, 06:04 PM
Well even though the item shows as around .01 percent globally, when applied to all mobs the drop was very consistent, about 2 per 4 hours of play is what I was seeing. I ended up just assigning them to certain types of mobs.