When I only use join (logs after first red line) and destroy session nodes (after second red line)…my dedicated server make some strange msg like image below. When a player close the game…the server keep saying the msgs in yellow in console…Any tip to upgrade this???
I already replied to you on this, but go find where you are calling GetPlayerName at and don’t call it with dead (invalid) player controller references. I don’t know how you have your stuff setup but you must be storing player references and not removing them when the player leaves the server.
For that matter, I don’t know why this would be on tick in the first place.
I already replied to you on this, but go find where you are calling GetPlayerName at and don’t call it with dead (invalid) player controller references. I don’t know how you have your stuff setup but you must be storing player references and not removing them when the player leaves the server.
For that matter, I don’t know why this would be on tick in the first place.
Test that in “Stand-Alone” launch or in a packaged exe, the PIE session that it automatically creates gets in the way here.
Thank you, that got it working! And thank you for such an amazingly fast and supportive response.
Has anyone figured out how to get this working in PIE, perhaps a workaround or hack? I have a few other team members (mainly doing UI work) who won’t be very impressed with me if I tell them they can’t use PIE for our match lobby
But I can’t quite wrap my head around why it is the solution… if it was, I’m guessing I’d need to hack around with the plugin source to pass WorldContext into the GetSessionSettings function. Also I can’t see any interface methods for Online::GetSessionInterface(World) that take a UWorld argument, so maybe that’s not a thing any more… or quite possibly I’m just blind
Does anyone know how to use the ‘filter’ node in the find sessions? What can I filter on: my own variables that I set earlier? Or?
Here is what I do: I add ‘MyServerName’ to the sessions ‘extra settings’, I can read the extra settings from the sessions I found, but after the list is complete. So, filtering it then would reduce the list to below the ‘results’ requirement…? so its a dirty workaround.
How can I use filter to get only sessions that have ‘MyServerName’ set to ‘whatever’, and still get the ‘results’?
So… I can check if ‘MyGameName’ is EQUAL to ‘SomeValue’, but… what do I do to handle this situation:
Host makes games with MyGameName’ set to ‘someveryveryverylonggamename’.
Client filters for ‘MyGameName’ to ‘gamename’. Since the name does not EQUAL someveryveryverylonggamename, it wont trigger?
Sooo. how do I make it that the ‘equal’ comparison is changed to a ‘in string’ comparison? So if you filter on ‘gamename’ you will get ‘someveryveryverylonggamename’ in the results?
Thank you, that got it working! And thank you for such an amazingly fast and supportive response.
Has anyone figured out how to get this working in PIE, perhaps a workaround or hack? I have a few other team members (mainly doing UI work) who won’t be very impressed with me if I tell them they can’t use PIE for our match lobby
But I can’t quite wrap my head around why it is the solution… if it was, I’m guessing I’d need to hack around with the plugin source to pass WorldContext into the GetSessionSettings function. Also I can’t see any interface methods for Online::GetSessionInterface(World) that take a UWorld argument, so maybe that’s not a thing any more… or quite possibly I’m just blind
Cheers
That would work actually, I can go and switch over to the world version of the interface retrieval for the relevant nodes, they have to have a world anyway. Its just a bit annoying to add the world context to everything.
Edit New version is up on the repository for 4.23/22/21 with world context added to a bunch of the most relevant nodes. I’ll get around to the rest eventually, most of them don’t have a use in editor.
Hmm that seems to resolve getting session settings, unfortunately UpdateSession still appears to fail on PIE
UPDATE:
However, switching UUpdateSessionCallbackProxyAdvanced::Activate() and ::OnUpdateCompleted() to use WorldContextObject->GetWorld(); seems to help.
I’m guessing the same fix may apply to the calls to GetWorld() in FindFriendSessionCallbackProxy (but I haven’t tried it)
I don’t know enough about AdvancedFriendsGameInstance to know if it’s an issue there or not sorry
Is there an elegant way to pass the ExtraSessionSettings over to clients? Or to request newer information from the client to its session (without refinding sessions)? The situation is, I have one client tell the server to change its game session extra settings, then I want all clients to get that information. I’ve tried passing an array of SessionPropertyKeyPair structs to an OnUpdate client RPC call but the information doesn’t appear to replicate; an array of 3 elements arrives on the client RPC but it’s all None/0/null data.
Is there an elegant way to pass the ExtraSessionSettings over to clients? Or to request newer information from the client to its session (without refinding sessions)? The situation is, I have one client tell the server to change its game session extra settings, then I want all clients to get that information. I’ve tried passing an array of SessionPropertyKeyPair structs to an OnUpdate client RPC call but the information doesn’t appear to replicate; an array of 3 elements arrives on the client RPC but it’s all None/0/null data.
Just keep an actual array of settings on the server, fill out the extra settings from that array, not the other way around, you are approaching it backwards. Even if I made the extra settings array replicate it would be a generally bad idea as all of the extra key names and a lot of the data are string formatted and it would be a bandwidth waste.
Generally I will also note that clients shouldn’t be “telling” the server to update session settings. Not entirely sure what you are doing there.
The use case for clients adjusting settings is eg. a room/lobby owner having the power to change a game mode (eg. from deathmatch to capture the flag). But I am not having them directly adjust settings; i’m triggering individual setting changes on the server via RPC calls.
I am sorry for being such a noob, but all the youtube tutorials on this fail to help me out it seems: after version 20 (I am using 4.23.1) I am supposed to install the plugin in the project folder. Ok. But then I have to add an empty c++ class. But that wont work. I get:
Creating makefile for ConnectFourEditor (no existing makefile) Parsing headers for ConnectFourEditor Running UnrealHeaderTool “F:\Unreal4\ConnectFour\ConnectFour.uproject” “F:\Unreal4\ConnectFour\Intermediate\Build\Win64\ConnectFourEditor\Development\ConnectFourEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed -FailIfGeneratedCodeChanges ERROR: ‘F:/Unreal4/ConnectFour/Plugins/AdvancedSessions/AdvancedSessions/Intermediate/Build/Win64/UE4Editor/Inc/AdvancedSessions/BlueprintDataDefinitions.generated.h’: Changes to generated code are not allowed - conflicts written to ‘F:/Unreal4/ConnectFour/Plugins/AdvancedSessions/AdvancedSessions/Intermediate/Build/Win64/UE4Editor/Inc/AdvancedSessions/Bluep rintDataDefinitions.generated.h.conflict’
So now I am stuck? What should I do? Skip this step? Put it in the engine/plugin folder anyway?
Snippet from install procedure:
Extract the file inside the zip to ProjectFolder/Plugins/AdvancedSessions (create /Plugins/AdvancedSessions if you have to) Note that post 4.20 you shouldn’t be installing it in the engine directory anymore due to some changes epic made that are hard to work around with me having multiple modules.
If installed at the project level you need to Create a C++ blank file in the editor to allow it to package out the plugin - If installed at the engine level you do not need to do anything else.
Reinstalled unreal 4.23.1, added advanced sessions to project plugin folder, add class, compile, no more error. I think my perhaps my older version of unreal was still polluted with the old version of advanced sessions (I simply removed it from the engine plugin folder). I had several crashes with that older unreal as well: perhaps setting some folder/files it was working on to ‘read only’, which would create that very error message. So that could also be it. (but then: I did try it out on freshly created projects as well… ) Anyway, its working now
Reinstalled unreal 4.23.1, added advanced sessions to project plugin folder, add class, compile, no more error. I think my perhaps my older version of unreal was still polluted with the old version of advanced sessions (I simply removed it from the engine plugin folder). I had several crashes with that older unreal as well: perhaps setting some folder/files it was working on to ‘read only’, which would create that very error message. So that could also be it. (but then: I did try it out on freshly created projects as well… ) Anyway, its working now
Deleting intermediate folders generally fixes issues like that, the generated meta code can get stale.
Been getting this error recently for some reason, unable to invite or find any sessions when searching(using our own ID)
on 4.23.1
[SPOILER]
[2019.11.05-05.12.19:842][589]LogOnlineSession: STEAM: Found 1 lobbies, finalizing the search
[2019.11.05-05.12.19:842][589]LogOnlineSession: STEAM: Search result 0: LobbyId=Lobby[0x18600000352209B], LobbyId.IsValid()=true, CSteamID(LobbyId).IsLobby()=true
[2019.11.05-05.12.19:843][589]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data name Imouto Headpat
[2019.11.05-05.12.19:843][589]LogOnlineSession: Warning: STEAM: Failed to parse setting from key name value Imouto Headpat
[2019.11.05-05.12.19:843][589]LogOnlineSession: Warning: STEAM: Unable to parse search result for lobby 'Lobby[0x18600000352209B]'
[2019.11.05-05.12.19:843][589]AdvancedFriendsInterfaceLog: Warning: UAdvancedFriendsInstance Return a bad search result in OnSessionInviteAccepted!
Been getting this error recently for some reason, unable to invite or find any sessions when searching(using our own ID)
on 4.23.1
[SPOILER]
[2019.11.05-05.12.19:842][589]LogOnlineSession: STEAM: Found 1 lobbies, finalizing the search
[2019.11.05-05.12.19:842][589]LogOnlineSession: STEAM: Search result 0: LobbyId=Lobby[0x18600000352209B], LobbyId.IsValid()=true, CSteamID(LobbyId).IsLobby()=true
[2019.11.05-05.12.19:843][589]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data name Imouto Headpat
[2019.11.05-05.12.19:843][589]LogOnlineSession: Warning: STEAM: Failed to parse setting from key name value Imouto Headpat
[2019.11.05-05.12.19:843][589]LogOnlineSession: Warning: STEAM: Unable to parse search result for lobby 'Lobby[0x18600000352209B]'
[2019.11.05-05.12.19:843][589]AdvancedFriendsInterfaceLog: Warning: UAdvancedFriendsInstance Return a bad search result in OnSessionInviteAccepted!
[/SPOILER]
What is that extra setting key and its value? Its invalid, whatever it is.
What is that extra setting key and its value? Its invalid, whatever it is.
Extra settings string for the player name who is hosting and such
Ive tried removing all extra settings and even using the default create session but its still the same result with being unable to parse the search result for the lobby or says
LogOnlineSession: Warning: STEAM: Invalid session info on search result
I have a problem with the plugins and steam. When I find session I get 9999 ping and the slot remaning 1/10.
The plugin work fine to LAN and on editor but not when I build and I try with my friend on steam.
Extra settings string for the player name who is hosting and such
Ive tried removing all extra settings and even using the default create session but its still the same result with being unable to parse the search result for the lobby or says
LogOnlineSession: Warning: STEAM: Invalid session info on search result
Not sure on that then, I don’t really have anything to go off of, that warning is returned if the session info isn’t valid on join session. Unless you are trying to replicate it or something though then it should be valid, the steam subsystem fails out on validity if the cases quoted below.
virtual bool IsValid() const override
{
switch (SessionType)
{
case ESteamSession::LobbySession:
return SteamP2PAddr.IsValid() && SteamP2PAddr->IsValid() && SessionId.IsValid();
case ESteamSession::AdvertisedSessionHost:
case ESteamSession::AdvertisedSessionClient:
return ((SteamP2PAddr.IsValid() && SteamP2PAddr->IsValid()) || (HostAddr.IsValid() && HostAddr->IsValid())) && SessionId.IsValid();
case ESteamSession::LANSession:
default:
// LAN case
return HostAddr.IsValid() && HostAddr->IsValid();
}
}
I have a problem with the plugins and steam. When I find session I get 9999 ping and the slot remaning 1/10.
The plugin work fine to LAN and on editor but not when I build and I try with my friend on steam.
Thx you
Steam lobbies don’t support pingback, you would need to implement it yourself if using the lobby system (non dedicated servers).