Advanced Sessions Plugin

[QUOTE=Dr_Jerm;626991]
The Get Current Players node on the Blueprint Session Result object always returns 0 even if there are connected players (from a dedicated server). This seems to have been mentioned on this thread many moons ago: Advanced Sessions Plugin - Programming & Scripting - Epic Developer Community Forums

That old bug was due to not keeping some of the server stats when using the update node. The dedicated server issue is because the steam subsystem code doesn’t actually retrieve the player count from dedicated servers when filling out the search result, the numplayers variables are actually visibly commented out in the code.

1 Like

Hi, I have a quick question. I’ve been porting our game project to C++ after building a very functional demo in blueprint. I’m at a point where I should be porting over the existing session creation events and such that are called from UMG menus and the like. We have been using this plugin, and clearly this is intended for bp use. I was trying to figure out some manner in which I could possibly use it in C++ code, but am having trouble figuring out where certain methods like UCreateSessionCallbackProxyAdvanced::Activate() are called (it kind of looks like something called from the bp scripting engine, but I want to be sure).

Is it possible to use this plugin in C++ despite its targeting for bp? If so, any particular suggestions on where I should start? (e.g. should I just make direct calls to the functions I need from classes like UCreateSessionCallbackProxyAdvanced, ignoring things like delegate handles and such?)

1 Like

[QUOTE=patience;627469]
Hi, I have a quick question. I’ve been porting our game project to C++ after building a very functional demo in blueprint. I’m at a point where I should be porting over the existing session creation events and such that are called from UMG menus and the like. We have been using this plugin, and clearly this is intended for bp use. I was trying to figure out some manner in which I could possibly use it in C++ code, but am having trouble figuring out where certain methods like UCreateSessionCallbackProxyAdvanced::Activate() are called (it kind of looks like something called from the bp scripting engine, but I want to be sure).

Is it possible to use this plugin in C++ despite its targeting for bp? If so, any particular suggestions on where I should start? (e.g. should I just make direct calls to the functions I need from classes like UCreateSessionCallbackProxyAdvanced, ignoring things like delegate handles and such?)

You would have to bind to the callback delegates for the nodes as they have multiple execution paths, the steam subsystem has callbacks because it asks for information over the internet, you don’t get instant results.

So a few options

  1. Bind to the results
  2. Exi has a c++ tutorial for sessions on the wiki and forum that you could follow for the parts you are unsure of.
  3. Leave sessions in BP, there isn’t a performance benefit to switching them to c++, they aren’t doing heavy math or constant node calls.
1 Like

[QUOTE=soctty;626093]
Plugin is installing in 4.14 without issue for me. However, it IS causing the editor to hang when exiting Standalone PIE, making a force close from Task Manager necessary.

This behavior persists after replacing the plugin with the newly-compiled copy. Disabling AdvancedSessions resolves it, so it’s either the plugin or something it acts on causing a pretty nasty lockup. Anybody else had this issue?

Edit:
Clean project, Online Subsystem, Online Framework, Online Subsystem Null, Online Subsystem Steam and Online Subsystem Utils enabled, Advanced Sessions disabled. Standalone exits normally via Alt-Tab from standalone, standalone window minimizes, X to close. After enabling Advanced Sessions, the editor parent window immediately hangs, buttons are no longer responsive to overlap or click events, process shows as Not Responding in Task Manager. Alt-Tab no longer minimizes the standalone window, and X to close simply returns you to the locked-up editor window, which now has to be closed from Task Manager.

1 Like

[QUOTE=;627728]
You would have to bind to the callback delegates for the nodes as they have multiple execution paths, the steam subsystem has callbacks because it asks for information over the internet, you don’t get instant results.

So a few options

  1. Bind to the results
  2. Exi has a c++ tutorial for sessions on the wiki and forum that you could follow for the parts you are unsure of.
  3. Leave sessions in BP, there isn’t a performance benefit to switching them to c++, they aren’t doing heavy math or constant node calls.

Alright, that’s helpful information. Looking further, it did seem like the results had to come back asynchronously. With this, I’ll talk it over with my team and see what they feel is the best approach forward. Thank you for your response. :slight_smile:

1 Like

I’ve started using this plugin and it has been great to get joining via the Steam friends list working. Filters on session properties also work fine for servers on a local machine.

