Jump to content

[patch][7344] Ignore Rate.Drop.Item values in grouped loot

Guest Velorien

Recommended Posts

What bug does the patch fix? What features does the patch add?

Ignore drop rate multipliers in loot groups.

For which repository revision was the patch created?


Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

No thread.

Who has been writing this patch? Please include either forum user names or email addresses.

Forum user brats from the 'rival' project forums.

Short explanation: there was some debate over this quite some time ago, and Vladimir decided then that the drop rate multipliers should not apply to grouped loots because it destroys the group, making some items from the group drop all the time, while others never. It looks like when the separate drop rate multipliers for different item types were implemented, the change from Vladimir was lost, and now the drop rate multipliers do apply to grouped loots again, destroying them. This patch, developed by brats for another project, removes the piece of code which made those multipliers apply to grouped loots, so groups will work correctly even with multipliers bigger than 1. I tested this on 7262, it works properly.

diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp
index 6743ffe..baaaaa4 100644
--- a/src/game/LootMgr.cpp
+++ b/src/game/LootMgr.cpp
@@ -777,8 +777,7 @@ LootStoreItem const * LootTemplate::LootGroup::Roll(bool rate) const
                return &ExplicitlyChanced[i];

            ItemPrototype const *pProto = objmgr.GetItemPrototype(ExplicitlyChanced[i].itemid);
-            float qualityMultiplier = pProto && rate ? sWorld.getRate(qualityToRate[pProto->Quality]) : 1.0f;
-            Roll -= ExplicitlyChanced[i].chance * qualityMultiplier;
+            Roll -= ExplicitlyChanced[i].chance;
            if (Roll < 0)
                return &ExplicitlyChanced[i];

Filebeam link:


Link to comment
Share on other sites

Main problem in original broken idea with rates in general.

Client support limited items in loot result. With rates you make some itemsin end of list always lost (not have place in looted items list). So bets recomendation if you want normal loot system work (including quest loot possibility in all cases):


1) not touch rates

2) make chnages in loot data explcitly with carefull check loot possibility specific items

Instead attempt hack loot data in "easy" way.

I will think about suggested patch apply...

Link to comment
Share on other sites

Well, if I remember correctly, the limit used to be 16 items/loot (I don't know if it's still the same), which only causes problems when high drop rates are set. With rates of up to 4x or 5x there probably won't be such problems. (I know there aren't with 3x) But with groups, from which only 1 item is supposed to drop (groups with explicit chances, not equally chanced groups), even a multiplier of 2x could mean that some items will never drop. Of course, this patch doesn't make the whole droprate multiplier system a lot better, but at least it allows lower multipliers (like up to 4x or 5x) to be used without causing malfunction in basic functionality.

Link to comment
Share on other sites

This sounds great!

If I may please ask an obvious and noob question for clarification.

So this means you will be able to set the drop rate multipliers to something like x3 (max of x5), and it will not negatively influence the loot groups (loot groups still function as they should), but in the same sense will only give higher drop rates for items which are not included in the loot groups?

Link to comment
Share on other sites

  • 1 month later...
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use