question

sathyaraj avatar image
sathyaraj asked

Merge Title and player Data

I want to merge 2 titles (A and B) Want to move tile B players to title A and transfer Virtual currency and player title data. I read in other thread posts regarding using cloud script to achieve the same. Can anyone help me with an example script! I am guessing when pushing an update to title B with updated title ID current users in that game would be treated as newUser in that case call a cloud script but not sure how to read the coins and player data of the old title.

Player DataTitle Data
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.

sathyaraj avatar image sathyaraj commented ·

Hi @Brendan. Seeking your assist

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Since there isn't a way to "copy" all players from one Title ID to another, the general advice would be to set up Azure Functions Cloud Scripts that host the logic to read everything you need from the old title and write it to the new one. We do not specifically have an example script we can provide, but in short, you would use the Secret Keys for each game with Server API calls to accomplish this. I'd recommend starting with our Azure Functions Cloud Script overview docs, here: PlayFab CloudScript using Azure Functions - PlayFab | Microsoft Docs. You'll want to run these as Queued scripts, so that they can run for more than the normal 10 second time (for API-triggered scripts), and please do bear in mind that all the reads and writes are going to generate spin on your usage meters.

2 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.

sathyaraj avatar image sathyaraj commented ·

Thanks for the reply. I was thinking if it's possible to read the other title data using the master account, access virtual coins and use that to update the current game's VC

0 Likes 0 ·
brendan avatar image brendan sathyaraj commented ·

The master player account is a shared namespace for the links to authentication providers and User Publisher Data. The VC and User Title Data are stored in the title player account.

1 Like 1 ·

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.