Stack Size Changer
Here you will find the documentation on the features in the Stack Size Changer part of the framework.
Documentation may be incomplete and might need additions, we will update this when we can.
The Stack Size Changer has been given its own dedicated section because this is a very useful tool and we wanted to keep everything clear to read.
This part of EM Framework will allow you to set it so server owners will be able to adjust the stack sizes of your items.
There is a few pre-requisites you will need in order to use this properly:
- You need to make sure all your items have the [MaxStackSize(int)] Attribute otherwise it won't work.
- Even if you want to use the default max stack size of 100 you still will need to specify it like so: [MaxStackSize(100)]
- You will need to setup a Config For your mod, this does not require the File Manager, this can be done with the Vanilla Config Generator - I will supply a default config below to use it.
To get Started we will first specify our config:
This a basic file setup for you:
We have now implemented our basic config for the stack sizes, now to implement it so it works in the server.
As an additional note this part:
[LocDescription("Stack Sizes: Editing stacksizes here requires a server restart. Changing the stack size of some items may have no ingame effect due to item data.")]
You should use that as the description for it because changing the stack sizes will require a server reboot regardless
This is the completed file for implementing the stack size changer for your mod, You can also make these additions to your config file if it already exists, you just need to update your config class and add the stack size changer.
This stack size changer will then output a file to the Configs folder with the name you chose here: this.config = new PluginConfig<MyModBaseConfig>("MyConfig");
All your items will appear in a List so you can find the item by its name and change its max stack size.