Syncing up players?

I have a question about player inventories. I am working on a weird gamemode and have been stuck on this for a while. It's just a fun thing, but I'm wondering if it's even possible.

The Premis is: There is one player, a Raid leader, then a bunch of other raiders, but the Raiders share inventory space. When raider A picks a mushroom I want Raider B, C, D, E.. to have that mushroom in their inventory as welll

I guess the simplistet way, and my question: is any way to sync multiple player inventories together?

I tried setting player inventories equal to eachother. It didn't really work, and the players get kicked with errors. After that I thought of spawning a box under the world and using that as a proxy inventory, and relaying the changes from each user into the box, that worked better, but I couldn't figure out how to find what items were moved in the inventory, and with the proxy inventory It looks like I would have to rewrite all the checks that normally happen with inventory mangament.

Is something like this possible?

Thanks :)

One way is to try using all inventory relevant hooks (OnItemPickup, OnItemDropped, OnItemCraftFinished, OnItemCraftCancelled, OnItemCraft) to maintain inventory state across all 'Raiders'.  But it does seem kind of tedious that way.

I'm not sure how you tried copying player inventories, but I don't see why you couldn't just create new entities, or delete existing ones based on the difference in state of the 'Raiders' inventories.

oDHqff8dgCYLxFO.jpg lolman300

One way is to try using all inventory relevant hooks (OnItemPickup, OnItemDropped, OnItemCraftFinished, OnItemCraftCancelled, OnItemCraft) to maintain inventory state across all 'Raiders'.  But it does seem kind of tedious that way.

I'm not sure how you tried copying player inventories, but I don't see why you couldn't just create new entities, or delete existing ones based on the difference in state of the 'Raiders' inventories.

No, thats very bad way. Best way is exactly syncing inventories that is kinda simple. I just suppose he did it a bit wrong.

dNpkqFyTbVbWbfa.png Orange

No, thats very bad way. Best way is exactly syncing inventories that is kinda simple. I just suppose he did it a bit wrong.

Don't want to rip on lolman300, but I tried that method out and it didn't go too well. lol. Any input is better than nothing though.

Next in line I tried keeping a list of sycned users, and listening to OnInventoryNetworkUpdate and returning non-null if they were not synced up. The idea was to override inventory management until everyone had the same inventory/were sycned, then and only then someone could move an item around inside. The only issue was, when I overrode/sycned everyones inventory, it would reinvoke the OnInventoryNetworkUpdate hook. I kept reading deeper, and any insight would be helpful, but do you think I could mess around with disabling networking for certian inventories until they are all updated, then sync them? I tried it out, but it didn't work, but I have reason to believe it was me not fully understanding when to send network updates, or make inventories dity and such.