Host Migration EU5 (EOS) 2023 C++

I am looking for updated information about Host Migration. All the forum posts I’ve read are from 2015 or so. And basically it says that at that time there was no simple solution and that you have to implement it by yourself.

However I have seen that other engines have a simple solution for this.

For example:

https://docs.cryengine.com/display/CEPROG/Host+Migration

That’s why I think Epic already should have a solution implemented for this as well.

Can someone provide information on how to handle this issue in Unreal?

Documentation, links, or sample codes are welcome.

Thank you so much!!

1 Like

This is the only available information I have been able to find on this topic.

1

However I haven’t been able to get it to work.
I keep getting a connection error and send clients to the main menu.

Any help will be welcome.
Thank you so much!!

Ok… looks like EOS is dead. I will have to rewrite my code with the new API. I hope the host migration works with it. EOS rest in peace!! :sob: :smile:

OK… where I live there is a saying that says don’t look at the teeth of a gift horse… However, I would like to record this situation.

The EOS plugin has been in beta for years.
2

I must add that I have tested it for several months and it works relatively well. But it is still a beta, so there is a lot of insecurity and uncertainty. So it’s not 100% reliable.

And now we find this:

I understand that the online subsystem will no longer be available in versions higher than 5.1 (is dead).

However “Online Service” is also in Beta. Today I was testing it and it is a real disaster. You have to put the full path to find the includes.

The sample codes has bugs. There are data types that are not found.
And the API is much more confusing than the online subsystem.

But there is also no information to use the authentication tool with this API.

4

Using the online subsystem to do this is extremely simple.

So this is the situation… we have an online subsystem that works relatively well but is no longer advisable to use for later versions of UE5.1 (an online subsystem that has been in beta for years and will never be stable).

We have a new online system that is also in beta and it works much worse than the online subsystem.

And we have recent versions of the engine already available UE5.2 (early access)… That we can’t migrate to use it because the online subsystem that works fine will no longer be available.

Gentlemen engineers, I think this idea is not great!
I mean… you have something that works well
Why do you throw it in the trash?

I’ve been using the engine for a year, since version 4.27. I tried all subsequent versions, and only version 5.0.3 and 5.1.1 were relatively stable. (The others were a headache)…

I don’t know, but I think you guys work too fast. Your desire to innovate and develop new technology at high speed compromises the quality of the final product too much.

It’s just an observation on my part.

On the one hand, I am enormously grateful because you offer us this wonderful work tool. When everything is stable and works well it is really wonderful. But when you release a version with bugs it’s a real nightmare.

Another saying from my country goes like this… “rush was never good”

Best regards!!

The includes path was fixed… It was a Rider problem. Everything worked after restarting Raider.

Today I managed to make this code work. There is too little information about it but it works.

Most types of data appeared, accessing them through their namespaces.

However, there are still things that can lead to confusion. Like this for example.

For my first code with this API it was quite a headache to make it work. But I think that after this everything that comes will be much easier.

So I think the migration from OSSv1 to OSSv2 won’t be so painful after all.

There is a saying in my land that says…
To Caesar what belongs to Caesar!! :slight_smile:

Best regards!!

Hey @Ivan3z ! I’ve noticed you spent a lot of time figuring out with Online Service.
Can you please help me with my question?

I can’t even retrieve Online Services.

UE::Online::IOnlineServicesPtr OnlineServicesPtr = UE::Online::GetServices(UE::Online::EOnlineServices::Null, "EOS");
	if (!OnlineServicesPtr.IsValid())
	{
		GEngine->AddOnScreenDebugMessage(
			-1,
			60.f,
			FColor::Yellow,
			TEXT("OnlineServices invalid")
		);
		return;
	}

OnlineServicesPtr is always invalid.

Also, I’ve added this to DeafultEngine.ini:

[OnlineServices]
DefaultServices=Null

[/Script/Engine.OnlineEngineInterface]
bUseOnlineServicesV2=true

For some reason (i don’t remember) i’m using nullptr intead.

Put this in your DefaultEngine.ini (You need change some things because i’m using NULL right now)

[/Script/Engine.OnlineEngineInterface]
bUseOnlineServicesV2=true

[OnlineSubsystem]
DefaultPlatformService=Null -->Change to EOS

[OnlineSubsystemNull]
bEnabled=true -->Change to false

[OnlineServices]
bEnabled=true
bUseBuildIdOverride=True
;DefaultServices=Epic
DefaultServices=Null
buildidoverride=0

