Jump to content

Questions regarding mod management post QoL


Recommended Posts

So, QoL with its v2 mod support is here and after a few false starts, I can actually get the server running... although, I still can't actually get the mods to update.

I'm not familiar with other dedicated game servers, so this is pretty new to me:

Quote
  • Dedicated servers will now store v2 mods in <install_directory>/ugc_mods/<ClusterDirectory>/<ShardDirectory> (ClusterDirectory and ShardDirectory are the values defined via -cluster and -shard respectively) should you wish to change this, you can add the command line argument -ugc_directory <path to directory to store v2 mods>.
  • What happens to the old mod location (app_install_dir/.../mods)? Are the mods loaded from there too? Which location has precedence?
  • Which location do the dedicated server's update commands use to download/update the mod?

I've long preferred to split cluster execution from mod updates, which may take a long time. To achieve this, the dedicated server's binary was executed with these options (through various scripts):

# Start a master shard
./dontstarve_dedicated_server_nullrenderer -skip_update_server_mods -persistent_storage_root /Volumes/Shared -conf_dir DST clusters -cluster Cluster_DSTU_1 -shard Master 
# Update mods in gamedir:
./dontstarve_dedicated_server_nullrenderer -only_update_server_mods

I have noticed that the latter would produce logs as if it was running with -cluster Cluster_1 -shard Master options.

  • Will the intent of the 2nd command (update mods for all shards) be supported?
  • If not, will the split method still be viable?
  • And finally - now that steam is supposed to be able to download mods into the game, does this apply to dedicated server as well?

The commands for the last one do seem to be there, has anyone checked yet? Would prefer if collections were supported here too...

steamcmd +login anonymous +workshop_download_item <appid> <PublishedFileId> 

 

  • Developer
4 hours ago, myxal said:
  • What happens to the old mod location (app_install_dir/.../mods)? Are the mods loaded from there too? Which location has precedence?
  • Which location do the dedicated server's update commands use to download/update the mod?

That location would still be used for all local or v1(old api) mods.
Both locations are used.

4 hours ago, myxal said:
  • Will the intent of the 2nd command (update mods for all shards) be supported?
  • If not, will the split method still be viable?
  • And finally - now that steam is supposed to be able to download mods into the game, does this apply to dedicated server as well?

You can use

-only_update_server_mods -ugc_directory /some/dir

to download all mods to that directory, and then launch your servers with

-skip_update_server_mods -ugc_directory /some/dir

if you don't pre download the mods via something like -only_update_server_mods(steamcmd should work to, I think.), then the dedicated servers must download to separate directories, to prevent download corruption issues.

To answer your last question, steam only auto updates mods that you are subscribed to, so if using anonymous login to download the mods, it has no way of knowing what mods to update, as far as I'm aware, you should only rely on that for Don't Starve Together, not its dedicated server.

Well, after adding the ugc_directory option, clearing out the 322330 directory, and deleting the acf file, I'm at the dedicated server segfaulting, after initially reporting:

Spoiler

[00:00:00]: [Steam] SteamGameServer_Init(11000, 27018)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27019)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27020)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27021)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27022)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27023)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27024)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27025)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27026)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.
[00:00:00]: [Steam] SteamGameServer_Init(11000, 27027)
[S_API FAIL] SteamAPI_Init() failed; ipcserver GetSteamPath failed.
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Could not determine Steam client install directory.

 

Annoying, this is again missing from server_log.txt

server_log.txt

Update: Nuked the dedi-server install, Steam's userdata directory (so that steamcmd can create it from scratch), downloaded dedicated server via anonymous login.. No change.

What's left? Replacing brew's steamcmd with the web version?

Hmm, anyone familiar with Steam's architecture? I see that the ipcserver (which I'm guessing dedi-server is querying) on my system resides in the full-steam data directory, while steamcmd doesn't come with it. If dedi-server is trying to communicate with GUI-steam, of course that doesn't work.

Is steamcmd supposed to come with its own ipcserver?

For now, I'm just giving up on running the dedi-server from steamcmd. Unless someone can show me otherwise, I consider it broken (not necessarily on the Klei side). (The key issue being - how is DS supposed to detect the location of the steam libraries, without the IPC server running? If there are some default locations where DS searches do steamclient.dylib, which are those/where does it need to be?)

