question

Kim Strasser avatar image
Kim Strasser asked

I have a few questions about storing the players save game statistics

I want to save the players total points, amount of levels played, player bans, amount of completed achievements and other statistics in my game but I'm not sure if I should store it in Player Data Read Only or Statistics. I want that the player himself and all other players can read the save game statistics.

I want that a player can read another players save game statistics when he/she clicks on the display name of this player in my game. This player could be a friend that is in the players friendlist or it could be a foreign player that is not yet in the players friendlist.

Is Statistics only for leaderboard values or can I store save game statistics in it without creating a leaderboard?

Where should I store the players save game statistics so that foreign players or friends can read it when they are logged in?

Player Data
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

·
Rick Chen avatar image
Rick Chen answered

If you would like to make leaderboards of the data you want to store, you could put them on statistics. Note that the statistic can only stores number as value and once created, the backend will generate a leaderboard for the new statistic. This is by design. You could refer to this document: https://docs.microsoft.com/en-gb/gaming/playfab/features/social/tournaments-leaderboards/using-resettable-statistics-and-leaderboards

You can also store the data in Player Data as you mentioned. There are 3 types of player data: Client, Read-Only and Internal. The internal data is not readable by any player. If you want the data to be readable by all players, you can store it in Player Data or Player Read-only data and set the data permission as Public. The permission is private by default if not set.

For more information about Player Data, please refer to: https://docs.microsoft.com/en-gb/gaming/playfab/features/data/playerdata/

10 |1200

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

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.