question

astrakh avatar image
astrakh asked

Ability to dynamically pick item durability/consumability during purchase?

I have a catalog of durable items which a player can purchase for virtual currency. I'm adding a "battle pass" feature that allows players to purchase all items for free but for the duration of the "battle pass" (1 month). When the "battle pass" is active, after each item purchase I want to make sure the acquired items expire in 1 month. As an option, I can create a catalog copy and switch all items to be "consumable by time" (1 month) and when the "battle pass" is active, instead of purchasing the durable items, I switch to the consumable catalog, this will force me to keep a duplicate of each item in both places which double the effort to manage it. Is there a better way to define durable vs consumable in runtime based on the user's "battle pass" status?

In-Game Economy
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

·
Xiao Zha avatar image
Xiao Zha answered

For now, we recommend that you can define the same item(different item Id) with different consumable types in one catalog and use Cloud Script Azure Function to handle the purchase (you can check for the existence when purchasing), which is more secure and easier to manage .

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.