Spoiler

This might be nonsense (not a seasoned mac developer), but:

  • If the dlopen(steamclient.dylib) log is the actual call, ie there's no relative path, or a list of paths to try out, then the library is assumed to be in the working directory. Last time I checked, DS needed to be executed from within the directory with the executable. Has this changed?

So I switched to running it via the full-fat Steam client (with Steam running and logged in, and ipcserver active).

Spoiler
    1. 
      $ launchctl list com.valvesoftware.steam.ipctool
      {
      	"LimitLoadToSessionType" = "Background";
      	"MachServices" = {
      		"com.valvesoftware.steam.ipctool" = mach-port-object;
      	};
      	"Label" = "com.valvesoftware.steam.ipctool";
      	"TimeOut" = 30;
      	"OnDemand" = false;
      	"LastExitStatus" = 0;
      	"PID" = 32761;
      	"Program" = "/Volumes/Shared/AppData/Steam/Steam.AppBundle/Steam/Contents/MacOS/ipcserver";
      };

That gets me over the dylib hurdle:

Spoiler

[00:00:00]: [Steam] SteamGameServer_Init(11000, 27018)
dlopen failed trying to load:
steamclient.dylib
with error:
dlopen(steamclient.dylib, 2): image not found
[S_API] SteamAPI_Init(): Loaded '/Volumes/Shared/AppData/Steam/Steam.AppBundle/Steam/Contents/MacOS/steamclient.dylib' OK.  (First tried local 'steamclient.dylib')
CAppInfoCacheReadFromDiskThread took 8 milliseconds to initialize
CApplicationManagerPopulateThread took 157 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread)
RecordSteamInterfaceCreation (PID 32981): SteamGameServer013 / 
RecordSteamInterfaceCreation (PID 32981): SteamUtils010 / 
Setting breakpad minidump AppID = 322330
[00:00:01]: [Steam] SteamGameServer_Init success
RecordSteamInterfaceCreation (PID 32981): SteamGameServer013 / 
RecordSteamInterfaceCreation (PID 32981): STEAMUGC_INTERFACE_VERSION015 / 

With that, I'm adding pieces into modsetup:

  • 2 existing mods which the Steam account is subscribed to: download OK (with the inconsequential AssertionFailed)
  • an unlisted collection containing public mods: downloads OK
  • an obsolete collection (a superset of the previous one): of the 80 still-listed mods in that collection, DS downloads 59. (I haven't deleted mods from the previous 2 attempts)
    Spoiler

    It's not clear to me why some of the mods are not downloaded - it doesn't match up with subscription status (on the account logged into the steam client), isn't limited to IDs higher than int_max, the affected mods are not restricted (friends-only, hidden). (EDIT: I miscounted the mods, it's actually less than 63)

      

A lot of the mods are downloaded as ZIP files named <numbers>_legacy.bin, while newer mods are properly extracted in their folders under. I'm assuming this is intended?
290994509_Screenshot2021-03-20at11_42_29.thumb.png.0771402780a07844633358ab8f51d479.png

Continuing with the tinkering...

Mods missing from the 80-mod collection:

With the exception of 1 friends-only mod, all of those are public. I see no mention of these ID either in the server logs, or the workshop log

Server logs from the download session: server_log_2021-03-20-11-28-31.txtserver_log_2021-03-20-11-55-27.txt

Workshop log: workshop_log copy.txt

 

server_log_2021-03-20-11-15-20.txt server_log_2021-03-20-11-26-00.txt

Right, so after checking that all the mods used by my cluster are downloaded, the "ugc" ones (not present in the old mod directory) are not being loaded. After manually copying those mods into the old mod directory, server finally runs fine.

  • Developer
14 hours ago, myxal said:

Right, so after checking that all the mods used by my cluster are downloaded, the "ugc" ones (not present in the old mod directory) are not being loaded. After manually copying those mods into the old mod directory, server finally runs fine.

I'm curious, did the steam api not init on the actual server launch? that would be the only reason the ugc mods would be able to download, but not be able to load.

32 minutes ago, zarklord_klei said:

