question

Curtis Pelissier avatar image
Curtis Pelissier asked

Change statistics for all players from CloudScript

Hello,

I need to update a player statistics for every player of my game once. I already had players in my db and I can't change their stats for each.

I tried to update each player in a cloudscript schedule task, but I get a "PlayFab API request aborted, because API call count limit exceeded" because of 25 calls limitation. I iterate and try to update on each player entity, but that's heavy.

Is there a way to update player stats, datas or objects for every players at once ? With one request ?

Player DataCloudScriptscheduled tasks
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

To update all the statistics or data of every player in your game, you would need to use a Scheduled Task operating on the All Players segment. Please note that this is a serialized function, so it processes through the players over time, depending on the total number of players. You can expect that it'll be somewhere around 100 accounts per second, if the logic is fairly simple.

In general, it's a better idea to design your game to update player data when the player signs in, or otherwise takes an action that indicates they're still playing. That way, you're only paying for the processing costs on players who are actually active in your game.

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.