Jump to content

Causing stacking issues

Closed 2.3.8

Some of my players recently alerted me to an issue that I've traced to stack modifier.

If a player has items in their inventory, and they buy something from the in-server store (David's Shop UI plugin), the items they purchased will not stack with the items in their inventory. These inventory items came from BotReSpawn NPC's, vanilla NPC's (ie: Oil scientists) and from loot crates. If I place the non-stackable items in a container such as a backpack (from the Backpacks plugin by WhiteThunder), a TC or a crafted crate, and I try stacking them, it works. I can then move them to my main inventory and they stack just fine. It's just the stacking in the player inventory that is having this issue.

If I unload Stack Modifier, this does not happen. I can loot items and buy items and they stack just fine. This never was a problem between Stack Modifier and the Shop UI. This is 100% reproduceable on my test server.

Link to comment
Khan

Posted (edited)

Can you pls try this update and let me know if that issue goes away?

 

Edited by Khan
Link to comment

I'm being told it didn't fix the issues. Items purchased from the shop still aren't stacking with items in a player's inventory until you drop them into a container.

Link to comment

Failed to call hook 'CanStackItem' on plugin 'StackModifier v2.3.8' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.StackModifier.CanStackItem (Item item, Item targetItem) [0x00238] in <2d5ff1fa54444d288a262832bf4bb122>:0
at Oxide.Plugins.StackModifier.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00138] in <2d5ff1fa54444d288a262832bf4bb122>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <87ce9ac9776a48658bc55eae6debe38b>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cd7231f30b444d86bc6cca8a53cdd2ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cd7231f30b444d86bc6cca8a53cdd2ea>:0

Same problem with stacking on my server and above in my log file
The loot from the Jet event doesn't stack.

Edited by Watcher
Link to comment

I've tested it and honestly I am not experiencing any stacking issues with GUIShop items or other 3rd party stack items given via commands. Or from killing npcs and looting. Even F1 and crafting items seems fine and to be working accordingly

Link to comment

I'll do more testing in the morning, but before the last 2 fixes, I confirmed it 100% of the time that items bought from David's Shop UI didn't stack with items found in the world. They'd only stack once placed in another container and then moved into the player's inventory.

Link to comment
Khan

Posted (edited)

version 2.3.7 has other issues such as F1 spawns & crafting bugs. ( Example crafting multiple lanterns results in loss of fuel inside them when they go to auto stack )

Edited by Khan
Link to comment

We'll revert to the latest version. Starting from version 2.3.8, it's no longer possible to stack purchased, looted, or spawned items correctly, even if the Skin ID, item name, and class name match.

Link to comment

Here's a video. I unloaded all plugins except Shop UI, Economics and Stack Modifier. With Stack Modifier loaded, ammo bought from the shop didn't stack. With Stack Modifier unloaded, ammo from the shop stacked.

 

Link to comment

Another bug that I was just told about is this: If a stack of an item is greater than that allowed by this plugin, say for example 500 of an item in a crate in a raidable base, and the stack limit is 100 with this plugin, a player could transfer that whole stack over to their inventory when he really should have made 5 piles of 100.

Link to comment

Using similar plugins and have the same issue randomly. Shop UI by David, BotReSpawn and StackModifier

04/23 17:28:26 | Failed to call hook 'CanStackItem' on plugin 'StackModifier v2.3.9' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.StackModifier.CanStackItem (Item item, Item targetItem) [0x0023e] in <9e53942b50974a0a8fe7ec87c5727230>:0
at Oxide.Plugins.StackModifier.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00138] in <9e53942b50974a0a8fe7ec87c5727230>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <87ce9ac9776a48658bc55eae6debe38b>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cd7231f30b444d86bc6cca8a53cdd2ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cd7231f30b444d86bc6cca8a53cdd2ea>:0

Using latest version 2.3.9

Link to comment

Report:

Another bug that I was just told about is this: If a stack of an item is greater than that allowed by this plugin, say for example 500 of an item in a crate in a raidable base, and the stack limit is 100 with this plugin, a player could transfer that whole stack over to their inventory when he really should have made 5 piles of 100.


@BetterDeadThanZed Their is an ignore admin check so that would only be a thing for admins ( anyone auth level 2 ) ( this is done due to F1 spawns to prevent issues )

image.png.e373a64d556b2897d2c779a89711d01b.png

Link to comment

Using GUIShop & F1 spawning NPCs to pickup their loot and buying items from GUIShop results in stacks working just fine.

So i have no problems with stacking.

Here is my video, for the record i do not own a copy of Davids shop plugin or BotRespawn so i cannot recreate the error your showing me.

 


Also, here.

Plugins that give anything to players should be respecting the stack sizes set on the server so that would be a 3rd party plugin bug.

I ran and maintained GUIShop on umod for about 5 years roughly and I had implemented special code that respects server stack sizes whenever any items where given to the player. 

As seen in the above video i made ^^.

So that would be something to ask david for to add support that respects server set stack sizes when giving the players items. 

I took screen shots of the code I made in guishop I made that handles stack size checks accordingly and gives the player the items in stack sizes that respect the server set amounts. 


image.png.d9978a08ecaca0c7992aee2f51c32294.png

image.png.dd7a2503bb046638bf94e50113570f2c.png

Link to comment
Khan

Posted (edited)

If you are using Davids Shop UI 

and you use an old data file it creates the item.name field with the display name when it shouldn't be for vanilla items thus causing the stack bugs.
 

The only fix for this is to either regenerate a new items.json data file and re-do your custom items / prices 

Or you can manually go in and edit all vanilla item DisplayName: fields to be "default" > DisplayName: "default",

David changed how the data file is created from this
( Old Way )

image.png.6eccc707e7c9a23417c5b1b481ed2629.png

To this 
( New data files )

image.png.0a1507b74945daac2ee733cbcd3ad1c2.png

Edited by Khan
Link to comment
1.4m

Downloads

Total number of downloads.

6.8k

Customers

Total customers served.

101.3k

Files Sold

Total number of files sold.

2m

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.