Project Zomboid

Project Zomboid

61 ratings
JB Max Capacity Override
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
570.983 KB
25 Mar @ 4:36pm
11 Apr @ 8:08pm
8 Change Notes ( view )

Subscribe to download
JB Max Capacity Override

Description
Pure Lua Max Capacity Override with 95.5247% less jank!
For B42 Only. This does not and will not work on B41

NOTE: This mod does nothing by itself. It is meant for the hard working modders, whom you should treat well.

This is a pure Lua MAX_CAPACITY override that does not require any manual "java mod" installation. It works with bags, crates, truck beds, etc

This mod requires Starlit Library by albion to fix up the tool tips to show the correct capacity.

This is still a WIP. Things that need added or addressed are:

  • Set up an equipped weight override (if I can)
  • Check for when a player "right-click grabs" a container instead of letting it "bug" out.
  • Add support for modifying player inventory capacity (if I can)
  • Fix world context grab half/all transfer times. It's borked for heavy items so I wouldn't use it right now

Side note regarding the World Object Context Menu: It sucks

Includes Nepenthe's speed fix from "Remove Bag Slowdown" with permission
Make sure y'all go to Nepenthe's workshop and drop a ton of likes and awards on their superb mods!
https://steamhost.cn/steamcommunity_com/id/drstalker/myworkshopfiles/

This fix will NOT keep you moving fast if you're overloaded and have the "Heavy Load" moodle

What you should know

The addContainer args are formatted as ("type", capacity, preventNesting, _equippedWeight. _transferTimeSpeed)

  • "type" = string - The item type to change. If you're unsure, you can getType() on your container to get it
  • capacity = number - That is the max weight your container can hold
  • preventNesting = true/false - Prevents putting the same "type" containers in each other
  • _equippedWeight = number - Can be nil. Not used currently but will be the weight of the container when equipped on a character
  • _transferTimeSpeed = number - Can be nil. An action "time" override when transferring an item to/from your fancy container

It's recommended to use this with your own container / type to prevent overwriting someone else's glorious work

There is some error checking:
  • If a capacity is not passed or it's not a number, then nope
  • If preventNesting is not passed or it's not a boolean, then nope
  • We don't care about equippedWeight or _transferTimeSpeed right now. They can be nil. This might change in the near future

How To Use

An example of how to use this mod with your container/bag/vehicle:

1) Make a separate Lua file:

2) Add the code below. Replace the args with whatever you need

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)

3) Make sure to add require=\JB_MaxCapacityOverride to your mod.info
4) upload it to the workshop.
5) Bam

What? It's broken? Nahhhh

Please report any issues on GitHub:
https://github.com/mikej1977/JB_MaxCapacityOverride



Mod Name: JB_MaxCapacityOverride
Mod ID: 3452113500
Popular Discussions View All (1)
12
8 Apr @ 12:05pm
Players Inventory
Flexible Games
61 Comments
jbdiablo  [author] 26 Jun @ 8:09am 
@Briar Feet require=\StarlitLibrary is correct for B42
Briar Feet 25 Jun @ 6:41pm 
@jbdiablo the issue is about the mod requirements. On the mod.info it was written like this: require=\StarlitLibrary and the correct one should be like this: require=StarlitLibrary because that is the mod id of Starlit Library. Ty!
jbdiablo  [author] 16 Jun @ 4:18pm 
@Vengent thanks for the info!

@Promises this is for 42. changing capacities in 41 was so easy and didn't need any of *waves hands* this
Promises 16 Jun @ 3:30pm 
im using it on b41
Vengent 16 Jun @ 3:15pm 
I've got it working in 42.9 with crates and some other movable containers. I'm not seeing any error about starlit currently.
jbdiablo  [author] 16 Jun @ 2:37pm 
@Promises @Luna - I'll do some digging tomorrow. I haven't even fired up PZ since 42.9 so something may have changed.
Luna ~ 14 Jun @ 7:51pm 
same problem as person below
Promises 14 Jun @ 7:25pm 
i have starlit library but in the mod menu it wont let me enable this because it says i dont have the library
jbdiablo  [author] 9 Jun @ 10:36am 
@Vengent I believe "crate" is the type you need"

-- Only using (containerType, capacity, preventNesting)
local JB_MaxCapacityOverride = require("JB_MaxCapacityOverride")
JB_MaxCapacityOverride.addContainer("crate", 500, false)
Vengent 6 Jun @ 6:06pm 
Hey JB, any chance of adding some samples for using this with containers like crates? Found a good one for character bags, but nothing for container existing in the world.