Announcement

Collapse
No announcement yet.

Advanced Sessions Plugin

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

    How does the get friends avatar node work?

    Do I need to pass it my controller and their steam ID? Does it only work for friends or can I use this for anybody match made with? Also, do you happen to know what the sizes of the avatars are?

    Comment


      Originally posted by GotSomePills View Post
      How does the get friends avatar node work?

      Do I need to pass it my controller and their steam ID? Does it only work for friends or can I use this for anybody match made with? Also, do you happen to know what the sizes of the avatars are?
      You know, technically that function shouldn't require a player controller, I must have been attempting to get it within the player context or got carried away since all of the subsystem ones do, but that is unnecessary (using the current version you will still need to pass any valid controller as it checks it). I will change it to not require one after I test with dedicated servers.

      I kept the name as "GetFriendAvatar" but it is a generic call to get the avatar, for that matter there are actually a lot of generic steam specific functions that are accessible but aren't used in the UE4 subsystem at large (clan chat, played with counts, clan info, name history, ect).

      The way it works is that it requests the information for all of your friends list and it gets download asynchronously afterwards, to get the avatar or information for a non friend you should use the node "RequestSteamFriendInfo" first to mark the player for retrieval. It will download the smallest to the largest avatar sizes so when I was doing it I would check for validity on the avatars from largest and fall back to smaller sizes until it found a valid avatar (or not).


      The size definitions are below but it is a UTexture2D so you should also be able to pull them from that:
      Code:
      	// gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
      	virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0;
      
      	// gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
      	virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0;
      
      	// gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
      	// returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again
      	virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0;
      The get user information is declared as:

      Code:
      	// requests information about a user - persona name & avatar
      	// if bRequireNameOnly is set, then the avatar of a user isn't downloaded 
      	// - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them
      	// if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved
      	// if returns false, it means that we already have all the details about that user, and functions can be called immediately
      	virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0;
      I'll remove the player controller requirement from the RestSteamFriendInfo and GetSteamAvatar nodes and next upload will be without them.
      Last edited by mordentral; 04-25-2016, 11:51 AM.


      Consider supporting me on patreon

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

      Comment


        Maybe 2 dumb questions. When I've created the session. How do I store a reference to it or get a reference to it as the hosting player? It seems like I create a session then instantly open the level and if I want my next level to show information about the session I don't know how to get it. Also, this video uses your library and suggests that I have separate custom client events that call server events to do the execution of the advanced session events. Do the advanced session blueprint events need to be called from events only running on the server? I can't figure why this would need to be the case.

        Comment


          Hello, I have not tried the plugin yet because I'm not home yet but I have 2 questions.

          #1. Epic's create session node allows, just like yours, to enter an in of the max. Public connections. Now here's my issue. My game makes use of local multiplayer so one connection could add 4 players to the game. 2 clients, 1 with 3 local players and 1 with 2 local players registers as 2 players. The join session node is fired per local player and that works, ingame the locaa players are recognized as separate player controllers. But the server browser still says 2 players. Again, I do not know if you have this or not.

          My question basically boils down to: Does this plugin support a mix between local and online multiplayer?

          #2. Say I have made a pregame lobby and my party of 8 want to join a server found in the server browser. Is there a way to make the partyleader(aka host) merge his session into an existing one, making all players in his session join the new session and destroy his old?

          Comment


            Does this plugin happen to expose the Steam unique player ID to blueprints or would I have to still write a C++ class to do that?

            Nevermind I found it and it's the Steam64 version
            Last edited by BananaClipStudio; 04-26-2016, 12:57 PM.

            Comment


              Originally posted by ErebusWolf View Post
              Maybe 2 dumb questions. When I've created the session. How do I store a reference to it or get a reference to it as the hosting player? It seems like I create a session then instantly open the level and if I want my next level to show information about the session I don't know how to get it. Also, this video uses your library and suggests that I have separate custom client events that call server events to do the execution of the advanced session events. Do the advanced session blueprint events need to be called from events only running on the server? I can't figure why this would need to be the case.
              RE: 1
              "GetSessionSettings" node is what you are looking for, however I really suggest that you keep variables for yourself anyway.


              Re: 2
              If you are searching then you are locally referenced (are authority for the search), server searching shouldn't be executed on a nonexistent server with an RPC, sounds like the tutorial creator just made a mistake is all.



              Originally posted by Mootjuh View Post
              Hello, I have not tried the plugin yet because I'm not home yet but I have 2 questions.

              #1. Epic's create session node allows, just like yours, to enter an in of the max. Public connections. Now here's my issue. My game makes use of local multiplayer so one connection could add 4 players to the game. 2 clients, 1 with 3 local players and 1 with 2 local players registers as 2 players. The join session node is fired per local player and that works, ingame the locaa players are recognized as separate player controllers. But the server browser still says 2 players. Again, I do not know if you have this or not.

              My question basically boils down to: Does this plugin support a mix between local and online multiplayer?

              #2. Say I have made a pregame lobby and my party of 8 want to join a server found in the server browser. Is there a way to make the partyleader(aka host) merge his session into an existing one, making all players in his session join the new session and destroy his old?
              My plugin only exposes missing features to Blueprint, it does not change the online subsystem implementation itself. If you wanted some of those features you would have to roll your own subsystem that mixes local and online play and registers the players differently.

              To merge sessions you could send an RPC to all clients with a session search result to connect too, the problem for steam would be that it doesn't allow for searching if you are hosting yourself. There is a party system that isn't currently implemented that is supposed to handle that functionality.
              Last edited by mordentral; 04-26-2016, 01:30 PM.


              Consider supporting me on patreon

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

              Comment


                This plugin does not seem to work with 4.11.2 source build?
                Click image for larger version

