Tool StarFix your time saver in space!

Discussion in 'Starbound Modding' started by Apple Teawalker, Sep 1, 2016.

Tags:
  1. Apple Teawalker

    Apple Teawalker Scruffy Nerf-Herder

    Hello Internet!

    Recently I decided to launch a server to play with some friends, and found out that launching a moded Starbound server through steam workshop is very tedious! So, armed with my knowledge of 1 course in IT university(going for my second one, this October) I decided to write a small app in java to ease this process ;P
    So here it is, the StarFix!(More like, workshop fixer. Name tbd, he-he).

    Instructions:
    1)Download through attachment or on github.
    2)Run .jar file and enjoy. You should have java installed on your pc. Cross-platform.
    3)Apply mods - grabs your mods in workshop and automatically adds right lines to the sbinit.config.
    4)Revert changes - reverts all mods you have installed.
    5)Checkboxes and Start Server/Play - self explanatory.
    6)Reset mods - Careful! This will rollback your sbinit.config to it's base state.
    7)Sever Editor - doesn't work... yet. In future, it will give you graphical interface, to manage your server settings.

    Github Link - https://github.com/Teawalker/StarFixer

    If anyone got any useful tips about my code(or even, if I uploaded correctly to github), they will be greatly appreciated.
    If you have any idea, how I can improve this simple tool, If it is at all possible for me, and idea sounds great(sure it will!), it will also be greatly appreciated!

    Sorry for any possible English mistakes ;).
     

    Attached Files:

  2. Ledhead

    Ledhead Phantasmal Quasar

    Which method did you use to get the sbinit to load the assets? If I stick my neck out and say you made a script to grab the sub-dir and each sub-dir found in the workshop content path as a new line in the sbinit, because I did this same trick once and its pretty much common knowledge now that the server will NOT load pak from sub folders of a folder.
    You can get my findings here http://steamcommunity.com/sharedfiles/filedetails/?id=735510285 on my steam guide for linking workshops mods for dedicated server use.

    I am about to post the tool here aswell which is my own script I made (don't ask me why I bothered to include a copy script for method two, some people still thinks its logical to make direct copies of the content.pak files rather than mklink them. I do however want to have a look at your script if that is okay with you man. Also if you need translation work done let me know :)
     
  3. Apple Teawalker

    Apple Teawalker Scruffy Nerf-Herder

    But sbinit does load mods this way. Or at least, maybe I don't understand what you mean. Basically, I find /workshop/whatever/starbound_steam_id folder, get all the folders there, and add them to sbinit.config in the right place. It does work for me, and my friends, at the very least.
    Found the basic guide on steam, and it is, more or less, your third(deprecated version). Can you emphasize please, what exactly is the problem with this method?

    And about looking at my script, please do. But you won't find very much there. The main idea of this script was written on the fly in about 5 minutes. Everything else, is to make sure it works as smooth as possible.

    Also, maybe anyone knows, how to get steam home folder on unix systems? On win systems, I just grab it from registry. Never really played with unix for too long, although, I probably should.
     
  4. Ledhead

    Ledhead Phantasmal Quasar

    Method 3 was depreciated after realising that sbinit.config won't load mods in workshop directory sub tree. As in if you just use the workshop content dir as a single line it will not read the mods within the sub folders but it will find the paths.

    I knew adding each individual folder on a new line within the workshop content dir would work but I depreciated the theory as it was an ineffective method to maintain the mod paths.

    Too many things will wipe the sbinit.config for instance if you verify Starbound on steam or they push a new version with sbint changes or replace the file completely as they did from beta to current version (sbint used to be called sboot) you loose the added paths, a tool does help with this though to aid re patching. I guess it's a matter of opinion on who preffers which method of doing things and personally I tried all the common methods except for the insane task of unpacking the pak files.

    I found the only good way to maintain the workshop mods was symbolic because these are the easiest way to do it without any issue or file editing and every OS has native support for internally linking files this way. But I digress each to his or her own.

    I only wanted to look at it to see if you added each folder individually or just the top tree (Starbound workshop id) as I know that didn't work, the server shows the paths loading but the actual pak files don't initiate.

    However it appears you add each folder individually on a new line which will work just fine, just wasn't something I was going to recommend to others a bit tedious when the alternative is to run a simple shell command on the entire lot which is what my script does you can give it a try if you like.

    To re cap I don't see any wrong with your method it's still a valid way of doing it I was just curious as to if you added all the folders or just the main folder, and I just wanted to say if you needed English translation I could fix it for you.
     
    Last edited: Sep 2, 2016
  5. Apple Teawalker

    Apple Teawalker Scruffy Nerf-Herder

    Ah, ok, so I see, how it goes. Okay then, you gave me some thoughts to think about, thanks ;)
    And about English translation, your help will be really appreciated. I actually wrote this in my last post, but I guess something went wrong(?!). Oh well.

    On topic of "insane task of unpacking the pack files". Was actually, something I was thinking about, but man, I pity the poor soul who will decide to run such a method on some 200+ mods mopack, heh. At least that what I am thinking. Never actually packed or unpacked a mod in Starbound. How much time will it take in your opinion, to convert some modpack monstrosity? I'd really wanted to go further in allowing the user more freedom and stability in his server mods, but unless I can somehow grab modnames and version numbers from workshop without unpacking, It will be quite tedious, if not outright impossible.

    Anyway, thank you for your thorough explanation on this matter.
     
  6. lazarus78

    lazarus78 The Waste of Time

    The real "IT" response to this situation would be to just copy the mods over to the proper folder and not have to deal with the directory issue.
     
  7. Ledhead

    Ledhead Phantasmal Quasar

    Not true, most hosts and departments have storage budgets for users.

    The real solution would be too hard link the sub trees to the mods dir as I said above as this maintains program and file transparency aswell as the directory structure. However I cover your solution aswell in my tool SWEL also available on these forums.

    The problem with straight copying is each one is called content.pak and you would override every mod you copy if you didn't rename each one on top of that you would be responsible for maintaining the coherency of the mod names so you knew which pak file was which mod without running the server or looking at the log to see the real name of the content.pak this is a tedious without scripts. But you knew that ;)

    Either way I opted to include both choices in my batch script tool I'll work in a tool for Linux shortly aswell, at least hard links are easier with Linux thanks to a recursive path lookup command which lacks in Win environments.
     
  8. lazarus78

    lazarus78 The Waste of Time

    An IT isn't dealing with the same user restrictions. The solution is whatever is easiest and does the job. Chucklefish's handling of workshop integration is quite terrible. It should download the mod directly to the mods folder in the first place. No other application is using the mods, so it doesn't make sense to put them somewhere outside of the game folder.

    I wasn't aware that the workshop uses all the same "content.pak" name, as I don't care for the workshop crap, which in itself is another terrible decision by Chucklefish.
     
  9. Ledhead

    Ledhead Phantasmal Quasar

    Not necessarily true again, I actually have been in and out of environments in the government sector as well as civilian, and hosting industry. The only ones were storage isn't taken into the equation is civilian offices most small businesses.

    Both Government and Enterprise have stricter leashes on what is allocated to what and you can just go putting things anywhere you like. . That being said, the only people who would be trying to find solution's here are hosting companies so in that circumstance storage isn't an issue however most clients are given between around 5gig-30gig, high value customers usually operate without restrictions and we monitor them separately. You guessed it I also spent time for them too.

    The biggest problem here is due to the implementation as you said even with client management back ends such as TCAdmin which is the main one in use by majority of game hosting clusters it's fiddly to give users a workshop path per Starbound install as we usually only have a master copy which is used to set up individual user copies.

    So majority of these people are going to use the mods folder and not workshop.

    I agree with some of your points yes it could have done more efficiently but we make do with what we have and dedicated servers are optional for a reason..
     

Share This Page