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.
Answer by Hernando · Feb 14, 2019 at 04:07 AM
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
How Update statistics player data using AzureFunction ? 2 Answers
Can we do action when Leaderboard is reset? 1 Answer
How to update username, email and password? 1 Answer
I have an existing Java backend with user data stored in MYSQL, want to move that data to PlayFab. 1 Answer
Uploading A File To Playfab 1 Answer