Name:	error.jpg
Views:	1
Size:	80.6 KB
ID:	1105390
                ______________________________________________
                https://www.facebook.com/madhousesoftware
                Where sanity is a virtue

                Comment


                  I compiled it with the source code and it worked for me just a few hours ago.
                  I noticed it said it couldn't be found... where did you put the plugin?

                  Comment


                    Originally posted by MADHOUSE View Post
                    This plugin does not seem to work with 4.11.2 source build?
                    [ATTACH=CONFIG]90696[/ATTACH]
                    Make sure that it is in "Project/Plugins/AdvancedSessions"

                    Also if you compiled the engine make sure that the compiler is still set as if it is self build you will need the compiler to recompile for your custom engine version.


                    Consider supporting me on patreon

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

                    Comment


                      Im using the official 4.11.2 github release branch, and the plugin was added properly to project/plugins/advancedsessions etc.
                      Tried to add it to all plugins directories eventually just to be sure, and none worked. What is a self build? VS is always set to win64 development editor.
                      I can try recompiling the engine, but since its not an engine plugin im not sure that would help?
                      Thanks for helping out.
                      ______________________________________________
                      https://www.facebook.com/madhousesoftware
                      Where sanity is a virtue

                      Comment


                        Originally posted by MADHOUSE View Post
                        Im using the official 4.11.2 github release branch, and the plugin was added properly to project/plugins/advancedsessions etc.
                        Tried to add it to all plugins directories eventually just to be sure, and none worked. What is a self build? VS is always set to win64 development editor.
                        I can try recompiling the engine, but since its not an engine plugin im not sure that would help?
                        Thanks for helping out.
                        Its if you downloaded the actual source to the engine and compiled it, then it is a self build. The prebuilt binaries won't be compatible and will have to be re-compiled to suite your compiled version.

                        The folder structure is currently "Plugins/AdvancedSessions/" and then that folder contains Binaries,Resources,Source,and AdvancedSessions.uplugin correct? It should ask if you want to re-compile it as the engine build differs.


                        Consider supporting me on patreon

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

                        Comment


                          Ah I see, thanks alot for clearifying for me.
                          Where would I be prompted to recompile the plugin? If I start the project using the plugin it only gives me that error.
                          I will look into this a bit, perhaps I lack knowlage with using plugins using source built engine.
                          Cheers
                          ______________________________________________
                          https://www.facebook.com/madhousesoftware
                          Where sanity is a virtue

                          Comment


                            Can this be used to download / upload files from/to Amazon S3 buckets ?

                            Thanks

                            Comment


                              Originally posted by MADHOUSE View Post
                              Ah I see, thanks alot for clearifying for me.
                              Where would I be prompted to recompile the plugin? If I start the project using the plugin it only gives me that error.
                              I will look into this a bit, perhaps I lack knowlage with using plugins using source built engine.
                              Cheers
                              Yeah it should ask you if you want to recompile it.


                              Originally posted by motorsep View Post
                              Can this be used to download / upload files from/to Amazon S3 buckets ?

                              Thanks
                              No


                              Consider supporting me on patreon

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

                              Comment


                                If you want to do this I would check out the REST plugin. I don't have a link but just google it and you should find it

                                Comment

                                Working...
                                X