First you're gonna need some software:
Even if you already know Git, scroll down to read the section about submodule setup. Seriously.
If you're familiar with Git, just fork and clone the repository, set up remotes, and then follow the submodule guide below.
If you're unfamiliar with Git, or just don't know how to proceed, follow the Git for the SS14 Developer guide, which goes in depth on how to contribute to the game and how to set up your initial repository. It also touches on submodule setup, but that's included here as well because of its importance.
We have an automatic submodule updater so you don't have to worry about running git submodule update --init --recursive
all the time.
Run RUN_THIS.py
inside the repo you downloaded with Python. Preferably from a terminal too. This should take a few seconds so if it instantly stops you probably aren't using Python 3.7+ or something.
If running RUN_THIS.py
immediately opens and closes a window: do not worry. This does not mean that it failed. The script closes automatically upon completion, so if you want to verify that it worked properly, check the submodule /RobustToolbox/
and verify that all the files are there.
Note: If you have any issues when getting started with missing files it's recommended you run git submodule update --init --recursive
by hand once in case something went wrong with python.
If you do want to modify the engine directly however, or you want to update the submodule manually (the auto updating can be a pain), make a file called DISABLE_SUBMODULE_AUTOUPDATE
inside the BuildChecker/
directory.
And with that, your repo is now properly setup!
.net desktop development
, then installVisual C#
.Open a project or solution
, then navigate to your cloned repository from above and open SpaceStation14.sln
Now you can get on to compiling the client and server! Use your flavor of IDE to open the solution file SpaceStation14.sln
and press the build button.
To compile without an IDE, run dotnet build
in the Space Station 14 repo directory. Then, call the following commands to run the client and server.
dotnet run --project Content.Server
dotnet run --project Content.Client
Both these commands use a debug configuration by default. To enable release optimizations, add --configuration Release
to the dotnet invocation.
Note: If you're having problems with dotnet not finding libssl (e.g. when using libressl), try setting the CLR_OPENSSL_VERSION_OVERRIDE
environment variable to the appropriate version. For instance, set it to 48
if your /usr/lib
contains libssl.so.48
.
If that doesn't work you can also try running ln -s /usr/lib/libssl.so /usr/local/lib/libssl.so.1.0.0
instead.
The SS14 client and server are independent projects, but both can launch with a single button somewhere in your IDE. This needs to be set up, however. Note: It is recommended that you run Content.Client
and Content.Server
when developing from your IDE. Not Robust.Client
or Robust.Server
. The reason is that running Content.*
will make your IDE aware of dependencies correctly and ensure everything is rebuilt nicely. If you run Robust.Client
directly you have to make sure the solution is fully built every time which is annoying and easy to forget. If you're unsure what Robust or Content are, check out this page on how the project is organized.
In Visual Studio 2022, you can configure the build button to run both the server and client by right clicking the solution, then selecting Set StartUp Projects...
. Once the menu pops up, then select Multiple startup projects:
and set the action for Content.Client
and Content.Server
to Start
. Once you apply the changes, hitting the big Start
button with a green arrow next to it should launch both client and server at the same time.
Note: If you're having problems with the program not getting built right, you may need to set always build before run. Go to Options Projects and Solutions/Build and Run
and change On Run, when projects are out of date
to Always build
.
In VS you can also use the keys F7 to build the project and F5 to run it.
The C# extension provides a "coreclr"
launch type which can be used to run the Content.Server
and Content.Client
executables in their respective bin/
directories. A compound launch configuration can be used to run the server and client at the same time.
Build with dotnet build
and run the client and server on different command lines with:
dotnet run --project Content.Server
dotnet run --project Content.Client
There's also definitely some way to run two commands at the same time, but you should probably google it.
In Rider you can create a "compound configuration" to run or debug both client and server at the same time. Quite convenient!
In Rider you can attach the resources directory to the solution so that you can more easily navigate to resource files like prototypes.
Make sure the first three items on top are downloaded.
RUN_THIS.py
not runningCheck that python is installed from the website and not the Microsoft Store. If it's installed from the Microsoft Store, uninstall it then download and install from the python website.
Unhandled exception. Robust.Shared.IoC.Exceptions.ImplementationConstructorException: Robust.Client.Graphics.FontManager threw an exception inside its constructor.
---> System.DllNotFoundException: Unable to load DLL 'freetype6' or one of its dependencies: The specified module could not be found. (0x8007007E)
at SharpFont.FT.FT_Init_FreeType(IntPtr& alibrary)
at SharpFont.Library..ctor()
at Robust.Client.Graphics.FontManager..ctor(IClyde clyde) in C:\Users\Larme\Downloads\space-station-14\RobustToolbox\Robust.Client\Graphics\FontManager.cs:line 33
--- End of inner exception stack trace ---
at Robust.Shared.IoC.DependencyCollection.BuildGraph() in C:\Users\Larme\Downloads\space-station-14\RobustToolbox\Robust.Shared\IoC\DependencyCollection.cs:line 348
at Robust.Shared.IoC.IoCManager.BuildGraph() in C:\Users\Larme\Downloads\space-station-14\RobustToolbox\Robust.Shared\IoC\IoCManager.cs:line 271
at Robust.Client.GameController.InitIoC(DisplayMode mode) in C:\Users\Larme\Downloads\space-station-14\RobustToolbox\Robust.Client\GameController\GameController.IoC.cs:line 16
at Robust.Client.GameController.ParsedMain(CommandLineArgs args, Boolean contentStart, IMainArgs loaderArgs, GameControllerOptions options) in C:\Users\Larme\Downloads\space-station-14\RobustToolbox\Robust.Client\GameController\GameController.Standalone.cs:line 49
Uninstall .NET Core SDK x86. Install .NET Core SDK x64.