Jump to content
  • 0

Loot Table & Stack size GUI - bug with item stacks


Question

Posted

Hello Support Team,

We have encountered an issue with the Loottable plugin. When changing the stack size in the stackSizeController section, the automatic stacking of items upon pickup stops working.

Issue Description:

Expected Behavior: Under default settings, items automatically stack when picked up, as managed by the hooks (CanStackItem, OnItemStacked, OnItemSplit) within the plugin.

Actual Behavior: After modifying the stack size settings in stackSizeController, the auto-stacking functionality is disabled, resulting in an excessive number of individual items in the inventory instead of being combined into stacks.

Context:

The stacking mechanism is activated through the UpdateStackingSubscriptions method, which subscribes to the necessary hooks if stackSizeController is enabled.

It appears that altering the stack size in the configuration affects the controller’s logic, preventing the required hooks from being registered, and consequently, the automatic merging of items does not occur.

Steps to Reproduce:

Open the plugin configuration and navigate to the stackSizeController section.

Modify the stack size value (for example, set it to a value different from the default).

Save the settings and reload the plugin.

Pick up items that should automatically stack.

Notice that the items remain separate despite having identical properties (ID, skin, name, condition, etc.).

Proposed Solution: Please review the logic in the UpdateStackingSubscriptions method, which handles the subscription of stacking-related hooks. It seems that changing the stack size in stackSizeController may cause the condition (stackSizeController.Enabled && !unsubscribe) to fail, preventing the hooks from being registered correctly.We appreciate your prompt attention to this matter.

 

 

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

I've just tested this on my server but unfortunately I am unable to reproduce your problem. It is very likely that another plugin is modifying the properties of your loot items and therefore prevents stacking of these items.

To test this, you can temporarily modify the plugin in line 647 and 648 like this:

grafik.png.1a9ad36cc58d883795c4fc51988b2307.png

 

If this fixes your problem with stacking then there is another plugin modifying the properties of your loot.

 

The UpdateStackingSubscriptions method has nothing to do with this problem.

Edited by The_Kiiiing
  • 0
Posted (edited)

 

On 3/28/2025 at 6:17 PM, The_Kiiiing said:

I've just tested this on my server but unfortunately I am unable to reproduce your problem. It is very likely that another plugin is modifying the properties of your loot items and therefore prevents stacking of these items.

To test this, you can temporarily modify the plugin in line 647 and 648 like this:

grafik.png.1a9ad36cc58d883795c4fc51988b2307.png

 

If this fixes your problem with stacking then there is another plugin modifying the properties of your loot.

 

The UpdateStackingSubscriptions method has nothing to do with this problem.

I tried and it worked, but these lines are not on 647 and 648, but on 746 and 747.

image.png

Edited by Kom4nder
  • 0
Posted
On 3/30/2025 at 7:03 AM, Kom4nder said:

 

I tried and it worked, but these lines are not on 647 and 648, but on 746 and 747.

image.png

There is probably another plugin that modifies the item text or name of your loot.

If you leave it like this, just keep in mind that there might be some problems with the stacking of custom items that wouldn't normally stack.

 

Sorry for the wrong line numbers, I was looking at an older version of the plugin.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1.7m

Downloads

Total number of downloads.

7.8k

Customers

Total customers served.

117.6k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • 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.