Advanced Sessions Plugin

[QUOTE=;549629]
mmm, android doesn’t support steam as a subsystem. Since I have steam specific functions in it you are getting errors packaging for android. I can wrap the steam specific functions up in a platform check and it should be fine. I’ll release a new version in a little bit that you can try out.

Thannnkkk! When you make a new realease I try this again. So many thanks!

1 Like

[QUOTE=LCDLV;549632]
Thannnkkk! When you make a new realease I try this again. So many thanks!

It has been updated, it now skips all of the steam specific code when compiling for platforms other than linux/mac/windows. Let me know if that works for you.

1 Like

[QUOTE=;549624]
Yes, and it is working for others ATM and is implemented in the subsystem. The other event sadly is not implemented yet.

Alright, I guess I’m going to find the reason it doesn’t want to work for me. Maybe something is wrong with my session.

1 Like

[QUOTE=;549655]
It has been updated, it now skips all of the steam specific code when compiling for platforms other than linux/mac/windows. Let me know if that works for you.

I delete the folder in Pluggin folder, next copy the new one.

Now I have another different error:

MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Reflection code generated for SuperSlughfest in 14,8313241 seconds
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Performing 4 actions (2 in parallel)
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [2/4] clang++.exe AdvancedSessions.generated.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [1/4] clang++.exe Module.AdvancedSessions.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: clang++.exe: error: no such file or directory: ‘@C:\Users\Koki\Documents\GitHub\UE4\Plugins\AdvancedSessions\Intermediate\Build\Android\UE4\Development\AdvancedSessions\Module.AdvancedSessions.cpp-armv7-es2.o.response’
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: clang++.exe: error: no input files
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: clang++.exe: error: no such file or directory: ‘@C:\Users\Koki\Documents\GitHub\UE4\Plugins\AdvancedSessions\Intermediate\Build\Android\UE4\Development\AdvancedSessions\AdvancedSessions.generated.cpp-armv7-es2.o.response’
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: clang++.exe: error: no input files
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Users\Koki\Documents\GitHub\UE4\Plugins\AdvancedSessions\Binaries\Android\UE4-AdvancedSessions-armv7-es2.a
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Total build time: 20,58 seconds
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: Took 20,7893605s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Command failed (Result:5): C:\Program Files\Epic Games\Engine\Binaries\DotNET\UnrealBuildTool.exe SuperSlughfest Android Development -Project=C:\Users\K
MainFrameActions: Packaging (Android (All)): oki\Documents\GitHub\UE4\SuperSlughfest.uproject C:\Users\Koki\Documents\GitHub\UE4\SuperSlughfest.uproject -remoteini=“C:\Users\Koki\Documents\GitHub\UE4” -noxge -NoHotReloadFromIDE -ignorejunk. See logfile for details: ‘UnrealBuildTool-2016.06.17-12.49.34.txt’
MainFrameActions: Packaging (Android (All)): en AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars) MainFrameActions: Packaging (Android (All)): en AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary2 EnvVars)
MainFrameActions: Packaging (Android (All)): en AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary2 EnvVars ) MainFrameActions: Packaging (Android (All)): en AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 PlatformEnvVars, Nullable1 InChangelistNumberOverride, Di
ctionary2 InTargetToManifest) MainFrameActions: Packaging (Android (All)): en Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) MainFrameActions: Packaging (Android (All)): en BuildCookRun.DoBuildCookRun(ProjectParams Params) MainFrameActions: Packaging (Android (All)): en AutomationTool.BuildCommand.Execute() MainFrameActions: Packaging (Android (All)): en AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) MainFrameActions: Packaging (Android (All)): en AutomationTool.Automation.Process(String] CommandLine) MainFrameActions: Packaging (Android (All)): en AutomationTool.Program.MainProc(Object Param) MainFrameActions: Packaging (Android (All)): en AutomationTool.InternalUtils.RunSingleInstance(Func2 Main, Object Param)
MainFrameActions: Packaging (Android (All)): en AutomationTool.Program.Main()
MainFrameActions: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
MainFrameActions: Packaging (Android (All)): Domain_ProcessExit
MainFrameActions: Packaging (Android (All)): copying UAT log files…
MainFrameActions: Packaging (Android (All)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Thank for the quick reply and the amazing job!

UPDATE: I delete some folders (SAVED, INTERMEDIATED and BINARI) and maybe I solve this last problem…

1 Like

Solved!

[QUOTE=LCDLV;549678]
I delete the folder in Pluggin folder, next copy the new one.

Now I have another different error:

MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Reflection code generated for SuperSlughfest in 14,8313241 seconds
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Performing 4 actions (2 in parallel)
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [2/4] clang++.exe AdvancedSessions.generated.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [1/4] clang++.exe Module.AdvancedSessions.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: clang++.exe: error: no such file or directory: ‘@C:\Users\Koki\Documents\GitHub\UE4\Plugins\AdvancedSessions\Intermediate\Build\Android\UE4\Development\AdvancedSessions\Module.AdvancedSessions.cpp-armv7-es2.o.response’
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: clang++.exe: error: no input files
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: clang++.exe: error: no such file or directory: ‘@C:\Users\Koki\Documents\GitHub\UE4\Plugins\AdvancedSessions\Intermediate\Build\Android\UE4\Development\AdvancedSessions\AdvancedSessions.generated.cpp-armv7-es2.o.response’
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: clang++.exe: error: no input files
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Users\Koki\Documents\GitHub\UE4\Plugins\AdvancedSessions\Binaries\Android\UE4-AdvancedSessions-armv7-es2.a
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Total build time: 20,58 seconds
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: Took 20,7893605s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Command failed (Result:5): C:\Program Files\Epic Games\Engine\Binaries\DotNET\UnrealBuildTool.exe SuperSlughfest Android Development -Project=C:\Users\K
MainFrameActions: Packaging (Android (All)): oki\Documents\GitHub\UE4\SuperSlughfest.uproject C:\Users\Koki\Documents\GitHub\UE4\SuperSlughfest.uproject -remoteini=“C:\Users\Koki\Documents\GitHub\UE4” -noxge -NoHotReloadFromIDE -ignorejunk. See logfile for details: ‘UnrealBuildTool-2016.06.17-12.49.34.txt’
MainFrameActions: Packaging (Android (All)): en AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars) MainFrameActions: Packaging (Android (All)): en AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary2 EnvVars)
MainFrameActions: Packaging (Android (All)): en AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary2 EnvVars ) MainFrameActions: Packaging (Android (All)): en AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 PlatformEnvVars, Nullable1 InChangelistNumberOverride, Di
ctionary2 InTargetToManifest) MainFrameActions: Packaging (Android (All)): en Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) MainFrameActions: Packaging (Android (All)): en BuildCookRun.DoBuildCookRun(ProjectParams Params) MainFrameActions: Packaging (Android (All)): en AutomationTool.BuildCommand.Execute() MainFrameActions: Packaging (Android (All)): en AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) MainFrameActions: Packaging (Android (All)): en AutomationTool.Automation.Process(String] CommandLine) MainFrameActions: Packaging (Android (All)): en AutomationTool.Program.MainProc(Object Param) MainFrameActions: Packaging (Android (All)): en AutomationTool.InternalUtils.RunSingleInstance(Func2 Main, Object Param)
MainFrameActions: Packaging (Android (All)): en AutomationTool.Program.Main()
MainFrameActions: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
MainFrameActions: Packaging (Android (All)): Domain_ProcessExit
MainFrameActions: Packaging (Android (All)): copying UAT log files…
MainFrameActions: Packaging (Android (All)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Thank for the quick reply and the amazing job!

UPDATE: I delete some folders (SAVED, INTERMEDIATED and BINARI) and maybe I solve this last problem…

I Delete the folders BUILD, INTERMEDIATE and SAVED and its work again.

I think the update is very necesary, and a little trick of delete this folders too.
Thanks again!

1 Like

[QUOTE=LCDLV;549749]
I Delete the folders BUILD, INTERMEDIATE and SAVED and its work again.

I think the update is very necesary, and a little trick of delete this folders too.
Thanks again!

Yeah intermediate stores the auto generated files, it gets in the way when it doesn’t know you need to regenerate it. You can either delete the folder entirely or (in most cases, sometimes deleting is required) run a “clean” operation on the project.

It still had information from the last version of the plugin in it.

1 Like

Ug, i’m going to have to revise the android fix and upload a new version. UFunctions inside of a preprocessor define check don’t ever compile out, even if the preprocessor check succeeded.

I’ll have the blueprint functions stay inside of the android builds but return null values instead. Don’t think there is an alternative without splitting it into another module or header.

Edit Uploaded the fix, someday i’ll make it cleaner

1 Like

Trying to compile a WindowsServer build but I’m getting the following error

ERROR : UBT error : Failed to produce item: C:\Unreal Engine Projects\DGP\Plugins\AdvancedSessions\Binaries\Win64\UE4Server-AdvancedSessions-Win64-DebugGame.lib

I’ve tried deleting the folders as suggested above, but to no avail. Any help is greatly appreciated.

1 Like

[QUOTE=;549976]
Ug, i’m going to have to revise the android fix and upload a new version. UFunctions inside of a preprocessor define check don’t ever compile out, even if the preprocessor check succeeded.

I’ll have the blueprint functions stay inside of the android builds but return null values instead. Don’t think there is an alternative without splitting it into another module or header.

Edit Uploaded the fix, someday i’ll make it cleaner

Hi Again! I finish a tutorial and in the PC work really fine, but in android CREATE ADVANCE SESSION and JOIN ADVANCE SESSION failed everytime…
My DefaulEngine.ini its:

[OnlineSubsystem]
DefaultPlatformService=Null

This is the tutorial: [UE4/BP] Advanced Lobby Tutorial - YouTube

Thats my blueprints en Game Instance:


I download the last version and have the issue with the above version (when I have a problem to compile the APK).
Sorry for my English! Thanks from Argentina!

1 Like

Thank you for this amazing plug-in. It opens so many new doors for BP-only users with little C++ experience.

I have one quick question about the “Is Player in Session” node. Does it return “true” only when the player in question has joined someone else’s session and not hosting theirs?
The problem I had is that it returned “false” when I called it with the hosting friend’s Unique Net ID (but she must be in the session she’s hosting, right?). Similarly, the “Find Friend Session Info” node returns nothing (doesn’t Fail or Succeed) if that friend is hosting the session.

I haven’t checked what happens when the player I input is in someone else’s session, so cannot comment on that case.

I’m positive that the host in our experiment succesfully created a session using the “Create Advanced Session” node, because it showed in the list when I used the “Find Sessions Advanced” node to search for it.

Any help would be great if you have the time.

1 Like

Hi ,

Has the problem with STEAM: Server Overflow SESSIONFLAGS error on dedicated servers been solved?
I see you talking about it in these link, but I’m not sure how to shorten key names and what keys can be accessed in the default session.

Thanks

1 Like

[QUOTE=alperenakyuz;550397]
Thank you for this amazing plug-in. It opens so many new doors for BP-only users with little C++ experience.

I have one quick question about the “Is Player in Session” node. Does it return “true” only when the player in question has joined someone else’s session and not hosting theirs?
The problem I had is that it returned “false” when I called it with the hosting friend’s Unique Net ID (but she must be in the session she’s hosting, right?). Similarly, the “Find Friend Session Info” node returns nothing (doesn’t Fail or Succeed) if that friend is hosting the session.

I haven’t checked what happens when the player I input is in someone else’s session, so cannot comment on that case.

I’m positive that the host in our experiment succesfully created a session using the “Create Advanced Session” node, because it showed in the list when I used the “Find Sessions Advanced” node to search for it.

Any help would be great if you have the time.

Is player in session probably only works for clients yes, the clients shouldn’t need to call it themselves. I haven’t ran into the Find Session info returning nothing if it is the host, in fact the only way to test it would have been client to host so you might have something wrong.

[QUOTE=Sarlack;550421]
Hi ,

Has the problem with STEAM: Server Overflow SESSIONFLAGS error on dedicated servers been solved?
I see you talking about it in these link, but I’m not sure how to shorten key names and what keys can be accessed in the default session.

Thanks

I can’t fix that in a plugin sadly unless I redefine names and I really shouldn’t #undef / #define engine constants.

1 Like

[QUOTE=;549546]
Not true, the On Session Invite Accepted event should work I believe, it is the on received one that will not work. Accepted has to work because that is how you implement joining the game off of the friends list invite.

This is true (tested on PC-Steam and PS4)

1 Like

[QUOTE=MaXi;551088]
This is true (tested on PC-Steam and PS4)

What I said? Or that that neither event is currently working?

1 Like

[QUOTE=;551158]
What I said? Or that that neither event is currently working?

What you said.
On Session Invite Accepted event works Ok in PC-Steam and PS4. Event On Session Invite Received event is never received.
Sorry for the confusion :s

1 Like

[QUOTE=MaXi;551161]
What you said.
On Session Invite Accepted event works Ok in PC-Steam and PS4. Event On Session Invite Received event is never received.
Sorry for the confusion :s

Thats fine, and thanks for the confirmation. There are a lot of artists and new engine users using the plugin so I get a ton of misinformation about what does/doesn’t work. I should resurrect a dead project and use it just to compile out test copies for multiple computers to make sure everything is fine across engine changes.

1 Like

Thanks for the hard work !

I’m working on releasing an example project.

Any ideas why FindFriendSession causes a crash when searching the UniqueNetID of a player who is on the main screen? (No CreateAdvancedSessions started.) It doesn’t crash if the players are playing the game.

[QUOTE]
[2016.06.21-05.50.12:351] 50]LogBlueprintUserMessages: [MainMenu_C_0] [MAIN MENU ]Active widget index is 1
[2016.06.21-05.50.13:688] 81]LogBlueprintUserMessages: [PlayGameSubMenu] [SETTINGS SUBMENU] Active widget index is 4
[2016.06.21-05.50.18:933][196]LogBlueprintUserMessages: [FriendsList] BuildID: 961667077
[2016.06.21-05.50.18:934][196]AdvancedFindFriendSessionLog:Warning: FindFriendSession Failed
[2016.06.21-05.50.18:968][196]LogBlueprintUserMessages: [FriendsList] FriendFailed: splinter
[2016.06.21-05.50.19:422][207]AdvancedFindFriendSessionLog:Warning: FindFriendSession Failed
[2016.06.21-05.50.19:423][207]LogBlueprintUserMessages: [FriendsList] FriendFailed: Vii
[2016.06.21-05.50.19:938][218]AdvancedFindFriendSessionLog:Warning: FindFriendSession Failed
[2016.06.21-05.50.19:939][218]LogBlueprintUserMessages: [FriendsList] FriendFailed: ¤CvG¤™Trothgar
[2016.06.21-05.50.20:491][230]AdvancedFindFriendSessionLog:Warning: FindFriendSession Failed
[2016.06.21-05.50.20:492][230]LogBlueprintUserMessages: [FriendsList] FriendFailed: AidanZon
[2016.06.21-05.50.20:994][241]AdvancedFindFriendSessionLog:Warning: FindFriendSession Failed
[2016.06.21-05.50.20:995][241]LogBlueprintUserMessages: [FriendsList] FriendFailed: darthgraygor
[2016.06.21-05.50.21:501][252]AdvancedFindFriendSessionLog:Warning: FindFriendSession Failed
[2016.06.21-05.50.21:503][252]LogBlueprintUserMessages: [FriendsList] FriendFailed: Reptar
[2016.06.21-05.50.22:002][263]AdvancedFindFriendSessionLog:Warning: FindFriendSession Failed
[2016.06.21-05.50.22:003][263]LogBlueprintUserMessages: [FriendsList] FriendFailed: Desperado
[2016.06.21-05.50.22:522][274]AdvancedFindFriendSessionLog:Warning: FindFriendSession Failed
[2016.06.21-05.50.22:556][274]LogMemory:Warning: Freeing 33554432 bytes from backup pool to handle out of memory.
[2016.06.21-05.50.22:556][274]LogMemory:Warning: MemoryStats:
AvailablePhysical 7933440000
AvailableVirtual 140735600828416
UsedPhysical 835244032
PeakUsedPhysical 897642496
UsedVirtual 1049387008
PeakUsedVirtual 1137192960
[2016.06.21-05.50.22:556][274]LogBlueprintUserMessages: [FriendsList] FriendFailed: metahusk
[2016.06.21-05.50.22:557][274]LogWindows:Error: Windows GetLastError: The operation completed successfully. (0)
[2016.06.21-05.50.23:009][281]LogThreadingWindows:Error: Runnable thread OnlineAsyncTaskThreadSteam DefaultInstance crashed.
[2016.06.21-05.50.23:009][281]LogWindows:Error: === Critical error: ===
Fatal error: [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp] [Line: 139]
Ran out of memory allocating 18446744066972348008 bytes with alignment 0

