If anyone wants to test the next release

You can grab the cs file here: https://raw.githubusercontent.com/MarcusHKrueger/StackSizeController/dev/StackSizeController.cs

Reply here with any issues you run into with this version. It's slated for full release tomorrow.
Here's an unsorted list of fixes and features.

- Fixed vanilla stack size multiplication in main data file. (Harmless but confusing)
- Config and Data file are no longer saved on unload. Should aid in eliminating overwrites to customizations. (Still saves when it's important)
- Added CategoryStackHardLimits to configuration.
- Multipliers in configuration now allow floats (ex: 2.3, 5.5)
- Configuration integrity checker fixes that likely never affected anyone
- Datafile VanillaStackSize and version number now populate correctly when generating data file (Thanks to RhialtoTheMarvelous for the report)
- Fixed setting stack sizes by command not updating stack sizes unless plugin is reloaded. (Thanks to RhialtoTheMarvelous for the report)
- Configuration settings IndividualItemStackMultipliers and IndividualItemStackHardLimits now accept shortnames as well as item id's.
- Adding stacks through commands now adds shortname instead of item id to the config entry to improve readability.
- Added multiplier to listcategoryitems command.
- Potential fix for water stack sizes being messed up (and associated exception when using ChestStacks and similar plugins - probably)
- CustomStackSize in searchs all display correctly now, as the in-game value is set.
- Fix for genetics loss on splitting or stacking plants.
- Added config option DisableDupeFixAndLeaveWeaponMagsAlone (default false) which disables the weapon ammo unloading, which enables the ammo duplication glitch.

Thank you man, going to test it!

Merged post

Hello.

So, I am not sure if its me (probably yeah, haha), but the CategoryStackHardlimits in config file doesnt seems to be working. The CategoryStackMultiplier is okay.

Am I missing something I should/shouldnt do to make the CategoryStackHardlimits work? If I set any category to 50, the max stackable limit should be set to 50?

Thank you! :)

Ahem, I appear to have forgotten to implement that last bit. Just committed a fix, if you go to the download link again it'll have it.

Okay, checkin it now, thanks man.

Merged post

CategoryStackHardlimits is seems to be working spotlessly from the config file, real good job!
The issue with stacking more than 1 item with durability is still on. (miners hat, lantern, tuna can lamp,...) Interestingly its not throwing warning messages when spawning more than 1 from torch? It might be Low Grade Fuel related? Not sure.

This is the warning I am getting when spawning these (miners hat, lantern, tuna can lamp,...) one by one as admin:

Failed to call hook 'CanStackItem' on plugin 'StackSizeController v3.2.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackSizeController.CanStackItem (Item item, Item targetItem) [0x002cb] in <b159a4f5b0704669a7729b2f4597d283>:0 ts, 1 slprs                                                                             2kb/s in, 15kb/s out
  at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7b] in <b159a4f5b0704669a7729b2f4597d283>: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 <c2afd8354b8b4f3ca451cf5​
xTheLastPhoenix

Okay, checkin it now, thanks man.

Merged post

CategoryStackHardlimits is seems to be working spotlessly from the config file, real good job!
The issue with stacking more than 1 item with durability is still on. (miners hat, lantern, tuna can lamp,...) Interestingly its not throwing warning messages when spawning more than 1 from torch? It might be Low Grade Fuel related? Not sure.

This is the warning I am getting when spawning these (miners hat, lantern, tuna can lamp,...) one by one as admin:

Failed to call hook 'CanStackItem' on plugin 'StackSizeController v3.2.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackSizeController.CanStackItem (Item item, Item targetItem) [0x002cb] in <b159a4f5b0704669a7729b2f4597d283>:0 ts, 1 slprs                                                                             2kb/s in, 15kb/s out
  at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7b] in <b159a4f5b0704669a7729b2f4597d283>: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 <c2afd8354b8b4f3ca451cf5​

I can stack miners hats. tuna can lamps without any problems at all. I will try this update when it is fully released and give any feedback as to problems.

Yah, you can stack them, it all works, but it will throw those warnings in the server command prompt, isnt it? You spawn one hat, after the second one I have the error message in server window, but all works in-game. 

xTheLastPhoenix

Yah, you can stack them, it all works, but it will throw those warnings in the server command prompt, isnt it? You spawn one hat, after the second one I have the error message in server window, but all works in-game. 

I will be testing this update tomorrow anyway as i find that L96's and M249's are not stacking as they were before,

I'll check and fix those issues when I can. I don't think I changed logic for the hats and shit and they were working before without an error. Ill check it out thanks

Does the old version still work? Hate the multiply. To us, it was way better when we just set the stack size.

You're replying to a topic, referencing the next release with a changelog that includes a hard stack limit instead of multiplier. Perhaps read the topic your randomly replying to. That update will be out shortly.

Locked