Auto Start Script for SPT 2.0.1

A program nobody actually quite needs, this script starts the 'Aki.Server.exe' and 'Aki.Launcher.exe' programs automatically, along with the ability to safely create a shortcut to SPT, so you can start it like any other game.

...If you're still here reading this, then you're lazy. Not as lazy as me though, considering I sat down and wrote nearly 900 lines of code in a new language I knew nothing about just to save me a handful of clicks.


Hopefully, I can save you some clicks too.


NEWEST UPDATE CHANGELOG:

  • Removed manual startup timers in favor of automatic server detection. (This checks the default IP address and port for activity, custom addresses are unsupported for now.)
  • Streamlined the startup process, with shorter unnecessary delays and overall much less time wasted getting into your game.
  • Added detection for already-running instances of the server/launcher, along with the ability to close them and start fresh.
    • This does not happen entirely without user input, a "Would you like to proceed?" prompt exists as a safeguard against misclicks and interrupted raids.
  • Cut down on most user input - no more finding your SPT install directory or entering timer values yourself. After your first run, the script runs entirely by itself.
  • Added desktop shortcut creation, with both light and dark versions for visibility on all desktops.
  • Cleaned up variable file formatting, It's now much easier and simpler to edit your own settings.
  • Use of temporary scripts/files to keep your install and mod folders clean.

INSTALL:

Place in "... /user/mods" and run "start.bat" to start the setup process. See below:



NOTE:

This is a very early release, and there's lots of polishing to be done. The program may not be as user-friendly as intended, despite my best efforts. Please don't be afraid to leave comments if something goes wrong, I need help. bugcatworking

Special thanks and Lots of love to Nichoasflak (or MoreWinters5760) for helping me debug and get this out to y'all. Your help means a lot. :)

  • Version 2.0.1

    CHANGELOG:

    • Fixed rare startup issues where the task would detect the server as running after its been closed.
      • Waits for activity from the old server to cease after stopping task.
    • New code to be read by the server to log that the mod has been detected and do away with mod.js errors (a.k.a. a message in the console).
      • Credit to Jehree in the comment section for the suggestion. <33
    • Code and console format changes.
    • Code and startup sped up significantly.
    • Added a window flash once all tasks have been completed (will add option to turn off soon).
    • Added support for custom server ports/ip addresses.
      • New user input question where you can enter your custom port or choose the default one on first startup.

    THIS RELEASE HAS NOT BEEN THOROUGHLY TESTED, NEW PATCHES SOON.

  • Version 2.0.0

    Complete overhaul of the main script.


    Removed manual startup times in favor of automatic server detection and task checking, the option to close preexisting instances of the server/launcher, removed most user prompts, added the option to create desktop shortcuts, added multiple color schemes for the desktop shortcut, trimmed unnecessary delays in the script, and much more.


    Overall should be a much better experience, with less bugs in general.

  • Version 1.0.1

    First working release of the program.

    Known bugs:
    The `fastMode` and `firstRunComplete` variables are not updated and saved when the script finishes.

  • I really wish they would stop screwing with the launcher formats. It's a pain to get my launcher script to start the server and client in one shortcut. Now my custom script won't work period.

    • I'm honestly not sure what you're talking about here... is there something I did wrong with the script? Are you just raving against bsg? spt?

  • I haven't tested this yet, but is this working with 3.6.1?

    Or what steps would need to be taken to make this work?


    Playing from steamdeck, this would make things so much easier and I could potentially actually play from game mode.

    • While I haven't tested it, I doubt it's working for the new versions of SPT. I'm gonna be rewriting the script soon-ish here now that I'm getting some free time again, but it's originally written in windows batch script which means I seriously doubt it'll work on steamdeck os unless you sideloaded windows onto it.

  • Hey everyone,


    I know it was months ago when I gave the last update that the new release would be out soon, but life came up for both me and Saru. That said, the program has been re-written and has had massive improvements on functionality, speed, and reduced PC strain for the program itself. Be on the lookout as we should have it out soon, for real this time.

  • New version is mostly ready, we are working to make the final tweaks on it. Just wanted to give an update to anyone reading.

    Heart 1 Thumbs Up 1
  • :thumbup:

    Heart 1
  • "Mod SaruShinobie-StartScript-v.2.0.0 package.json main property must be a .js file"


    I assume this is a false flag. Is that correct?


    yuFFgT6.png

    Heart 1
    • Yes, that can be ignored. The mod isn't actually a mod per se, it just sits in the game directory. I included a package.json file as a formality (if you wanna call it that?), but it doesn't actually interact with the server or launcher in any way. The error you're seeing is the server trying to read the content of the folder and failing because it isn't actually meant to be read. If I find a way to mark the folder to be ignored in the future and do away with the error, I will. animeokay

    • You could make a tiny mod that just logs to the console that your program is sitting in the mods folder :)

    • That's a good idea, though I don't have any real experience with actually modding SPT. Definitely worth looking into once I get the next patch out. Thanks for the suggestion. <33

  • Love the effort you put in. Happy to help anytime

    Heart 1
  • QUICK UPDATE: The new update for the script is taking much longer than expected to push out. As is expected with code, you add a new feature, others break. I'm stuck in an endless loop of replacing old code and debugging and so far I'm making a lot less progress than I'd hoped. kananotimpressed

    For now, just hang with me. Hang in there, and I'll have the newest version of the script out in no more than a couple days.

    I also want to mention that I've just recently (about an hour ago) been made aware of the fact that there's already a script to do the exact same thing as mine. I just want to clear the record now and let everyone following this project know that I developed this script entirely independently of any other options available on the workshop.
    This is not a copy, and I do not intend to turn it into a copy.

    tl;dr - Update is taking a long time. Please be patient.

    Thumbs Up 1
  • not all heroes wear capes....unless you do wear one...... you should totally wear a cape

    Heart 1
  • Well made script

    Heart 1
    • thanks man, I've been no life-ing this for the past couple days. I'm basically rewriting the whole damn thing again, so there should be a new version out pretty soon.

      Heart 1