Crash in runnable thread OnlineAsyncTaskThreadSteam DefaultInstance

The crash only happens when a player is in the main menu and that player UniqueNetID is called by FindFriendSession. If the player is in the game it doesn’t cause an issue.

I’ve tried three different systems and both in-editor and built copies. Mismatched BuildID’s? I wonder why would it only happen in the main menu. (Where no session has been created yet.) I’ve tried a lot of things before taking your time. I’m not sure if it’s a bug.

That last friend “metahusk” is the Steam user that is sitting on the main menu.

Thanks!

edit: I built a new copy of the game. The built copies that match won’t crash on FindFriendSession hitting a Steam user sitting on the main menu but if I open the in editor Standalone Game it does crash.

1 Like

Its attempting to allocate uint64_MAX worth of memory when searching for many friend sessions during a loop? ok…

Can you show me a SS of your loop? I have the function pulled up but can’t get down to testing it for a couple of hours but it looks like they are creating a unique net id manually for people out of a lobby. Regardless FindFriendSession shouldn’t be called on someone in the menu, they aren’t actually in a session at the time, but it should fail gracefully, not have memory corruption.

Edit You know what? I totally forgot to initialize Friend.PresenceInfo in the “GetFriend” function…

It contains the following:


	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bIsOnline;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bIsPlaying;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bIsPlayingThisGame;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bIsJoinable;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bHasVoiceSupport;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		TEnumAsByte<EBPOnlinePresenceState::Type> PresenceState;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		FString StatusString;

