Jump to content

Recommended Posts

For example, I have a mod with this option set in modinfo.lua, then I want to update my mod. But there are many people that are currently using my mod on their running hosts. So they have different version from Steam version. Does it mean that they have to stop their servers, go to "Mods" menu and update my mod? Will users be able to connect to these hosts? 

Until they go into the menu to update their mod it will simply run the old version. And people joining it will also download the old version. Although I have noticed that sometimes it also says the server version is out of date. Not really sure when it says that, perhaps when you already have a newer version subbed and downloaded yourself? Idk.

Pretty much, I had the same with my mod when I updated it. People complaining it wasn't working so i joined some servers and checked what version was running on the servers  where it was\wasn't and my game just downloaded the old version. different versions have different directory names workshop-# you'll see it downloads the old one.

 

*edit*

I'm pretty sure this is whats happening anyway, tho, it seems the # must always have been the same, tho I've sworn I've seen it change.

Edited by Sarcen
  • Developer

Hey @Sarcen and @Maris, regarding the autodownloading of the old version of the mod, we don't do this. The Steam Workshop unfortunately doesn't store older versions of the mods, so when a mod is updated, users won't be able to join a server running the old version. This is why I added the in-game warning to let servers know they are out of date, and made it super easy for them to get the update (they just need to reboot the dedicated server assuming they are using servermods.lua to install, or go into the mods screen).

 

That said, it is possible for some clients to join servers running old versions of a mod. This is mainly achieved by the local mod cache. When downloading a mod on joining a server, we cache that copy of the mod locally inside DoNotStarveTogether\cached_mods. When you join a server and don't have the required mod/version, we check the cached_mods folder first, if we can't find it there, we then look for it on the Workshop. It's also possible to join an out of date server if you yourself are out of date.

 

Hope this provides some illumination on how this functions. Long term, I'm investigating a better solution to this. Ideally the Workshop would store old versions for us, but we may end up writing our own system for hosting older versions of mods. This is a ways down the road though, and there's lots of other improvements to come first.

PeterA, thank You for your answer.

 

I think, best way is to divide the mod into two parts:
1) all_clients_require_mod = true. Updates very rarely. Keeps recipes, art etc.
2) all_clients_require_mod = false. Server side part. Contains all server logic for the mod. This part can be updated very often. It's not critical if server (without admin) is still using an older version, because all clients are able to play on the server. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...