Been trying to get a steam dedicated server working, but haven’t had much luck. I more or less copied the code from ShooterGame. I am using a source built engine (4.17.1), compiling a dedicated server build (TDSServer.exe) and then copying that into my built game directory. When I launch the steam dedicated server, I get an error:
[2017.09.15-19.10.25:776][
32]LogOnline: Warning: STEAM: Server
setting ,SESSIONFLAGS:683 overflows
Steam SetGameTags call
Even knowing I haven’t set any extra options! I talked a bit with eXi on discord, who mentioned that it’s a bit of an error with the engine. On line 242 of OnlineSessionAsyncServerSteam.cpp you’ll see theres a conditional check
if (GameTagsString.Len() + NewKey.Len() < k_cbMaxGameServerTags)
{
GameTagsString = GameTagsString + "," + NewKey;
}
else
{
UE_LOG_ONLINE(Warning, TEXT("Server setting %s overflows Steam SetGameTags call"), *NewKey);
}
I’ve been told that there is an issue with this check, I’m hoping someone from the Epic staff department can help out, or others that have run into this issue before.
Just to confirm, I have my own application ID, and I have setup my IPs on steam partner page. I have steam working if I do a listen server. I just can’t get the dedicated server to launch properly. Just to show, this is my current GameSession class:
#include "TDS.h"
#include "TDSGameMode.h"
#include "TDSGameSession.h"
ATDSGameSession::ATDSGameSession()
{
OnCreateSessionCompleteDelegate = FOnCreateSessionCompleteDelegate::CreateUObject(this, &ATDSGameSession::OnCreateSessionComplete);
MaxPlayers = 64;
}
void ATDSGameSession::BeginPlay()
{
Super::BeginPlay();
}
void ATDSGameSession::RegisterServer()
{
IOnlineSubsystem* const OnlineSub = IOnlineSubsystem::Get();
if (OnlineSub)
{
IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();
if (Sessions.IsValid())
{
ATDSGameMode* GameMode = Cast<ATDSGameMode>(GetWorld()->GetAuthGameMode());
if (GameMode)
{
UE_LOG(LogTemp, Warning, TEXT("game session register server"));
TSharedPtr<class FOnlineSessionSettings> HostSettings = MakeShareable(new FOnlineSessionSettings());
/*HostSettings->Set(FName(TEXT("MATCHHOPPER")), FString("TeamDeathmatch"), EOnlineDataAdvertisementType::DontAdvertise);
HostSettings->Set(FName(TEXT("MATCHTIMEOUT")), 120.0f, EOnlineDataAdvertisementType::ViaOnlineService);
HostSettings->Set(FName(TEXT("SESSIONTEMPLATENAME")), FString("GameSession"), EOnlineDataAdvertisementType::DontAdvertise);*/
//HostSettings->Set(SETTING_MAPNAME, GetWorld()->GetMapName(), EOnlineDataAdvertisementType::ViaOnlineService);
HostSettings->NumPublicConnections = 64;
HostSettings->NumPrivateConnections = 0;
HostSettings->bIsLANMatch = false;
HostSettings->bShouldAdvertise = true;
HostSettings->bAllowJoinInProgress = true;
HostSettings->bAllowInvites = true;
HostSettings->bUsesPresence = false;
HostSettings->bAllowJoinViaPresence = true;
HostSettings->bAllowJoinViaPresenceFriendsOnly = false;
HostSettings->bIsDedicated = true;
OnCreateSessionCompleteDelegateHandle = Sessions->AddOnCreateSessionCompleteDelegate_Handle(OnCreateSessionCompleteDelegate);
UE_LOG(LogTemp, Warning, TEXT("starting create session"));
Sessions->CreateSession(0, GameSessionName, *HostSettings);
}
}
}
}
void ATDSGameSession::OnCreateSessionComplete(FName InSessionName, bool bWasSuccessful)
{
UE_LOG(LogTemp, Verbose, TEXT("OnCreateSessionComplete %s bSuccess: %d"), *InSessionName.ToString(), bWasSuccessful);
IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
if (OnlineSub)
{
IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();
Sessions->ClearOnCreateSessionCompleteDelegate_Handle(OnCreateSessionCompleteDelegateHandle);
}
OnCreatePresenceSessionComplete().Broadcast(InSessionName, bWasSuccessful);
}