Which should allow you to fully define whether they are joinable and their current status. I had some of the presence settings exposed to their own variables but I will fill out the entire presence structure, like “IsJoinable” which would be a big help here…

1 Like

[QUOTE=;551923]
Its attempting to allocate uint64_MAX worth of memory when searching for many friend sessions during a loop? ok…

Can you show me a SS of your loop? I have the function pulled up but can’t get down to testing it for a couple of hours but it looks like they are creating a unique net id manually for people out of a lobby. Regardless FindFriendSession shouldn’t be called on someone in the menu, they aren’t actually in a session at the time, but it should fail gracefully, not have memory corruption.

Edit You know what? I totally forgot to initialize Friend.PresenceInfo in the “GetFriend” function…

It contains the following:


	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bIsOnline;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bIsPlaying;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bIsPlayingThisGame;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bIsJoinable;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		bool bHasVoiceSupport;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		TEnumAsByte<EBPOnlinePresenceState::Type> PresenceState;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
		FString StatusString;

Which should allow you to fully define whether they are joinable and their current status. I had some of the presence settings exposed to their own variables but I will fill out the entire presence structure, like “IsJoinable” which would be a big help here…

Thanks for the fast reply. I’m at work right now. I can take a screenshot later. No hurry… I know supporting things can be a lot of work. Friend.PresenceInfo discovering if they are joinable would be a great!