I'm curious, did the steam api not init on the actual server launch? that would be the only reason the ugc mods would be able to download, but not be able to load.

Not retesting, just reaching for a log in the backup folder: server_log_2021-03-20-20-44-18.txt Is this what you're looking for?

[00:00:00]: [Steam] SteamGameServer_Init(11000, 27018)
[00:00:00]: [Steam] SteamGameServer_Init success

The mod 758532... which caused the crash is Global pause - an "old-style" mod that depends on GEM core, which has been updated. That's what gave me a hint, and when I checked the list of mods reported by the lines modoverrides.lua enabling workshop-<...> I noticed all v2 mods I use in that cluster (4) are missing. I assume the v2 mods should also produce that output.

  • Developer
On 3/21/2021 at 10:31 AM, myxal said:

Not retesting, just reaching for a log in the backup folder: server_log_2021-03-20-20-44-18.txt Is this what you're looking for?


[00:00:00]: [Steam] SteamGameServer_Init(11000, 27018)
[00:00:00]: [Steam] SteamGameServer_Init success

The mod 758532... which caused the crash is Global pause - an "old-style" mod that depends on GEM core, which has been updated. That's what gave me a hint, and when I checked the list of mods reported by the lines modoverrides.lua enabling workshop-<...> I noticed all v2 mods I use in that cluster (4) are missing. I assume the v2 mods should also produce that output.

I think I figured out the issue, as it just occurred to me, the game is actually starting up so fast, that the steam log on sequence hasn't finished, and so it can't find the v2 mods, this should be rectified in the next hotfix.

Update as of build 457283:

  1. steamclient.dylib issue:
    • Mac build of DS ships without the library (I see that the Linux build does include it). I don't see how it can work in any way other than having the full steam client installed.
      Spoiler

      If you need to "uninstall" Steam to test this out, this is what I do to remove any traces of Steam being installed:

      1. Quit Steam
      2. Rename/delete ~/Library/Application Support/Steam
      3. Terminate ipcserver (reboot also works):
        
        $ launchctl stop com.valvesoftware.steam.ipctool
        $ launchctl bootout user/$(id -u)/com.valvesoftware.steam.ipctool

         

       

    • However, even after copying the library from steamcmd's download folder to DS' executable folder, the DS reports dlopen - image not found error. ¯\_(ツ)_/¯
  2. Downloading mods:
  3. Loading new mods:
    • v2 mods loading from ugc_directory: Yup, this is fixed

@zarklord_klei

Update as of build 458765:

  1. steamclient.dylib:
    • no change - dylib not included
  2. Downloading mods:
    • Updated collection seems OK. The usual Assertion failure is present:
      Spoiler
      
      [00:00:51]: FinishDownloadingServerMods Complete!
      src/tier1/fileio.cpp (4913) : Assertion Failed: s_bExit
      src/tier1/fileio.cpp (4913) : Assertion Failed: s_bExit
      src/tier1/fileio.cpp (4915) : Assertion Failed: m_vecRegisteredWriters.Count() == 0
      src/tier1/fileio.cpp (4915) : Assertion Failed: m_vecRegisteredWriters.Count() == 0
      Bad thread localsrc/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
      src/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
      Bad thread localBad thread localsrc/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
      src/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
      Bad thread localBad thread localsrc/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
      src/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited

       

       

    • obsolete collection: still incomplete - seems to get hung up on 49/86. Sometimes segfaults, but didn't get a crashlog this time. Observed warnings about unsupported file types: server_log-download-obsolete.txt

|

[00:00:51]: FinishDownloadingServerMods Complete!
src/tier1/fileio.cpp (4913) : Assertion Failed: s_bExit
src/tier1/fileio.cpp (4913) : Assertion Failed: s_bExit
src/tier1/fileio.cpp (4915) : Assertion Failed: m_vecRegisteredWriters.Count() == 0
src/tier1/fileio.cpp (4915) : Assertion Failed: m_vecRegisteredWriters.Count() == 0
Bad thread localsrc/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
src/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
Bad thread localBad thread localsrc/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
src/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
Bad thread localBad thread localsrc/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited
src/tier1/fileio.cpp (4975) : Assertion Failed: CFileWriterThread already exited

