Testing Version 4.0

If anyone is interested in testing the latest version, or just preparing for change from complex datafile to simple config you can download the plugin with the latest changes directly at https://raw.githubusercontent.com/AnExiledDev/StackSizeController/dev/StackSizeController.cs
You can see some of the changes here.

  • Ignore data files, they are no longer used, just stored. Stacksizes are defined in the configuration in the value "IndividualItemStackSize". Replaces IndividualItemStackHardLimits in the configuration.
  • IndividualItemStackSize is last in priority, every other configuration setting takes priority (ex: multipliers, category hard limits, etc), multipliers multiply the vanilla stack size (reference [github]) not the defined stacksize in IndividualItemStackSize. 
  • Removed PreventStackingDifferentSkins as it's reliant functionality has been removed. 
  • IndividualItemStackSize is populated when the plugin is initially loaded, you can not edit them until the plugin has been run once.
There is one more feature I'm going to add which adds the ignore list to the configuration, I'll probably do this tomorrow.

Please give it a try and let me know if you run into any issues with exceptions or logs and hopefully I can resolve any issues before release. There are no more plugin conflicts (none known anyway), and any duping features have been removed, they're not really needed and cause too many issues.

I will give it a try and see how it goes even though i had no problem with current version.

Merged post

There doesnt seem to any problem so far , I noticed that Chocolate was still  "Chocholate" (?)  and Tech Trash is "Techparts"  but loaded up ok , seems more like the original plugin i remember  :)

Merged post

(seems i cant edit posts anymore ?)
an annoying thing i just found was if you set the "CategoryStackHardLimits for a group "ammo"
it will override an individual setting you set ? ,
I have rockets individually set at 50 but ammo at 1000 and can stack the rockets to 1000 ?

Any misspelling is compliments of the high level education of those lovely Rust devs that need a vocab expansion. Like their "BuildingPrivlidge" class.

Yeah you can only edit posts for a few minutes after posting them, which I absolutely hate. I'd love to have a forum topic that I can update repeatedly with changes, but noooope. 

IndividualItemStackSize is last in priority, yes. That is functioning how it should, do you think IndividualItemStackSize should take priority over CategoryStackHardLimits? I can see that being a bit confusing.

The plugin is basically what I envisioned for 3.0 but without all the volatile crap that's more a headache than worth, then again people couldn't understand data files so not sure I can win either way but this is the best implementation I can think of for now.

mxDeqx85hSQh9gd.jpg AnExiledDev

IndividualItemStackSize is last in priority, yes. That is functioning how it should, do you think IndividualItemStackSize should take priority over CategoryStackHardLimits? I can see that being a bit confusing.

My impression is that people would use categories as an optional starting place, then override individual items as needed. Considering that individual item stack sizes are the most grandular, I would expect them to take highest priority.

NKXTQs24ExGTuL8.jpg WhiteThunder

My impression is that people would use categories as an optional starting place, then override individual items as needed. Considering that individual item stack sizes are the most grandular, I would expect them to take highest priority.

What about multipliers, should they multiply the individual definition? I guess if they decide to use pure multipliers and want to go back to vanilla, they can just copy the values from vanilla-defaults.



Merged post

What I have changed now is IndividualItemStackMultipliers, CategoryStackMultipliers both multiply the IndividualItemStackSize instead of vanilla stack size and those values are given priority in their respective order, then IndividualItemStackSize value.

So everything returns a multiplied defined override otherwise return IndividualItemStackSize value without multipliers.

I'm removing CategoryStackHardLimits as I don't think this fits anymore.
mxDeqx85hSQh9gd.jpg AnExiledDev

Any misspelling is compliments of the high level education of those lovely Rust devs that need a vocab expansion. Like their "BuildingPrivlidge" class.

Yeah you can only edit posts for a few minutes after posting them, which I absolutely hate. I'd love to have a forum topic that I can update repeatedly with changes, but noooope. 

IndividualItemStackSize is last in priority, yes. That is functioning how it should, do you think IndividualItemStackSize should take priority over CategoryStackHardLimits? I can see that being a bit confusing.

The plugin is basically what I envisioned for 3.0 but without all the volatile crap that's more a headache than worth, then again people couldn't understand data files so not sure I can win either way but this is the best implementation I can think of for now.

AnExiledDev

IndividualItemStackSize is last in priority, yes. That is functioning how it should, do you think IndividualItemStackSize should take priority over CategoryStackHardLimits? I can see that being a bit confusing.

