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
@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
1) Added a check "if containerType exists" before calling Nepenthe's fix to cut down on errors in the logs
2) Re-did the transferTime function to be more friendly
3) Vehicle Mechanics UI now shows the correct "trunk" capacity
4) Vehicle damage affects trunk capacity
5) Changed hard-coded message to the RD text "You can't do that!" so there will be no translation files today, satan
6) Got rid of check "if container type exists" in addContainer because really, it did nothing important
Really, I'm just telling lua to use my functions instead of the java functions. The limitation is that lua has to call the function. If java calls it, it will use the java function.
One last mountain to climb, can this be used for the player inventory? If so, what do I use for the passed in type? If that can happen, then I don't need the java override for this either.
local containerType = self:getType()
local overrideData = JB_MaxCapacityOverride.CONTAINERS_TO_OVERRIDE[containerType]
I created a discussion post on the other mod with the script edit
Wow that took awhile to track down. I could not figure out where you got the string "militarycrate" until I did a search on on the entire media directory files, not just media/scripts
This games files are just... so god awful.
container = ...
list?
Please forgive my ignorance, I'm not a LUA dev normally and the PZ back-end is... confusing at best.
I just streamed with this for 10 hours and none of my containers like crates had the change. I checked poedgirls mod and getItems() is called, but crates are not items, they're entities.
The one other capacity mod I'm using is the one that edits the characters capacity.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3408066578
Can this mod api work for the player as well?
Would it be possible to add that functionality or ability?
- Changed the formula for transfer time. but I'm not happy with it, so it will be improved.
- Implemented Nepenthe's speed fix from "Remove Bag Slowdown" with permission.
I'm not sure if an equipped weight is going to happen and I'm not sure if a speed fix for "heavy load" is going to happen. I haven't found a way in to the java classes/functions that I need to do those.