Project Zomboid

Project Zomboid

Nested Containers
FatherSarge 23 Sep, 2023 @ 6:20am
The "This Mod deletes items on my server!!!!" thread -explanation and "solutions"
tl;dr
There is an issue with server-client inventory communication that will be fixed in B42, until then pass containers through the player inventory after you are done to save the container inventory to the server database


Hey all! I've come back to zomboid after a couple of months and came to check one of my favorite mods. To help others I'm making this thread to explain why this mod doesn't work in MP for all those wondering. This issue is not unique to Sioyth's mod and it seems to be a very tricky one to overcome.

So here's what's going on with this mod in MP:

When in multiplayer zomboid, a player's inventory interactions are handled on the client-side, meaning the player's computer. Inventories like the floor and a vehicle truck are interacted with locally on the client but the state of those inventories is only saved during certain interactions. Interacting with a container through this mod is not one of those certain interactions as this mod serves as an extension of the player's internal inventory and is only "saved" on the client side. Server-side inventories are only updated when a player interacts with that system, either by transferring an item into their inventory or dropping an item from their inventory.

The reason people are losing their items(or duping them in some cases) when using this mod on multiplayer is because the server-side database that stores inventory information is not being updated.

In the coming zomboid patch (B42) all multiplayer inventory functions will be handled on the server, so this issue will not exist and there will be no client-server communication jank possible (hopefully)

It is tedious but there is a way around this bug currently. It doesn't exactly defeat the purpose of using the mod, but it is a little annoying. At least it is easy. All you need to do is transfer the container you are working with into your player inventory and then place it back down on the ground or in the vehicle it was in once you have finished organizing it. This will save the inventory state to the server and avoid losing items. Failing to do this will result in the container reverting to whatever state the server has it saved as. This means you can effectively dupe items as well.

Again, this issue is not exclusive to this mod (there was another mod that did a very similar thing that had the same issue for the same reason) and might not even be currently solvable until B42



Hope this helps
Last edited by FatherSarge; 30 Dec, 2023 @ 1:28pm
< >
Showing 1-7 of 7 comments
FatherSarge 30 Dec, 2023 @ 1:28pm 
bump for those having issues (to make it get to the popular thread)

Post your inventory horror stories below!

I looted the surplus store in louisville entirely on my server before I realized what was happening. Lost the entire store!
Meyar 30 Dec, 2023 @ 1:53pm 
On this episode of "Man am I glad I read the damn comments before I lost anything important"
Slinkerdeer 7 Jan, 2024 @ 4:47pm 
Second that, I almost used this mod in my multiplayer server. Dodged a bullet there.
Meyar 18 Jan, 2024 @ 7:39am 
Now, would this effect the host of someone locally hosting through their client, or would it work as intended because both are ostensibly running through the same client? I play in a "multiplayer" world that's really just a world I play on 99% of the time unless one of my friends wants to jump in for an hour or two
FatherSarge 18 Jan, 2024 @ 3:45pm 
Originally posted by Meyar:
Now, would this effect the host of someone locally hosting through their client, or would it work as intended because both are ostensibly running through the same client? I play in a "multiplayer" world that's really just a world I play on 99% of the time unless one of my friends wants to jump in for an hour or two

Interesting scenario but I do not think it would work as intended. If I'm recalling how local MP works, it actually just spins up a local server instance that your local (host) client automatically connects to. Functionally, at least for this mod, it should be the same.

But if you've got the time to test and report back that would be great
I know I'm late to the party and I'm a little slow. We want this mod so we dont need to equip stuff like our lunch boxes or first aids. If the items containers are kept on our player, will that prevent item loss?
Originally posted by Poncho558:
I know I'm late to the party and I'm a little slow. We want this mod so we dont need to equip stuff like our lunch boxes or first aids. If the items containers are kept on our player, will that prevent item loss?

Yes, that works fine even on servers
< >
Showing 1-7 of 7 comments
Per page: 1530 50