Course: The EOS Online Subsystem (OSS) Plugin

Thank you again. This did Indeed work!

[2023.12.21-12.27.29:647][ 44]LogTemp:  Store Subsystem
[2023.12.21-12.27.29:648][ 44]LogTemp: Store Interface is  valid
[2023.12.21-12.27.29:648][ 44]LogTemp: Attempting query of store interface

:grinning:

2 Likes

Good Day @SebBergy2.0 !

As I continue to explore the Epic Online Services and the various ways to interface with them, I have a question about which direction I should go in.

For example, I see two different methods for achieving the same outcome:

1. EOS Ecom Interface:
EOS Ecom Interface API Reference | Epic Online Services Developer (epicgames.com)

2. Online Subsystem Store Interface:
Online Subsystem Store Interface in Unreal Engine | Unreal Engine 5.3 Documentation

They both deal with offers and purchases.
One of the Major differences I am noticing is that the EOS Ecom Interface is able to return an Offers Thumbnail image where the OSS Store interface cannot.

Why would a developer choose one or the other?

I have implemented OSS - Should I switch to the EOS Ecom so I can get thumbnail images?

Thank you so much for your support in creating this course and providing some additional context for me.

1 Like

Hello! Thanks for the course, very helpfull! I have a question… Is there a way to search for diffrent sessions in a single querry?
For example I want to seach for sessions that have the search key “Map” equals to “1” or equals to “2”.

Hey! Sorry for the delay our offices were closed for the holidays. The Store Interface in the EOS OSS plugin uses the EOS Ecom Interface. See OnlineStoreEOS.cpp. However, not ALL functionality of EOS ECOM is present in the plugin. I recommend double-checking the plugin code to see if it has the features you need. If it doesn’t, what you can do is either modify the plugin directly in your source build, or move the plugin at the project level and modify it there. I would definitely add the EOS Ecom code to the plugin directly (in OnlineStoreEOS.cpp) rather than call the SDK directly from game code.

1 Like

Yes! You can see all the possible comparison operators in the EOS SDK documentation here. What you’re looking for is EOS_CO_ANYOF. This searches attributes that matches a semi-colon delimited list. This comparison operator maps to EOnlineComparisonOp::In in the OSS code, see EOS_EOnlineComparisonOp ToEOSSearchOp(EOnlineComparisonOp::Type Op.

Here is a simple example:

    FString SearchValues = "1;2"; 
    Search->QuerySettings.Set(SearchKey, SearchValues, EOnlineComparisonOp::In);
2 Likes

If you’re using UE5.3 you will notice that the overlay does NOT open in standalone or shipping builds. This is fixed in UE5.4. Code change is here if you want to backport it to 5.3. https://github.com/EpicGames/UnrealEngine/commit/f86e6e04df0b9f642f2396ba727f154631d7ccb0

1 Like

Hello! First of all, thank u very much for the course, it was very helpful. My questions is, Im trying to make multiplayer game for two people, using P2P (listen server) connection. In online mode, everything works fine and Im able to play with my friend online. But i would like to integrate LAN mode too, for that Im using basic Unreal nodes “Create session” etc… I can create session, find that session but after attempting to join the session, Im left with error

LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionTimeout, ErrorString = UNetConnection::Tick: Connection TIMED OUT. Closing connection... Driver = PendingNetDriver NetDriverEOSBase_0

It seems it casues line in config:

[/Script/SocketSubsystemEOS.NetDriverEOSBase]
bIsUsingP2PSockets=true

But without that, online connection is not working… Do you have some solution or workaround for this? Thank u

I have lobbies working with clients able to connect. I’m not able to get notifications working though.

I adapted the example code use the following delegates in the SetupNotifications() function:

	Session->AddOnSessionParticipantJoinedDelegate_Handle(FOnSessionParticipantJoinedDelegate::CreateUObject(
		this, 
		&ThisClass::HandleParticipantJoined));

	Session->AddOnSessionParticipantLeftDelegate_Handle(FOnSessionParticipantLeftDelegate::CreateUObject(
		this,
		&ThisClass::HandleParticipantLeft));

The delegate functions never get called though. I’m testing with three players, one being the host and two connecting clients. The functions are setup to print a log, but that never happens.

In general what I’m looking for is a way to get general information about the current lobby from the client’s perspective. Things like “is connected”, “is host”, “num of connections”. I know it’s said that Epic handle a lot of lobby information, so I figured their would be a way to pull in up to date information.

Hello, can you elaborate a little more what you mean by “integrate lan mode”? I’m a bit confused as you mentioned online connections are not working.

Yeah these should be working. I’d set a breakpoint in FOnlineSessionEOS::RegisterLobbyNotifications and FOnlineSessionEOS::OnMemberStatusReceived to confirm the notifications are being set up correctly and to see what happens when they fire. If you can’t figure this out, it would be worth opening a separate thread and sharing a full set of logs and screenshots of your debugging sessions.

I want to give players two options.

One is online play, when they need to have internet connection, login with account and use EOS.

And second is LAN approach, so they can play on same network together without internet connection or accounts.

But i cannot get it work in same build due to config file.

UnregisterPlayer() being called multiple time is now fixed in the GitHub repo. Sorry for the delay! I was calling the function twice (once from Super::NotifyLogout and another time intentionall in AEOSGameSession).

Ok thanks for clarifying. I don’t see how the NetDriver configuration is causing issues here. Can you confirm you set bIsLanMatch to true in your SessionSettings when creating the lan session?

If you did, are you able to set a breakpoint in FOnlineSessionEOS::JoinSession() and confirm you are going into FOnlineSessionEOS::JoinLANSession()?

Thanks!

OMG you are the best @SebBergy! My knowledge of c++ is not at the point where I can recognize conflicts, or intentional code vrs test code etc, so, this isn’t something I could have recognized myself — super appreciated! I think we are actually going to make it out of pre-alpha! I still need to write that forum post requesting examples of EOS error checking, but it will have to wait for a bit. Again sincerely, thank you for the followup.

1 Like

Hello! I’v been looking into the documentation of unreal engine and I found that it has a new plugin to implement EOS called “Online Services EOS Plugin” and “Online Services EOSGS Plugin”. For Unreal 5.3 and 5.4 is it recommended to use the EOS Online Subsystem or this new plugin?

Thank you!

The new plugin is still being worked on. If you’re working on a game that is shipping soon, and want to limit the chance of having to do some engine code changes, I’d recommend using Online Subsystem.

2 Likes

Hello SebBergy, i have made a lot of things with EOS Online Subsystem, but one thing that I am looking for some time is the ability to invite a friend to the same Session that you are, I am taking the Friends List, selecting a friend from the friend list, creating a session, starting this session, and sending an invite to this friend, this invite appears in the Epic Launcher (we have the game in the Epic Store) but it ot firing the callback to the Session Invite Received inside of the game, I dont know why its not being fired, can someone help me with it?

So I just updated my old project (5.3.1 to 5.4.3) and EOS doesn’t seem to function at all anymore?

EOS: ÐÊó°„
: Support for bShouldEnforceBeingLaunchedByEGS has been removed, please delete this config entry and instead set bUseLauncherChecks=true in your .Target.cs file(s)
EOS: EOS API failed to initialize!
OSS: Unable to create OnlineSubsystem instance EOS

Is there anything I missed? (I have been away from the project for several months)

Same, you find out why ?

Yes
in your DefaultEngine.ini > bShouldEnforceBeingLaunchedByEGS comment it out or remove it all together

; causing EOS to not init at all! remove or comment bShouldEnforceBeingLaunchedByEGS
;bShouldEnforceBeingLaunchedByEGS=False
1 Like