Jump to content
XerShade's Corner

Search the Community

Showing results for tags 'mod'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Announcements
    • Community Updates
  • Gaming
    • Elder Scrolls Online
  • Coding
    • Scripts

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 1 result

  1. So one of the more annoying things I ran into while maintaining a Starbound server for a friend was every time we added or removed mods I would have to manually add and remove symlinks or files because of how the steam workshop works. So eventually I decided, why am I manually doing this when I can write a script, then simply upload the files to the server and then run the script. The result is a nice little script that you just tell it where the mods folder is and it will link the workshop mods to the mods folder. The script is below: FIRSTDIR=$PWD MODSFOLDER=${1:-serverfiles/mods/} echo "Attempting to switch to mods folder..." cd "$MODSFOLDER" || { echo 'Unable to find folder $MODSFOLDER, aborting...' ; e$ echo "Removing old links..." rm *.pak echo "Creating mod links..." for d in */ ; do MODFILE=$(find $d -type f -name "*.pak") echo "Created link for mod $MODFILE as ${d//'/'/.pak}..." ln -s "$MODFILE" "${d//'/'/.pak}" done echo "All mods have been successfully linked..." cd $FIRSTDIR To run the script simple save it in a .sh file of your choice, I personally call it linkmods.sh then run the following command chmod +x scriptname.sh. Once this is done all you need to do is run the script like so ./scriptname.sh {PathToModsFolder} the path to the mods folder is optional and will use a default value if no path is provided manually. The script is designed to work with the lgsm scripts out of the box by simply playing it in the same folder as the sbserver script, though you can manually tell the script where the folder actually is by passing the path as the first argument. After you tell it where the mods are located, simply upload the workshop content folders from your PC to the server then run the script. It will automatically delete any .pak files in the root folder, then go through each of the folders provided by the steam workshop and link any .pak files that it finds in those folders to the main folder. At the moment it is currently limited to one .pak file per folder, but I have yet to find any mods that have more then one .pak file so I haven't had the need to implement something to handle mods that have multiple .pak files, but for now one work around is to manually split the mod files into different folders, but again I will most likely add multiple .pak file support in the future. Disclaimer: This script is provided as is and I am not responsible for any mishaps or damage it may cause. I have tested this and use it on my friends live server with no issues, however if you discover an issue please let me know so I can look into patching it ASAP. Also I will NOT be adding support to automatically download the files from the steam workshop any time soon, as that would involve at the very least playing with the steam api, which I currently don't have the time or intention to learn right now as I have other projects on the go.
  • Create New...