Configurable Stack Size (Lua)
Добавить в игру через Steam
Нажмите «Подписаться»
На странице Steam войдите в аккаунт, если потребуется.
Подписаться
О материале
«Configurable Stack Size (Lua)» — материал мастерской Barotrauma. Моды, подлодки, предметы и новые задания для экипажа. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
Configure the stack size of any in-game item via an editable config file. The 63-stack size limit is removed in Singleplayer but remains in Multiplayer. By default:
-
Stackable "smallitems" have a stack size of 64 (32 in player inventory).
-
Items like O2/fuel tanks remain unstackable in player inventory but stack to 64 elsewhere.
-
Ammo and battery stacks are doubled in player inventory (e.g., 24 revolver rounds instead of 12).
All defaults are customizable in the config file.
Requirements
- Lua For Barotrauma with "CSharp Scripting" enabled.
Configuration
Launch the game once with the mod enabled to generate the default config in the "Barotrauma/ModConfigs/ConfigurableStackSize/" directory. "Barotrauma" refers to the folder where your save files are stored.
The configuration file is initially minified. It's recommended to format it with an auto-formatter before making modifications.
In Multiplayer, only the host’s configuration is used and synced to players.
Format
"itemPatches": [
{
"applyOnlyToStackables": false,
"tags": [ "mobilebattery", "handheldammo" ],
"operations": [
{ "key": "MaxStackSize", "operation": "=", "value": "{maxStackSize}" },
{ "key": "MaxStackSizeCharacterInventory", "operation": "*", "value": 2 },
]
}
],
"containerOptions": {
"maxStackSize": 64,
"characterInventoryCapacity": 32,
}
The configuration uses "itemPatches" to define stack size rules based on tags or item IDs. Items are matched in top-down order, applying the operations of the first matching patch.
Each item has three stack sizes: general, player inventory, and mobile containers. Operations modify these sizes using numbers or references to container options like "{maxStackSize}".
The "containerOptions" section sets general stack size limits for different container types. For example, "maxStackSize" applies to containers that don't fall under other specific container groups. Customize these limits as needed in the config file.
If "applyOnlyToStackables" is not specified, it defaults to true.
Refer to the config file for more details.
Note:
- I plan to add an UI to edit item stack size in-game instead of having to go through the config file.
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.