Advanced Sessions Plugin

4.20 beta branch is up, its been working for a week or so but I forgot to upload earlier, its a preview engine version anyway so you shouldn’t be using it regardless.

I need a hand with this. I upgraded from 4.18.3 to 4.19.2.
Before the upgrade, Advanced Sessions worked fine but after the engine upgrade, works sometimes and sometimes doesnt.

Let me explain, always joins to Spacewars as clients and as hosting server. I create a Server with no warnings and Find Sessions with no warnings. So the thing is that sometimes I can join the server with the client and sometimes Find Sessions return 0 servers continuesly with my server up and running. I could have no problems for 10 times but suddently for no reason, stop finding my server one and another try…
What could be happening here?
Could I have done something bad when I upgraded the UE engine?

[quote=“gon, post:1831, topic:30020”]

I need a hand with this. I upgraded from 4.18.3 to 4.19.2.
Before the upgrade, Advanced Sessions worked fine but after the engine upgrade, works sometimes and sometimes doesnt.

Let me explain, always joins to Spacewars as clients and as hosting server. I create a Server with no warnings and Find Sessions with no warnings. So the thing is that sometimes I can join the server with the client and sometimes Find Sessions return 0 servers continuesly with my server up and running. I could have no problems for 10 times but suddently for no reason, stop finding my server one and another try…
What could be happening here?
Could I have done something bad when I upgraded the UE engine?

Not likely, it is more likely that the spacewars app is flooding you with return results.

Did you add an extra setting that you filter by? If not, the returned list of other peoples lobbies can be larger than the default 100 results.

I am trying to create lobby and invite friends into to it. I am successful in creating and inviting people also. But I could not make onSessionInviteReceived called on the invitee client.
I have the same AdvancedFriendsGameInstance as my Project Game Instance. But when I accept Invite using Steam “chat box” of the particular invite client. I could see “onSessionInviteAccepted” is called on the invitee client.

Can you please help sorting this ? Am I missing anything here ?

[quote=“sanjithkanagavel, post:1833, topic:30020”]

I am trying to create lobby and invite friends into to it. I am successful in creating and inviting people also. But I could not make onSessionInviteReceived called on the invitee client.
I have the same AdvancedFriendsGameInstance as my Project Game Instance. But when I accept Invite using Steam “chat box” of the particular invite client. I could see “onSessionInviteAccepted” is called on the invitee client.

Can you please help sorting this ? Am I missing anything here ?

Session invite received is not actually hooked up anywhere in the engines default subsystems.

It is exposed in their SubsystemInterface though and third party subsystems can use it so I added it to the game instance.

I’ll note that Steam actually has an OnInviteReceived event in their API, but Epic sadly doesn’t currently implement it.

[quote=“, post:#Post:0x000055984f0e2990, topic:30020”]

Not likely, it is more likely that the spacewars app is flooding you with return results.

Did you add an extra setting that you filter by? If not, the returned list of other peoples lobbies can be larger than the default 100 results.

Hi , Thnx for your answer.
I think its more like a hosting server problem instead of a client prob. I can keep the client open when fails returning servers and when I see that happens, I just close and restart the game on the computer which will work as server and it could be found by client. Dunno, let me paste two pictures of the nodes, maybe with all the changes I made, I did something wrong with their settings.

Also I checked all steps and found that uncompressed your pluging inside project/plugins/AdvancedSessions/AdvancedSessions/ instead of project/plugins/AdvancedSessions/ but seems to work fine and moving to the right path makes nothing. Keeps failing sometimes to find servers.

[quote=“gon”]

Hi , Thnx for your answer.
I think its more like a hosting server problem instead of a client prob. I can keep the client open when fails returning servers and when I see that happens, I just close and restart the game on the computer which will work as server and it could be found by client. Dunno, let me paste two pictures of the nodes, maybe with all the changes I made, I did something wrong with their settings.

Also I checked all steps and found that uncompressed your pluging inside project/plugins/AdvancedSessions/AdvancedSessions/ instead of project/plugins/AdvancedSessions/ but seems to work fine and moving to the right path makes nothing. Keeps failing sometimes to find servers.

I have changed some settings and kept 0 in Private Connections at Create Advanced Sessions node and also changed Sessions to 50 at Find Sessions Advanced node.
For now, in about 8 tries, seems to work fine and always get my server listed. Ill reply this if I get any error in the future.

Does it have sense to fix the game with those changes?
​​​​​​​Thanks

This is worth 200 euros or more.

[quote=“, post:1832, topic:30020”]

Not likely, it is more likely that the spacewars app is flooding you with return results.

Did you add an extra setting that you filter by? If not, the returned list of other peoples lobbies can be larger than the default 100 results.

Nah, keeps failing sometimes giving me 0 results but I think its a Create Sessions problem instead of Find Sessions and still have no real clue.

Hi there. Just wanted to say that this plugin is amazing. Great help for us who dont wanna touch c++ more than we absolutely have to.
I’m missing some sort of overview on the extrasettings for when we create an advanced session tho… Maybe i missed something, if so can anyone give me a pointer? If an overview does not exist I think it would be great to make :slight_smile:

Thanks again!

Br
Squize

I have a problem… I can’t create any session on the Unreal Engine 4.19.2 version in a packaged build (in the editor it works fine). I’ve created a sample project and it does the same thing. I did create a widget with some buttons to create and join the session but when I try creating the session, nothing happens…

This is probably amateur question, but how do I access this plugin in c++? I have tried adding stuff to .cs file.

PublicIncludePaths.AddRange(new string] { “AdvancedSessions/Public”, “AdvancedSessions/Classes” });

