Announcement

Collapse
No announcement yet.

Advanced Sessions Plugin

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

  • started a topic [PLUGIN] Advanced Sessions Plugin

    Advanced Sessions Plugin

    Advanced Sessions Plugin


    Message to users 09/08/2017

    I'd like to note that the original intent of this plugin was to shore up blueprint support for sessions (mainly steam) until Epic fixed the engine integration for them. Its been over 2 years now with little to no appreciable differences in the core Steam/sessions integration in engine and that leaves this plugin somewhat in limbo.

    I don't really want to expand the plugin too much as I fully believe that what it does should be part of the engine already and doing so feels like enabling the lax steam/blueprint sessions support in engine. Also most of the major hurdles people run into are locked into the steam subsystem itself and would require basically a re-write of it in order to correct them.


    I also don't want to drop it because I understand that many users currently rely on it to patch up the missing features and get a game going with blueprints only.

    I am fully invested in a VR plugin that takes the majority of my free time and feel bad about how I have been keeping this plugin on bugfix mode for this long but feel like that project is the one that I really need to spend my time on.

    Just thought I would give a heads up, but also mention that the guys working on the UWorks plugin in engine are basically doing the total overhaul approach which is what the engine really needs. And that when they eventually get their subsystem implementation up and running so that it meets the standard workflow for the engine that people should seriously consider the price being worth it.

    *Edit* this isn't meant to imply that I will not continue to keep the plugin up to date on new engine versions, only that new features are likely to be slow and far between.

    ____________________________________________________________________________________________________________________

    *Updated 04/03/2019*

    Plugin now has two modules, one is AdvancedSessions and one is AdvancedSteamSessions, this will allow me to tie more Steam specific functions in without forcing the steam subsystem to be packaged out with projects that don't want it.

    I have had several requests for supporting the authentication system for steam and wanted to be up front about it in here. The changes required are likely to be out of the scope of a plugin (or very backwards to implement through one) and I would rather people go and support the pull request that adds the functionality into the engine itself: https://github.com/EpicGames/UnrealEngine/pull/2135

    *New*
    Parvan/Metahusk has made a menu example project that also shows the general usage of the plugin, you can view it here:
    http://community.metahusk.com/topic/...and-discussion

    Brief
    A Blueprint Library Plugin that exposes additional Networking/Session/OnlineSubsystem/Friends/Voice features to Blueprints that were missing.

    Overview
    I took it upon myself to make an all blueprint game just so that I would get a better grasp of the system and not get in the habit of ignoring such a powerful tool. During this mini project I discovered that the Online Subsystem and Sessions interfaces are really lacking with how much of them are currently exposed to Blueprints.

    Since I had to go in and expose more of the session backend to Blueprints anyway I packaged it as a blueprint library plugin for future projects and thought that I would share it here for anyone else that needed it. I saw a lot of "I want custom server names with blueprints", "How can I get network client player names in blueprints" in the answer hub.

    I fully expect it to expand significantly as I require new functions for my own use, and I am willing to add to it if anyone has requests as well.

    4.13.1 And beyond Sessions have been stable for awhile now, opening up the repository.
    Repository: https://bitbucket.org/mordentral/adv...lugin/overview


    Automatically Generated Documentation (Kantan Doc Gen)

    AdvancedSessions

    AdvancedSteamSessions


    Plugin .Zip File Download (Wasn't sure about where to upload) - Extract the file inside to ProjectFolder/Plugins/AdvancedSessions (create /Plugins/AdvancedSessions if you have to)

    4.23: https://drive.google.com/file/d/14KK...ew?usp=sharing

    4.22: https://drive.google.com/file/d/1xBz...ew?usp=sharing

    4.21: https://drive.google.com/file/d/1dRk...ew?usp=sharing

    4.20.4: https://drive.google.com/file/d/1Gry...ew?usp=sharing


    4.19.2: https://drive.google.com/open?id=1RU...MM-dIh0MnZVPog

    4.18.3: https://drive.google.com/file/d/0B5c...ew?usp=sharing

    4.17.2:https://drive.google.com/file/d/0B5c...ew?usp=sharing

    4.16.2:https://drive.google.com/file/d/0B5c...zFDcGIwaENEY1U

    4.9.2 Locked to 06/26/2017 Update
    4.15.3 Release:https://drive.google.com/open?id=0B5...DZHU3Fudml0b2s

    4.14.3 Release: https://drive.google.com/open?id=0B5...092REpDNk4xNHc

    4.13.2: https://drive.google.com/file/d/0B5c...ew?usp=sharing

    4.12.5: https://drive.google.com/file/d/0B5c...ew?usp=sharing

    4.9.2 Locked to 06/03/2016 Update
    4.11.2: https://drive.google.com/file/d/0B5c...ew?usp=sharing

    4.9.2 Locked to 03/28/2016 Update
    4.10.4: https://drive.google.com/file/d/0B5c...ew?usp=sharing

    4.9.2 Locked to 09/15/2015 Update
    4.9.2: https://drive.google.com/file/d/0B5c...ew?usp=sharing

    4.8.3 Locked to 09/15/15 Update
    4.8.3: https://drive.google.com/file/d/0B5c...ew?usp=sharing

    4.7 Locked to 06/26/15 Update
    4.7: https://drive.google.com/file/d/0B5c...ew?usp=sharing


    Version Log

    Code:
    06/26/2017
    
    Added SteamRequestGroupOfficers function to the sessions plugin.
    
    Added GetSteamGroups to the sessions plugin.
    
    Added GetSteamFriendGamePlayed function to the sessions plugin.
    
    06/06/2017
    
    Added in some more missing ULocalPlayer header includes to 4.15 and 4.16 versions.
    
    05/27/2017
    
    Added back in missing ampersand to FindFriendSessions Delegate
    
    05/23/2017
    
    Fixed where several variables in the OnPlayerLoginStatusChanged event were set to be inputs instead of outputs.
    
    Updated to 4.15.3 for download
    
    04/20/2017
    
    Fixed some missing safety checks in the voice library
    
    03/23/2017
    Updated 4.15 to fix a missing validity check in GetFriendsCallbackProxy (fixes a very rare crash)
    
    03/21/2017
    Updated 4.15 to 4.15.1
    
    03/02/2017
    Split plugin into two modules
    
    One is for the general AdvancedSessions (Advanced Sessions Plugin)
    
    The second is for Steam specific implementations (Advanced Steam Sessions Plugin)
    
    This makes it easier to package without steam included, as the default setup always packaged steam out on PC platforms.
    
    Unchecking the AdvancedSteamSessions plugin should allow for totally removing any steam reliance from the plugin.
    
    You would also have to remove steam specific nodes from your blueprints as well however as they will no longer exist, just having them as dummies doesn't work with this.
    
    You can still package and run on another platform that isn't steam without doing this, this just gives the option of not having steam included in packaging / compilation at all.
    
    02/27/2017
    
    Marking EndSession as deprecated
    
    It is not only not really useful in blueprints, but people have also been using it wrong.
    
    It isn't useful to Steam Subsystem and isn't really useful in blueprints to begin with as its use is vauge, would rather enforce the actual
    total destruction of the session instead by making users call DestroySession as is intended.
    
    I feel like that node suffers from overexposing the back end to blueprints.
    
    02/25/2017
    
    Fixed a bug where the new AllServers secondary search was adding in the first results a second time instead of adding in the second results.
    
    Also made the secondary search Steam subsystem exclusive, as it is the only one that uses two seperate server lists.
    
    02/24/2017
    
    Added "bRequireNameOnly" to the RequestSteamFriendInfo node, significantly reduces time to return
    a result as the cost of not downloading the avatar for that user.
    
    Made FindSessions AllServers option search twice, once for client servers, once for dedicated, and merge the results.
    (This fixes a bug and also ensures that steam works correctly, if you want to avoid the longer search time before showing results you could
    search one first, fill in results, and then search the second and add them in when it is complete instead).
    
    Added the following additional nodes
    
    AdvancedFreinds
    GetSteamPersonaName - To retrieve the name of a non friend from steam (requires RequestSteamFreindInfo to have sucessfully completed for that ID already)
    
    Make UniqueNetID from SteamID String - Makes a uniquenetid from a 64bit steam ID string (mostly for testing, can use IDs that are not your friends).
    Could also be used for storing the string representation of a UniqueNetID and later converting back to retrieve information about them.
    
    Advanced Steam Workshop
    
    Get Num Subscribed Workshop Items - Returns how many workshop items the user is subscribed to for this AppID
    
    Get Subscribed Workshop Items - Returns how many items and an array of workshop item IDs for workshop item the user is subscribed to.
    
    Get Workshop Item Details - Takes a workshop item ID, returns a structure with details about that workshop item.
    
    02/15/2017
    
    Rebuilt and uploaded for 4.15 release 1
    
    01/30/2017-
    
    Merged in CriErr's equality check node for Unique Net IDs
    
    Added execution paths to GetSteamFreindAvatar to make using the node easier.
    
    Recompiled 4.14.3 and added 4.15 preview 1 downloads.
    
    01/20/2017- Recompiled and uploaded for 4.14.3 again, might have had a bad upload?
    
    11/20/2016- Recompiled and uploaded for 4.14 release 0 again, might have had a bad upload?
    
    10/31/2016- Recompiled and uploaded for 4.14 release 0
    
    11/04/2016- Fixed a missing assignment in Identity interface, re-uploaded for 4.13 and committed to repository.
    
    10/31/2016- Recompiled and uploaded for 4.14 preview 1
    
    10/26/2016- General
    
    Added GetPlayerAuthToken function to advanced identity
    
    Now forcing not passing in a player controller if hosting dedicated.
    
    10/24/2016- Added Advanced Identity Library to the plugin
    
    This part of the plugin probably won't be of much use to most people, it was a special request.
    
    10/19/2016- Opened up repository to the public, now that subsystems have been fairly stable
    
    Added additional options to the FindSessionsAdvanced node (All Servers search, full only, empty only, secure only, minimum number of users).
    
    Made CreateSessionAdvanced ignore "UsePresence" setting if bIsDedicated is ticked and force presence off (to help avoid misuse).
    
    
    09/01/2016- Recompiled and uploaded build for 4.13.0
    
    08/29/2016- Fixed where both friends instance callbacks were the same name in editor, added an MIT license to the plugin so people are free to do what they want.
    
    07/11/2016- Recompiled binaries for 4.12.5
    
    06/21/2016- Revised how "GetFriendSession" Throws OnSuccess and OnFailure, will now throw failure if the steam call succeeded but returned an invalid session (player is in game but not in a session yet).
    
    06/21/2016- Fixed the GetFriend Node as it wasn't fully filling the Presence information.
    
    06/17/2016- Added platform checks to exclude the steam specific features from platforms that aren't Mac/Windows/Linux *Edit* and then revised to fix an issue with UFunctions inside of preprocessor ifs
    
    06/16/2016- Rebuilt under 4.12.3 and uploaded
    
    05/27/2016- Rebuilt 4.11 adding additional output variables to "GetSessionSettings"
    
    04/19/2016- Rebuilt 4.11 with a fix for searching for dedicated servers and for the 4.11.2 hotfix.
    
    03/31/2016- Recompiled and uploaded a 4.11 download, had to change the ShowWebURL node a bit because of new formatting. In this build and onward it now takes serveral optional parameters.
    
    03/28/2016- Corrected a file inclusion issue with the folder layout so that c++ derived game instances will work again.
    
    03/04/2016- Re-uploaded 4.10.4 with a fix for bIsInSameGame, also added more presence related information and exposed missing ExternalUIInterface functions to BP with the AdvancedExternalUI blueprint node set. As a side note, set the default values for the UpdateSession node to sane numbers. Also exposed the NumPrivateConnections variable to both the create and update session nodes. Last thing to note is that I updated the example blueprint to have all of the missing and new nodes and to fix a few areas that have changed over the versions.
    
    02/24/2016 - Uploaded a new version of 4.10 with some linux specific fixes.
    
    02/22/2016 - Rebuilt 4.10 to 4.10.3 hotfix *And then 4.10.4*
    
    01/20/2016 - Rebuilt 4.10 with an additional node to correct the difficulty of retrieving players UniqueNetIds from the client side (GetUniqueNetIDFromPlayerState) and added some warning comment text to the STEAM specific nodes.
    
    01/16/2016 - Rebuilt 4.10  to the 4.10.2 hotfix, corrected a bug with UniqueNetID::ToString node, and sped up the "GetSteamAvatar" node.
    
    01/14/2016 - Rebuilt 4.10 version with two additional nodes - GetSteamFriendAvatar(in a sub category for advanced friends) and EventSessionInviteReceived (for the game instance and player controller interfaces)
    
    01/11/2016 - Rebuilt 4.10 version with a fix for the Add/Modify session node.
    
    12/21/2015 - Rebuilt 4.10.1 with every setting exposed for the CreateAdvancedSession Node, if you don't know what one does leave it at default for now (anti cheat just flags the server, it doesn't actually enable an anticheat).
    
    12/17/2015- Rebuilt 4.10 to the new 4.10.1 hotfix and fixed some GCC compiler specific issues to hopefully fix the plugin with linux.
    
    11/23/2015- Revised the Update Sessions node once more to pass entire original structure in first before modifying. This should have been how it was written to begin with, oops.
    
    11/11/2015- Added 4.10 download, compilation with 4.10 still seems rough with visual studio 2015
    
    09/15/2015- Updated 4.9 download with a better check with the "End Session node" for if a session is currently live, will not call End Session if it is not. Updated to 4.9.2
    
    
    09/15/2015- Updated 4.9 download to 4.9.1 hotfix and fixed some structs and enums not being able to be made into blueprint variables. 4.8.3 will receive this update tomorrow. *Edit* 4.8.3 version uploaded
    
    09/14/2015- Updated 4.8 download as it was requested.
    
    09/03/2015- Updated the 4.9 download, this version fixes the UpdateSession BP Node - 4.8 not updated, will be updated if requested only.
    
    08/31/2015- Updated the 4.9 download to a version compiled under full release.
    
    08/27/2015- Updated both 4.8 and 4.9 Plugins, adds several new nodes for sessions and the first release of the Advanced Voice Interface Nodes.
    Post with more detailed notes
    
    08/19/2015 - 4.9 Preview 4 compatible build is uploaded for testing, 4.8 Build has been re-compiled in latest hotfix version 4.8.3 and re-uploaded (double checked folders this time)
    
    08/18/2015- Re-uploaded the plugin for 4.8 to move the files into a sub folder to fix a packaging error. Last release did not have the files in a sub folder already (whoops) and was causing packaging problems.
    
    08/04/2015- Updated to change how ExtraSettings work to support retrieving the current active sessions ExtraSettings. Effects GetSessionProperty nodes and the GetSessionSettings node. Detailed info in this post
    
    08/03/2015- Re-uploaded to fix an error introduced in the last revision
    
    07/31/2015 - Re-uploaded the 4.8 build with a revised CreateSession that allows to not pass in a player controller and has the "Dedicated Server" boolean. Not passing in a player controller WILL NOT WORK with client steam builds as it needs the UniqueNetID to create the session. This was added in for dedicated server builds that don't initialize the SteamAPI and don't have a valid player controller UniqueNetID. #TODO in the future would be to also add in a "JoinViaPresence" boolean to control if a session is invite only or not. Would probably add this in if someone requests it.
    
    The 4.7 build will stay at the last version as 4.7 was less stable overall and 4.9 will be out soon.
    
    06/26/2015 - Re-uploaded the zips without an extra UAsset file in the examples folder, it was crashing someones editor for some reason and wasn't supposed to be there anyway.
    
    06/16/2015 - Updated the 4.8 download to support blueprint only projects now that it can be done
    
    06/08/2015- Added the UpdateSessions function
    
    05/28/2015 - Final version of sessions functions (hopefully no more signature changes), added many new friends related functions, added a few new session functions, zip now includes a blueprint with the functions labeled and laid out with use cases in it.
    Post with more detailed notes
    
    05/20/2015 - Cleaned up the sessions functions more, added a separate session results filter, added the baseline of a Friends Function library and interface/game instance
    Post with more detailed notes
    
    05/18/2015 - Added Advanced Session Find
    
    05/15/2015 - Added Source
    New Steam Defines - 4.22

    As of the 4.22 patch, the steam subsystem has a few useful definitions that you can set in Target.cs for dedicated servers to prevent having to manually edit source files. I have listed them below for convenience sake.


    These definitions would have to be set in the Target.cs of your project file (IE: a source and not BP project).

    Online
    • New: Projects targeting Steam releases no longer require source code edits to properly register their dedicated servers on Steam. This change also enables setting the application ID for shipping projects without further modifications to source as well. The following macros have been added and should be defined in the project's Target.cs file:
      • For projects that use dedicated servers, these must be defined for your servers:
        • UE4_PROJECT_STEAMPRODUCTNAME
        • UE4_PROJECT_STEAMGAMEDESC
        • UE4_PROJECT_STEAMGAMEDIR
      • Clients for dedicated server projects must have the following defined:
        • UE4_PROJECT_STEAMGAMEDIR
      • All Steam-based projects must have the following defined:
        • UE4_PROJECT_STEAMSHIPPINGID
    Please refer to the Steam project documentation regarding setting these flags and their appropriate values.

    Setup Info
    1. 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.
    2. 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.
      *NOTE* If packaging for a platform other than windows you may need to have the plugin installed at the project level, as I can only package out for windows and not Mac / Mobile.
    3. Copy the example blueprint file into your content folder if you want to look at the examples.
    4. To get the ability to join a session invite when it has been accepted through the online subsystem (IE: Steam freind game invite) you will need to derive your GameInstance from AdvancedFriendsGameInstance so that it will bind the Delegate, you can also use the added event in the graph. This game instance also enables accessing the "PlayerTalkingStateChanged Delegate". *01/14/16* Also added an OnSessionInviteReceived Delegate that triggers if you have been invited to a game, you can accept in game by joining the session it gives you *Not yet implemented by Epic, do not use this event yet!!*.

      A tutorial on how to set this up is in this post: Setting Up Interface and Game Session Tutorial
    5. 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.
    6. To use Push To Talk, bind a key to "Stop Networked voice / Start networked voice" for a local player.
    7. To enable voice in your build copy the following settings (From Epic Answerhub).

      DefaultEngine.ini

      [Voice]
      bEnabled=true

      [OnlineSubsystem]
      bHasVoiceEnabled=true
      In DefaultGame.ini

      [/Script/Engine.GameSession]
      bRequiresPushToTalk=false/true


    *Note* If you are updating a session I highly advise that you fill ALL of the Update session parameters with your values as otherwise it chooses default ones that might not work for you.

    Current Added BP Functions ( Updated 08/27/2015 With Voice functions):

    New Session Related Blueprint Functions - They all have info text on hover in editor to explain them briefly
    (Image is missing: "CancelSessionSearch", "EndSession", "ModifyOrAddSessionSetting", "GetUniqueNetIDFromPlayerState", "IsValidSession" Nodes)


    New Friends Related Blueprint Functions - They all have info text on hover in editor to explain them briefly
    (Image is missing: "GetSteamFriendAvatar", "GetSteamLevel", "RetrieveSteamInfo" Nodes)


    New Voice Interface Related Blueprint Functions - They all have info text on hover in editor to explain them briefly


    New External UI Interface Related Blueprint Functions - They all have info text on hover, two are not steam compatible and the info text states this


    New Steam Workshop Related Blueprint Functions


    Example of hosting a session with additional parameters (Slightly different now but basics stay the same)
    Last edited by mordentral; 09-04-2019, 04:27 PM.

  • replied
    When I trying to finish/close a connected client with the server session in dedicated server...The console of server keep the saying the same msglog:

    AdvancedSessionsLog: Warning: GetLocalPlayerNameFromController Bad Player Controller!

    What I need to do to fix this and make correct disconnection of clients???

    Leave a comment:


  • replied
    Originally posted by mordentral View Post

    Its not intended for c++ use, there is little to no reason to use it in C++ as it is just exposing the C++ backend anyway, and most of the blueprint nodes are async blueprint objects and are awkward to use in C++. Its not tagged with the _API macro to expose it to c++ for that very reason.

    It would actually be far faster and cleaner to just straight up use the C++ yourself.
    Sure thing, thanks for helping.

    Leave a comment:


  • replied
    Originally posted by XynanXDB View Post
    This plugin is awesome but how do I use it in C++ even though I have added the module dependency on build.cs and target.cs, it still doesn't work. Please help
    Its not intended for c++ use, there is little to no reason to use it in C++ as it is just exposing the C++ backend anyway, and most of the blueprint nodes are async blueprint objects and are awkward to use in C++. Its not tagged with the _API macro to expose it to c++ for that very reason.

    It would actually be far faster and cleaner to just straight up use the C++ yourself.

    Leave a comment:


  • replied
    This plugin is awesome but how do I use it in C++ even though I have added the module dependency on build.cs and target.cs, it still doesn't work. Please help

    Leave a comment:


  • replied
    Hi, thanks for this plugin, it looks like it's filling a need in the community.

    Leave a comment:


  • replied
    hi, Unreal engine crash, and i have this error "AdvancedSessionsLog: Warning: GetNetPlayerIndex received a bad PlayerController!" in the crash log, i use the 4.22 version, when i use the 4,21version this error not exist, whay can i do? sorry for my bad enlgish

    Leave a comment:


  • replied
    Hey everyone, I am having a problem that I was hoping I could get some help with.

    I have a project that, suddenly, I cannot connect to other players, whether it be 2 instances on my computer or to my laptop with the same build as me. Strangely, my friend can connect to other instances running on his computer and to my other friend that has the same build, it's just that I cannot connect to other sessions. I went back to previous builds where it was working but still no luck. When I launch the game in a build or as standalone it says im playing "Spacewar" and I can Shift-Tab into steam, but I cannot join sessions. Anyone else have the same problem?

    Leave a comment:


  • replied
    i think you can make some good money by selling this on the marketplace

    Leave a comment:


  • replied
    mordentral thanks for your help, and as it usually goes dumb simple solution. I missed the top line you're supposed to paste into the DefaultEngine.ini. Now it works like a champ!

    Leave a comment:


  • replied
    Originally posted by BiGiRON1999 View Post
    mordentral thanks for responding.

    I have tested also without the loading screen, same issue though. Could it possibly have something to do with how the plug-in is installed? Just really weird how it works perfectly with steam closed.
    No, the plugin doesn't have anything to do with the level loading, check your log for errors.

    Leave a comment:


  • replied
    mordentral thanks for responding.

    I have tested also without the loading screen, same issue though. Could it possibly have something to do with how the plug-in is installed? Just really weird how it works perfectly with steam closed.

    Leave a comment:


  • replied
    Originally posted by BiGiRON1999 View Post
    Hello all!

    I would like to start off by saying thank you to the creator of this plugin, I am really enjoying it.

    However I have a strange problem, I am able to host games and have others join absolutely fine. But only when steam is not open. When steam is open I load into the level for a split second then the game goes black. I am pretty stumped any help would be greatly appreciated.

    I am using 4.23 if that helps any.
    Unsure? Sounds like some initialization issue on your camera manager or a bad loading screen. The steam subsystem doesn't actually really do anything after you are loaded into the actual level.

    Leave a comment:


  • replied
    Hello all!

    I would like to start off by saying thank you to the creator of this plugin, I am really enjoying it.

    However I have a strange problem, I am able to host games and have others join absolutely fine. But only when steam is not open. When steam is open I load into the level for a split second then the game goes black. I am pretty stumped any help would be greatly appreciated.

    I am using 4.23 if that helps any.
    Attached Files

    Leave a comment:


  • replied
    mordentral That fixed the problem. Thanks!

    Now I am attempting to solve the connection problem. My friend won't be online to help me test until later today.
    However, I threw on a VPN and changed the Steam download region on a different computer on my network (to see if it would have trouble connecting) but it was able to connect to the server on my computer just fine.

    Which means 1) It can connect because it's on the same network despite the VPN 2) The download region isn't what keeps my friend from connecting. What keeps him from connecting is related to not being on the same network.

    I'l let you know how the test goes when he get's on later. I'm not entirely confident that it will work.

    Leave a comment:

Working...
X