question

doronhn avatar image
doronhn asked

add "field" for every player i create in PlayFab with default value

Hey,

i want to store data for every player is login to my game.

the data i want to store is

1. current level (easy player start from 1 and advanced) - default 1

2. and number of power ups he has. - default 0.

how do i do that?

how do i update this info from the client itself? (for intense the player grab a power up in some level) or alternatively the player complete level (and i need to update the current player level)

Player DataPlayer Inventory
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

·
brendan avatar image
brendan answered

For the first question - adding values to player accounts on creation - please see this thread, which is on that topic: https://community.playfab.com/questions/7242/assign-default-player-statistic-value-on-new-accou.html.

For updating info from the client, whether user data or statistics, it depends upon how secure you want to be. Assuming you don't want players to be able to cheat, you would use a custom game server or Cloud Script, so that you can write appropriate cheat-checking logic (that the values are safe and align to the player's progress, that enough time has passed since the last update, etc.).

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.

doronhn avatar image doronhn commented ·

hey,

Thanks Brendan for the fast answer.

For this situation (user play and complete the first 3 levels) i need to update PlayFab with his "current level" (was level 1 and now 4).

i have to update this from the player mobile itself, am i wrong?

0 Likes 0 ·
brendan avatar image brendan ♦♦ doronhn commented ·

It's up to you to decide what level of security you want to have on your games. Allowing the client to state what level the player is means that you make it trivial for a hacker to push whatever data they want to into the game. Our recommendation is to at least use Cloud Script, so that you can write your own logic for checking the values the client is posting for validity.

0 Likes 0 ·
doronhn avatar image doronhn brendan ♦♦ commented ·

got it.

you have idea about the use full logic to check if the data is correct?

never thought about it.

0 Likes 0 ·
Show more comments

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.