Here you can find the Space Engineers Torch Server ported to .NET 8.0.
Clone the se-dotnet-server repository. Follow the instructions there to build the game server.
Once the DS works, add Torch by copying over the projects from this repository into your local Git working copy folder which has the decompiled game server source in it. Overwrite the solution file or add the projects manually in your IDE.
Set the TORCH_ROOT
environment variable to the full path of the folder you have
the Instance
folder in (it usually has Logs
, Plugins
, Torch.cfg
, etc.).
Make sure to remove these files from your TORCH_ROOT
folder:
- The binary files of the original Torch installation
_CommonRedist
appcache
config
Content
DedicatedServer64
Logs
(recommended for clarity)steamapps
steamcmd
Keep the following:
Torch.cfg
Instance
Plugins
If you run multiple Torch instances as the same Windows user, then you need to
create "startup" batch files for each of the instances and set TORCH_ROOT
in
those accordingly.
Build and run it from the command line by executing the
BuildAndRunTorch.bat
script.
For debugging run the Torch.Server
project from your IDE.
- Harmony 2.3.3 is used for binary patching with a compatibility layer in place to support Torch patches.
*
- Plugins using transpiler patches may not work. Such patches need to be fixed to handle both the old and new .NET.
This was tested to work reliably:
var isOldDotNetFramework = Environment.Version.Major < 5;
I suggest using the TranspilerHelper to produce IL files of the original and patched code, so they can be diff'd and fixed easier. You can find usage examples in this repository. It works with both the Torch and Harmony transpiler patches.
*
The PatchManager
code was copied from PvPTeam Torch (Apache License Version 2.0) in order to avoid duplicating that work. The changes were made by zznty
. That repo contains another solution to run Torch on recent .NET.