question

teambrunchdev avatar image
teambrunchdev asked

I want to create a daily mission weekly mission in Playfab. using Azure Function,Weekly Mission System

I am currently creating a daily mission weekly mission.

For example Craft a player item 3 times The player uses a fishing rod 5 times

I'm trying to put these into a mission, but the

In the Player Title Data, I want to set the number of times the player uses the fishing rod and the number of times they craft items to and rewards according to the above contents in the Title Data. and rewards according to the above.

The overall process is as follows

I will use Azure Function.

  1. Input the title of the mission.

  2. Get Title Data

  3. Get User Data to get the key value of the mission.

  4. If the number of times Title Data and the number of times User Data match, we will add the title of the mission to the key value called CompleteWeeklyMission to prevent data tampering later.

  5. Receive the reward

For the WeeklyMission DailyMission, we'll use DataTime.UTC to get the For daily missions, we'll use DataTime.UTC For the Weekly Mission, we will set the value of the Player Title Data to 0 every Wednesday at 6pm.

I'm wondering if this is what I'm trying to do.

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

teambrunchdev avatar image teambrunchdev commented ·

I decided to use statistics instead of UserData in the above, is that okay?

0 Likes 0 ·

1 Answer

·
Neils Shi avatar image
Neils Shi answered

Yes. Since the Title data is suitable for storing global constant/static data, you can store the parameters for mission completion and mission reward in title data. Please note that Title data is not suitable for data that changes frequently, because Title data values are copied and distributed to potentially hundreds of machines in the PlayFab server cluster. As part of this process, Title Data is cached, and changes may take up to fifteen minutes to refresh in those caches. Then you can use Azure Functions to update mission progress count with User Read Only Data. After that, you can determine whether the mission is completed in Azure Function as you said, and if it is completed, granting the rewards to players.

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.

teambrunchdev avatar image teambrunchdev commented ·

I decided to update the player's statistics and store mission completion confirmations in the user read only data.

I chose statistics because it allows me to set the initialization to automatic.

Thanks for the answer!

0 Likes 0 ·

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.