question

rootsnwonky avatar image
rootsnwonky asked

How increase the inventory item expiration period?

I'm making a store where users can buy items for either 7, 30, or indefinitely days. For example, a player rented an item for 7 days, and a few days later decided to add another 30 days to it or buy it in full (add 999 days, for example).

How can I increase the inventory item expiration period without losing item custom data / without creating a lot of copies of this item with different consumable time in playfab catalog

Player 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

·
Rick Chen avatar image
Rick Chen answered

If you set up an item with an expiration (consumable by time), and set the "time group name" on the item, any other item added with the same "time group name" will add its time to the expiration for the item. However, if the item expires, the custom data will be gone. If you want a static custom data for the item, a workaround is to move the custom data from the item to somewhere else, for example, put the custom data of the item in Player data.

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.

rootsnwonky avatar image rootsnwonky commented ·

This is the only way to add time to the item expires date?

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ rootsnwonky commented ·

Yes, the time group is the only way to extend an item’s expiration time. If you have any concerns about this method, please feel free to let us know.

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.