Compare commits
5 Commits
1.1.207.7
...
1.1.213.39
Author | SHA1 | Date | |
---|---|---|---|
![]() |
97da740e7e | ||
![]() |
42bb24ca6a | ||
![]() |
2f3b6cdda7 | ||
![]() |
525b496774 | ||
![]() |
562bb77dda |
@@ -1,4 +1,4 @@
|
||||
# Torch 1.1.205.478
|
||||
# Torch 1.1.207.7
|
||||
* Notes
|
||||
- This release makes significant changes to TorchConfig.xml. It has been renamed to Torch.cfg and has different options.
|
||||
* Features
|
||||
|
17
README.md
17
README.md
@@ -10,17 +10,15 @@ Torch is the successor to SE Server Extender and gives server admins the tools t
|
||||
* Organized, easy to use configuration editor
|
||||
* Extensible using the Torch plugin system
|
||||
|
||||
# Installation
|
||||
|
||||
* Get the latest Torch release here: https://github.com/TorchAPI/Torch/releases
|
||||
* Unzip the Torch release into its own directory and run the executable. It will automatically download the SE DS and generate the other necessary files.
|
||||
- If you already have a DS installed you can unzip the Torch files into the folder that contains the DedicatedServer64 folder.
|
||||
|
||||
# Building
|
||||
To build Torch you must first have a complete SE Dedicated installation somewhere. Before you open the solution, run the Setup batch file and enter the path of that installation's DedicatedServer64 folder. The script will make a symlink to that folder so the Torch solution can find the DLL references it needs.
|
||||
|
||||
# Installation Guide
|
||||
|
||||
### Automatic (recommended)
|
||||
* Unzip Torch to its own folder, run Torch.Server.exe and enter 'y' in the prompt for automatic updates. Torch will automatically download the Space Engineers files and generate all of the configs/folders necessary.
|
||||
|
||||
### Manual (for hosting companies or the paranoid)
|
||||
* Install the Space Engineers DS and then unzip the Torch files into the server's DedicatedServer64 directory. It will automatically detect the manual install and disable automatic updates.
|
||||
|
||||
In both cases you will need to set the InstancePath in TorchConfig.xml to an existing dedicated server instance as Torch can't fully generate it on its own yet.
|
||||
|
||||
# Official Plugins
|
||||
@@ -28,4 +26,5 @@ Install plugins by unzipping them into the 'Plugins' folder which should be in t
|
||||
* [Essentials](https://github.com/TorchAPI/Essentials): Adds a slew of chat commands and other tools to help manage your server.
|
||||
* [Concealment](https://github.com/TorchAPI/Concealment): Adds game logic and physics optimizations that significantly improve sim speed.
|
||||
|
||||
If you have a more enjoyable server experience because of Torch, please consider supporting us on [Patreon](https://www.patreon.com/bePatron?u=847269)!
|
||||
If you have a more enjoyable server experience because of Torch, please consider supporting us on Patreon.
|
||||
[](https://www.patreon.com/bePatron?u=847269)!
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.0.207.7")]
|
||||
[assembly: AssemblyFileVersion("1.0.207.7")]
|
||||
[assembly: AssemblyVersion("1.0.213.390")]
|
||||
[assembly: AssemblyFileVersion("1.0.213.390")]
|
@@ -34,7 +34,10 @@ namespace Torch.Server.Managers
|
||||
/// <inheritdoc />
|
||||
public override void Init()
|
||||
{
|
||||
LoadInstance(Torch.Config.InstancePath);
|
||||
MyFileSystem.ExePath = Path.Combine(Torch.GetManager<FilesystemManager>().TorchDirectory, "DedicatedServer64");
|
||||
MyFileSystem.Init("Content", Torch.Config.InstancePath);
|
||||
//Initializes saves path. Why this isn't in Init() we may never know.
|
||||
MyFileSystem.InitUserSpecific(null);
|
||||
}
|
||||
|
||||
public void LoadInstance(string path, bool validate = true)
|
||||
@@ -45,6 +48,8 @@ namespace Torch.Server.Managers
|
||||
MyFileSystem.Reset();
|
||||
MyFileSystem.ExePath = Path.Combine(Torch.GetManager<FilesystemManager>().TorchDirectory, "DedicatedServer64");
|
||||
MyFileSystem.Init("Content", path);
|
||||
//Initializes saves path. Why this isn't in Init() we may never know.
|
||||
MyFileSystem.InitUserSpecific(null);
|
||||
|
||||
var configPath = Path.Combine(path, CONFIG_NAME);
|
||||
if (!File.Exists(configPath))
|
||||
@@ -68,6 +73,8 @@ namespace Torch.Server.Managers
|
||||
return;
|
||||
}
|
||||
|
||||
ImportWorldConfig();
|
||||
|
||||
/*
|
||||
if (string.IsNullOrEmpty(DedicatedConfig.LoadWorld))
|
||||
{
|
||||
@@ -79,13 +86,13 @@ namespace Torch.Server.Managers
|
||||
public void SelectWorld(string worldPath, bool modsOnly = true)
|
||||
{
|
||||
DedicatedConfig.LoadWorld = worldPath;
|
||||
LoadWorldMods(modsOnly);
|
||||
ImportWorldConfig(modsOnly);
|
||||
}
|
||||
|
||||
|
||||
private void LoadWorldMods(bool modsOnly = true)
|
||||
private void ImportWorldConfig(bool modsOnly = true)
|
||||
{
|
||||
if (DedicatedConfig.LoadWorld == null)
|
||||
if (string.IsNullOrEmpty(DedicatedConfig.LoadWorld))
|
||||
return;
|
||||
|
||||
var sandboxPath = Path.Combine(DedicatedConfig.LoadWorld, "Sandbox.sbc");
|
||||
@@ -93,6 +100,8 @@ namespace Torch.Server.Managers
|
||||
if (!File.Exists(sandboxPath))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
MyObjectBuilderSerializer.DeserializeXML(sandboxPath, out MyObjectBuilder_Checkpoint checkpoint, out ulong sizeInBytes);
|
||||
if (checkpoint == null)
|
||||
{
|
||||
@@ -106,11 +115,17 @@ namespace Torch.Server.Managers
|
||||
|
||||
DedicatedConfig.Mods = sb.ToString();
|
||||
|
||||
Log.Info("Loaded mod list from world");
|
||||
Log.Debug("Loaded mod list from world");
|
||||
|
||||
if (!modsOnly)
|
||||
DedicatedConfig.SessionSettings = new SessionSettingsViewModel(checkpoint.Settings);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error($"Error loading mod list from world, verify that your mod list is accurate. '{DedicatedConfig.LoadWorld}'.");
|
||||
Log.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveConfig()
|
||||
{
|
||||
|
@@ -84,10 +84,14 @@ namespace Torch.Server
|
||||
{
|
||||
var pid = int.Parse(_config.WaitForPID);
|
||||
var waitProc = Process.GetProcessById(pid);
|
||||
_log.Warn($"Waiting for process {pid} to exit.");
|
||||
waitProc.WaitForExit();
|
||||
_log.Info("Continuing in 5 seconds.");
|
||||
Thread.Sleep(5000);
|
||||
if (!waitProc.HasExited)
|
||||
{
|
||||
_log.Warn($"Killing old process {pid}.");
|
||||
waitProc.Kill();
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.1.207.7")]
|
||||
[assembly: AssemblyFileVersion("1.1.207.7")]
|
||||
[assembly: AssemblyVersion("1.1.213.390")]
|
||||
[assembly: AssemblyFileVersion("1.1.213.390")]
|
@@ -77,10 +77,9 @@ namespace Torch.Server
|
||||
MySessionComponentExtDebug.ForceDisable = true;
|
||||
MyPerServerSettings.AppId = 244850;
|
||||
MyFinalBuildConstants.APP_VERSION = MyPerGameSettings.BasicGameInfo.GameVersion;
|
||||
|
||||
MyObjectBuilderSerializer.RegisterFromAssembly(typeof(MyObjectBuilder_CheckpointSerializer).Assembly);
|
||||
InvokeBeforeRun();
|
||||
|
||||
MyObjectBuilderSerializer.RegisterFromAssembly(typeof(MyObjectBuilder_CheckpointSerializer).Assembly);
|
||||
MyPlugins.RegisterGameAssemblyFile(MyPerGameSettings.GameModAssembly);
|
||||
MyPlugins.RegisterGameObjectBuildersAssemblyFile(MyPerGameSettings.GameModObjBuildersAssembly);
|
||||
MyPlugins.RegisterSandboxAssemblyFile(MyPerGameSettings.SandboxAssembly);
|
||||
@@ -88,6 +87,7 @@ namespace Torch.Server
|
||||
MyPlugins.Load();
|
||||
MyGlobalTypeMetadata.Static.Init();
|
||||
|
||||
GetManager<InstanceManager>().LoadInstance(Config.InstancePath);
|
||||
Plugins.LoadPlugins();
|
||||
}
|
||||
|
||||
@@ -143,6 +143,8 @@ namespace Torch.Server
|
||||
VRage.Service.ExitListenerSTA.OnExit += delegate { MySandboxGame.Static?.Exit(); };
|
||||
|
||||
base.Start();
|
||||
//Stops RunInternal from calling MyFileSystem.InitUserSpecific(null), we call it in InstanceManager.
|
||||
MySandboxGame.IsReloading = true;
|
||||
runInternal.Invoke(null, null);
|
||||
|
||||
MySandboxGame.Log.Close();
|
||||
|
@@ -39,7 +39,7 @@
|
||||
</StackPanel>
|
||||
<TabControl Grid.Row="1" Height="Auto" x:Name="TabControl" Margin="5,0,5,5">
|
||||
<TabItem Header="Configuration">
|
||||
<Grid>
|
||||
<Grid IsEnabled="{Binding IsRunning, Converter={StaticResource InverseBool}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
|
@@ -40,7 +40,7 @@ namespace Torch.Commands
|
||||
|
||||
public bool IsCommand(string command)
|
||||
{
|
||||
return command.Length > 1 && command[0] == Prefix;
|
||||
return !string.IsNullOrEmpty(command) && command[0] == Prefix;
|
||||
}
|
||||
|
||||
public void RegisterCommandModule(Type moduleType, ITorchPlugin plugin = null)
|
||||
|
@@ -120,6 +120,9 @@ namespace Torch.Managers
|
||||
/// <inheritdoc />
|
||||
public void SendMessage(string message, string author = "Server", long playerId = 0, string font = MyFontEnum.Red)
|
||||
{
|
||||
if (string.IsNullOrEmpty(message))
|
||||
return;
|
||||
|
||||
ChatHistory.Add(new ChatMessage(DateTime.Now, 0, author, message));
|
||||
var commands = Torch.GetManager<CommandManager>();
|
||||
if (commands.IsCommand(message))
|
||||
|
@@ -126,8 +126,7 @@ namespace Torch.Managers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.Fatal(ex);
|
||||
_log.Fatal(ex, "~Error processing event!");
|
||||
_log.Error(ex);
|
||||
//crash after logging, bad things could happen if we continue on with bad data
|
||||
throw;
|
||||
}
|
||||
@@ -200,8 +199,8 @@ namespace Torch.Managers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.Fatal(ex);
|
||||
_log.Fatal(ex, "Error when returning control to game server!");
|
||||
_log.Error(ex, "Error processing network event!");
|
||||
_log.Error(ex);
|
||||
//crash after logging, bad things could happen if we continue on with bad data
|
||||
throw;
|
||||
}
|
||||
|
@@ -121,9 +121,10 @@ namespace Torch.Managers
|
||||
|
||||
commands.RegisterPluginCommands(plugin);
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.Error($"Error loading plugin '{type.FullName}'");
|
||||
_log.Error(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@@ -67,6 +67,8 @@ namespace Torch.Managers
|
||||
if (!Torch.Config.GetPluginUpdates)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
var name = manifest.Repository.Split('/');
|
||||
if (name.Length != 2)
|
||||
{
|
||||
@@ -90,12 +92,20 @@ namespace Torch.Managers
|
||||
_log.Info($"{manifest.Repository} is up to date. ({currentVersion})");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.Error($"An error occured downloading the plugin update for {manifest.Repository}.");
|
||||
_log.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
private async void CheckAndUpdateTorch()
|
||||
{
|
||||
if (!Torch.Config.GetTorchUpdates)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
var releaseInfo = await GetLatestRelease("TorchAPI", "Torch").ConfigureAwait(false);
|
||||
if (releaseInfo.Item1 > Torch.TorchVersion)
|
||||
{
|
||||
@@ -110,6 +120,12 @@ namespace Torch.Managers
|
||||
_log.Info("Torch is up to date.");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.Error("An error occured downloading the Torch update.");
|
||||
_log.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateFromZip(string zipFile, string extractPath)
|
||||
{
|
||||
|
Reference in New Issue
Block a user