Project Zomboid

Project Zomboid

JB Max Capacity Override
130 条留言
jbdiablo  [作者] 11 月 23 日 上午 11:38 
@reguero01 - Nothing particular to this mod, but SimKDT has some good videos to get started with PZ modding:
https://www.youtube.com/watch?v=FGbyLGLmxes&list=PL91PT-Vd7Vhp_eBA8pE4hCXPcrxHWgr_E&pp=0gcJCbAEOCosWNin

I also have a template for this mod that's very basic: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3595466063
reguero01 11 月 23 日 上午 2:55 
não tem um video tutorial pra um burrinho como eu conseguir usar esse mod? :)
jbdiablo  [作者] 11 月 20 日 下午 2:45 
Added a check for CleanUI so I don't break it again. If y'all come across anything else, let me know. Cheers!
Blue 11 月 20 日 下午 2:01 
cool thanks for the quick response you're the real mvp
jbdiablo  [作者] 11 月 20 日 下午 1:58 
@Blue - I appreciate the report! I'll rip it out until we can figure out what that issue is.
Blue 11 月 20 日 下午 1:44 
the new weight display has caused both the player and container panes all white bars, and capacity appears floating off to the left of where it should be. Compatibility issue with CleanUI?
jbdiablo  [作者] 11 月 20 日 上午 10:09 
Updated: Add per vehicle trunk/truck bed capacity. Prettier weight display on the inventory pane c/o Black Moons (thanks!)
jbdiablo  [作者] 11 月 19 日 上午 8:17 
@Black_moons I'll look later today. I forgot all about it. LOOK! A SQUIRREL
Black_moons 11 月 18 日 下午 11:52 
Looking forward to support for overriding individual vehicle types trunk size. (Via modData on the individual trunks perhaps?)
jbdiablo  [作者] 11 月 7 日 上午 8:51 
@PANZER - with mod data you can. I haven't rewritten for it yet so it's a little convoluted.

1st add it to the container list as normal and set the capacity to something reasonable or vanilla.
You'll then need to hook in to something to "get" your container and then you can:
yourContainer:getModData()["JB_MaxCapacityOverride"] = { capacity = 20 }

That sets capacity individually, so you need to do it for every container you want to target. It's mainly there for "upgrading" like bags and such but no reason you can't use it to set capacity ona small freezer.
PANZER 11 月 7 日 上午 1:27 
Is there a way to target specific containers like the different types of freezers? My mini fridge now has a 80 capacity storage for its freezer lol. Was just trying to adjust the chest freezers
PANZER 10 月 28 日 下午 5:01 
Thank you buddy!
jbdiablo  [作者] 10 月 28 日 下午 4:50 
@PANZER - I uploaded a template for this mod. Hope it helps ya!

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3595466063
jbdiablo  [作者] 10 月 28 日 下午 4:26 
that's just the name of my lua file. if you have discord, hit me up there @jimbeamdiablo and we can see what we have going on
PANZER 10 月 28 日 下午 4:22 
I don't have the " overrides.lua: " at the beginning no. I just copied what was in the description. Required mod from mod.info is green when I go to enable mod in game.

Will try add the line in a bit.
jbdiablo  [作者] 10 月 28 日 上午 8:39 
@PANZER - you're sure that the JB_MaxCapacityOverride mod is active? I have that exact line in my capacity test mod and it's working.

overrides.lua:

local JB_MaxCapacityOverride = require("JB_MaxCapacityOverride")
-- containerType, capacity, preventNesting, _equippedWeight, _transferTimeSpeed

JB_MaxCapacityOverride.addContainer("Bag_BreakdownBag", 125, true, 10)
JB_MaxCapacityOverride.addContainer("Bag_TrashBag", 40, false, nil, 10)
JB_MaxCapacityOverride.addContainer("militarycrate", 180, true)
JB_MaxCapacityOverride.addContainer("TruckBedOpen", 500, false)
PANZER 10 月 28 日 上午 12:44 
`attempted index: addContainer of non-table: null
function: Crates.lua -- file: Crates.lua line # 3 | MOD: Crates
java.lang.RuntimeException: attempted index: addContainer of non-table: null

`
Can you help me out man? just want to Increase military crates to 100 lol...only thing I have is this lua file

