Advanced Sessions Plugin

I figured it out. It was actually that ‘Should Advertise’ was set to ‘false.’ I feel like if ‘Use LAN’ is true, ‘Should Advertise’ should just automatically be treated as true. I don’t think there are a ton of people hosting invite only games at their LAN parties.

Hello,
I’m basically trying to retrieve a player state from the event OnPlayerVoiceStateChanged:

image

However the one on the left is a"FBPUniqueNetId", while the one on the right a “FUniqueNetId”. How can this be achieved?

Get Player State From Unique Net ID is a new engine node using a new unique net id wrapper. AFAIK its the only engine node using it for that matter.

I will need to provide a conversion node from my unique net id BP struct to that one.

I don’t know which engine version you are on but I added it to the master branch on github (5.3). In that latest version you should be able to directly pull the FBPUniqueNetID pin to the other one and it will auto convert in place for you.

Thank you! I’m on 5.3.

Do you happen to know if, in fact, that UniqueID relates to a player state? I have assumed it would but maybe it doesn’t… Good to have the conversion nonetheless! Thanks for such a quick turnaround. Will try it ASAP.

It doesn’t really “relate”, its a multiplayer ID for the player so the player state stores it. That function you had there is just reverse looking up the player state by it.

AS already had the other version in it of getting the unique net id from the player state itself. I honestly should have had a function like this already but no-one ever needed it, now that its in the engine natively the pin conversion should just work with it and any other nodes they add in the future.

Gotcha, thanks. I didn’t know if that ID was a unique hash of some sorts for an instance specifically, rather than a multiplayer ID as you described.

Just tried, the conversion works. Thanks a lot!

When I try to get a UniqueID from a begin play on a Player State, on a server I get:

[2024.02.15-18.18.08:321][177]AdvancedSessionsLog: Warning: GetUniqueNetIdFromPlayerState couldn't get the player uniquenetid!

Is there a way for me to know when this uniquenetid is available or am I forced to keep looping?

Also, IsValid called with the returned value from GetUniqueNetIdFromPlayerState returns true even after this warning, is this expected?

Are you sure the player state is valid? the unique net id should be valid as long as the player state is.

Hi! I created the game with this plugin, but when I test the game on my second computer, I can’t find any active sessions at all. How do I can fix that?:eyes:

If you are on steam, it can’t be the same steam account. If you enabled steam auth, the other account has to also own the game. Other than that, it should mostly work.

Its other steam account. Hm, I have set steam appid to 480

maybe its settings in blueprints. Also Im having phantom sessions lol

AHHH I found solution - I need to set same download region with like the second PC in Steam settings! Thanks, @mordentral!

Hey, I just upgraded from 5.0.3 to 5.3.2! It was working before but now i can no longer join game. Any help?

Hey, how to get current session and set it in variable?

GetSessionSettings

1 Like

I have heard a few people having issues with steam sockets in 5.3, I don’t personally have much experience with that module beyond what the documentation says. Its unrelated to AS.


How do I can set this session in variable?
Also if you want, you can help me - I want to create a lobby, so, if maximum of players reaached, then everyone will teleport to game level. I making lobby logic in level blueprint, and to get current session players I need variable.


@mordentral Can i use AS with EOS? instead of steam? That would solve my issue as well!

You can get session, but you don’t need to get the session info to start from within the server.

Server has events like PostLogin and the current player array that are live indicators of players joining / the count. You don’t need to try and derive that off of session settings.