Announcement

Collapse
No announcement yet.

Advanced Sessions Plugin

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

    Question ,

    how do you take the UniqueNetId for another player?

    It seems that it require PlayerController and they only exist on server and owning client.
    Hence , only server can get the UniqueNetIdfor everyone. And you can only get your own UniqueNetId.
    There is no way for client to get the uniqueID of another player. I try forcefully passing the controller over . resulting in bad unique ID.


    So if you can't get UniqueNetId, how then are you going to mute another player ( i'm developing a team-based game and is needing to unregister/mute opposing team )
    I also cannot get steam avatar of another player.
    It seems that a lot cannot be done without UniqueNetId

    Is there a way to get UniqueNetIdfrom Playerstate , this is where i believe the actual UniqueNetIdis being stored isn't it?
    Please share an ideal solution if you know any. thanks
    Developer at AmmoboxStudios.



    Eximius ( An FPS/RTS Hybrid )

    Comment


      Originally posted by Frozenfire View Post
      Question ,

      how do you take the UniqueNetId for another player?

      It seems that it require PlayerController and they only exist on server and owning client.
      Hence , only server can get the UniqueNetIdfor everyone. And you can only get your own UniqueNetId.
      There is no way for client to get the uniqueID of another player. I try forcefully passing the controller over . resulting in bad unique ID.


      So if you can't get UniqueNetId, how then are you going to mute another player ( i'm developing a team-based game and is needing to unregister/mute opposing team )
      I also cannot get steam avatar of another player.
      It seems that a lot cannot be done without UniqueNetId

      Is there a way to get UniqueNetIdfrom Playerstate , this is where i believe the actual UniqueNetIdis being stored isn't it?
      Please share an ideal solution if you know any. thanks
      Well you can take the BPUniqueNetID structure that I made and replicate it to the client. However it really shouldn't be needed, (as you said) they are already passed over with the player state, so I'll just add a new node that is the same as "GetUniqueNetID" but takes a player state instead of a playercontroller. You can use the nodes GetGameState()->GetPlayerArray()->Player and pass it in then and it will return their BPUniqueNetID. I had named the current GetUniqueGetID as "GetUniqueNetIDFromController" in my code previously, pretty sure I intended to have both node versions anyway and forgot to implement the second one.

      I'll have the modified version uploaded shortly with the new node "GetUniqueNetIdFromPlayerState", I had a couple of node comments that I edited for the steam avatar anyway explaining how the different sizes might not always be available and to check for a valid texture.


      *Edit* New version uploaded for 4.10.2
      Last edited by mordentral; 01-20-2016, 03:37 PM.


      Consider supporting me on patreon

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

      Comment


        many thanks for the quick update.

        UPDATE : the playerstate way seems to work fine for steamavatar. works fantastically.

        However, I'm still having problem with the voice chat. I"m well aware of the INI thing. I've already done them
        Click image for larger version

