Starbound

Starbound

View Stats:
Mo¡stDreams 26 Jul, 2016 @ 4:07pm
[Guide ] Getting Workshop Mods working on Dedicated Servers (Updated)
I see a lot of you are stuck on how to properly set and forget installing new mods into your servers and keep them updated as Starbound does not look for mods which have been downloaded by Workshop when running the server!

THIS GUIDE HAS BEEN CONVERTED TOO A PROPER Steam Guide. PLEASE SEE THE NEW GUIDE FOR UPDATES I WILL NOT BE RESPONDING HERE!

Below is the recommended method taken from the new guide linked above and is left here as an outdated but still usable resource







Method One - Symbolic Linking
Recommended for the majority of you!
You can do this with any Operating System
This method can be time consuming!


Firstly - What is a Symbolic Link?
Symbolic links, otherwise known as symlinks, are basically advanced shortcuts. You can create symbolic links to individual files or folders, and then these will appear like they are stored in the folder with the symbolic link even though the symbolic link only points to their real location.

Why Use This Method?
TLDR
This methods allows you to create a shortcut to a file just like you would have a shortcut on your desktop and everything works without copying or unpacking anything Click here and see for yourself, that everything loads![pastebin.com]

Long-Answer
Glad you asked! Starbound does NOT look inside sub directories and load the package files within, what this means is you cannot just add a new path to the workshop dir to search for mods, you will have to copy or move them manually each time they update which sucks!

It sounds more complex but it is a rather simple process and allows you to simply drag and drop a shortcut of the workshop file you want into the servers mod directory and forget about it your job as an admin is done. It works because we no longer require Starbound's code too find files we are using the Operating Systems ability to create a link directly to a file on one or more of your drives accessable from any location on another drive.


Instructions Part 1
  1. Download and Install Link Shell Extension[schinagl.priv.at]
    This provides a GUI for the command line process to create the shortcuts the other benifit of this program over doing it manually is that it has intergrated syslinking over mapped network drives and SMB shares, read the notes section below if you preffer to do this via command-line.

  2. Find and Open "SteamInstallPath"\SteamApps\workshop\content\211820
    All Workshop mods for Starbound exist in this workshop content folder by default!
    Location above may be different for you!


  3. Find and Open "SteamInstallPath"\SteamApps\common\Starbound\mods
    Locations above may be different for you!
    "SteamInstallPath"[/i] is where you have Steam installed. By default it should be "C:\Program Files (x86)\Steam\"

    You should now have BOTH of these open in a seperate window!


    Instructions Part 2



    Notes:
    • Please make sure you install the correct version of the program for your operating system.
    • If you rather script the process than use the above program learn about that here![www.howtogeek.com]
Last edited by Mo¡stDreams; 18 Aug, 2016 @ 5:19am
< >
Showing 1-15 of 22 comments
Sheycara 29 Jul, 2016 @ 8:57pm 
i have a question about method one, i saw on another thread that you said there were problems if you joined the game on the same pc? if i read that right. my question is, would it be possible to write a batch file that will first copy the folder that steam puts the mods in and then make it run the server so you basicly update your mods every time you start up the server and have the server pull the mods from that folder instead? would that maybe fix the conflic issue of the server and client working out of the same folder?
Mo¡stDreams 29 Jul, 2016 @ 9:37pm 
Originally posted by PJB:
i have a question about method one, i saw on another thread that you said there were problems if you joined the game on the same pc? if i read that right. my question is, would it be possible to write a batch file that will first copy the folder that steam puts the mods in and then make it run the server so you basicly update your mods every time you start up the server and have the server pull the mods from that folder instead? would that maybe fix the conflic issue of the server and client working out of the same folder?
Yes that is an issue which can be resolved by any sort of automated method to copy the workshop sub-directory's where workshop downloads the mods into your servers mods folder :).

There was a potential fix for this I was exploring but since have not have time to test where by running the server standalone and by that I mean making a copy of starbound and placing that somewhere else for and configuring it solely for server use, then method one may not conflict with the install you are playing the game with.

