Advanced Sessions Plugin

[QUOTE=Kaptain-Wiz;658224]
Maybe calling it every tick is the problem, how do I put a delay on that or something so that it’s not called every tick? I know that you can’t put a delay in a function so.

Bind to variable and update somewhere else or just update somewhere else.

1 Like

Yeah don’t call that every tick…

Check every now and then for success on the function, I used to check the largest size, on failure check the medium size, on failure check the smallest size and then delay for a set amount of time if none of them are ready yet (has to download from the server). You have to check the output for “ISVALID”, making a brush out of null textures every tick is prob killing it.

Even if you have ones that ARE ready to download you don’t want to loop through every image on every tick and get it, it has to load the image data, create a Texture2D from it, and then pass the reference in to blueprint (prob the slowest part honestly).

I should refactor that function some time in the future like I did for the controller models in my VR plugin and have it output different pathways depending on if the function succeeded or not to help avoid confusion (Succeeded, Loading, Failed is what I have that one doing I think).

Edit
Updated the plugin

Added in the different execution paths to the Steam Avatar node and merged in CriErr’s nodes (with some optimizations).

Recompiling the binaries to update the zip now

Edit2

4.15 preview 1 and 4.14.3 versions are compiled and uploaded.

1 Like

[QUOTE=;658440]
(with some optimizations).

lol
I didn’t even though about dereferencing pointer, but i got it work, so I got that goin for me. http://i.imgur.com/lfL0UvH.gif

1 Like

Thanks! It works now!

1 Like

Hoping for a Preview 3 compatible one soon! :smiley:

1 Like

[QUOTE=rojo8399;661284]
Hoping for a Preview 3 compatible one soon! :smiley:

With latest 4.15 source it works fine for me so far (haven’t extensively tested, but working with /metahusk’s example project), just have to recompile.

1 Like

is the DestroySession/EndSession Node working with AS + 4.15?
Cause currently there seems to be a Bug, where those nodes are not working correctly :confused:

1 Like

[QUOTE=Chaosgod_Espér;661724]
is the DestroySession/EndSession Node working with AS + 4.15?
Cause currently there seems to be a Bug, where those nodes are not working correctly :confused:

Should be working fine, one isn’t even mine but rather is built into the engine.

I’ll recompile for preview 3, just keep in mind that I don’t really usually consider supporting preview releases a requirement and may skip one or two if they are patching fast enough.

Edit Preview 3 of 4.15 is uploaded

1 Like

Hey , been working for months with this plugin and it’s really been a project saver. Thanks for your work on this. We are trying to pass an array of enums into the array of sessions properties, which, I’m assuming and array within an array is a no-go. What about a struct though? I didn’t see any options for adding a struct into the array of session properties. Is this possible or could it be added? A little background, we have a player selected map rotation built into an array of enums. So we could convert the array of enums into a struct and pass that through the session. Thanks!

1 Like

[QUOTE=PDubulous;662236]
Hey , been working for months with this plugin and it’s really been a project saver. Thanks for your work on this. We are trying to pass an array of enums into the array of sessions properties, which, I’m assuming and array within an array is a no-go. What about a struct though? I didn’t see any options for adding a struct into the array of session properties. Is this possible or could it be added? A little background, we have a player selected map rotation built into an array of enums. So we could convert the array of enums into a struct and pass that through the session. Thanks!

The session properties is a custom implementation of a blueprint FVariant variable, variants represent all “Base” forms of variables, they technically support BLOB which would work with a struct but since everything converts to text for steam and there is a rather small length limit to the properties string I don’t see it as being something that I should implement.

To save space I would suggest that instead you use a byte code system to represent maps and create a string of the bytes to pass in, then when retrieving it you can convert from string back to bytes and from byte values back to the enums that you use internally.

There is a BytesToString node and a StringToBytes node in blueprint, fill a byte array with each enum, convert to string, pass the string into the session properties as a value, on the client side convert back to byte array / then back to the enums.

1 Like

[QUOTE=;662457]
The session properties is a custom implementation of a blueprint FVariant variable, variants represent all “Base” forms of variables, they technically support BLOB which would work with a struct but since everything converts to text for steam and there is a rather small length limit to the properties string I don’t see it as being something that I should implement.

To save space I would suggest that instead you use a byte code system to represent maps and create a string of the bytes to pass in, then when retrieving it you can convert from string back to bytes and from byte values back to the enums that you use internally.

There is a BytesToString node and a StringToBytes node in blueprint, fill a byte array with each enum, convert to string, pass the string into the session properties as a value, on the client side convert back to byte array / then back to the enums.