However, searching for Steam servers doesn’t work properly for me. I can find my server, it has the correct player numbers but it a ping of 9999 and my session properties aren’t present. In the logs, I see a lot of lines like “STEAM: Unable to parse search result for lobby ‘Lobby [0x1860000A952D3EF]’” or “Unknown or unsupported data type from Steam key data open_public 2” (I guess these are from other projects using SpaceWar), but nothing related to my game or my open server. Am I missing something? This is on 4.14.

1 Like

[QUOTE=dysplaced;628393]
I’ve started using this plugin and it has been great to get joining via the Steam friends list working. Filters on session properties also work fine for servers on a local machine.

However, searching for Steam servers doesn’t work properly for me. I can find my server, it has the correct player numbers but it a ping of 9999 and my session properties aren’t present. In the logs, I see a lot of lines like “STEAM: Unable to parse search result for lobby ‘Lobby [0x1860000A952D3EF]’” or “Unknown or unsupported data type from Steam key data open_public 2” (I guess these are from other projects using SpaceWar), but nothing related to my game or my open server. Am I missing something? This is on 4.14.

Ping 99999 is a problem with steam and UE4 that epic has gone back and forth with about whether it is a bug or not. Last I heard it is issued as a bug but still unresolved.

Those throw out servers are indeed ones that are filtered out because they are different games using the same APP id.

[QUOTE=soctty;628292]
This behavior persists after replacing the plugin with the newly-compiled copy. Disabling AdvancedSessions resolves it, so it’s either the plugin or something it acts on causing a pretty nasty lockup. Anybody else had this issue?

Edit:
Clean project, Online Subsystem, Online Framework, Online Subsystem Null, Online Subsystem Steam and Online Subsystem Utils enabled, Advanced Sessions disabled. Standalone exits normally via Alt-Tab from standalone, standalone window minimizes, X to close. After enabling Advanced Sessions, the editor parent window immediately hangs, buttons are no longer responsive to overlap or click events, process shows as Not Responding in Task Manager. Alt-Tab no longer minimizes the standalone window, and X to close simply returns you to the locked-up editor window, which now has to be closed from Task Manager.

No nodes whatsoever? The plugin doesn’t have anything that loads on startup, you actually have to bind to nodes for its functionality to work so it shouldn’t be “Hanging” if you aren’t using it. I don’t know of anyone else that has your problem, and the closest I ever saw was people using “End session” on exit and waiting for it to complete even though there wasn’t one hosted so the project hung there.

1 Like

[QUOTE=;628397]
No nodes whatsoever? The plugin doesn’t have anything that loads on startup, you actually have to bind to nodes for its functionality to work so it shouldn’t be “Hanging” if you aren’t using it. I don’t know of anyone else that has your problem, and the closest I ever saw was people using “End session” on exit and waiting for it to complete even though there wasn’t one hosted so the project hung there.

Nothing at all. Rolled a completely new project just to isolate whatever was causing the issue. It’s the weirdest thing. I’ve been using the plugin for several engine versions now, and this is the first time I’ve seen it do anything but be amazing.

1 Like

[QUOTE=soctty;628398]
Nothing at all. Rolled a completely new project just to isolate whatever was causing the issue. It’s the weirdest thing. I’ve been using the plugin for several engine versions now, and this is the first time I’ve seen it do anything but be amazing.

And you have the subsystems enabled as plugins now and not directly linked into your build.cs?

1 Like

[QUOTE=;628399]
And you have the subsystems enabled as plugins now and not directly linked into your build.cs?

Correct. All relevant subsystems are enabled as plugins.

Side note: This isn’t an on startup issue; the editor itself launches as normal. It’s only when attempting to play in editor, and only in standalone mode.

Update: Just had it happen in another new project, but the plugin hasn’t been integrated yet. Will follow up.

Update 2: I can’t make heads or tails of this. There doesn’t seem to be any rhyme or reason to what causes it, but it’s all related to the OSS. The Steam overlay isn’t popping in, the editor is still locking up on begin PIE, and I’m absolutely at a loss because there’s no bloody documentation of the new OSS plugin system and no output log to be had from the lockups.

1 Like

After some deep digging, it appears to have been an issue with GeForce Experience 3. Disabling “Share” has been the remedy for several folks, myself included.

Link:
https://answers.unrealengine.com/questions/488678/bug-editor-hangs-after-playing-in-standalone.html

1 Like

[QUOTE=;628397]
Ping 99999 is a problem with steam and UE4 that epic has gone back and forth with about whether it is a bug or not. Last I heard it is issued as a bug but still unresolved.

Those throw out servers are indeed ones that are filtered out because they are different games using the same APP id.