(I don't have much hope though as assets loaded and in use seem to be the issue)

However I did see some benift form method ones flaw that being any previous characters you have created prior to starting the dedicated server executable are not phsyically delted or broken! they are simply hidden from the character menu while the server is running, viewing the logs shows that the assets from mods where in use which were not being found... ironicly probably because of what I said above.

That said it MAY be possible to use this to your advantage by using the now FREE character slot\slot's to make fresh charcaters for use on your presistant universe server (dedicated server) then when you close the dedicated server executable those should techincally now be hidden and your previous ones restored as that is what happend on my system can you confirm it?



Note
I am pondering about adding a Method Three! Starbound Dedicated Server does NOT actually require steam to function and since Steam allows you to login on more than one device simutaniously one could come to the decision that all this path linking and work arounds are pointless :)... If one is to host it dedicated on a seperate machine, you can actually install Steam on your Server Machine! and copy your existing starbound over to the new steam install and verify it. (it will find the exsting files and not download anything but I bet you knew that already)

Then create a workshop collection if you not already done so which contains all the stuff you need on the server bare in mind just about every single UI mod or visual mod is client sided ;) your now second steam login will download and update those and starbound for you! best part is will be completely seperate to your gaming machines install of starbound and workshop no more conflicts will happen.

Last edited by Mo¡stDreams; 29 Jul, 2016 @ 9:37pm
Sheycara 30 Jul, 2016 @ 5:58am 
I could give method one a try with creating a char while already running the server but thechar i'm using atm is already completed the game and i'm trying to use it with a friend so it wouldn't be a solution for this moment but perhaps in the future if we restart again, as for method 3, thats a good option too as it not only gets rid of the conflict but also for people with weaker pc's have less power drain from there pc (which is no issue to my pc), however, I don't know of many people that actually own a second pc to run it from. I myself have an old laptop i sometimes use for servers but since it is old it is unreliable and it likes to restart randomly while people are playing.

So for now i will try and see if i can get the copy and run bat file to work
Mo¡stDreams 30 Jul, 2016 @ 8:01am 
Whatever works haha I use my laptop to host usually but yea I don't have a problem hosting two or three servers on my rig either :). I'll figure something out I'm a coder aswell a d system administrator for hosting companies which I'll leave unnamed.
Sheycara 30 Jul, 2016 @ 8:51am 
i just used the most simple method ever to fix my problem xD
del /q "C:\Steam\steamapps\workshop\content\211820_server" xcopy /y "C:\Steam\steamapps\workshop\content\211820" "C:\Steam\steamapps\workshop\content\211820_server" start starbound_server.exe
Sheycara 30 Jul, 2016 @ 3:08pm 
oke i seam to have a problem which i can't find out if it is the mods or the method i'm using but when anyone in the server places any of the modded items the player crashes, even me myself. if i run the server it does say that it loads the mods like shown in your example but when crafting a modded item i get an error saying the item doesn't exist but it does craft it and when placing the player just compleetly crashes with a bunch of gibberish as en error.
any ideas?

[Error] Could not instantiate item '[okeashopmini, 1, {}]'. (ItemException) No such item 'okeashopmini'
^it gives that error with all modded items, not just that one, just as an example
Last edited by Sheycara; 30 Jul, 2016 @ 3:43pm
Sheycara 30 Jul, 2016 @ 4:02pm 
oke so i did some searching around and found a post on the starbound forum that had a good point, is it true that the server does not seach in subdirectories? because the server sais it loads the files and the assets in the files, but not the .pak files that are in there. so now the question is, is it possible to force the server to read subdirectories? i'm not to femiliar with the code used for this so i don;t know if just slapping a * at the end will have any effect
Sheycara 30 Jul, 2016 @ 5:23pm 
oke so here is my updated batch file
del /q "C:\Steam\steamapps\workshop\content\211820server" for /r C:\Steam\steamapps\workshop\content\211820\ %%f in (*.pak) do ( copy "%%f" C:\Steam\steamapps\workshop\content\211820server\contents_%%~zf.pak ) start C:\Steam\steamapps\common\Starbound\win64\starbound_server.exe

so what i did was trying to figure out how to copy just the content of the folders and not the folders themself

ones i found that i had to problem that all files are called contents.pak and it would just overwrite eachother, so i had to rename them

not being the best at batch files i went searching for a way to rename them to contents_(original subfolder name)

however being a noob at batch i couldn't figure that out, so my solution.... just use the nearest damned solution i could come up with

then i found out i could print the file size behind it instead
this seemed to me the most reliable way to do it since i highly doubt (thought it is posible) that you ever run in to 2 mods that are the exact same size up to the byte

