For support please join the SE Mods Discord.
Please consider supporting my work on Patreon or a one time donation via PayPal.
Thank you and enjoy!
This repository provides a way to decompile the Dedicated Server into C# 11.0 source code in several projects, combined into a single solution. It also contains a script and patches to fix the code to run on .NET 8.0.
See also: Torch Server on .NET 8.0
Space Engineers is a trademark of Keen Software House s.r.o.
I have no affiliation with Keen Software House.
This repository contains an advanced development and server side deployment tool. If you are only playing Space Engineers and not developing for it or hosting a busy server, then you should not use this repository in any way.
The method described in this repository is completely unsupported by the game's developer. Use it only at your own risk.
Do not report any bugs based on running the game this way, unless the exact same issue is reproducible with the original game server.
If decompiling software for your own personal learning, research, testing or debugging purposes is against the law in your country, then do not use this repository.
Never publish the decompiled source code, including, but not limited to uploading it to publicly available source code repositories.
- Space Engineers Dedicated Server installed via Steam
- .NET 8.0 SDK, Windows x64
- JetBrains Rider or Microsoft Visual Studio
- ILSpy version 8.2.0.7535 - Install it by running
SetupILSpy.bat
- Python 3.12 or newer
- Git to create a local repository
Make sure these executables are available on PATH
:
ilspycmd
python
git
Define this environment variable: DEDICATED_SERVER_ROOT
- Usual value:
C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineersDedicatedServer
- If you installed the server at a custom path, then use that path.
Run Prepare.bat
, it should take about 10-20 minutes to complete.
It should print DONE
at the end. If it prints FAILED
, then investigate
the console output and try again. This script is designed to be retryable,
but it requires reverting the working copy to the latest commit beforehand.
You can then open and built the project in your C# IDE (Rider, Visual Studio).
Alternatively you can build and run a Release
build from the command line by
executing the BuildAndRun.bat
script. It should work without an IDE.
Enjoy!
Debug
builds are running a bit slower than normal due to the lack
of code optimization, but still usable for development/research.
Release
builds should also work and provide the usual performance.
Release builds are less debuggable due to code optimization, you
may not be able to break the code everywhere and some variable
values may not be observable.
Investigating game bugs and performance issues directly without
continuously waiting on the decompiler. Being able to quickly navigate
the code and even change it at runtime. You can see all variable values
and can break the code anywhere if you run a Debug
build.
Prototyping plugins by directly changing the game's source code. Once it works and tested, it can be turned into a Torch plugin. Combined with publicizer support it would be a powerful way to develop new plugins.
Server hosting with better performance, especially if you want to make custom code changes which are not available via plugins.
- The script performance profiling is disabled, because it broke the script compiler. It has not been fixed, because without game analytics it is pointless to have anyway.
- Plugins most likely won't work, especially if they depend on transpiler patches.
- The server will not update itself when a new game version is released, it has to be recompiled once an updated set of patches are available here.
git format-patch -1 HEAD --stdout >Manual_fixes.patch
In alphabetical order
- BetaMark
- Bishbash777
- Casinost
- Dorimanx
- wafoxxx
- DontFollowOrders
- Gabor
- Lazul
- Lotan
- mkaito
- ransomthetoaster
- Raidfire
- zznty: motivation, slight hints into the right direction
Make sure you have the DedicatedServer64
folder linked to your solution folder.
If it is not there, then run LinkBin64.bat
to restore it.