local JB_MaxCapacityOverride = require("JB_MaxCapacityOverride")

JB_MaxCapacityOverride.addContainer("militarycrate", 100, false)
jbdiablo  [作者] 10 月 15 日 上午 9:50 
added patches for CC, SOTO and True Smoking to defer to whichever function won the loading war

and a side note that if you have any combination of the above enabled, you will probably get some errors and/or unexpected behavior
jbdiablo  [作者] 10 月 15 日 上午 9:11 
@明明灭灭 - there may be more going on but I'll add a patch for TrueSmoking since it's nuking the same functions as I am. The 42.12 update mucked a lot of stuff up.

@gravelle164 - correct, it just changes a whole bunch of lua functions. You'll need to add a container to the lookup table for it to do anything useful.
gravelle164 10 月 15 日 上午 6:02 
im assuming from what im reading this mod doesnt do anything on its own correct?
明明灭灭 10 月 15 日 上午 4:41 
Perhaps it's caused by a series of mod conflicts. I've been using this mod recently, and it causes errors when used together with previously added mods.
明明灭灭 10 月 15 日 上午 4:39 
`Callframe at: isExclusive
function: SetClothingInfo -- file: ItemInfo.lua line # 459 | MOD: More Item Information
function: SetItemInfo -- file: ItemInfo.lua line # 130 | MOD: More Item Information
function: render -- file: ItemInfo.lua line # 733 | MOD: More Item Information
function: render -- file: AAA_show_material.lua line # 75 | MOD: 界面:展示布料信息 Show Clothes Material
function: render -- file: KATTAJ1_TooltipFixer.lua line # 13 | MOD: KATTAJ1 Clothes Core
function: render -- file: Skill Recovery Journal Tooltip.lua line # 296 | MOD: Skill Recovery Journal

`
明明灭灭 10 月 15 日 上午 4:39 
此留言正在等待我们的自动内容检查系统分析。在我们证实其内容无害之前(例如试图窃取信息的钓鱼站点链接),留言将暂时隐藏。
明明灭灭 10 月 15 日 上午 4:38 
`function: getOverrideType -- file: JB_MaxCapacityOverride.lua line # 312 | MOD: JB Max Capacity Override
function: new -- file: JB_MaxCapacityOverride.lua line # 315 | MOD: JB Max Capacity Override
function: ReturnItemToContainer -- file: ISCraftingUI.lua line # 2016 | Vanilla
function: eatItem -- file: ISInventoryPaneContextMenu.lua line # 4122 | MOD: Give Me Some Time
function: eatItem -- file: TrueSmoking.lua line # 301 | MOD: True Smoking
function: findSmokable -- file: TrueSmoking.lua line # 291 | MOD: True Smoking
function: onKeyStartPressed -- file: TrueSmoking.lua line # 339 | MOD: True Smoking
function: keyWrapper -- file: TrueSmoking.lua line # 397 | MOD: True Smoking
java.lang.RuntimeException: attempted index: getType of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1530)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:502)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:174)
jbdiablo  [作者] 10 月 14 日 下午 6:42 
@Gentoo - Yo, thanks for the heads up! I'll get a fix in here in a day or two.
Gentoo 10 月 14 日 下午 3:37 
The Dexterous trait conflicts with the SOTO mod.

Just a warning.
魔法 10 月 5 日 下午 6:50 
大佬我改好了,我本地吧代码改了,谢谢大佬给代码,不报错了
jbdiablo  [作者] 10 月 5 日 上午 9:29 
@魔法 - that's not my mod, how am I supposed to change it?
魔法 10 月 4 日 下午 7:58 
G:\steam\steamapps\workshop\content\108600\3369211813\mods\PZFateMagicTraits 圣杯魔术\42\media\lua\client,大佬是不是改这个里面的第186行代码为您发的就可以了吗
jbdiablo  [作者] 10 月 4 日 下午 4:18 
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  [作者] 10 月 4 日 下午 4:16 
@魔法 - my code is working fine. their code is not working fine.
魔法 10 月 3 日 下午 11:22 
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  [作者] 10 月 2 日 下午 4:36 
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  [作者] 10 月 2 日 下午 4:31 
@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 10 月 2 日 下午 3:29 
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 9 月 27 日 下午 7:15 
Спасибо большое
jbdiablo  [作者] 9 月 27 日 上午 11:49 
@galkinzhenia it still works on my end
galkinzhenia 9 月 25 日 下午 9:45 
Проверте на совместимость 42.12
jbdiablo  [作者] 9 月 21 日 下午 12:21 
I'm testing with:

local JB_MaxCapacityOverride = require("JB_MaxCapacityOverride")
JB_MaxCapacityOverride.addContainer("ChuwuRing", 1000, true, nil, 1)

It's working as expected. Ring has 1000 capacity, I can't put another ring in the ring container and transfer speed in instant.

Also, I'm not sure what StoreageBag01, 02 etc is. That's not part of either mod or vanilla.

You can hit me up on discord, jimbeamdiablo if you want to go over your code
UnDeadPuff 9 月 21 日 下午 12:05 
local JB_MaxCapacityOverride = require("JB_MaxCapacityOverride")

JB_MaxCapacityOverride.addContainer("StorageBag01", 1000, true, nil, 1)
JB_MaxCapacityOverride.addContainer("StorageBag02", 500, true, nil, 1)
JB_MaxCapacityOverride.addContainer("StorageBag03", 250, true, nil, 1)
JB_MaxCapacityOverride.addContainer("StorageBag04", 250, true, nil, 1)


The only modifications I made to the other mod was to add one more bag and change the names around.
jbdiablo  [作者] 9 月 21 日 上午 11:57 
@UnDeadPuff can you show me your modified code? I don't see anything that should cause an array out of bounds
UnDeadPuff 9 月 21 日 上午 11:11 
Hello. I'm getting these errors [pastebin.com] when loading only your mod and a personalized version of this mod to which I added your mod's utility.Sometimes the errors make it so one or more of the bags disappear, which is obv not ideal. Any suggestions or are they just not compatible?
jbdiablo  [作者] 9 月 14 日 下午 1:11 
@Dartagne you can set individual container capacity with mod data. It does checks in getCapacity and getEffectiveCapacity. So if your item is in the container, you can set the container moddata.capacity. The container type does need to be in the override table though, otherwise it will ignore it.

local modData = item and item:getModData()["JB_MaxCapacityOverride"]
return (modData and modData.capacity) or overrideData.capacity

If I ever figure out how to animate so I can finish this other mod I'm working on, I might pivot back and change these checks to "if overridedata or modData"
Dartagne 9 月 14 日 上午 11:10 
Very nice! Is it possible to make it so if a specific item is in the container, then that container gets increased carry weight?
Flexible Games 9 月 6 日 下午 10:55 
Love that your keeping this updated! I phase in and out of my play with PZ and hate when I return and stuff is out of date. So major kudos! One of my mods just straight up disappeared and I don't know which as the ID no longer exists.
jbdiablo  [作者] 9 月 5 日 下午 7:26 
Added logic so y'all can 'place' your giant bags almost anywhere, Cheers!
Achille12345 9 月 1 日 上午 5:24 
I'm using steam version yeah.
jbdiablo  [作者] 8 月 31 日 上午 10:58 
actually, the creator of Starlit had the idea, I'm just asking it.
jbdiablo  [作者] 8 月 31 日 上午 10:58 
@Achille12345 I just had a thought - are you using this mod without steam or with the -nosteam option?
Achille12345 8 月 31 日 上午 3:38 
Yeah there was an typo or something in the mod.info file requirement \StarlitLibrary I changed it to StarlitLibrary and now I can activate the mod.