Split-screen issue: As of the 1.0.6 (and 1.0.7) update, whenever one player opens a chest, all chest/dialog/menu/etc. screens close for the other player. I'm not sure if it matters, but we are streaming from my PC to the tv via sunshine/moonlight and we are both using controllers. I updated to 1.0.7 from 1.0.5 because of the previous split-screen issue with items automatically being taken out of chests when you open them, otherwise I would just rollback for the time being. Outside of these minor issues, I am enjoying the mod. I hope it is a simple fix. Thank you!
I've not had this happen, so it might be a split-screen thing. What I can recommend for now is rolling back to 1.0.4, it was build for 1.5.6 but will still work fine, aside from the issues patched from 1.0.5 and up. I can't guarantee it won't have this issue (again, haven't had it happen before myself), but it might solve it for now. I'll start testing this out and post a fix as soon as I can.
Welp back again! Lol, anywho it does now work in split screen now thank you. With that said as SOSalcex also pointed it the mod causes a weird pickup issue when opening chests. Using controller just in case that info helps.
It seems the taking/putting away item bug is caused by the button press/action going through after the chest interface is shown. If you test it you'll notice the item that is being put away/taken out is in the inventory slot directly over the chest. Or in the case of using a controller it will take/put away whatever item the cursor automatically highlights. Not entirely sure how to fix it other than maybe adding a small delay before showing the chest interface.
edit: I did some playing around with the code and found that changing it from a button press event to button release event seems to have fixed the bug. Obviously this does make it so that a chest in use doesn't open immediately after clicking/pressing the button, but instead opens after releasing the click/button press. This seems like a pretty small thing to fix the bug, though.
edit2: After looking further into how chests work in multiplayer, I think the best solution is actually to leave the button press event, but simply replace objectAtTile.ShowMenu(); with objectAtTile.performOpenChest(); objectAtTile.GetMutex().ReleaseLock(); This is simply opening a chest as normal and then immediately releasing the mutex lock that normally prevents multiple people from opening chests at once. Sometimes it does take the 2nd player to interact twice with the chest to open it, but most of the time it opens immediately and without any obvious bugs.
I tried working around the chests mutex, but it didn't end up working out to much. I've instead chosen to add a simulated delay which seemed to also prevent the issue when testing on my controller. Regardless, thanks for looking into it
Doesn't seem to work in split screen. Not sure if it is because the chest is colored or placed before the mod was installed but will keep it installed in hope it somehow decides to work and look out for updates.
So I tried to test this but it seems to work fine, or at least, it does what it's supposed to. Can you describe some more details about what's going wrong?
SImply put, we can't both access chests at the same time. This is with https://www.nexusmods.com/stardewvalley/mods/9791 . We just tested it again, and we can't access a default, regular chest, at the same time. The old version of his mod was compatible, but the new version is not.
edit - another bug to report, when clicking on a chest, a random piece item will be pulled from the chest into our inventory. This goes away when we remove the mod.
25 comments
this works with big chests and stone big chests?
Should be fixed in 1.0.6
edit: I did some playing around with the code and found that changing it from a button press event to button release event seems to have fixed the bug. Obviously this does make it so that a chest in use doesn't open immediately after clicking/pressing the button, but instead opens after releasing the click/button press. This seems like a pretty small thing to fix the bug, though.edit2: After looking further into how chests work in multiplayer, I think the best solution is actually to leave the button press event, but simply replace
objectAtTile.ShowMenu();
withobjectAtTile.performOpenChest();
objectAtTile.GetMutex().ReleaseLock();
This is simply opening a chest as normal and then immediately releasing the mutex lock that normally prevents multiple people from opening chests at once.
Sometimes it does take the 2nd player to interact twice with the chest to open it, but most of the time it opens immediately and without any obvious bugs.
Can you describe some more details about what's going wrong?
edit - another bug to report, when clicking on a chest, a random piece item will be pulled from the chest into our inventory. This goes away when we remove the mod.