and accessing it with

#include “…/Plugins/AdvancedSessions/AdvancedSessions/Source/AdvancedSessions/Classes/AdvancedSessionsLibrary.h”

resulted in error - …classes\BlueprintDataDefinitions.h(7) : fatal error C1083: Cannot open include file: ‘OnlineSessionInterface.h’: No such file or directory

Any ideas?

[quote=“Crispy_Penguin, post:1840, topic:30020”]

This is probably amateur question, but how do I access this plugin in c++? I have tried adding stuff to .cs file.

PublicIncludePaths.AddRange(new string] { “AdvancedSessions/Public”, “AdvancedSessions/Classes” });

and accessing it with

#include “…/Plugins/AdvancedSessions/AdvancedSessions/Source/AdvancedSessions/Classes/AdvancedSessionsLibrary.h”

resulted in error - …classes\BlueprintDataDefinitions.h(7) : fatal error C1083: Cannot open include file: ‘OnlineSessionInterface.h’: No such file or directory

Any ideas?

You need to include the module for the session interface, I also just did change that include line to be more verbose.

Regardless though it isn’t really intended to be used in c++, many of the nodes (async ones for instance) do not have c++ function equivalents and it doesn’t flow well in code.

Hosting sessions through c++ is far more simple and easier than using the AS nodes, they are just there to expose functionality to blueprints that isn’t normally available.

TLDR: don’t do that, follow one of the many c++ sessions tutorials and skip the additional overhead and steps.

[quote=“Squize, post:1838, topic:30020”]

Hi there. Just wanted to say that this plugin is amazing. Great help for us who dont wanna touch c++ more than we absolutely have to.
I’m missing some sort of overview on the extrasettings for when we create an advanced session tho… Maybe i missed something, if so can anyone give me a pointer? If an overview does not exist I think it would be great to make :slight_smile:

Thanks again!

Br
Squize

Extra settings are a hacky method of supporting the FVariantData type in blueprint since any kind of variable can be passed in.

You define a key (name) and a value for a property that you want people searching for the server to be able to retrieve on the other end.

[quote=“Voyder Rozann, post:1839, topic:30020”]

I have a problem… I can’t create any session on the Unreal Engine 4.19.2 version in a packaged build (in the editor it works fine). I’ve created a sample project and it does the same thing. I did create a widget with some buttons to create and join the session but when I try creating the session, nothing happens…

If you are packaging in shipping then you have to define your AppID in a txt file in the .exe directory. You can package to development to just run without worrying about that for now until later on.

[quote=“, post:1843, topic:30020”]

If you are packaging in shipping then you have to define your AppID in a txt file in the .exe directory. You can package to development to just run without worrying about that for now until later on.

My game is on Steam, I followed the “Multiplayer” tutorial by and I did put the “.txt” file with my Steam AppID… With the old versions (like “4.18.3”) it was working great but in 4.19.2 it does not work…

[quote=“Voyder Rozann, post:1844, topic:30020”]

My game is on Steam, I followed the “Multiplayer” tutorial by and I did put the “.txt” file with my Steam AppID… With the old versions (like “4.18.3”) it was working great but in 4.19.2 it does not work…

Its working for others, without a log error or something I can’t tell you anything

[quote=“eXi, post:5, topic:30020”]

Nice! Though i won’t use this. Still waiting for Epic to release this for BPs themself. Can’t put a project on the Market with a Plugin in it. :confused:

Sorry if this is the wrong place – but I have not been able to find any more information on this. I have plugins in my project, will steam not allow me to publish my application? Or is this user just saying he himself doesn’t like using plugins in a published app. Thanks

[quote=“Ethan_Sherr, post:1846, topic:30020”]

Sorry if this is the wrong place – but I have not been able to find any more information on this. I have plugins in my project, will steam not allow me to publish my application? Or is this user just saying he himself doesn’t like using plugins in a published app. Thanks

He was making a marketplace asset, you can’t require a third party plugin for your marketplace asset unless it is also on the marketplace AFAIK.

Hey, im running into a issue with hosting server/player count. so i want a server where can be only 2 players. if i set both numbers to 2 then there can be 3 players on server, if i set both to 1 then only one can be on the server. what are the numbers i need to set so there can be only 2 players?

edit: there can be also 3 players with the setting in the image.
edit2: i noticed that if im testing locally if values are 1 and 1 there can be still 3 players. but over steam there can be only 1, it feels weird. i wonder if those values doesnt affect for local testing and what is the right ones for steam…