Advanced Sessions Plugin

Awesome stuff!

: Nice job on this plugin … thank you for this … going to give it a whirl tonight. 8-}

Oh you already started adding friends support? dude you are awesome xD

[QUOTE=;296635]
Oh you already started adding friends support? dude you are awesome xD

Have a significant portion of the friends functionality integrated now. Probably going to finish it totally or at least 75% before throwing another update on here.

Uploaded a new version today, feature complete as far as I can tell at the moment regarding the average use case (Steam), ran into quite a few OnlineSubsystemInterface features that are ignored for the SteamInterface (matchmaking and friends addition/deletion included, as well as some things like OnInvitedToSession events).

Back to playing with it instead of making it now I guess.

  • Includes lots of new friends functions
  • A few new session functions, optimized the old ones where possible
  • Finalized blueprint function signatures (hopefully)
  • A blueprint example with use cases and labeled functions for everything that the plugin adds.
1 Like

Great work !

Thanks for sharing this with us!

1 Like

when i try to compile i get lots of missing “;” before identifier and illegal member errors.

edit:

[QUOTE]
Error 11 error : Failed to produce item: D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AdvancedSessions.exp D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Intermediate\ProjectFiles\ERROR
Error 7 error C2039: ‘AddOnSessionInviteAcceptedDelegate_Handle’ : is not a member of ‘IOnlineSession’ D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Private\AdvancedFriendsGameInstance.cpp 50
Error 6 error C2039: ‘ClearOnSessionInviteAcceptedDelegate_Handle’ : is not a member of ‘IOnlineSession’ D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Private\AdvancedFriendsGameInstance.cpp 27
Error 8 error C2065: ‘SessionInviteAcceptedDelegate’ : undeclared identifier D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Private\AdvancedFriendsGameInstance.cpp 50
Error 1 error C2146: syntax error : missing ‘;’ before identifier ‘SessionInviteAcceptedDelegate’ D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Classes\AdvancedFriendsGameInstance.h 40
Error 9 error C2146: syntax error : missing ‘;’ before identifier ‘SessionInviteAcceptedDelegate’ D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Classes\AdvancedFriendsGameInstance.h 40
Error 5 error C2614: ‘UAdvancedFriendsGameInstance’ : illegal member initialization: ‘SessionInviteAcceptedDelegate’ is not a base or member D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Private\AdvancedFriendsGameInstance.cpp 12
Error 3 error C2653: ‘FOnSessionInviteAcceptedDelegate’ : is not a class or namespace name D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Private\AdvancedFriendsGameInstance.cpp 10
Error 4 error C3861: ‘CreateUObject’: identifier not found D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Private\AdvancedFriendsGameInstance.cpp 10
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Classes\AdvancedFriendsGameInstance.h 40
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Classes\AdvancedFriendsGameInstance.h 40

i fixed most of it by renaming adding User in all the delegates in the game instance(i guess i’m using a newer version that you?, i’m using the release branch from github so maybe they renamed the delegated). But the SessionInviteAcceptedDelegate in the constructor has errors (the arguments isn’t right).

[QUOTE]
4 IntelliSense: no instance of overloaded function “TBaseDelegate<void, ParamTypes…>::CreateUObject [with ParamTypes=<const bool, const int32, TSharedPtr<FUniqueNetId, ESPMode::NotThreadSafe>, const FOnlineSessionSearchResult &>]” matches the argument list argument types are: (UAdvancedFriendsGameInstance , void (UAdvancedFriendsGameInstance::)(int32 LocalPlayer, bool bWasSuccessful, const FOnlineSessionSearchResult &SessionToJoin)) d:\Users\Tobias\Documents\Unreal Projects\TheSurvivalGames\Plugins\AdvancedSessions\Source\AdvancedSessions\Private\AdvancedFriendsGameInstance.cpp 10

