question

Muhammad Roshaan Tariq avatar image
Muhammad Roshaan Tariq asked

Change recharge maximum per player

Hi, I have a Virtual Currency which recharges itself every 3 minutes and the maximum value a player can hold is calculated by it's Level.

For example, if the player is Level 1 then they can only hold 50 of the said VC and if they are on Level 2 then they can hold 75 and so on

I want to use the Playfab's Recharge feature for this but I can't seem to find a way using which I can modify the recharge maximum value for each player.

Is it possible on Playfab? If yes, then what's the API for it? And if not then is there any work around I can use on Playfab?

apisPlayer 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

·
Seth Du avatar image
Seth Du answered

It is not supported. Virtual Currency is Global resource, which cannot be overridden by the players. Please feel free to send a thread on Feature Request Forum.

However, there can be a workaround solution. You may store the maximum “VC” value, current “VC” value and last update timestamp on Player Read-Only Data. The Recharge is done by the client (the recharged in predefined on both clients and Cloud Script). The current timestamp will be compared with last timestamp so that the VC’s increased value can be calculated. Max VC, Current VC along with timestamp should be returned to the clients so that the client can refresh the local data.

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.