question

David A Kimball JR avatar image
David A Kimball JR asked

How should I segment player stat updates from server stat updates

We would like to have two players, an unofficial and an official, we want to allow client updates for statistics and things like inventory to only one of the players, while the server (having the playfab secret key) is the only one that can interact with the second players stats and inventory.

How should I approach doing this, is it possible?

Leaderboards and StatisticsPlayer InventoryCharacter DataCharacters
10 |1200

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

Gosen Gao avatar image
Gosen Gao answered

First of all, having “Allow client to post player statistics” enabled may allow client to cheat.

>> Basically we want an "offline" mode where playfab can be used and players can make their own leaderboards and groups etc.

In my opinion, offline means not contacting other players, while Leaderboards and Groups are features that interact with multiple players. So when a player is in offline mode and you want to store some game data of this player, you should store those data in somewhere that doesn’t interact with other players, such as Player Data (Title) or Objects.

>> While doing similar/more on the server authority side for the official servers.

Since server can do similar/more, could you tell me why not just letting it handle both of offline and official players? Why you want to handle them in different ways? If offline mode is just for players to experience the game, players in offline mode won’t interact with other players whether in offline mode or in official mode, then what I write above may help.

>> I am worried that if characters have individual stats (im not sure yet sorry) then a replay or malicious api could be made to update the same stat targeting the other "official" character. (because we have the allow public api stat updates enabled).

Although API UpdatePlayerStatistics can only update stats for the current player, but without verification players can update any data they want. I strongly suggest you not to enable that feature in your scenario.

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.

David A Kimball JR avatar image David A Kimball JR commented ·

>> While doing similar/more on the server authority side for the official servers.

Since server can do similar/more, could you tell me why not just letting it handle both of offline and official players? Why you want to handle them in different ways? If offline mode is just for players to experience the game, players in offline mode won’t interact with other players whether in offline mode or in official mode, then what I write above may help.

We dont want to host servers for everyone to play a single/peer based game. We want players to have leaderboards for their own stats and personal progression. We want to segment those stats from a secure stats that only the server can interact with.

Thanks for the feedback, will do what I can to disable this feature but it would possibly remove singleplayer/peer based from the game entirely.

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao David A Kimball JR commented ·

In the common scenario, developers tend to create separate titles for different groups of players.

0 Likes 0 ·
David A Kimball JR avatar image David A Kimball JR Gosen Gao commented ·

Thanks this was my backup plan, I just was not sure on having the accounts created on both sides it didn't feel 100%

0 Likes 0 ·
Show more comments
Gosen Gao avatar image
Gosen Gao answered

Would you please tell us what the design purpose of this two kinds of players? If the unofficial players mean internal test player. Because players can interact with each other in a title, I suggest you to separate the product title and development title.

>> we want to allow client updates for statistics and things like inventory to only one of the players.

Does this mean letting client modify player’s statistics and inventory? If so, I suggest not to do that. Giving client this permission will cause abusive use and statistics/leaderboard will be valueless.

What is the scenario? May I have more details about your question?

1 comment
10 |1200

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

David A Kimball JR avatar image David A Kimball JR commented ·

Basically we want an "offline" mode where playfab can be used and players can make their own leaderboards and groups etc. While doing similar/more on the server authority side for the official servers. I am worried that if characters have individual stats (im not sure yet sorry) then a replay or malicious api could be made to update the same stat targeting the other "official" character. (because we have the allow public api stat updates enabled).

I can provide more context if needed just let me know, and thanks for the response!

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.