I could live with the ping, but the properties are essential. Could their absence be related to the plugin, or is that an engine bug as well? Also, finding games over LAN doesn’t work at all for me, but I assume that can’t be related to or solved by the sessions plugin.

1 Like

[QUOTE=dysplaced;628499]
I could live with the ping, but the properties are essential. Could their absence be related to the plugin, or is that an engine bug as well? Also, finding games over LAN doesn’t work at all for me, but I assume that can’t be related to or solved by the sessions plugin.

Session properties should be there, you are doing something wrong if they aren’t.

1 Like

Hey mord,

I’ve just made a new project for 4.14 and have the old Sessionflags problem again. I thought I ‘fixed’ it by using just a small boolean as extra setting when creating the session, but even without any additional settings, the error now occurs. This is the servers log:



LogInit: Build: ++UE4+Release-4.14-CL-0
LogInit: Engine Version: 4.14.1-0+++UE4+Release-4.14
LogInit: Compatible Engine Version: 4.14.0-0+++UE4+Release-4.14
LogInit: Net CL: 0
LogDevObjectVersion: Number of dev versions registered: 13
LogDevObjectVersion:   Dev-Blueprints (B0D832E4-1F89-4F0D-ACCF-7EB736FD4AA2): 7
LogDevObjectVersion:   Dev-Build (E1C64328-A22C-4D53-A36C-8E866417BD8C): 0
LogDevObjectVersion:   Dev-Core (375EC13C-06E4-48FB-B500-84F0262A717E): 1
LogDevObjectVersion:   Dev-Editor (E4B068ED-F494-42E9-A231-DA0B2E46BB41): 8
LogDevObjectVersion:   Dev-Framework (CFFC743F-43B0-4480-9391-14DF171D2073): 17
LogDevObjectVersion:   Dev-Mobile (B02B49B5-BB20-44E9-A304-32B752E40360): 0
LogDevObjectVersion:   Dev-Networking (A4E4105C-59A1-49B5-A7C5-40C4547EDFEE): 0
LogDevObjectVersion:   Dev-Online (39C831C9-5AE6-47DC-9A44-9C173E1C8E7C): 0
LogDevObjectVersion:   Dev-Physics (78F01B33-EBEA-4F98-B9B4-84EACCB95AA2): 0
LogDevObjectVersion:   Dev-Platform (6631380F-2D4D-43E0-8009-CF276956A95A): 0
LogDevObjectVersion:   Dev-Rendering (12F88B9F-8875-4AFC-A67C-D90C383ABD29): 12
LogDevObjectVersion:   Dev-Sequencer (7B5AE74C-D270-4C10-A958-57980B212A5A): 1
LogDevObjectVersion:   Dev-VR (D7296918-1DD6-4BDD-9DE2-64A83CC13884): 0
LogInit: Compiled (64-bit): Nov 26 2016 03:07:56
LogInit: Compiled with Visual C++: 19.00.24215.01
LogInit: Build Configuration: Development
LogInit: Branch Name: ++UE4+Release-4.14
LogInit: Command line: -log
LogInit: Base directory: C:/WindowsNoEditor/TestProject4_14/Binaries/Win64/
LogInit: Installed Engine Build: 0
LogInit: Presizing for 2097152 objects, including 0 objects not considered by GC, pre-allocating 0 bytes for permanent pool.
LogInit: Object subsystem initialized
[2016.11.26-10.41.44:087]  0]LogInit: Selected Device Profile: [WindowsServer]
[2016.11.26-10.41.44:087]  0]LogInit: Applying CVar settings loaded from the selected device profile: [WindowsServer]
[2016.11.26-10.41.44:090]  0]LogInit: Computer: IULIUS
[2016.11.26-10.41.44:090]  0]LogInit: User: JuliusLange
[2016.11.26-10.41.44:091]  0]LogInit: CPU Page size=65536, Cores=4
[2016.11.26-10.41.44:091]  0]LogInit: High frequency timer resolution =3.914069 MHz
[2016.11.26-10.41.44:091]  0]LogMemory: Memory total: Physical=31.9GB (32GB approx)
[2016.11.26-10.41.44:091]  0]LogMemory: Platform Memory Stats for WindowsServer
[2016.11.26-10.41.44:092]  0]LogMemory: Process Physical Memory: 108.23 MB used, 108.23 MB peak
[2016.11.26-10.41.44:092]  0]LogMemory: Process Virtual Memory: 121.02 MB used, 121.02 MB peak
[2016.11.26-10.41.44:092]  0]LogMemory: Physical Memory: 10499.39 MB used,  22117.16 MB free, 32616.55 MB total
[2016.11.26-10.41.44:092]  0]LogMemory: Virtual Memory: 422.14 MB used,  22117.16 MB free, 134217728.00 MB total
[2016.11.26-10.41.44:113]  0]LogTextLocalizationManager: No translations for ('de-DE') exist, falling back to 'en' for localization and internationalization data.
[2016.11.26-10.41.44:212]  0]LogAssetRegistry: FAssetRegistry took 0.0023 seconds to start up
[2016.11.26-10.41.44:215]  0]LogPackageLocalizationCache: Processed 3 localized package path(s) for 1 prioritized culture(s) in 0.002652 seconds
[2016.11.26-10.41.44:237]  0]LogInit: Selected Device Profile: [WindowsServer]
[2016.11.26-10.41.44:243]  0]LogBlueprintUserMessages:Warning: DEBUG: LocalNotification DefaultPlatformService NOT FOUND
[2016.11.26-10.41.44:250]  0]LogNetVersion: GetLocalNetworkVersion: CL: 0, ProjectName: testproject4_14, ProjectVersion: , EngineNetworkVersion: 2, GameNetworkVersion: 0, NetworkChecksum: 1500023503
[2016.11.26-10.41.44:258]  0]LogUObjectArray: 29801 objects as part of root set at end of initial load.
[2016.11.26-10.41.44:258]  0]LogUObjectAllocator: 6081000 out of 0 bytes used by permanent object pool.
[2016.11.26-10.41.44:258]  0]LogUObjectArray: CloseDisregardForGC: 0/0 objects in disregard for GC pool
[2016.11.26-10.41.44:258]  0]LogModuleManager:Warning: ModuleManager: Module 'XAudio2' not found - its StaticallyLinkedModuleInitializers function is null.
[2016.11.26-10.41.44:283]  0]LogEngine: Initializing Engine...
[2016.11.26-10.41.44:288]  0]LogInit: Texture streaming: Disabled
[2016.11.26-10.41.44:293]  0]LogInit:Display: Game Engine Initialized.
[2016.11.26-10.41.44:293]  0]LogInit:Display: Starting Game.
[2016.11.26-10.41.44:293]  0]LogNet: Browse: /Game/ThirdPersonBP/Maps/ThirdPersonExampleMap?Name=Player
[2016.11.26-10.41.44:293]  0]LogLoad: LoadMap: /Game/ThirdPersonBP/Maps/ThirdPersonExampleMap?Name=Player
[2016.11.26-10.41.44:325]  0]LogMemory: Platform Memory Stats for WindowsServer
[2016.11.26-10.41.44:325]  0]LogMemory: Process Physical Memory: 158.11 MB used, 162.45 MB peak
[2016.11.26-10.41.44:325]  0]LogMemory: Process Virtual Memory: 148.87 MB used, 153.93 MB peak
[2016.11.26-10.41.44:325]  0]LogMemory: Physical Memory: 10629.90 MB used,  21986.65 MB free, 32616.55 MB total
[2016.11.26-10.41.44:325]  0]LogMemory: Virtual Memory: 469.64 MB used,  21986.65 MB free, 134217728.00 MB total
[2016.11.26-10.41.44:326]  0]LogMemory:
[2016.11.26-10.41.44:326]  0]Allocator Stats for binned2: (not implemented)
[2016.11.26-10.41.44:339]  0]LogAIModule: Creating AISystem for world ThirdPersonExampleMap
[2016.11.26-10.41.44:345]  0]LogLoad: Game class is 'ThirdPersonGameMode_C'
[2016.11.26-10.41.44:345]  0]LogNet:Display: SteamNetDriver_0 bound to port 7777
[2016.11.26-10.41.44:345]  0]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2016.11.26-10.41.44:345]  0]LogNet: GameNetDriver SteamNetDriver_0 IpNetDriver listening on port 7777
[2016.11.26-10.41.44:346]  0]LogRHI: NullRHI preferably does not allocate memory on the server. Try to change the caller to avoid doing allocs in when FApp::ShouldUseNullRHI() is true.
[2016.11.26-10.41.44:369]  0]LogWorld: Bringing World /Game/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap up for play (tick rate 30) at 2016.11.26-11.41.44
[2016.11.26-10.41.44:369]  0]LogWorld: Bringing up level for play took: 0.023339
[2016.11.26-10.41.44:371]  0]LogNetVersion: GetLocalNetworkVersion: CL: 0, ProjectName: testproject4_14, ProjectVersion: 1.0.0.0, EngineNetworkVersion: 2, GameNetworkVersion: 0, NetworkChecksum: 3981561974
[2016.11.26-10.41.44:371]  0]LogLoad: Took 0.077420 seconds to LoadMap(/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap)
[2016.11.26-10.41.44:371]  0]LogLoad: (Engine Initialization) Total time: 0.69 seconds
[2016.11.26-10.41.44:371]  0]LogExternalProfiler: No external profilers were discovered.  External profiling features will not be available.
[2016.11.26-10.41.45:566] 36]LogOnline:Warning: STEAM: Server setting ,SESSIONFLAGS:683 overflows Steam SetGameTags call
[2016.11.26-10.41.45:567] 36]LogScriptCore:Warning: Script Msg: StartSessionCallback - Invalid player state
[2016.11.26-10.41.45:568] 36]LogBlueprintUserMessages: [ThirdPersonExampleMap_C_1] session created


