When Steam Module Active Cant Find Session or "Open" server

Greetings fine folk.

Having some issues getting steam to work correctly in my game.

I have the following code setup.

In Config/DefaultEnging.ini

[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver")
 
[OnlineSubsystem]
DefaultPlatformService=Steam
PollingIntervalInMs=20

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
GameServerQueryPort=27015
bRelaunchInSteam=false
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90
 
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="/Script/OnlineSubsystemSteam.SteamNetConnection"

In Game.Build.Cs

public class AllSpark : ModuleRules
{
	public AllSpark(TargetInfo Target)
	{
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

        // Uncomment if you are using Slate UI
        // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

        // Uncomment if you are using online features
        PublicDependencyModuleNames.AddRange(new string[] {
             "OnlineSubsystem",
             "OnlineSubsystemUtils"
        });

        if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
        {
            if (UEBuildConfiguration.bCompileSteamOSS == true)
            {
                DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
            }
        }
    }
}

And in game.target.cs

	public AllSparkTarget(TargetInfo Target)
	{
		Type = TargetType.Game;
        bUsesSteam = true;
    }

Now this all compiles and runs fine. In game I get the shift tab steam overlay going.

The problem arrives when I try and connect to a listen server from a client. Nothing seems to happen.

I have tried to connect by just typing open ipofserver but it seems that nothing happens.

When testing I am using 2 separate machines that I have copied the packaged game to.
Each pc has steam running with different accounts.
Also firewalls on both pcs are disabled during testing.

I am using 4.10.3

The following is the BP I am using to Find sessions which also doesn’t connect Lan or Steam.

Can anyone see what I’m doing wrong :(?

As another note I have now tested on another network with different pcs with the same result.

I have the same issue. I set it up like you did.
Does anyone has an idea for this?

I am afraid that I am late with an answer but here it is.

You use test app id = 480. Many other people use it for testing Steam integration in their games as well. When you ask Online Subsystem to look for sessions it actually finds those other games sessions. Your game fails to read those incompatible sessions data so it does not return them from Find Sessions node. Engine logs on the other hand are full of attempts to parse those sessions.

I would expect that Find Sessions->Max Results parameter limits the number of compatible sessions to find. But actually it limits total results number indifferently to compatibility. So when there are 100 other game sessions online and you call Find Sessions with Max Results = 10 good chances are that you won’t find the session of your game at all.

Quick fix is to increase Max Results to some greater value, say 500.

You can check how many people are playing Spacewar here.

1 Like

Name Current Players 30-Day Avg. 30-Day Gain 30-Day % Gain

Spacewar 11,004 6,060.9 +382.0 +6.73%

I guess this means, even with 10k max sessions, we may not see our test instance? (but should expect we would)