[OnlineServices.NetDriverEOS]
bIsUsingP2PSockets=true

[/Script/Engine.Engine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName=“GameNetDriver”,DriverClassName=“SocketSubsystemEOS.NetDriverEOSBase”,DriverClassNameFallback=“OnlineSubsystemUtils.IpNetDriver”)
+NetDriverDefinitions=(DefName=“DemoNetDriver”,DriverClassName=“/Script/Engine.DemoNetDriver”,DriverClassNameFallback=“/Script/Engine.DemoNetDriver”)

[/Script/SocketSubsystemEOS.NetDriverEOSBase]
bIsUsingP2PSockets=true

[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName=“GameNetDriver”,DriverClassName=“SocketSubsystemEOS.NetDriverEOSBase”,DriverClassNameFallback=“OnlineSubsystemUtils.IpNetDriver”)
+NetDriverDefinitions=(DefName=“DemoNetDriver”,DriverClassName=“/Script/Engine.DemoNetDriver”,DriverClassNameFallback=“/Script/Engine.DemoNetDriver”)

[/Script/UnrealEd.EditorEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName=“GameNetDriver”,DriverClassName=“OnlineSubsystemUtils.IpNetDriver”,DriverClassNameFallback=“OnlineSubsystemUtils.IpNetDriver”)
+NetDriverDefinitions=(DefName=“BeaconNetDriver”,DriverClassName=“OnlineSubsystemUtils.IpNetDriver”,DriverClassNameFallback=“OnlineSubsystemUtils.IpNetDriver”)

[/Script/OnlineSubsystem.IpNetDriver]
ConnectionTimeout=300.0

[/Script/OnlineSubsystemUtils.IpNetDriver]
bIsUsingP2PSockets=true
ConnectionTimeout=300.0
MaxClientRate=10000
MaxInternetClientRate=10000
ReplicationDriverClasName=“ServerStatReplicator”

in your “…Build.cs” (for UE5.2.1)

2

i hope this help!!

1 Like

Still doesn’t work. I think, EOS SDK is required for it, but there is nothing on it in the documentation. I’ll wait for a few months before additional information will be added. It is not urgent for me.
Thank you @Ivan3z for the help!

The SDK is here:

C:\Program Files\Epic Games\UE_5.2\Engine\Source\ThirdParty\EOSSDK\

Did you enabled this?

DefaultServices=Epic

And disable this?

DefaultServices=Null

And uncomment the module dependency

OnlineServiceEOS

and enable your pugins

@Ivan3z I’ve tried to set up Null Service. So I set corresponding properties. I will check the plugins.

-You cannot use EOS and NULL at the same time.
-EOS only works in standalone mode.
-NULL only works in the editor

-I know this is a headache… I have two different .ini files that I include in the DefaultEngine.ini header… so I can easily change the settings when I want to do tests

#!./Online/DefaultEngineOnlineServices.ini
#!./Online/DefaultEngineOnlineSubsystemNull.ini

Thank you! I will try to figure out with this

Did anyone manage to figure out how to get Online Services to work with Steam? The documentation for this topic on unreal official docs is absolute trash

I din’t try it yet… my game is in development.
I only made it work with Epic and the only problem I found was with the lobby interface in the version (UE5.1)…
But I guess making it work on Steam is easy.
If it is the same as with OnlineSubsistem, you only have to add a couple of lines in DefauldEngine.ini

Something like this:

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"

This is the UE4.26 documentation version.

The official docs say you need even fewer lines in the DefaultEngine.ini the only problem is, it doesn’t work. When you try to get the service as per the example you just get a nullptr.

Seem like the module “OnlineSubsystemSteam” is missing…

in the documentation i see a new method using “Steamworks SDK”… maybe you need download that DLL to get it works.

This is the UE5.3 documentation version.

You’re talking about online subsystem steam I’m talking about Online
Services which is the new framework UE is moving towards: Overview of Online Services in Unreal Engine | Unreal Engine 5.1 Documentation

These two things, according to the documentation, should work independently and are entirely separate.

Yes, that is the theory… but Online Service still using some OnlineSubsytem modules to work… i think it is in some kind of transition phase or something like that.

This open-source plugin seamlessly incorporates straightforward host migration. It could prove valuable for your needs.

Check it out on GitHub: EOSIntegrationKit

1 Like

Thanks for sharing :heart: