|
1 | 1 | ## Feature Highlights |
2 | 2 | * Allows setting stack sizes for nearly every item in Rust. |
3 | | -* Items are catagorized and automatically populated in the data file. |
4 | | -* Stacks can easily be modified globally, by category or individually in the configuration file. If you want complete control over every item you can modify each item individually in the data file. |
| 3 | +* Items are automatically populated in the configuration file. |
| 4 | +* Stacks can easily be modified globally, by category or individually in the configuration file. |
5 | 5 | * Several quality of life commands allowing you to **search all items** and list categories. |
6 | 6 | * Item search displays vanilla stack rate as well as custom stack rate after multipliers. |
7 | 7 |
|
8 | 8 |
|
9 | 9 | ## Quick Important Notes |
10 | | -* If stack sizes are modified in the data file (at /oxide/data/StackSizeController.json) defined hard limits will override them, whereas defined multipliers will multiply that base value. |
11 | | -* Stacking an item over 2,147,483,647 will cause an error when loaded and will not stack the item at that number. 2,147,483,647 is the max for stack sizes for all stack size plugins. |
| 10 | +* Running the plugin once generates items in configuration for IndividualItemStackSize from vanilla defaults. This list is automatically updated when new items are detected, and a notification is put in the console. |
| 11 | +* Multipliers multiply IndividualItemStackSize definitions not vanilla stack size. Individual multipliers take priority over category stack multipliers. |
| 12 | +* Datafiles are no longer used. Editing vanilla-defaults does nothing but screw up stack sizes when unloading the plugin. |
| 13 | +* Stacking an item over 2,147,483,647 will cause an error when loaded and will not stack the item at that number. 2,147,483,647 is the max for stack sizes for all stack size plugins as it is a hardcoded limitation of Rust. |
| 14 | + |
| 15 | + |
| 16 | +## Installation Instructions |
| 17 | +* Put plugin in oxide/plugins. |
| 18 | +* Start server and wait for StackSizeController to be loaded. |
| 19 | +* Open the configuration and modify settings as needed. Setting individual stack sizes is done in the configuration NOT datafile in value IndividualItemStackSize which is generated on plugin load. |
| 20 | +* Run o.reload StackSizeController in console to set configured stack sizes. |
12 | 21 |
|
13 | 22 |
|
14 | 23 | ## Console Commands |
|
74 | 83 |
|
75 | 84 | ##### Updates configuration file, changing every category to the defined multiplier. |
76 | 85 |
|
77 | | ----- |
78 | | - |
79 | | -### **stacksizecontroller.regendatafile** |
80 | | -##### **Permission:** `stacksizecontroller.regendatafile` (Only needed if used in-game) |
81 | | -##### **Usage:** `stacksizecontroller.regendatafile` |
82 | | -##### **Parameters:** `No Parameters` |
83 | | -##### **Usage Example:** `stacksizecontroller.regendatafile` |
84 | | - |
85 | | -##### Wipes the data file and regenerates the item cache. (Note: Item cache is automatically maintained on plugin initialization.) |
86 | | - |
87 | 86 |
|
88 | 87 | ## Configuration |
89 | 88 |
|
|
93 | 92 | "RevertStackSizesToVanillaOnUnload": true, |
94 | 93 | "AllowStackingItemsWithDurability": true, |
95 | 94 | "HidePrefixWithPluginNameInMessages": false, |
96 | | - "DisableDupeFixAndLeaveWeaponMagsAlone": false, |
97 | 95 | "GlobalStackMultiplier": 1.0, |
98 | 96 | "CategoryStackMultipliers": { |
99 | 97 | "Weapon": 1.0, |
|
116 | 114 | "Fun": 1.0 |
117 | 115 | }, |
118 | 116 | "IndividualItemStackMultipliers": {}, |
119 | | - "CategoryStackHardLimits": { |
120 | | - "Weapon": 0, |
121 | | - "Construction": 0, |
122 | | - "Items": 0, |
123 | | - "Resources": 0, |
124 | | - "Attire": 0, |
125 | | - "Tool": 0, |
126 | | - "Medical": 0, |
127 | | - "Food": 0, |
128 | | - "Ammunition": 0, |
129 | | - "Traps": 0, |
130 | | - "Misc": 0, |
131 | | - "All": 0, |
132 | | - "Common": 0, |
133 | | - "Component": 0, |
134 | | - "Search": 0, |
135 | | - "Favourite": 0, |
136 | | - "Electrical": 0, |
137 | | - "Fun": 0 |
138 | | - }, |
139 | | - "IndividualItemStackHardLimits": {}, |
| 117 | + "IndividualItemStackSize": {}, |
140 | 118 | "VersionNumber": { |
141 | | - "Major": 3, |
142 | | - "Minor": 2, |
| 119 | + "Major": 4, |
| 120 | + "Minor": 0, |
143 | 121 | "Patch": 0 |
144 | 122 | } |
145 | 123 | } |
|
151 | 129 | "RevertStackSizesToVanillaOnUnload": true, |
152 | 130 | "AllowStackingItemsWithDurability": true, |
153 | 131 | "HidePrefixWithPluginNameInMessages": false, |
154 | | - "DisableDupeFixAndLeaveWeaponMagsAlone": false, |
155 | | - "GlobalStackMultiplier": 1, |
| 132 | + "GlobalStackMultiplier": 1.0, |
156 | 133 | "CategoryStackMultipliers": { |
157 | | - "Weapon": 10.0, |
158 | | - "Construction": 1.0, |
| 134 | + "Weapon": 1.0, |
| 135 | + "Construction": 5.0, |
159 | 136 | "Items": 1.0, |
160 | 137 | "Resources": 1.0, |
161 | 138 | "Attire": 1.0, |
|
173 | 150 | "Electrical": 1.0, |
174 | 151 | "Fun": 1.0 |
175 | 152 | }, |
176 | | - "IndividualItemStackMultipliers": { |
177 | | - "-566907190": 10 |
178 | | - }, |
179 | | - "CategoryStackHardLimits": { |
180 | | - "Weapon": 1, |
181 | | - "Construction": 0, |
182 | | - "Items": 0, |
183 | | - "Resources": 50000, |
184 | | - "Attire": 0, |
185 | | - "Tool": 0, |
186 | | - "Medical": 15, |
187 | | - "Food": 0, |
188 | | - "Ammunition": 0, |
189 | | - "Traps": 0, |
190 | | - "Misc": 0, |
191 | | - "All": 0, |
192 | | - "Common": 0, |
193 | | - "Component": 0, |
194 | | - "Search": 0, |
195 | | - "Favourite": 0, |
196 | | - "Electrical": 0, |
197 | | - "Fun": 0 |
| 153 | + "IndividualItemStackMultipliers": |
| 154 | + { |
| 155 | + "-586342290": 10, |
| 156 | + "ammo.pistol": 20 |
198 | 157 | }, |
199 | | - "IndividualItemStackHardLimits": { |
200 | | - "-586342290": 3 |
| 158 | + "IndividualItemStackSize": { |
| 159 | + "abovegroundpool": 1, |
| 160 | + "aiming.module.mlrs": 1, |
| 161 | + "ammo.grenadelauncher.buckshot": 24, |
| 162 | + "ammo.grenadelauncher.he": 12, |
| 163 | + "ammo.grenadelauncher.smoke": 12, |
| 164 | + "ammo.handmade.shell": 64, |
| 165 | + "ammo.nailgun.nails": 64, |
| 166 | + "ammo.pistol": 128, |
| 167 | + "ammo.pistol.fire": 128, |
| 168 | + "ammo.pistol.hv": 128, |
| 169 | + "ammo.rifle": 128, |
| 170 | + "ammo.rifle.explosive": 128, |
| 171 | + (... Continued) |
201 | 172 | }, |
202 | 173 | "VersionNumber": { |
203 | | - "Major": 3, |
204 | | - "Minor": 2, |
| 174 | + "Major": 4, |
| 175 | + "Minor": 0, |
205 | 176 | "Patch": 0 |
206 | 177 | } |
207 | 178 | } |
|
210 | 181 | - `RevertStackSizesToVanillaOnUnload` - If true; item stacksizes are returned to vanilla defaults on plugin unload. |
211 | 182 | - `AllowStackingItemsWithDurability` - If enabled, items with durability such as weapons can be stacked if they are at full durability. If disabled items with durability can't be stacked at all. (Contents, attachments and ammo are all returned to the player) |
212 | 183 | - `HidePrefixWithPluginNameInMessages` - Currently does nothing. Future version will hide the prefix from chat messages in-game. |
213 | | -- `DisableDupeFixAndLeaveWeaponMagsAlone` - Disables the dupe fix, which removes ammo from weapons when stacking, with this disabled players can dupe any ammo slowly. |
214 | 184 | - `GlobalStackMultiplier` - Multiplies all item stacks by this value. |
215 | 185 | - `CategoryStackMultipliers` - Each category will multiply stacks for those items by the defined amount. |
216 | 186 | - `IndividualItemStackMultipliers` - Accepts "item_id": multiplier. Use stacksizecontroller.itemsearch to find the item id easily. |
217 | | -- `CategoryStackHardLimits` - Each item in this category will be set to this hard stack limit, if the value is above 0. |
218 | | -- `IndividualItemStackHardLimits` - Accepts "item_id": hard limit. Use stacksizecontroller.itemsearch to find the item id easily. |
| 187 | +- `IndividualItemStackSize` - Where you define specific stack sizes for each individual item. |
219 | 188 |
|
220 | 189 | ## Data |
221 | 190 |
|
222 | | -### StackSizeController.json |
223 | | -- Each item is separated into different categories which are generated by the game. Everything in this file is auto generated and automatically maintained. |
224 | | -- The only value in here not overriden are the CustomStackSize values. You can modify these for fine-tuning stack sizes of every item in the inventory or storages. |
225 | | -- You do not need to modify this file unless you need more control than the configuration gives you. Modifying this value overrides every config file definition EXCEPT IndividualItemStackHardLimits. |
226 | | -- **Setting "CustomStackSize" to any value other than 0 will override vanilla defaults. (As of v3.1.3)** |
227 | | - |
228 | | -#### Datafile Example |
229 | | -```json |
230 | | -"Resources": [ |
231 | | - { |
232 | | - "ItemId": 996293980, |
233 | | - "Shortname": "skull.human", |
234 | | - "HasDurability": false, |
235 | | - "VanillaStackSize": 1, |
236 | | - "CustomStackSize": 0 |
237 | | - }, |
238 | | - { |
239 | | - "ItemId": 204391461, |
240 | | - "Shortname": "coal", |
241 | | - "HasDurability": false, |
242 | | - "VanillaStackSize": 1, |
243 | | - "CustomStackSize": 0 |
244 | | - }, |
245 | | - { |
246 | | - "ItemId": -1018587433, |
247 | | - "Shortname": "fat.animal", |
248 | | - "HasDurability": false, |
249 | | - "VanillaStackSize": 1000, |
250 | | - "CustomStackSize": 0 |
251 | | - }, |
252 | | - { |
253 | | - "ItemId": 609049394, |
254 | | - "Shortname": "battery.small", |
255 | | - "HasDurability": false, |
256 | | - "VanillaStackSize": 1, |
257 | | - "CustomStackSize": 0 |
258 | | - }, |
259 | | - { |
260 | | - "ItemId": 1719978075, |
261 | | - "Shortname": "bone.fragments", |
262 | | - "HasDurability": false, |
263 | | - "VanillaStackSize": 1000, |
264 | | - "CustomStackSize": 0 |
265 | | - }, |
266 | | - { |
267 | | - "ItemId": 634478325, |
268 | | - "Shortname": "cctv.camera", |
269 | | - "HasDurability": false, |
270 | | - "VanillaStackSize": 64, |
271 | | - "CustomStackSize": 0 |
272 | | - }, |
273 | | - { |
274 | | - "ItemId": -1938052175, |
275 | | - "Shortname": "charcoal", |
276 | | - "HasDurability": false, |
277 | | - "VanillaStackSize": 1000, |
278 | | - "CustomStackSize": 0 |
279 | | - }, |
280 | | - (... continued) |
281 | | -] |
282 | | -``` |
| 191 | +No data files are used except vanilla-defaults which is overriden everytime the plugin loads. You're welcome to edit it, but that'd be a waste of time. |
0 commit comments