I have Prize tables which apply pirzes in the form of virtual currency upon reset of the leaderboard. Our virtual currencies do not get tracked on PlayFab, since we only recently decided to add PlayFab features to the game.
How can we trigger the application of prizes for currencies which are not tracked via PlayFab?
A simple solution is to use the CloudScript to make webhook calls to your website that grant the external currency to player. Then in your Prize table, choose "Add rank" in the TABLE CONTENTS, in the "type" field, choose "Execute Cloud Script". Then in the "Cloud Script Function" field, choose the CloudScript function created earlier and save your Prize Table.
@Rick Chen. Actually this is an app where currency is stored via the features of the various app stores (Google Play Games, Apple Game Center) etc. as opposed to a website.
I thought of a solution where prizes would be allocated to the appropriate store in PlayFab. Then, the player can retreive their prize from PlayFab, which adds to the game currency (and updated via Gogole etc.), then finally the prize value/s is/are removed from PlayFab such that it is zero (until next time) and so on.
Would there be any issues with that?
Could you please describe your solution in detail? How will you implement that when the player retrieves their prize from PlayFab, their game currency in Google Play Games and etc. increase?
@Rick Chen.
Ok, so the binary user data, for a player, incorporates game currency. The binary is just a file which is stored on local device, and synced with Google Play Games (or Apple, Steam) etc.
Whenever the player receives currency, via play, this added and saved to the user data, and again synced in the cloud.
My idea for prizes, is for Playfab to act as a form of escrow. That is, prizes are applied via the leaderboard reset, managed automatically with PlayFab. The player is notified, via say push notification and, next time they enter the game, they can claim their escrow reward. Once claimed, the escrow can be reset to zero. And the apply, notify, reset of escrow can continue as needed.
I see no issue with this, myself. But I wondered if my ignorance of PlayFab may cause problems.
Your idea sounds OK. The price and the push notification can be triggered using the Prize Table. And when the player wants to claim their escrow reward, you can use the ConsumeItem API to remove the their prize from PlayFab (resetting escrow to zero).
2 People are following this question.