I disagree. The CategoryStackHardLimits is more of a GENERAL setting for that group and IndividualItemsStackSize should allow you to define what items in that list should override that, for instance i want rifle ammo to stack to 1000 so that it is easier to load turrets , but i dont want every ammo to stack that high , who would want arrows to stack to 1000, I want ak47's to stack to 400 because its the most used weapon for turrets but i dont want M249's, L96 or M39's should stack that high,

*for interest sake i went through all the old oxide logs from when you first submitted this plugin and saw some of the ridiculous amounts that people would fail to load in the plugin , some with everyitem at 65000000 and  one even larger in the hundreds of millions ? .
There will always be confusion as some people will confuse themselves overthinking what they have to do , I have always been confused by the "search" category ?  wtf is that for ?
I have never understood the use of global multipliers , i set the amount for that item and thats the amount i want it to stack without
having to worry about "should" resources be set at x1,2,3,4 etc , t
*but thats me , others will (for sure) have different opionions

**EDIT
for some reason the above text was regarded as too short !!  or empty for a quick reply, and the inability to edit is very annoying when you make an error in typing and want to correct it . an additional box showing reason for editing would be more logical

1:38:10) | [Stack Size Controller] Acquiring vanilla defaults file from official GitHub repo and overwriting; https://raw.githubusercontent.com/AnExiledDev/StackSizeController/master/vanilla-defaults.json

(21:38:10) | Loaded plugin Stack Size Controller v4.0.0 by AnExiledDev

(21:38:10) | [Stack Size Controller] Populating Individual Item Stack Sizes in configuration.

(21:38:10) | [Stack Size Controller] Exception encountered during GetStackSize. Item: firework.boomer.pattern Ex:System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

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

at Oxide.Plugins.StackSizeController.GetStackSize (ItemDefinition itemDefinition) [0x00023] in <5784022fa4d24227bf65b64fe6c16852>:0

(21:38:10) | [Stack Size Controller] Exception encountered during GetStackSize. Item: xmas.advent Ex:System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

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

at Oxide.Plugins.StackSizeController.GetStackSize (ItemDefinition itemDefinition) [0x00023] in <5784022fa4d24227bf65b64fe6c16852>:0

(21:38:10) | [Stack Size Controller] Exception encountered during GetStackSize. Item: xmas.double.door.garland Ex:System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

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

at Oxide.Plugins.StackSizeController.GetStackSize (ItemDefinition itemDefinition) [0x00023] in <5784022fa4d24227bf65b64fe6c16852>:0

(21:38:10) | [Stack Size Controller] Exception encountered during GetStackSize. Item: attire.snowman.helmet Ex:System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

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

at Oxide.Plugins.StackSizeController.GetStackSize (ItemDefinition itemDefinition) [0x00023] in <5784022fa4d24227bf65b64fe6c16852>:0

Error doesn't cause any issues and should be resolved with a plugin reload. I'll look into handling it better.

The error resolved, yes.   However, this update reset ALL my stack sizes back to vanilla!!!!!

Yeah that happens whenever there is a major version change. It means there are incompatibilities between v3 and v4.

mxDeqx85hSQh9gd.jpg AnExiledDev

Yeah that happens whenever there is a major version change. It means there are incompatibilities between v3 and v4.


 set explosives to my normal 600000 and the same with coal, but they wont stack higher than 1000 even though set to my amount in config ? tried adding them to IndividualItemStackSize and got confirmation when reloading plugin , but although explosives now stack coal does not

mxDeqx85hSQh9gd.jpg AnExiledDev

Coal is one of the Christmas items still right? Those have always been wonky. I'd say it suffers from a similar issue to https://umod.org/community/stack-size-controller/39499-not-working-for-some-items

Just loaded latest version and got this error

(15:02:44) | Loaded plugin Stack Size Controller v4.1.0 by AnExiledDev

(15:02:44) | [Stack Size Controller] Exception encountered during GetStackSize. Item: blueprintbase Ex:System.NullReferenceException: Object reference not set to an instance of an object

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

at Oxide.Plugins.StackSizeController.GetStackSize (ItemDefinition itemDefinition) [0x00023] in <2f58e0b99dff41018abfed0c5ac3f597>:0

(15:02:44) | Failed to call hook 'OnMaxStackable' on plugin 'StackSizeController v4.1.0' (NullReferenceException: Object reference not set to an instance of an object)

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

at Oxide.Plugins.StackSizeController.GetStackSize (ItemDefinition itemDefinition) [0x001e9] in <2f58e0b99dff41018abfed0c5ac3f597>:0

at Oxide.Plugins.StackSizeController.OnMaxStackable (Item item) [0x00000] in <2f58e0b99dff41018abfed0c5ac3f597>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00efc] in <2f58e0b99dff41018abfed0c5ac3f597>:0

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

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

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

I don't get why this isn't happening for me under the same conditions.