Announcement

Collapse
No announcement yet.

Advanced Sessions Plugin

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

    Originally posted by mordentral View Post
    Ok, version compiled under the full release of 4.9 is uploaded.

    Also I've been looking into cloud support through blueprints but haven't decided how I would handle the file interface. It would be best to support any current file I/O nodes to prevent implementation overlap but i'm not sure if it is possible to do cleanly. When I get some more time to sit down and go over it i'll decide on the direction I want to take it in and then flesh it out.
    Thank you for the fast update
    Assets: Military Ammunition (Released)
    Plugins: BlueManBPFunctionLibrary C++ plugin (Free), Blue Man Vehicle AI Plugin (Released), Air Resistance C++ Plugin (WIP), Blue Man Vehicle Physics Plugin (Marketplace)
    Projects: Giants Of Destruction

    Comment


      That is awesome!

      Comment


        @mordentral - going to test this puppy out this weekend. Finally got some free time. Thanks for this awesome contribution. 8-}
        Quinton Delpeche
        Founder - Gobbo Games | Designer - The Colony 2174 (Board Game) | Developer - Riders of Asgard

        Comment


          Ok, I did some digging regarding the UpdateSessions function as I had checked and it should be working without a problem. After updating a session when searching for the session in the steam susbsystem it finds it but then throws "Unable to parse session result" in the log and fails out. I'll so some digging and see where it fails and why and try to fix it.

          *Edit* Also did a complete test of the voice functions last night and they all seem perfectly fine so far.


          *Re-Edit* Ok found the problem, when updating the session it is overwriting the Unique Build ID that filters sessions of different builds and passing 0. I modified the BP Update function to manually get the current build ID when modifying the settings and pass it in now. Got a clean test of modifying a session and still being able to find it in the server list.

          Also added the unique build id output to "GetSessionSettings" and have a "GetCurrentUniqueBuildID" node for comparison or passing as a setting to display and a "GetUniqueBuildID" to get the build id of a session result.

          Currently these aren't all that useful for filtering as the steam subsystem does not pass sessions with different builds to you anyway, however if you want to display it in the server or something or as a build identifier then you can with these nodes, otherwise ignore that they exist. I am keeping them mainly in case I need them to test something later on.

          I'll have the 4.9 download updated in a little bit, i'll hold off on updating the 4.8 unless someone specifically asks me too.




          -- Uploaded --
          Last edited by mordentral; 09-03-2015, 03:27 PM.


          Consider supporting me on patreon

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

          Comment


            Maybe I'm thinking about this incorrectly (wouldn't be the first time) but wouldn't it make a lot of sense to expose the created session as a return value pin on the Create Session node for storing and eventual passing into Invite events/functions?

            I'm taking my first awkward steps with the Steam OSS here, but I'm not seeing a native handler for receiving an invite, so I'm a little lost as to where the receiving controller would get the Session struct to pass into a Join node. Again, good chance I'm looking at it incorrectly here, or overlooking something silly, but I'm kinda stymied right now. Anyone?
            @thereisnoscotty
            Grand Marshal of the Parade of Madfellows

            Comment


              Out of curiosity, does this let you set the 'server' name when you host a session? Or the player name (other than just picking the computer name)?
              Acclivity Game Studios. Making a BP FPS, Tutorial Series on Blog : On Unreal Wiki : Twitch

              Comment


                Originally posted by soctty View Post
                Maybe I'm thinking about this incorrectly (wouldn't be the first time) but wouldn't it make a lot of sense to expose the created session as a return value pin on the Create Session node for storing and eventual passing into Invite events/functions?

                I'm taking my first awkward steps with the Steam OSS here, but I'm not seeing a native handler for receiving an invite, so I'm a little lost as to where the receiving controller would get the Session struct to pass into a Join node. Again, good chance I'm looking at it incorrectly here, or overlooking something silly, but I'm kinda stymied right now. Anyone?
                Inviting friends already by default uses the current session with my nodes, you don't have to pass anything in. And the session search result structure is fairly useless to the host, you can get the same information with the "getsessioninfo" function / node. The person being invited gets the session struct from the OnFriendInviteDelegate that is part of my AdvancedFriendsInterface with this plugin.

                From the plugin setup notes: "If you want the AcceptedSessionInvite event to be called in the owning player controller you also need to add the AdvancedFriendsInterface to the blueprint for your player controller." It also calls it in the game instance as well.

                If you want to do it yourself, just setup the AcceptedSessionInvite Delegate.

                Originally posted by arbopa View Post
                Out of curiosity, does this let you set the 'server' name when you host a session? Or the player name (other than just picking the computer name)?
                Yes
                Last edited by mordentral; 09-07-2015, 08:45 PM.


                Consider supporting me on patreon

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

                Comment


                  Originally posted by mordentral View Post
                  Yes
                  EXCELLENT! I will have to download it and replace the normal BP sessions stuff. And hope I can compile it into a final project correctly. Thanks loads, this is stuff they SHOULD of had in BP's long ago.
                  Acclivity Game Studios. Making a BP FPS, Tutorial Series on Blog : On Unreal Wiki : Twitch

                  Comment


                    Originally posted by mordentral View Post
                    Inviting friends already by default uses the current SessionData with my nodes, you don't have to pass anything in. And the session search result structure is fairly useless to the host, you can get the same information with the "getsessioninfo" function / node. The person being invited gets the session struct from the OnFriendInviteDelegate that is part of my AdvancedFriendsInterface with this plugin.

                    From the plugin setup notes: "If you want the AcceptedSessionInvite event to be called in the owning player controller you also need to add the AdvancedFriendsInterface to the blueprint for your player controller." It also calls it in the game instance as well.

                    If you want to do it yourself, just setup the AcceptedSessionInvite Delegate.



                    Yes
                    I had a feeling I'd overlooked something. Thanks!
                    @thereisnoscotty
                    Grand Marshal of the Parade of Madfellows

                    Comment


                      Originally posted by soctty View Post
                      I had a feeling I'd overlooked something. Thanks!
                      Sorry for how semi incomprehensible that paragraph was, I was in a Dota match when I read the thread and tried to bang out a reply. Thinking about it more I don't have a tutorial for how to use the custom Game Instance and Player Controller interface, so I will try and get something up soon to explain how to use them with this plugin as it is more complicated than the rest of the plugin.


                      Consider supporting me on patreon

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

                      Comment


                        I looked at the plugin yesterday, and LOADS of tutorials about sessions. Can not figure out how to set server name (vs gamename) or player name... the lack of documention for UE4 is maddening.
                        Acclivity Game Studios. Making a BP FPS, Tutorial Series on Blog : On Unreal Wiki : Twitch

                        Comment


                          Originally posted by arbopa View Post
                          I looked at the plugin yesterday, and LOADS of tutorials about sessions. Can not figure out how to set server name (vs gamename) or player name... the lack of documention for UE4 is maddening.
                          For custom server name you need to use "make property string" node and plug it in extra settings on "create session" node.
                          And when you run "find session" node use "get session property string".



                          Edit:

                          You can only do that with Advanced sessions plugin.
                          Last edited by Blue man; 09-08-2015, 10:04 AM.
                          Assets: Military Ammunition (Released)
                          Plugins: BlueManBPFunctionLibrary C++ plugin (Free), Blue Man Vehicle AI Plugin (Released), Air Resistance C++ Plugin (WIP), Blue Man Vehicle Physics Plugin (Marketplace)
                          Projects: Giants Of Destruction

                          Comment


                            Originally posted by arbopa View Post
                            I looked at the plugin yesterday, and LOADS of tutorials about sessions. Can not figure out how to set server name (vs gamename) or player name... the lack of documention for UE4 is maddening.
                            When using a compatible subsystem like steam the GetPlayerName node will return the players subsystem name as a value. On the PostLogin event in your gamemode you get the playercontroller reference to the person that logged in. You can pass this in to "GetPlayerName" to get their online subsystem name.

                            I'll add a "SetPlayerName" node as well just in case it is useful in the future but for online sub games it would probably be better to let the subsystem control their name changes (Like changing your name through steam). Obviously you can have the player pass in a custom name as well and store it as a replicated variable if there is such a thing as a character name in your game. Getting the UniqueNetId for a player controller and converting it to a string will get you their "network id", or in the case of steam their 64bit steam id.

                            I also have a "GetNumNetworkPlayers" that you can use with a Blueprint For loop to loop through each currently connected player controller (using GetPlayerController and passing the integer) and do whatever with them. Personally for my test project I save a list of players and their stats seperate and update it on PostLogin (GameMode) and EventEndPlay (Player Controller).

                            In short though aside from getting the name from the subsystem for storing it and passing it to the other clients I would suggest you roll your own implementation by making a Struct of player data (score, kills, deaths, name, player controller reference, ect) and replicating it to clients. Getting everything into a single structure and fully controllable by you is probably the way to go.



                            As was already mentioned for the server name pass in a custom property to stand as your game name and retrieve it when finding the game on the clients end.

                            The example blueprint that ships with the plugin shows how to do a lot of the operations. Place it in your content folder and open it up in engine.
                            Last edited by mordentral; 09-08-2015, 11:08 AM.


                            Consider supporting me on patreon

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

                            Comment


                              *For linking to on the first page*


                              Setting up the Advanced Game Instance and Player Controller Interfaces

                              The Game Instance


                              Start by creating a blueprint GameInstance class and setting it default for your game. Once that is complete go into the Class Options for it and Reparent it to the "Advanced Friends Game Instance" class.
                              This gives you access to the options and Event nodes that it provides.


                              These are the options that the Game Instance provides, it allows you to turn off calling the Accepted session and/or voice Events for player controllers and turning off receiving the voice events at all.


                              These are the events that become accessible in the Game Instance with the class reparented.



                              The Player Controller

                              Sometimes it might be preferable to access the events that the Game Instance provides directly in a player controller, if you wish to do so then add the Advanced Friends Interface to the interfaces available for the player controller class like is shown above.


                              Adding the interface gives you access to these new delegates in your player controller. You control whether they are called or not in the GameInstance, if it is set to call them it will search for player controllers that implement the interface and call the delegate on them if it is appropriate (For session invite accepted on the player that accepted the invite, and for talking state changed, on every player controller that implements the interface).


                              Consider supporting me on patreon

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

                              Comment


                                Originally posted by mordentral View Post
                                As was already mentioned for the server name pass in a custom property to stand as your game name and retrieve it when finding the game on the clients end.

                                The example blueprint that ships with the plugin shows how to do a lot of the operations. Place it in your content folder and open it up in engine.
                                Yeah, I set that per the example blueprint. And in game, in the scorboard screen, it shows the name I pass as the server name. But when you go to find servers, it still uses the auto generated computer name plus random numbers .. hmm.
                                Acclivity Game Studios. Making a BP FPS, Tutorial Series on Blog : On Unreal Wiki : Twitch

                                Comment

                                Working...
                                X