I don't think this is a Linux/OSX only issue.

I'm also getting this error trying to run dontstarve_dedicated_server_nullrenderer -persistent_storage_root C:\dst_server\dst -ugc_directory C:\dst_server\ugc_mods -only_update_server_mods

I'm getting this on Windows though, after moving all my server config from OSX+docker.  Mods do not load.

[00:00:00]: Don't Starve Together: 458972 WIN32
[00:00:00]: Build Date: 6226

Seriously, this is making it very hard to locate where my mods are stored so I can check the config file options. How do I set it up so it works in finding all the mods. Most aren't even downloading to a place I know of in either my dedicated server or client.

Please provide help soon, if you know a solution!

Please help inform myself how to setup, enable and configure mods in the updated method(s)!

If able to help, that would be wonderful.

 

Status Update:

Client;

- Haven't found the files.

* Enabling/configuring mods are done automatically unlike dedicated server.

Dedicated Server;

- Have found the files.

- Haven't been able to enable/configure these mods.

@neahxx Re: everything else: Log file(s) pls.

9 hours ago, neahxx said:

Client;

- Haven't found the files

Start at the root of the Steam Library folder where your game is installed - the client. Then navigate under steamapps/workshop/content/322330 - in here, you'll find folders for both old and new mods (the number matches workshop ID) - new mods will have their data here and used directly by the game. Old mods will have just a "<very long number>_legacy.bin" file in their folder, and this is a zip that will get extracted into the usual mods folder in the game's directory (the one with binaries, scripts, databundles, etc.)

On 3/20/2021 at 7:12 PM, myxal said:

Right, so after checking that all the mods used by my cluster are downloaded, the "ugc" ones (not present in the old mod directory) are not being loaded. After manually copying those mods into the old mod directory, server finally runs fine.

Did you ever figure out how to get the dedicated server to run ugc / V2 mods without having the folders in the old V1 mod locations?

Because if you have a ugc / V2 mod, and you run the DST client on the same PC as the dedicated server, the DST client's auto mod updater will constantly delete the V1 folder locations when it "updates" the V2 mods. This will cause the dedicated server to crash because even though the V2 mod exists in the dedicated server's ugc directory, the server looks in the V1 path instead, which doesn't exist anymore. So when a client does something that triggers the server-side mod, for example, when entering the Caves server, the Caves server will crash because it's trying to index mod files that don't exist anymore due to DST client deleting the V1 folders due to auto mod "updating". The DST client also forces mod "updates" on every client launch, as well as on disconnect from a server.

So you end up not being able to run V1 + V2 mods together on a dedicated server (for instance, Global Positions [V1] mod + your own custom server-side mod that was forced to become V2 because you updated it recently).

I've tried searching all over for how to get V1 + V2 mods to work together on a dedicated server, but it seems not many people have gone in depth to figure out / explain how to actually get things working. Or at least if they did, they haven't documented much (or it's outdated and doesn't apply to the ugc mod update).

8 hours ago, null value said:

Did you ever figure out how to get the dedicated server to run ugc / V2 mods without having the folders in the old V1 mod locations?

Uhh, yes? As I wrote a week later:

On 3/28/2021 at 12:33 PM, myxal said:

Loading new mods:

  • v2 mods loading from ugc_directory: Yup, this is fixed

 

 

8 hours ago, null value said:

Because if you have a ugc / V2 mod, and you run the DST client on the same PC as the dedicated server, the DST client's auto mod updater will constantly delete the V1 folder locations when it "updates" the V2 mods.

First - at the time, this wasn't my use case and I ran the dedicated server on a separate host. I had been running setup like yours (client and server on the same host) for some time (a month or two, I guess) and never had an issue like you're describing. (I have since stopped because the PC is too much of a potato to handle it).

Second - I will point out, I had been using explicitly configured ugc directory from the very beginning - I haven't used Klei's scripts in ages, so didn't think much about editing my own script to handle the updated server app.

I set ugc directory to "../ugc_mods" - AFAIK the server binary still needs to be executed from within the bin directory, so the relative path ends up pointing to a directory adjacent to the old mods directory. This is not shared with the client, so the conflict you describe shouldn't arise.

