Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2011, 01:06 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

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.
Reply With Quote
  #2  
Old 12-19-2011, 05:15 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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:
Code:
        //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
        }
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 12-19-2011, 09:23 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

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.
Reply With Quote
  #4  
Old 12-20-2011, 04:40 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 12-21-2011, 09:41 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 187
Default

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

Last edited by jsr; 12-21-2011 at 09:44 AM.. Reason: clarity
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:28 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3