Project Zomboid

Project Zomboid

82 arvostelua
JB Max Capacity Override
2
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Tiedostokoko
Julkaistu
Päivitetty
572.128 KB
25.3. klo 16.36
31.7. klo 18.14
12 muutosilmoitusta ( näytä )

Tilaa ladataksesi
JB Max Capacity Override

Kuvaus
Pure Lua Max Capacity Override (v1.1)
🚀 Now with 98.355% less jank!

Compatible ONLY with Build 42 — does NOT work with Build 41.



📝 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)



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.



Requires Starlit Library by albion for correct tooltip capacity display.



🆕 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 likes and awards on Nepenthe’s workshop:
https://gtm.steamproxy.vip/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



Mod Name: JB_MaxCapacityOverride
Mod ID: 3452113500
Suositut keskustelut Näytä kaikki (1)
12
8.4. klo 12.05
Players Inventory
Flexible Games
80 kommenttia
neobenmike 15.8. klo 22.56 
No worries, already got it working, thanks
jbdiablo  [tekijä] 15.8. klo 20.33 
@neobenmike - which version of 42 are you running?
neobenmike 15.8. klo 18.11 
Can't enable mod due to requirement typo: \StarlitLibrary instead of just StarlitLibrary
jbdiablo  [tekijä] 31.7. klo 10.58 
Re-uploaded the mod data enhancement. See description on how to use it and the limitations.

Thank you Eizen for the inspiration and testing!
jbdiablo  [tekijä] 30.7. klo 7.57 
no worries, go ahead and hit me up on discord @jimbeamdiablo
Eizen 30.7. klo 4.16 
@jbdiablo thank you for all the help. I managed to solve my issue except when equipping the backpack the capacity reverts back. Can I message you in discord? Btw I saw the thread in the discord link that you gave me. I'm really sorry for the clutter that I made in your comment section
jbdiablo  [tekijä] 29.7. klo 17.05 
I broke it. Reverting until I can figure it out
jbdiablo  [tekijä] 29.7. klo 14.56 
Added a mod data capacity override for single containers. To use:

yourContainer:getModData()["JB_MaxCapacityOverride"] = { capacity = 75 }

It still checks if your container type is in the lookup table first. Let me know if there are any issues with it. Cheers!
jbdiablo  [tekijä] 29.7. klo 12.13 
@Eizen - I don't know what you're cooking but I tested and mod data was persistent on the item. I'll mess around with my code in a bit to check for mod data when patching capacities.
jbdiablo  [tekijä] 29.7. klo 11.34 
I was trying to find a work around to preserve mod data, because that's messed up.