Thanks for the support and quick reply. Makes sense. We will give it a go!

1 Like

Out of curiousity, has anyone gotten this to work with a dedicated server? Its working great for a listen server. I guess i’m l looking to see an example of how someone has it setup/creating a session for a dedicated server.

1 Like

I’ve done some testing trying to get steam sessions to return the number of connected players.
Was this never implemented in the engine? That functionality seems to work fine with the default online subsystem, but not at all when using steam.
(just like how ping is also returned as null basicly when using steam)

I’ll keep trying to find a solution.

Update: It seems the only solution is to use the “extra settings” in the session to create a system to
keep track of player count, as this can be updated manually and then retrieved when finding sessions.
The standard UE4 integration is just not working with steam sessions.

1 Like

[QUOTE=;591653]
Its not giving the player a unique net id, that error is shown if the unique net id is empty. Are you testing in editor?

GetSessionSettings only fails in two isntances:

There is no session Interface (no subsystem using sessions is active).

The session interface doesn’t support sessions (probably attempting to play through editor).

The log will output an error message to you when it fails saying which one it is.

Hey ,

I’m getting a lot of those errors too “AdvancedSessionsLog:Warning: UniqueNetIdToString received a bad UniqueNetId”
Usually it works just fine, but from time to time it won’t.
It seems to happen after a servertravel, as my logs are only showing those errors at that moment. Apparently it never happens when the players join the lobby.

I have some suspicions regarding the server travel’s behavior. I’m using Seamless Travel (to prevent players from disconnecting) and I don’t know but it seems as if the player controller from the lobby was still alive for a short bit once in the new map (or pending to kill ?), because my ‘Welcome’ widget is communicating with the PlayerController when the game starts, and in my logs, it says it interacted with the PC from the Lobby instead of the one from the game.

So, what would happens if the script tries to get the UniqueNetID from PlayerController as soon as the player arrive in the game, and that PlayerController happens to be the Lobby that is pending to kill ?
Is it even possible ?

Thanks
PS : i’m on 4.14.3

1 Like

[QUOTE=Genova;664833]
Hey ,

I’m getting a lot of those errors too “AdvancedSessionsLog:Warning: UniqueNetIdToString received a bad UniqueNetId”
Usually it works just fine, but from time to time it won’t.
It seems to happen after a servertravel, as my logs are only showing those errors at that moment. Apparently it never happens when the players join the lobby.

I have some suspicions regarding the server travel’s behavior. I’m using Seamless Travel (to prevent players from disconnecting) and I don’t know but it seems as if the player controller from the lobby was still alive for a short bit once in the new map (or pending to kill ?), because my ‘Welcome’ widget is communicating with the PlayerController when the game starts, and in my logs, it says it interacted with the PC from the Lobby instead of the one from the game.

So, what would happens if the script tries to get the UniqueNetID from PlayerController as soon as the player arrive in the game, and that PlayerController happens to be the Lobby that is pending to kill ?
Is it even possible ?

Thanks
PS : i’m on 4.14.3

I could see it happening if the old player controller is no longer used/inhabited, it wouldn’t be able to get a valid UniqueNetID anymore from the player state.

Perhaps it is related to this answerhub thread?

1 Like

[QUOTE=;664995]
I could see it happening if the old player controller is no longer used/inhabited, it wouldn’t be able to get a valid UniqueNetID anymore from the player state.

Perhaps it is related to this answerhub thread?

Yes, I believe this is the issue right there.
Seems like it won’t be fixed anytime soon. You may want to get a look at that so the Get Unique NetID isn’t failing.

1 Like

[QUOTE=Genova;665125]
Yes, I believe this is the issue right there.
Seems like it won’t be fixed anytime soon. You may want to get a look at that so the Get Unique NetID isn’t failing.

That not really something for me to fix, it means that while traveling is still occurring that get net ids will fail on the players still traveling in, or at least fail to get one with valid properties.

If the console isn’t throwing “GetUniqueNetIdFromController couldn’t get the player uniquenetid!” then its not registering as an invalid UniqueNetID.

I did add an extra check to the IsValid for FBPUniqueNetId for the pointer version that may help handle this case, but overall it appears to be something where you will have to wait for the clients to finish traveling.

1 Like

update for 4.15 version ? thanks for the work done :wink:

1 Like

[QUOTE=Andrea92;667275]
update for 4.15 version ? thanks for the work done :wink:

Should be up, let me know if you run into any issues, last few updates I had to re-upload sometimes.

1 Like

[QUOTE=;667293]
Should be up, let me know if you run into any issues, last few updates I had to re-upload sometimes.

I get the error message which says that the plugin is not compatible …

1 Like