1 Like

[QUOTE=;627142]
That old bug was due to not keeping some of the server stats when using the update node. The dedicated server issue is because the steam subsystem code doesn’t actually retrieve the player count from dedicated servers when filling out the search result, the numplayers variables are actually visibly commented out in the code.

I just spent the last two days trying to encode my own player count in the session settings (both your plugin and with C++ source) and haven’t had any luck. Whenever I update my session (when a player joins or leaves) it causes the dedicated server to no longer be returned in a session search. Can you think of a work-around for player count? It seems pretty critical to have… if one server fills up you have to be able to know to pick another one.

1 Like

After hosting a game other players can see the available lobby but cant join it. The lobby ping appears as “9999”.

How can I fix it ?

1 Like

[QUOTE=;630230]
After hosting a game other players can see the available lobby but cant join it. The lobby ping appears as “9999”.

How can I fix it ?

Look on answerhub for the ping issue, 9999 is an engine “bug”, the lobby not being joinable is something that you are doing wrong.

[QUOTE=adipFTW;628958]
Hey mord,

I’ve just made a new project for 4.14 and have the old Sessionflags problem again. I thought I ‘fixed’ it by using just a small boolean as extra setting when creating the session, but even without any additional settings, the error now occurs. This is the servers log:






You are on a dedicated build right? The lobby builds use the full larger alternative string for hosting and get away with more, the dedicated ones are locked into the short string. There actually isn't much I can help you with about it through a plugin. I can't change the subsystem macros without remaking the subsystem itself. If you need to save space then I would suggest turning map names and other longer values you are trying to pass into enums and sending the enum value instead as it will take faaaaar less space in the total string that Steam stores.

