Project Zomboid

Project Zomboid

95 lượt đánh giá
JB Max Capacity Override
2
   
Giải thưởng
Yêu thích
Đã yêu thích
Bỏ thích
Kích cỡ file
Đã đăng
Đã cập nhật
570.611 KB
25 Thg03 @ 4:36pm
5 Thg09 @ 7:24pm
13 ghi chú thay đổi ( xem )

Đăng ký để tải xuống
JB Max Capacity Override

Mô tả
Pure Lua Max Capacity Override (v1.1)
Now with 98.355% less jank!
Compatible ONLY with Build 42 — does NOT work with Build 41.



If you're here from Customizable Containers
Dane's mod uses a custom implementation of this mod.
This mod works fine(so far) in B42.12




Requires Starlit Library by albion for correct tooltip capacity display.
Regarding the "require=\StarlitLibrary" line in the mod.info: As of Build 42, the backslash is required. https://pzwiki.net/wiki/Mod.info



This mod does nothing on its own. It’s intended for your friendly neighborhood modder.



Summary
This mod provides a pure Lua MAX_CAPACITY override without needing any Java mod installations. It works on:
  • "Equipable" Bags
  • Crates / Containers
  • Truck beds / Trunks
  • Sprite containers (with some limitations)



07/31/25
Re-added mod data override for single containers. Example usage:
yourContainer:getModData()["JB_MaxCapacityOverride"] = { capacity = 75 }

- Works if the container type exists in the lookup table
- Compatible with bags and sprite containers
- Mod data override not yet compatible with trunks (WIP)



Current To-Do List
  • [ ] Add equipped weight override
  • [ ] Handle right-click grab bug
  • [ ] Consider player inventory capacity override (probably not)
  • [ ] Fix transfer times for heavy items in world context (borked right now)



Side note: The World Object Context Menu can eat me.



Performance Boost
Includes Nepenthe's speed fix from Remove Bag Slowdown (used with permission).

Drop some likes and awards on Nepenthe’s workshop:
https://psteamcommunity.yuanyoumao.com/id/drstalker/myworkshopfiles/

This fix does NOT bypass the “Heavy Load” moodle slowdown.



Argument Structure (for addContainer)
("type", capacity, preventNesting, _equippedWeight, _transferTimeSpeed)

type | string | Container type (use getType() to find it)
capacity | number | Max weight container can hold
preventNesting | boolean | Prevents nesting same type containers
_equippedWeight | number | (optional) Weight of equipped container
_transferTimeSpeed | number | (optional) Transfer time override

Error checking included for capacity and preventNesting.
Equipped weight and transfer speed are optional — defaults to nil.

How To Use
[ ] Create a new Lua file
[ ] Add and customize the following code:

local JB_MaxCapacityOverride = require("JB_MaxCapacityOverride")

JB_MaxCapacityOverride.addContainer("Bag_ShotgunDblSawnoffBag", 125, true, nil, 30)
JB_MaxCapacityOverride.addContainer("militarycrate", 180, true)
JB_MaxCapacityOverride.addContainer("TruckBedOpen", 500, false)

[ ] Add to your mod.info: require=\JB_MaxCapacityOverride

[ ] Upload to the workshop



Found a bug? No you didn't. Really? Aight, report it here please:
https://github.com/mikej1977/JB_MaxCapacityOverride




Workshop ID: 3452113500
Mod ID: JB_MaxCapacityOverride
Thảo luận nổi bật Xem tất cả (1)
15
9 Thg09 @ 9:49am
Players Inventory
Flexible Games
102 bình luận
魔法 1 giờ trước 
G:\steam\steamapps\workshop\content\108600\3369211813\mods\PZFateMagicTraits 圣杯魔术\42\media\lua\client,大佬是不是改这个里面的第186行代码为您发的就可以了吗
jbdiablo  [tác giả] 5 giờ trước 
I just looked. They are calling functions that do not exist.

line 186 in their mod:
weapon:setCritDmgMultiplier(weapon:getCritDmgMultiplier() * 2)

it should be:
weapon:setCriticalDamageMultiplier(weapon:getCriticalDamageMultiplier() * 2)
jbdiablo  [tác giả] 5 giờ trước 
@魔法 - my code is working fine. their code is not working fine.
魔法 22 giờ trước 
function: PZFateMagicExtraShooter -- file: PZFateMagic.lua line # 186 | MOD: PZFateMagicTraits 圣杯魔术
Callframe at: setPrimaryHandItem
function: complete -- file: ISEquipWeaponAction.lua line # 211 | Vanilla
function: complete -- file: JB_MaxCapacityOverride.lua line # 298 | MOD: JB Max Capacity Override

LOG : Lua f:240, t:1759558775127> 100
LOG : Lua f:240, t:1759558775128> 100
LOG : Lua f:240, t:1759558775128> 100
LOG : Lua f:240, t:1759558775128> 100
LOG : Lua f:240, t:1759558775128> 100
LOG : Lua f:240, t:1759558775128> 100
LOG : Lua f:240, t:1759558775128> 100
jbdiablo  [tác giả] 2 Thg10 @ 4:36pm 
CC overrides the same functions I do. I'll look in to getting some compatibility in there or maybe shoot him a message and see if he's thought about it since CC has hella more subs than mine
jbdiablo  [tác giả] 2 Thg10 @ 4:31pm 
@Scadrian Street Rat no idea since I've never looked at his code. I'll poke my head in there and have a looksee, tho
Scadrian Street Rat 2 Thg10 @ 3:29pm 
Quick question, because you said CC uses a custom implementation of your mod. Do the two mods interfere with each other? Ocassionally on load with both active, certain containers will default to 49 max capacity, and be fully unable to be upgraded, and I'm uncertain if the conflict comes from the similarities between this mod and what is implemented in CC, or if it's a problem related to the bag upgrades?
galkinzhenia 27 Thg09 @ 7:15pm 
Спасибо большое
jbdiablo  [tác giả] 27 Thg09 @ 11:49am 
@galkinzhenia it still works on my end
galkinzhenia 25 Thg09 @ 9:45pm 
Проверте на совместимость 42.12