question

Ritichai avatar image
Ritichai asked

Why suggest to use Player Statistics for keep Plater Xp?

I’ve read several posts on the community page. It seems like people are suggesting that players EXP should be kept in Player Statistics. But I'm not sure why people are doing that. I personally think that it is risky to keep players EXP in Player Statistics because the leaderboard could wipe out the data. Additionally, why shouldn’t I keep in the players EXP in PlayerData? Are there any suggestions or something else that I need to know? Please advise.

Player DataLeaderboards and Statisticsdata
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

·
Hernando avatar image
Hernando answered

PlayerData typically stores multiple key-value pairs that contain user-related data. If you send a request to get PlayerData, just for a tiny value in the current data model, it would be fairly inefficient.

Also, be aware that you should not shore XP in a place(such as PlayerData) that can be updated by call Client API. Players can bypass the client you released and send an API request to PlayFab via HTTP Request tool like Postman.

For the risk you are worried about, many statistics in games are intended to be “lifetime” values, and these will not disappear unless you manually reset Leaderboard or set the "Reset frequency". More information please see: https://api.playfab.com/docs/tutorials/landing-tournaments/using-resettable-statistics-and-leaderboards

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.