Edit: It’s strange it only crashes in the editor. I imagine detecting if they are joinable first will fix the problem.

1 Like

[QUOTE=;552017]
Thanks for the fast reply. I’m at work right now. I can take a screenshot later. No hurry… I know supporting things can be a lot of work. Friend.PresenceInfo discovering if they are joinable would be a great!

Edit: It’s strange it only crashes in the editor. I imagine detecting if they are joinable first will fix the problem.

It was only the “GetFriend” function that was missing the Presence information. GetStoredFriendsList and GetFriendsList both return the correct presence and you should be able to check “bIsJoinable” and “bIsPlayingSameGame”.

Also the steam function FindFriendSession already checks to see if they are actually in game or not. I would like that screenshot when possible, I can’t find a problem in the code itself so far.

Edit Unless it has to do with this:


				else
				{
					// Search for the session via host ip
					TSharedRef<FInternetAddr> IpAddr = ISocketSubsystem::Get()->CreateInternetAddr(FriendGameInfo.m_unGameIP, FriendGameInfo.m_usGamePort);
					CurrentSessionSearch->QuerySettings.Set(FName(SEARCH_STEAM_HOSTIP), IpAddr->ToString(true), EOnlineComparisonOp::Equals);

					FOnlineAsyncTaskSteamFindServer* NewTask = new FOnlineAsyncTaskSteamFindServer(SteamSubsystem, SearchSettings, LocalUserNum, OnFindFriendSessionCompleteDelegates[LocalUserNum]);
					SteamSubsystem->QueueAsyncTask(NewTask);
				}

If the player isn’t in a session then it tries to find a server by the players session IP instead, i’ll see if steam ever passes in a NULL for an ip.

Edit 2

Welp, no clue anymore, there is some funky **** going on in the steam subsystem


TSharedRef<FInternetAddr> FSocketSubsystemSteam::CreateInternetAddr(uint32 Address, uint32 Port)
{
	FInternetAddrSteam* SteamAddr = new FInternetAddrSteam();
	return MakeShareable(SteamAddr);
}

When making the search for the ip based game it uses that function, which doesn’t end up using the passed in address and port at all… The default socketsubsystem uses them but it is calling the SocketSubsystemSteams implementation instead so the port and ip are just 0.

Long story short, I think the steam subsystem has some real problems in it and you should just check if they are playing a game and are joinable before getting their session information. I will upload a new version that has the GetFriendInfo having the full presence information after I run a debug test to make sure it actually calls that function.

1 Like