question

haoshi avatar image
haoshi asked

For consumables by time, can I set it to like 0.1 or even 0 seconds if I just want it to act like a bundle that doesn't need to appear in my inventory at all?

For now, I am setting my progression table as bundles and I would purchase those leveling up bundles through a progression store that contains them. Each bundle contains several rewards (items/currencies), I would like the bundle to automatically consume itself, can I set it to 0 or a very small number, because once the items in the bundle are granted, I'll need to update the inventory to display those items immediately, so I want to make sure we don't need an extra api call to just consume it or wait for 2 seconds (as suggested by PlayFab when setting "consume by time").

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

The minimal unit for time on PlayFab (at least the front end) is 1 second which is by design.

You may not concern too much because the required items will be granted once the item-granting call is made. For example, a bundle with 3 different items and will expire in 5s has been granted to a player. The player will receive 4 items immediately including 3 items inside the bundle and an item instances of bundle itself. However, the bundle instance will be expired soon because it is consumed by time, this also illustrates that if the bundle is consumed by 1 count, and the bundle item will be simply expired and nothing else will happen even when the player actively calls ConsumeItem API to “open” it.

The bundle instance is only for management purpose and can keep a record in the EXPIRED/REVOKED/STACKED history of player inventory. Besides, it still takes few seconds to complete the item-granting calls and refresh inventory. I believe players won’t be noticeable.

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.

haoshi avatar image haoshi commented ·

Thank you. That's very nice. Now I can just manage my inventory locally based on the list I received. But many of my bundles only contain virtual currencies, which is not returned in the purchase result. Do you have plans to add that in? Cause it seems redundant to get the whole inventory just to update my currencies.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ haoshi commented ·

I believe you may need to add additional codes to refresh the data after those bundles are granted. Besides, you may implement it on the cloud script which means you can simply add/subtract VC via Server APIs, and make sure there are verification processes before doing it.

Also, feel free to send a thread on our Feature Requests Forum.

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.