Announcement

Collapse
No announcement yet.

Advanced Sessions Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by JJGG117
    1.


    So I can get it to work by opening up what two files?? Or is it just one like in your above post? ... in VS and changing it to:

    Code:
    		// Don't respond to query if the session is not a joinable LAN match.
    		if (Session)
    Code:
    	const bool bAreSpacesAvailable = Session.NumOpenPublicConnections > 0;
    
    	// LAN matches don't care about private connections / invites.
    	// LAN matches don't care about presence information.
    	return bIsAdvertised && bJoinableFromProgress;
    Then save the two files. Right click .uproject and GenerateProjectFiles, run the new .sln and rebuild the Game?

    2.
    And thanks for your response to this:


    So in this case ^^ I don't use SessionResult->GetCurrentPlayers, instead I use the ExtraSettings and UpdateSession (making sure to connect everything to that node so it doesn't update some settings to "empty")?

    How should I go about updating this on EventTick...is there a way to run this on the Host? How can I get the Host of a server?


    3.
    Oh and one more thing: does this Plugin automatically work with Steam Global Stats? And Leaderboard nodes will load and save and unlock achievements?
    Leaderboard support is built into the engine already, there is a non related plugin called (I think) Advanced Steam something that adds more to the leaderboards support, I haven't checked it out (as much as it has a similar naming convention).


    Consider supporting me on patreon

    My Open source tools and plugins
    Advanced Sessions Plugin
    VR Expansion Plugin

    Comment


      Hi mordentral

      First of all, really great job for the plugin, it's awesome and very useful, so thanks Plus you're really reactive, that's pretty nice!
      I downloaded your plugin for my blueprint project (4.13.2), which includes a dedicated server that must register itself on Steam.
      First of all, I got the "Server setting overflows Steam SetGameTags call" warning, but I managed to fix it with your help, by renaming hardcoded defines in the source. Now, I only have 1 warning left:
      Code:
      [2017.08.19-01.31.48:995][460]LogScriptCore:Warning: Script Msg: StartSessionCallback - Invalid player state
      [2017.08.19-01.31.48:996][460]LogScriptCore:Warning:
      Since my server is a dedicated one, I do not pass any player controller while registering it (the server logs "Server registered on Steam", and I can join it with FindSessions):
      Click image for larger version

