So…
I’m running into all sorts of bad news whenever I try to get a dedicated server up and running for either my game, or even ShooterGame. To keep things simple I’ll use ShooterGame as an example.
First off the shootergame didn’t actually come with a server build configuration, but this is what I’m using atm:
ShooterGameServer.Target.cs:
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class ShooterGameServerTarget : TargetRules
{
public ShooterGameServerTarget(TargetInfo Target)
{
Type = TargetType.Server;
bUsesSteam = true;
}
//
// TargetRules interface.
//
public override bool GetSupportedPlatforms(ref List<UnrealTargetPlatform> OutPlatforms)
{
// It is valid for only server platforms
return UnrealBuildTool.UnrealBuildTool.GetAllServerPlatforms(ref OutPlatforms, false);
}
public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
OutExtraModuleNames.Add("ShooterGame");
}
public override List<UnrealTargetPlatform> GUBP_GetPlatforms_MonolithicOnly(UnrealTargetPlatform HostPlatform)
{
if (HostPlatform == UnrealTargetPlatform.Mac)
{
return new List<UnrealTargetPlatform> { UnrealTargetPlatform.Mac };
}
return new List<UnrealTargetPlatform> { UnrealTargetPlatform.Win32, UnrealTargetPlatform.Win64 };
}
public override List<UnrealTargetConfiguration> GUBP_GetConfigs_MonolithicOnly(UnrealTargetPlatform HostPlatform, UnrealTargetPlatform Platform)
{
return new List<UnrealTargetConfiguration> { UnrealTargetConfiguration.Development };
}
}
The documentation here:
https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/TargetFiles/index.html
doesn’t have all that much info on this, so I’ve been going off the info I could find in the comments @engine\source\programs\unrealbuildtool\system\rulescompiler.cs
The above config file results in the binary being built, but after that I’m still seeing oddities when it comes to running that Server binary. It pretty much crashes soon after starting, and when I pass in the -log parameter, I can see that it has a bunch of errors. The thing is though, I can’t actually see the log from the crash because it doesn’t write one.
When I look in : ShooterGame\Saved\Logs, It only has logs from running ShooterGame.exe. ShooterGameServer.exe instead is outputting a bunch of binary dump files akin to Dump240478864.dmp there each time it gets run.
Anyone know what might be wrong, or how to properly build a server executable for a game?