SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
84 stars 18 forks source link

Client and Server workshop desync #4334

Closed DerpyHoowes closed 4 months ago

DerpyHoowes commented 4 months ago

It's been a long going issue in the game, and would probably be weird enough to report it just now, but it just seems weird for me that we already have the functionality to manually unload master bundles or reload them without restarting the game, but still didn't get any solution to that issue.

Right now if the MasterBundle (referred to MB from now on) versions on client and server don't match, you only get a warning after getting kicked from the server. Why not just enforce the Server's MB version on Client, and let the player join the server. Even if the Server's MB version is outdated, why does it matter, if the player specifically wants to join that exact server? Couldn't we just have the game unload the current MB version, and download one from Server?

Overall things related to Workshop downloads on server join and updates seems very flawed and unreliable to me. Like the fact that for some reason the game doesn't delete the workshop files, that it downloaded after joining a server, yet when you join it again next time, it still makes you wait till it downloads the same files over again, wasting your time. If it's going to download them on every server join, make it at least so that the files get deleted, instead of just piling them up on user's drive storage.

Attempting to clear the useless workshop files left over from joining servers manually often is just impossible, even by deleting the workshop storage folder, because Steam Cloud treats these files as part of game save, I guess, and downloads them back, even though you're not subscribed to these mods.

Mod updates also often cause a lot of problems, with game restart on client/dedicated server restart not solving them. From my previous server owning experience, almost every mod update I rolled out caused issues for at least one person, making them go through this annoying series of mumbo jumbo (from resubscribing to mods, to reinstalling the game and so on) attempting to fix client desync with server. Somehow such a trivial task as downloading a new version of mod files on update is very unreliable on many people's clients from time to time.

Perhaps this whole interaction between Client, Server, and Steam Workshop service should be somehow rewritten, considering how much headache it causes on daily basis to the playerbase of modded servers.

SDGNelson commented 4 months ago

One of the common problems is servers re-uploading duplicates of MBs, then when the original gets updated there are two MBs with the same name but different versions and contents. It's not uncommon for servers to have multiple workshop files that each have different versions of the same MB with different contents. :(

Steam doesn't currently have a mechanism for requesting a specific version of a workshop file. For example, to request the same version as the server. If they added support for that we could relatively easily load the same version as the server.

We actually have a support article specifically for the workshop files remaining on disk: https://support.smartlydressedgames.com/hc/en-us/articles/16184460051988-Why-is-Steam-installing-workshop-files-I-m-not-subscribed-to

One alternative I've given thought is to support alternative backends for downloading the workshop files. For example, the server providing a URL of a zip to download for the mods on that server. The server could offer the files directly over the game connection but that's probably not ideal. Either way, these would make the complaints of server hosts stealing modders' workshop files worse as there would be no way to moderate it, and it's relatively low priority compared to whatever is selected as the top priorities from the 2024 Survey.