Third - as you can guess, steam has no knowledge of this ugc_mods directory, and updating therefore must be done using the dedicated server's own procedures (same as with old mods).

The one issue I keep seeing even recently was lack of connectivity to steam, for various reasons, which disables the v2 mods on launch entirely. I always got that fixed by resolving the network issue.

 I eventually figured out a way to get dedicated server + client to work on the same PC (overall it works pretty well if the PC has good specs), but I basically had to create directory junctions (basically folder shortcuts) between the mod folders for client-side and server-side.

I had been using explicit -ugc_directory "../somefoldername" as well, but it doesn't actually work properly for 2 main reasons:

1) Using -only_update_server_mods -ugc_directory "../somefoldername" can download my custom V2 mod to the ugc folder, but it cannot download Global Positions (ID 378160973), which is a popular V1 mod that hasn't been updated by the dev author. So Global Positions mod only works if it's installed in the older V1 directory (in ./mods).

I haven't been able to figure out a way for steamcmd to download / update the mods instead, since the dedicated_server_mods_setup.lua method doesn't actually work for all mods.

2) The dedicated server doesn't actually properly load V2 mods at all, even though they are installed and in the correct ugc location.

9 hours ago, myxal said:

The one issue I keep seeing even recently was lack of connectivity to steam, for various reasons, which disables the v2 mods on launch entirely. I always got that fixed by resolving the network issue.

Maybe that's what causes my V2 mods to not load at all. Can you clarify that further and how you fixed that?

 

As for me, my old setup consisted of client + dedicated server using the dontstarve_dedicated_server_nullrenderer.exe from the DST client's Steam installation. This method actually still works well if you are only running V1 server mods, but it won't work with V2 mods because your DST client will overwrite / delete the V1 folders for V2 mods.

However, you can use steamcmd to download the DST dedicated server (takes an extra ~2.6GB though), so that the server will be installed in a separate directory than the DST client, that way the DST client's auto mod updater cannot overwrite / delete the V1 mod folders for the dedicated server.

Then you can setup directory junctions using "mklink /J" between the DST client's mods (both V1 and V2/ugc mod folders) and the dedicated server's mod paths. This way, you can use the DST client's auto mod updater to keep the dedicated server's mods updated. This at least seems to work much more reliably than trying to update mods through the dedicated server exe or steamcmd.

11 hours ago, null value said:

1) Using -only_update_server_mods -ugc_directory "../somefoldername" can download my custom V2 mod to the ugc folder, but it cannot download Global Positions (ID 378160973), which is a popular V1 mod that hasn't been updated by the dev author. So Global Positions mod only works if it's installed in the older V1 directory (in ./mods).

When this QoL launched, I took a closer look at the full game's nullrenderer executables and found that they actually aren't the same (by md5sum), between the full game package and the dedicated server package.

The "downloading v1 mods with nullrenderer exe" is something that definitely worked for me after the first few patches to this QoL landed, although I will point out:

  • I don't recall ever using the full game package's executable for this, always used the dedicated server package.
  • I use a mod collection, never individual mods. And I do have one collection that fails to download some mods for unknown reasons.
  • If this affects only v1 mods, then by definition any subsequent breakage would go unnoticed by me, after I got the setup working and stopped downloading mods to a clean installation.
  • There was a longer-lived issue where the dedicated server didn't work without the full steam client running (ie. with just steamcmd), which I gave up on tracking. Shouldn't be an issue if you're running the same host, just skip steamcmd entirely and only launch the server after lauching steam.
11 hours ago, null value said:

Maybe that's what causes my V2 mods to not load at all.

Do you see the error in the server logs? (Can't remember the exact wording, something about 'workshop functionality'.)

11 hours ago, null value said:

Can you clarify that further and how you fixed that?

The networking issues were completely external to DST and span a wide range of tech - firewall settings, port forwarding, systemd-resolved bugs, routing mishaps. I'm not sure how the windows builds of DST work - on Linux/Mac, they use libcurl, so whenever I was in doubt about network connectivity, I'd start by trying curl with login.kleientertainment.com and steamcommunity.com, and proceed according to errors reported.

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...