Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Thank you Eizen for the inspiration and testing!
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!
https://discord.gg/theindiestone
JB_MaxCapacityOverride.CONTAINERS_TO_OVERRIDE["Bag_ShotgunDblSawnoffBag"].capacity = 100
it works in my head anyway, I haven't tried it.
@Promises this is for 42. changing capacities in 41 was so easy and didn't need any of *waves hands* this
-- Only using (containerType, capacity, preventNesting)
local JB_MaxCapacityOverride = require("JB_MaxCapacityOverride")
JB_MaxCapacityOverride.addContainer("crate", 500, false)
"TruckBed" is vanilla. You could probably setType() if vehicle = W900 and then set capacity to what you want. That way you don't change every TruckBed. I don't see why the W900 mod would care what the container type is named, but I could be wrong.
Was looking at the W900 truck mod to customize it. It uses "TruckBed" as well and I am afraid to mess too much with renaming things as all the data is tied up in knots together.
The other things I desperately want to do is make the W900's vehicle transport flatbed able to take more than one vehicle. Sort of like how you can load many chickens into an animal trailer. But again, more LUA that I have no idea how to do.
JB_MaxCapacityOverride.addContainer("TruckBedOpen", 500, false)
JB_MaxCapacityOverride.addContainer("TruckBed", 500, false)
I believe I had it up to 10,000 at some point and it was fine. You could loop through vehicle parts and check if they are a container. I believe vanilla does this somewhere. Seats, glovebox, begins with "TruckBed" are all going to be containers, though. It should be seamless.
Also, if you give the player container a type, you can alter the capacity. The big issue I couldn't overcome without java modding is - the over loaded moodle won't go away.
So now I think I might have to override something somewhere regarding vehicle weight calculations.
Sigh...
Been trying to get it to work, I can connect with mods, but a friend is having issues.
time will tell
but for some reason I'm getting a ton of LUA script errors like this:
function: JB_MaxCapacityOverride.lua -- file: JB_MaxCapacityOverride.lua line # 315 | MOD: JB Max Capacity Override
Callframe at: require
function: SetContainerSize -- file: infinitecontainers.lua line # 64 | MOD: Infinite Carryable Containers
[15:25:12] [INFO] [Zomboid/Error]: ExceptionLogger.logException> Exception thrown
java.lang.RuntimeException: attempted index: new of non-table: null at KahluaThread.tableget(KahluaThread.java:1667).
The line in question?
local OG_ISInventoryTransferAction_new = ISInventoryTransferAction.new
I'm trying to get this to work, but I may have to abandon it as the server seems obsessed with running client side scripts
and btw reading ur codes is fun LOL
i'm sorry i didn't submit a PR directly, i didn't notice you pasted github link at the bottom of description