Unable to edit stack sizes with new update?Solved

I used the older version to set stack sizes on all of my items in game. I upgraded to the latest version this evening. 

I am unable to change any stack sizes using the console commands provided. I have deleted and reinstalled the plugin with no change.  Any ideas?

Also when i edit an items stack size and then look up the item after reloading, there is no change. 

I would post a pic, but it doesnt seem to work when i do. 

If you're running them from console they should work fine. If you're running them from in-game, you'll need to give yourself, or the admin group the permission stacksizecontroller.*Sorry I don't think I documented the permissions, my bad.

Merged post

Sorry there's a bug where when setting via config or command (which just updates the config) it doesn't show the custom stack size. But I assure you it's being set correctly. Sorry again

I use PermissionsManager. I did grant myself all perms in the GUI; Regendatafile, Setstack, setstackcat, setallstack, itemsearch, listcategories, listcategoryitems are all granted for myself

Merged post

Can I add you on discord and show you what my issue is? It would help clarify if its a user issue.

That's odd, that's all handled by Oxide so it should work unless I'm somehow registering them wrong. You're on version 3.1.3 or 3.1.4 right? I'll try to replicate tomorrow.

3.1.3 is the one I upgraded too.

Merged post

Lets say I want to increase the stack of Flares, which is actually what I wanted to do. 

I type in "stacksizecontroller.setstack flare 50", then reload.

when I give myself flares, it stacks at 100. when i move the stack it automatically breaks it down into the set stack amount. But it still only breaks down into a stack of 5 instead of 50. 

When I reload or restarting my server the stack size do not save in my data folder its always coming back to default any idea? I do oxide.unload StackSizeController / edit data folder / save / oxide.reload StackSizeController.

Is it throwing the exception whenever you reload the plugin? If so use v3.1.4 and the exception might be the issue. Sorry it's getting late and I've been in full dev mode for 4 hours.

Merged post

If changes to the data file are being wiped on reload, unload the plugin, make your modifications and save, then load the plugin.

It does give an error. 

"

| Failed to call hook 'OnServerInitialized' on plugin 'StackSizeController v3.1.3' (KeyNotFoundException: The given key was not present in the dictionary.)

at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <fb001e01371b4adca20013e0ac763896>:0

at Oxide.Plugins.StackSizeController.GetVanillaStackSize (ItemDefinition itemDefinition) [0x00000] in <5beef6003c6548dbb373030fd0a772e8>:0

at Oxide.Plugins.StackSizeController.MaintainVanillaStackSizes (System.Boolean refreshDataFileOnly) [0x00061] in <5beef6003c6548dbb373030fd0a772e8>:0

at Oxide.Plugins.StackSizeController.OnServerInitialized () [0x0001a] in <5beef6003c6548dbb373030fd0a772e8>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00177] in <5beef6003c6548dbb373030fd0a772e8>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0

(00:56:32) | Loaded plugin Stack Size Controller v3.1.3 by AnExiledGod"

 

I will download the v3.1.4 and see if it fixes the issue.

Thank for the quick reply I will try it tommorow

@FullMetalMedic the latest version is a hotfix for that, it fixes it without requiring a server restart.

Downloading v3.1.4 seems to have fixed the issue. It worked like a charm. Thanks for the help
Locked automatically