Same for game modes and the like, if you know what they are then sending the full qualified name is overkill and you can just send an ID for it instead. Instead of key "GAMEMODE" "THIS IS THE MODE NAME" you can do "GM" "0", "GM" "1", and then translate it to the enum value on the client side.


There was a while when dedicated servers ALWAYS caused the bufffer overflow because the engine passes in the clients system name as the hostname and that can get really long. It might be doing it again.....



[QUOTE=Dr_Jerm;629238]
I just spent the last two days trying to encode my own player count in the session settings (both your plugin and with C++ source) and haven't had any luck. Whenever I update my session (when a player joins or leaves) it causes the dedicated server to no longer be returned in a session search. Can you think of a work-around for player count? It seems pretty critical to have... if one server fills up you have to be able to know to pick another one.



Are you updating it with dedicated unticked or presence ticked or some other conflicting setting?
1 Like

[QUOTE=;630333]
Are you updating it with dedicated unticked or presence ticked or some other conflicting setting?

Merging in the Steam Auth pull request (https://github.com/EpicGames/UnrealEngine/pull/2135) seemed to have resolved the issue :confused: hopefully that functionality gets added to core soon. Thanks again for being so responsive/active on this thread.

1 Like

[QUOTE=Dr_Jerm;630494]
Merging in the Steam Auth pull request (https://github.com/EpicGames/UnrealEngine/pull/2135) seemed to have resolved the issue :confused: hopefully that functionality gets added to core soon. Thanks again for being so responsive/active on this thread.

Yeah…it would be really nice if it eventually got merged (though it needs changes).

1 Like

altnabla passed me along a link about the 9999 ping problem. http://www.aclockworkberry.com/ping-9999-issue-on-unreal-engine-steam-session-results/ He did fix the issue for another project but isn’t allowed to share the code. Maybe this will interest someone here? Have you seen this before ?

1 Like