question

DW avatar image
DW asked

What Blueprint in UE should I place the Update Stats calls?

I am running a multiplayer unreal engine 4.22 that the dedicated server is on SpatialOS. I have playfab settings and login in the 'level blueprint'.

I am wanting to use the node 'update player statistics'. I have it in my 'BP_PlayerState' file. It works when testing locally but when I deploy to the server and test on the server when it accesses the playfab node it crashes the server. This was happening to me before with the 'settings' and 'login' when I did not have them in the level bp.

Where is it recommended to have the 'update player statistics' node in Unreal Engine?

Player Dataunreal
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

So, you want to use the “update player statistics” node in the dedicated server, is that correct? And, which one are you using, is it from the Client API or the Server API? Would you please share the crash report when the crash happened ?

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DW avatar image DW commented ·

@CitrusYan

Where are you supposed to put the 'update player statistics' for unreal engine on a dedicated server?

I see some people were talking about putting those calls in users UI/Widget Blueprint files, is that recommended? Also on the event call that is calling the update player statistics what is the recommended replication setting for it? I tried them all and all had the same result.

To answer your questions, I have tried both client and server api, both work locally but on the live server both cause the server to have issues/errors/crash. The crash report is a 51mb file that didnt really have anything I could see. Here is the logs before that worker crashes:

Crash dump generated at /data/improbable/logs/core-dumps/core-UnrealWorker-1586854418-UnrealWorker1.31.gz (size: 54038337 bytes). Visit raw logs to view. The worker UnrealWorker1 disconnected from SpatialOS with cause CONNECTION_CLOSED: REMOTE_SHUTDOWN: transport remote peer closed the connection [UnrealClient-422459569738-a4a33a7b-67d5-4044-8f2a-ada2970e72da:Unreal] CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?)

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan DW commented ·

Sorry that I cannot provide you with a solid answer on where to put the 'update player statistics' for unreal engine on a dedicated server because I'm not very familiar with such topic.

And, you should use the Server "update player statistics" node since it's called from the dedicated server. Did you set up the PlayFab Settings (secret key, title id, etc) for your server?

Moreover, looking at the piece of logs you provided, I cannot see that this issue is caused PlayFab, maybe there are some errors with the SpatialOS part of the code?

0 Likes 0 ·
DW avatar image DW commented ·

Regarding your screenshot, Yes, the plugin settings are set correctly.

Regarding "And, you should use the Server "update player statistics" node since it's called from the dedicated server. Did you set up the PlayFab Settings (secret key, title id, etc) for your server?"

Where do you recommend people put the 'update player statistics' for an unreal project? Or are you saying it shouldnt matter if I call it from a bp like playerstate or gamestate or a widgetblueprint they should all work??

It is playfab causing the issue as if I deploy without the update statistics I can play many games without ever getting those warnings or the server crashing/freezing. The second I enable playfab on the first 'update player statistics' everything breaks.

I will get more evidence of this today and provide, but please please please tell me what BP you recommend putting the update player statistics node.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan DW commented ·

After a discussion with our team, we recommend that you put it in the Game Instance BP. And, as a matter of fact, you can also put it in GameMode, or anything else.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.