Project Zomboid

Project Zomboid

[B41/B42] Weapon Cases
 此主题已被置顶,因此可能具有重要性
Sim0nG 「狐」  [开发者] 6 月 16 日 上午 4:12
Bug Report
Share your bug details here :seriousboss:
< >
正在显示第 1 - 11 条,共 11 条留言
yo thx for the cool mod, i'm having a problem with sandbox settings like confing, playing on b41. Can't adjust any settings except compatible pools from vfe, brita etc. How to fix?
最后由 ✵ А.У.Е ✵ 编辑于; 8 月 10 日 上午 3:47
Sim0nG 「狐」  [开发者] 8 月 10 日 下午 1:34 
Distribution and loot-specific settings have been moved to the 'media\lua\server\Config' folder:

DistributionSettings.lua is used to modify spawn chances, room, and roll settings.
MarkedPools.lua is used to modify the item pools of locked cases.

Other than that and selecting mod compatibility in the Sandbox Options, there are no additional settings
引用自 Sim0nG 「狐」
Distribution and loot-specific settings have been moved to the 'media\lua\server\Config' folder:

DistributionSettings.lua is used to modify spawn chances, room, and roll settings.
MarkedPools.lua is used to modify the item pools of locked cases.

Other than that and selecting mod compatibility in the Sandbox Options, there are no additional settings
thank you
Bebop Cola 9 月 7 日 上午 12:55 
When attempting to open a closed Rifle case, I received the following error:

`function: ChangeItem -- file: PreserveItems.lua line # 8 | MOD: Weapon Cases function: player -- file: PreserveItems.lua line # 25 | MOD: Weapon Cases function: onMouseUp -- file: ISContextMenu.lua line # 92 | Vanilla java.lang.RuntimeException: Object tried to call nil in ChangeItem at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:101) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:817) at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:174) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1826) at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1765) at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104) at zombie.ui.UIElement.onMouseUp(UIElement.java:1638) at zombie.ui.UIElement.onConsumeMouseButtonUp(UIElement.java:1700) at zombie.ui.UIManager.updateMouseButtons(UIManager.java:866) at zombie.ui.UIManager.update(UIManager.java:725) at zombie.GameWindow.logic(GameWindow.java:326) at zombie.GameWindow.frameStep(GameWindow.java:916) at zombie.GameWindow.mainThreadStep(GameWindow.java:642) at zombie.MainThread.mainLoop(MainThread.java:76) at java.base/java.lang.Thread.run(Unknown Source) `

Edit: I didn't think about it at the time, but maybe it's trying to load a non-supported rifle in the case? I believe the only one I have is the Foldable Survival Rifle:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3491265315
最后由 Bebop Cola 编辑于; 9 月 7 日 上午 1:06
Sim0nG 「狐」  [开发者] 9 月 7 日 上午 4:21 
Is this a fresh save or was the mod added to an existing one?
Bebop Cola 9 月 7 日 上午 4:51 
Fresh save.
Sim0nG 「狐」  [开发者] 9 月 7 日 上午 6:28 
And have you changed any of the sandbox variables?
Bebop Cola 9 月 7 日 上午 7:34 
I don't remember, I'm sorry to say. What variables might have affected it, do you think?

To clarify, when I said it was a fresh save, I meant in terms of having added the mod to an existing save. I've been running this save for a week or so, and I had both the Weapon Cases and Foldable Survival Rifle enabled at the start.

The house I found the rifle case in is the same I also found a foldable survival rifle. The Rifle case was in a locker in the basement, while the survival rifle was in a cabinet upstairs. Not sure if that matters.
最后由 Bebop Cola 编辑于; 9 月 7 日 上午 7:39
Sim0nG 「狐」  [开发者] 9 月 7 日 上午 8:13 
In short: before rolling for a weapon, the mod checks which compatibility options are enabled and then constructs an array of possible items to pull from.

I can say that the foldable rifle is not a problem for sure, because it is neither supported nor automatically patched in :seriousboss:

To actually check for which mod to include items from, I've added sandbox variables for each supported mod. In case you didn't have any of them selected, it fallbacks to the vanilla pool.
The catch is, I've found out that fallback vanilla pool was actually enabled all the time ignoring user preferences. And that's why I removed it.

I'm also not exactly sure how sandbox variables behave when the mod is installed into an already existing save. Your logs show an 'Object tries to call nil' error, which means the array that holds the rollable items doesn't exist. It looks like the mod couldn’t find any allowed item pools at all (because it is possible that even vanilla pool is off now) so I'm fairly certain that all compatibility options disabled themselves when the mod first loaded into the save.

The easiest way to verify this is by installing an options editor mod and checking the variables in-game:

B41
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2670674997

B42
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3386906181

In your case, to fix it, just enable Vanilla compatibility flag.

Let me know if this helps :sleepyjill:
Bebop Cola 9 月 7 日 上午 9:51 
So, I just checked and I already have "Vanilla Compatible Pools" checked in the options. It's the only item checked, aside from the option for moving the configs that defaults to on.

I decided I'd try troubleshooting a bit and I think this might have been user error on my part. I'll save you the troubleshooting story unless you're interested. I don't think it's relevant to my user-error discovery below.

For some background on generating the error, I saw that there was an "Open" context menu when I had picked up the case, so I assumed I needed to use that to open it, even though it was not one of the "locked" cases. That's what caused the error.

I thought I had also tried equipping it like a normal container when I originally found it, but I'm a bit sleep-deprived at the moment so I'm honestly not sure if I did. After my troubleshooting efforts above I hovered the mouse over the case and saw that it showed it had contents, so I equipped it like a normal container. Doing so I was able to access it like a normal container and see the contents without issue.

So...you have my sincere apologies.
最后由 Bebop Cola 编辑于; 9 月 7 日 上午 9:53
Sim0nG 「狐」  [开发者] 9 月 7 日 下午 4:39 
Well, it still sounds like an actual problem, just in a different part of the mod.

The Open / Closed prompt is used to visually toggle between the open and closed case models. It looks like there are some issues with preserving the items inside (which may also bug due to the case being empty)

Thank you for your feedback! I'll definitely look into it
最后由 Sim0nG 「狐」 编辑于; 9 月 7 日 下午 4:40
< >
正在显示第 1 - 11 条,共 11 条留言
每页显示数: 1530 50