so yea, thats my solution for now, feel free to clean up my mess xD
Mo¡stDreams 30 Jul, 2016 @ 8:19pm 
You have some valid points, I am aware that the pak files may not be read but too say it doesn't read subdirectories is wrong because clearly it does but it doesn't always load the files within I didn't test method 1 out all that long I just noticed that creating a new character fixed the crashes. Honestly there are better methods to get workshop mods synced but utilities are better off used. I for the life of me don't know why the intergration of dedicated workshop mounting wasn't added at same time as workshop publishing but it can't be helped now soo he we are.

However if I was going to resort too a script to copy and rename I'd use a PowerShell script for the extra flexibility.

The good thing is you can create a service out of the PowerShell script and have it run when the date changes on a file. I'm not sure exactly from memory too explain how but I do know that the PowerShell shell is tightly tied into Windows where just about any variable will work.

Though if you want something more reliable which you can also use over the network I suggest this http://www.cobiansoft.com/cobianbackup.htm

Sure it's not a "2016" program but you will not be disappointed! It can do file lookup and rename so for what you want to do it can. You can rename a file on destination path and prefix or affix filenames aswell including sequencing same name files if you rather.

As stated it can do differential copies so only runs when schedule detects a change in the file and it can run over ftp and local network storage ;), it's FREE did I say FREE haha.
Last edited by Mo¡stDreams; 30 Jul, 2016 @ 8:26pm
Mo¡stDreams 30 Jul, 2016 @ 8:37pm 
Just a thought but a symbolic link might fix this subdirectory issue.
Sheycara 31 Jul, 2016 @ 5:09am 
are you sure about the subfolder detection? because when i run the server with the mods in the subfolders i get something allong the lines of
unnamed asset detected at ..\..\..\workshop\content\211820server\(and then the number) loading assets from: '..\..\..\workshop\content\211820server\\(that number again)'
and then when trying to craft an item from a mod in the game it sais that error i mentioned way above

but when i make it load the pak files instead of the folders like i did i get this
Detected asset source named 'Improved Food Descriptions' at '..\..\..\workshop\content\211820server\\contents_107701.pak' Loading assets from: '..\..\..\workshop\content\211820server\\contents_264036.pak'

and that time it does work, i can craft the items fine and place them and everything works fine
Mo¡stDreams 31 Jul, 2016 @ 11:39pm 
UPDATED!
Complete Re-Write of the 1st post, and added a new method which 100% works every time when used properly.

Steam Guide Coming Soon
Dolphin 3 Aug, 2016 @ 10:25pm 
This works because we are no longer relying on Starbounds ability to look inside folders instead we are creating a hard link* too the content within the workshop folder and instead let the OS (operating system) handle the file lookup process!

My only problem with this myself initially was "what if the workshop updates files while the server is running?"

Perhaps you know the answer. Does it work fine? Do you get errors? Are the files write-locked while the server is loaded?

Personally I don't think they're locked and they're also not loaded in once at the start and that's that -- I deleted the mod folder while the server was running at one point and immediately started getting errors out of the wazoo.
Last edited by Dolphin; 3 Aug, 2016 @ 11:11pm
Kranot 4 Aug, 2016 @ 7:05am 
(commenting for my mod project)
Mo¡stDreams 4 Aug, 2016 @ 9:51am 
Originally posted by g1real:
This works because we are no longer relying on Starbounds ability to look inside folders instead we are creating a hard link* too the content within the workshop folder and instead let the OS (operating system) handle the file lookup process!

My only problem with this myself initially was "what if the workshop updates files while the server is running?"

Perhaps you know the answer. Does it work fine? Do you get errors? Are the files write-locked while the server is loaded?

Personally I don't think they're locked and they're also not loaded in once at the start and that's that -- I deleted the mod folder while the server was running at one point and immediately started getting errors out of the wazoo.
Personally I haven't tested a live server with updates but a scheduled restart of dedicated servers would fix any such issues, it's a good idea to restart once every day anyway.

I run mine locally for a persistent shared universe for lan play and I usually let it update before I start it.

However for more serious hosting you would have thr query and remote connect enabled for a console so you would just have a moderator restart it.
Last edited by Mo¡stDreams; 18 Aug, 2016 @ 5:11am
< >
Showing 1-15 of 22 comments
Per page: 1530 50

Date Posted: 26 Jul, 2016 @ 4:07pm
Posts: 22