Name:	Steam Create session.PNG
Views:	1
Size:	109.8 KB
ID:	1132637

      It appears that this warning is triggered by the "QueryIDFromPlayerController" function, called from the "UCreateSessionCallbackProxyAdvanced::OnStartCompleted" function. Here, you pass "PlayerControllerWeakPtr.Get()" as argument, but since (I think) I use a dedicated server, the player controller is probably equal to NULL. And then, in the "QueryIDFromPlayerController", you use this:
      Code:
      if (APlayerState* PlayerState = (PlayerController != NULL) ? PlayerController->PlayerState : NULL)
      {
      	UserID = PlayerState->UniqueId.GetUniqueNetId();
      	if (!UserID.IsValid())
      	{
      		FFrame::KismetExecutionMessage(*FString::Printf(TEXT("%s - Cannot map local player to unique net ID"), FunctionContext), ELogVerbosity::Warning);
      	}
      }
      else
      {
      	FFrame::KismetExecutionMessage(*FString::Printf(TEXT("%s - Invalid player state"), FunctionContext), ELogVerbosity::Warning);
      }
      Since the player controller you pass is equals to NULL, the warning is triggered.

      So, here are my questions:
      - Is it normal that my "PlayerControllerWeakPtr.Get()" is NULL, if I try to register a dedicated server?
      - Is it a problem to not pass through the "QueryIDFromPlayerController" function? What if I just skip that?
      - How can I get rid of this warning, and do I need to?

      If I'm asking you all of this, that's because I have a problem in my game with Steam achievements and leaderboards (see here if interested), and my only warning is this one, due to this plugin. I know you may don't know that, but do you think this warning can interfere with Steam achievements, and cause the warning I describe in my other post?

      Really thank you for all the job you did, pretty awesome

      Comment


        Thanks for the detailed answer.

        Comment


          Originally posted by Syalen View Post
          Hi mordentral

          First of all, really great job for the plugin, it's awesome and very useful, so thanks Plus you're really reactive, that's pretty nice!
          I downloaded your plugin for my blueprint project (4.13.2), which includes a dedicated server that must register itself on Steam.
          First of all, I got the "Server setting overflows Steam SetGameTags call" warning, but I managed to fix it with your help, by renaming hardcoded defines in the source. Now, I only have 1 warning left:
          Code:
          [2017.08.19-01.31.48:995][460]LogScriptCore:Warning: Script Msg: StartSessionCallback - Invalid player state
          [2017.08.19-01.31.48:996][460]LogScriptCore:Warning:
          Since my server is a dedicated one, I do not pass any player controller while registering it (the server logs "Server registered on Steam", and I can join it with FindSessions):
          [ATTACH=CONFIG]152451[/ATTACH]

          It appears that this warning is triggered by the "QueryIDFromPlayerController" function, called from the "UCreateSessionCallbackProxyAdvanced::OnStartCompleted" function. Here, you pass "PlayerControllerWeakPtr.Get()" as argument, but since (I think) I use a dedicated server, the player controller is probably equal to NULL. And then, in the "QueryIDFromPlayerController", you use this:
          Code:
          if (APlayerState* PlayerState = (PlayerController != NULL) ? PlayerController->PlayerState : NULL)
          {
          	UserID = PlayerState->UniqueId.GetUniqueNetId();
          	if (!UserID.IsValid())
          	{
          		FFrame::KismetExecutionMessage(*FString::Printf(TEXT("%s - Cannot map local player to unique net ID"), FunctionContext), ELogVerbosity::Warning);
          	}
          }
          else
          {
          	FFrame::KismetExecutionMessage(*FString::Printf(TEXT("%s - Invalid player state"), FunctionContext), ELogVerbosity::Warning);
          }
          Since the player controller you pass is equals to NULL, the warning is triggered.

          So, here are my questions:
          - Is it normal that my "PlayerControllerWeakPtr.Get()" is NULL, if I try to register a dedicated server?
          - Is it a problem to not pass through the "QueryIDFromPlayerController" function? What if I just skip that?
          - How can I get rid of this warning, and do I need to?

          If I'm asking you all of this, that's because I have a problem in my game with Steam achievements and leaderboards (see here if interested), and my only warning is this one, due to this plugin. I know you may don't know that, but do you think this warning can interfere with Steam achievements, and cause the warning I describe in my other post?

          Really thank you for all the job you did, pretty awesome

          It has nothing to do with an achievements problem, and is actually an ignorable message with dedicated servers.

          Thanks for the heads up though, I should really be bypassing the player controller check there entirely if it is a dedicated server, there is no reason to go through it since there is no player controller on a dedicated server. I'll make a change that will roll in with the next update at some point since it is a log message and not an actual bug.

          *Edit* actually removed the call entirely, not using a player controller in that function anyway.
          Last edited by mordentral; 08-19-2017, 06:58 PM.


          Consider supporting me on patreon

          My Open source tools and plugins
          Advanced Sessions Plugin
          VR Expansion Plugin

          Comment


            Originally posted by JJGG117
            But I was checking to see if Read/Write Leaderboard nodes is all I need? No C++ even for Steam to list a game's stats globally? Where do they list game's global stats -- I'm wondering.

            And can you tell me exactly what .cpp or .h files I must edit and where in order to get full servers to show up on a findSession search?

            p.s. Do you have a known way I can constantly update session players thru an extra setting?
            1: Don't ask me, I don't touch leaderboards currently as they were more complete when I took up this plugin and at the time I didn't feel they needed the support. Obviously people have found parts of them lacking and have been adding to them since then.


            2: OnValidQueryPacketReceived function inside of OnlineSessionInterfaceNull.cpp, make the changes I listed in the post above.


            3: Would have to keep calling UpdateSession over and over, I wouldn't do it every tick, or even very often at all.


            Consider supporting me on patreon

            My Open source tools and plugins
            Advanced Sessions Plugin
            VR Expansion Plugin

            Comment


              Originally posted by JJGG117
              I don't have OnlineSessionInterfaceNULL.cpp, I'm using 4.16. Is there any reason why I don't have it?

              I downloaded it very recently. The only file with "Online" in it is called: OnlineSubSystemHeader.h
              Its not in my plugin....its in the ENGINE source.


              Consider supporting me on patreon

              My Open source tools and plugins
              Advanced Sessions Plugin
              VR Expansion Plugin

              Comment


                Hey guys! Can you help me with something? So, I am going to make a button that activates the Steam Invite UI. But I do not really know how I should do this. I thought it was the Show Invite UI node, but that does nothing? Can you give me a hint? Thanks.

                Comment


                  Originally posted by JJGG117
                  Ahhh my bad.

                  I edited that line in .cpp however I cannot create a session now. I saved then rebuilt UE4 and my game....any reason why it doesn't work now?



                  I thought UpdateSession "Public Connections" was how many total public connections is possible? Not showing how many public connections there are on the server (i.e. num of current players?)

                  Am I wrong?

                  Also, finally, I'm having trouble updating my session. I can't do it from controller or game instance, or game mode. Where do I do it from???
                  Settign the custom setting for that....not public connections

                  and it should work from anywhere, look for log entries


                  Consider supporting me on patreon

                  My Open source tools and plugins
                  Advanced Sessions Plugin
                  VR Expansion Plugin

                  Comment


                    Originally posted by JJGG117
                    I edited this line and can't go back...It fails to create a session now. I did so much work after editing this line. I tried updating this line, even deleting binaries and intermediate and rebuilding with new .sln

                    Nothing works and I can't go back!
                    does it fail to create? or fail to find?

                    Because re-building will make it a different build number and the client needs to match in order to find it.


                    Consider supporting me on patreon

                    My Open source tools and plugins
                    Advanced Sessions Plugin
                    VR Expansion Plugin

                    Comment


                      Originally posted by JJGG117
                      I hooked up a print node to GetSessionState (which I call as it's hooked up to CreateSession OnSuccess exec) module and I'm printing the enum called "SessionState." There is no session (no print) until I hit my button to CreateSession. Then it will print "Creating" for ever (literally won't ever change) and I'm stuck at my main menu. It doesn't ACTUALLY create the game, it is just stuck at "Creating."

                      It won't end up in FindSession results because I'm not able to join a game that is stuck "Creating" itself, and my level never opens!

                      Did I do something wrong:
                      1. open .sln
                      2. find the line in OnlineSessionInterfaceNULL.cpp
                      3. Rebuild UE4 which did nothing really, just built instantly.
                      4. Rebuild Game which was successful.
                      5. Test with standalone.

                      When it didn't work I deleted Binaries and Intermediate from Game folder as well as my plugins. Generated Project files and my code was still there successfully. So I rebuilt the Game there then tested with standalone.

                      Both create for Editor but not any version of Standalone.


                      Oh! EDIT:
                      My CreateSession was not set to LAN or Dedicated );
                      I set it to LAN, it worked. I set it to Dedicated, it didn't! Even with UsePresence turned off.
                      But if I return that LAN server with this line of code in a FindSession results, then it won't have it's ExtraSettings working (doesn't show text) and my players is 0/0 always (Using regular CurrentPlayers node)!
                      .....Are you actually on a custom branch of the engine for dedicated?

                      Or did you edit it in the source of a launcher version....


                      Consider supporting me on patreon

                      My Open source tools and plugins
                      Advanced Sessions Plugin
                      VR Expansion Plugin

                      Comment


                        Originally posted by JJGG117
                        I converted a project to C++
                        Running a listen dedicated server from CreateSession

                        I'm having a really awful time with this project now...

                        I reverted back to an old project and another computer can't find any games...it did once when I created two on the same computer...both in steam...not working
                        I explained it to you a while ago, that you can't run a dedicated server without downloading and fully compiling the engine. You can't run dedicated servers off of the launcher version of the engine, and changing the source to the launcher version won't re-compile it.


                        Consider supporting me on patreon

                        My Open source tools and plugins
                        Advanced Sessions Plugin
                        VR Expansion Plugin

                        Comment


                          find session advanced does not find the lobbys on steam? any idea why?
                          i'am using steam and invites work with no problem i just cant find any sessions O.o
                          My website: https://www.pijellypin.com
                          Multiplayer Components: https://www.unrealengine.com/marketp...yer-components

                          Comment


                            Originally posted by VirtueeL View Post
                            find session advanced does not find the lobbys on steam? any idea why?
                            i'am using steam and invites work with no problem i just cant find any sessions O.o
                            There are multiple possibilities.

                            First, check the log to see if it it throwing any warnings and to make sure that it is even loading the steam subsystem

                            Second, make sure you aren't filtering by an extra setting that doesn't exist.

                            Third, if this is for VR make sure that SteamVRHome isn't conflicting with your SteamSubsystem (it causes it not to load on non steam hosted builds currently when enabled...)


                            Consider supporting me on patreon

                            My Open source tools and plugins
                            Advanced Sessions Plugin
                            VR Expansion Plugin

                            Comment


                              Have to make sure to set your Steam Download Location to be the same as the host because the steam app ID for games that are not yet greenlit are region locked.

                              Comment


                                [MENTION=4285]mordentral[/MENTION] Hi, I'm using 4.17 VXGI version how can I use Advanced Sessions plugin? When I copy plugin files to plugins folder of project I have an error like that: Click image for larger version

Name:	missin.jpg
Views:	1
Size:	27.3 KB
ID:	1132727
                                How can I fix this error?

                                Comment

                                Working...
                                X