This plugin compiles and runs fine off the the 4.7.6 version on the unreal launcher download, I also went and checked out the interface on github for 4.7 under release and it still uses the definitions that I am using. Are you sure that you aren’t on an older release than 4.7? They re-did the handles for the sessions delegates in 4.7 and the code hasn’t had a committed change on there for 2 months, something to notice is that the sessions and friends interfaces uses different delegate declarations, they appear to be halfway through re-factoring how they handle them so it would make sense if you are using 4.6 by mistake and throwing errors.

i’m using 4.8

oh, sorry, my mistake. i’m using the 4.8 Branch, not the release branch,

Wow man, this is amazing! I don’t check the forums for a few weeks and look what happens… Thanks for sharing!

[QUOTE=tfrom222;302444]
oh, sorry, my mistake. i’m using the 4.8 Branch, not the release branch,

Yeah I won’t be updating it to 4.8 until it release or just before it, from the state of 4.7 it is going to undergo a lot of changes in the new version. The commit that changed delegates in 4.8 mentions something about making it compatible for Fortnite so might be more changes inc.

The new delegate function parameters are:


virtual void OnSessionUserInviteAccepted(const bool bWasSuccess, const int32 ControllerId, TSharedPtr< FUniqueNetId > UserId, const FOnlineSessionSearchResult & InviteResult)

[QUOTE=;302507]
Yeah I won’t be updating it to 4.8 until it release or just before it, from the state of 4.7 it is going to undergo a lot of changes in the new version. The commit that changed delegates in 4.8 mentions something about making it compatible for Fortnite so might be more changes inc.

The new delegate function parameters are:


virtual void OnSessionUserInviteAccepted(const bool bWasSuccess, const int32 ControllerId, TSharedPtr< FUniqueNetId > UserId, const FOnlineSessionSearchResult & InviteResult)

I will try to make it work for 4.8. :slight_smile:
Would it be possible for you to put the plugin source on Github?, then maybe i can put my changes on a 4.8 branch.:smiley:

I’ll probably do it today over lunch, its about a 10 minute change and I went back and looked at the last commit and it isn’t actually very likely that they are changing it any more on 4.8.

Edit 4.8 version is up, BP output on the OnSessionInviteAccepted BP Event changed as the delegate passes the inviting UniqueNetId now in 4.8 and that seemed useful to have.

Thank you so much for being so fast at updating this. :slight_smile:

Hey, thanks again for this awesome plugin. I managed to get a Server Broswer, hosting, Joining, quick play, etc. to my game but there are still some questions I got where I don’t know how to manage this.

Currently everyone joins the Lobby of some Hosted Session, The Host decides to Start the game and everyone starts playing. But as soon as the game starts I want the Session not to be visible for anyone searching for a new game. How is this possible?
As far as I have seen I can’t change Session Properties while the Session is running.

[QUOTE=Nobody;306035]
Hey, thanks again for this awesome plugin. I managed to get a Server Broswer, hosting, Joining, quick play, etc. to my game but there are still some questions I got where I don’t know how to manage this.

Currently everyone joins the Lobby of some Hosted Session, The Host decides to Start the game and everyone starts playing. But as soon as the game starts I want the Session not to be visible for anyone searching for a new game. How is this possible?
As far as I have seen I can’t change Session Properties while the Session is running.

Whoops! I had that one being worked on and totally forgot about it.

The function below handles that, I’ll work it in tomorrow and update the plugin. I had planned to have it in already but I guess it got buried in the friends interface work.


virtual bool UpdateSession(FName SessionName, FOnlineSessionSettings& UpdatedSessionSettings, bool bShouldRefreshOnlineData = true) = 0;

[QUOTE=;306132]
Whoops! I had that one being worked on and totally forgot about it.

The function below handles that, I’ll work it in tomorrow and update the plugin. I had planned to have it in already but I guess it got buried in the friends interface work.


virtual bool UpdateSession(FName SessionName, FOnlineSessionSettings& UpdatedSessionSettings, bool bShouldRefreshOnlineData = true) = 0;

Awesome! Thanks a lot :slight_smile:

The UpdateSession function is added into both of the new downloads.