Name:	gVEpKXd.jpg
Views:	1
Size:	233.7 KB
ID:	1099098

        In regards to the push to talk. I've found out that if I do not do register, nothing work.
        Once I did register local talker. The voice will be considered on the entire time. Note that set the bRequiresPushToTalk on the ini.
        I've also tried removing the settings. Can you double check if anything is overriding this logic?
        I've already mapped the start/stop networked voice. I've also manually stop the voice. Still nothing works.
        The voice is either ON all the time. Or not ON at all ( if I didn't register )

        I haven't tried muting. I'm going to try it now.

        Testing this is incredibly slow& difficult as i need to package and use another pc with steam. IF u know another way to test it locally would be awesome.
        Last edited by Frozenfire; 01-21-2016, 03:08 AM.
        Developer at AmmoboxStudios.



        Eximius ( An FPS/RTS Hybrid )

        Comment


          The test project I used when I was first creating the interface nodes to the steam subsystem just has the ini entries and then I call start/stop networked voice on a button press/release.

          On post login of a base gamemode the game calls an RPC:

          Code:
          // Tell the player to enable voice by default or use the push to talk method
          NewPlayer->ClientEnableNetworkVoice(!GameSession->RequiresPushToTalk());
          Which maps directly to the start/stop networked voice functions as per the toggle speaking command:

          Code:
          void APlayerController::ClientEnableNetworkVoice_Implementation(bool bEnable)
          {
          	ToggleSpeaking(bEnable);
          }
          Toggle speaking just calls the start/stop networked voice functions:

          Code:
          void APlayerController::ToggleSpeaking(bool bSpeaking)
          {
          	ULocalPlayer* LP = Cast<ULocalPlayer>(Player);
          	if (LP != NULL)
          	{
          		UWorld* World = GetWorld();
          		IOnlineVoicePtr VoiceInt = Online::GetVoiceInterface(World);
          		if (VoiceInt.IsValid())
          		{
          			if (bSpeaking)
          			{
          				VoiceInt->StartNetworkedVoice(LP->GetControllerId());
          			}
          			else
          			{
          				VoiceInt->StopNetworkedVoice(LP->GetControllerId());
          			}
          		}
          	}
          }
          The playercontroller has built in stop/stop voice functions but they also map to the same toggle speaking function that just calls start/stop networked voice:

          Code:
          void APlayerController::StartTalking()
          {
          	ToggleSpeaking(true);
          }
          
          void APlayerController::StopTalking()
          {
          	ToggleSpeaking(false);
          }
          There is some debugging information for the voice system in this post here: https://forums.unrealengine.com/show...l=1#post258292

          It has some debugging commands that dump voice and session states that might help you out, however as far as my experience goes you should have it working WITHOUT registering the player yourself as this is already done for you as when you create or join a session both functions in the steam subsystem call "RegisterLocalPlayers(Session);" which registers ALL local players of the connecting computer with "VoiceInt->RegisterLocalTalker(Index);".

          So both registertalkers() and registerplayers() is called by default from the gamemode/playerstate or an online subsystem call, you shouldn't ever NEED to use these functions. I included them as they where there and someone might find a use for them.


          Consider supporting me on patreon

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

          Comment


            You know, you might be having issues if you have a derived GameMode in c++ that you override "PostLogin" in. If it is missing the Super::PostLogin(player); line in it then it would never register the player for voice, or call the BP post login or update the player count for that matter.


            Consider supporting me on patreon

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

            Comment


              Hello,

              i have this error when i try to launch my packaged game

              Click image for larger version

Name:	advancedsessionsfailed.png
Views:	1
Size:	5.0 KB
ID:	1099296

              any idea how to resolve this? i dont know how to check if plugin is properly installed, the plugin appear in the plugin list correctly

              i work with unreal engine 4.10.2
              Last edited by skeleton60; 01-24-2016, 07:56 AM.

              Comment


                You must add the plugin name to project's Build.cs.
                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                Comment


                  Originally posted by BrUnO XaVIeR View Post
                  You must add the plugin name to project's Build.cs.
                  No you don't, you can package and run just fine after adding a plugin into the plugins folder and packaging the game without messing with the Build.cs file.
                  Usually that error is caused by incorrect file system layout for the plugin, IE it isn't currently "Project/Plugins/AdvancedSessions/" for its location.

                  Originally posted by skeleton60 View Post
                  Hello,

                  i have this error when i try to launch my packaged game

                  any idea how to resolve this? i dont know how to check if plugin is properly installed, the plugin appear in the plugin list correctly

                  i work with unreal engine 4.10.2
                  I just made a brand new blueprint only 4.10.2 project, dropped the plugin in, packaged it with a test call to one of the functions and it ran fine after packaging (wanted to make sure I didn't screw anything up with my last upload). Your likely issue is that you have the plugin installed in the wrong location currently or downloaded the wrong version of the plugin (but then it wouldn't load prior to packaging either).

                  If the file structure is wrong it will still run in editor but will fail be packaged in.


                  Consider supporting me on patreon

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

                  Comment


                    Thank you very much for this plugin sir.

                    I'm using it for my prototypes and I might use it for a tutorial.

                    Great work!
                    [Released] Multiplayer Combat Editor
                    A-RPG Sacred Swords
                    Auto-Chess Live Development
                    Youtube Tutorials

                    Comment


                      Hi mordentral,

                      I just checked the new functionality and tried out the "Event On Session Invite Received" node with a simple printstring right behind it. Unfortunately the string won't be printed to the screen if you receive an invite via steam. But the invite is sent properly as the little steam overlay pops up as soon as you get invited by another person. Could you have a look at this please?

                      (My game instance derives from "Advanced Friends Game Instance")

                      Best regards,
                      Daniel
                      Daniel Mihajlovic |Freelance 3D Artist | Showreel

                      Comment


                        Originally posted by polygon View Post
                        Hi mordentral,

                        I just checked the new functionality and tried out the "Event On Session Invite Received" node with a simple printstring right behind it. Unfortunately the string won't be printed to the screen if you receive an invite via steam. But the invite is sent properly as the little steam overlay pops up as soon as you get invited by another person. Could you have a look at this please?

                        (My game instance derives from "Advanced Friends Game Instance")

                        Best regards,
                        Daniel

                        Bad news, the delegate exists and is exposed in the session interface and can be "implemented". However I did a full source search of all Online subsystems for 4.10 and I don't think that any of them actually implement the callback yet. I don't remember it existing at all before so it may be WIP with Epic.

                        I also just checked for 4.11 and it still isn't implemented, i'll leave the delegate in but it won't do anything until they implement it on the backend (I don't want to hack together a "fix" that works around it).


                        Consider supporting me on patreon

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

                        Comment


                          Thanks for the quick answer This is very sad but I hope that Epic will implement this in a future release :<

                          Best regards,
                          Daniel
                          Daniel Mihajlovic |Freelance 3D Artist | Showreel

                          Comment


                            I installed 4.10.2 version but it says

                            ---------------------------
                            Plugin 'AdvancedSessions' failed to load because module 'AdvancedSessions' does not appear to be compatible with the current version of the engine. The plugin may need to be recompiled.
                            ---------------------------

                            Plugin folder;

                            C:\Users\Ben\Documents\Unreal Projects\MyProject3\Plugins\AdvancedSession\

                            Is it needs visual studio?

                            Comment


                              Originally posted by SoloWarrior View Post
                              I installed 4.10.2 version but it says

                              ---------------------------
                              Plugin 'AdvancedSessions' failed to load because module 'AdvancedSessions' does not appear to be compatible with the current version of the engine. The plugin may need to be recompiled.
                              ---------------------------

                              Plugin folder;

                              C:\Users\Ben\Documents\Unreal Projects\MyProject3\Plugins\AdvancedSession\

                              Is it needs visual studio?
                              Hmm, I used my home comp for the last fix and didn't notice that it was still 4.10.1. I'm recompiling and uploading now.

                              *Edit* Uploaded, should work for you now, but you'll probably want to install visual studio anyway even if you don't code.
                              Last edited by mordentral; 01-26-2016, 08:47 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
                                Hmm, I used my home comp for the last fix and didn't notice that it was still 4.10.1. I'm recompiling and uploading now.

                                *Edit* Uploaded, should work for you now, but you'll probably want to install visual studio anyway even if you don't code.
                                Thanks,I will try it when I go home.

                                I'm using ue4 source but I removed visual studio

                                When 4.11 released,I'm going to re-download all files.

                                Comment

                                Working...
                                X