question

andreas avatar image
andreas asked

Buying VC - Using bundles?

How would I go about buying a package of soft currency with another currency?

I would guess it's to use bundles and offer them in a store.

The problem I am facing is that I cannot see how much money I will get as store is only giving away ItemId of the bundle when calling GetStoreItems. This means I will need to get all item info for every single bundle just to populate my store.

Are there any other way you are doing this?

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.

andreas avatar image andreas commented ·

Hmm, couldnt edit post so I'll add some here. Seems like only way of getting info about the bundle is through GetCatalogItems, which in this case would be terrible as it would mean >500 itemdefinitions each time I want to open the store (and get the correct definition and pricing) and also because I'm not sure that I want to expose to client all the items we have in the catalog.

0 Likes 0 ·
brendan avatar image
brendan answered

That's correct - Stores are for defining sub-sets of items from your game and setting prices, while the global definition of items is in your catalog. So getting the catalog on start, to make sure you have the latest definitions, and storing it locally is the best way to do this. If there's information you want to obfuscate from the user about things in the catalog, I would recommend making those elements of the item definition something you put in Title Internal Data, so that you can control if and when the client gets that information via Cloud Script.

To sell virtual currency to a player, you can define a bundle with a Usage Period of 5 seconds, which contains the VC. That way, the bundle adds the VC to the player's balance(s), then cleans itself up.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

drallcom3 avatar image
drallcom3 answered

After talking to the Playfab guys:

- Put currency in bundle

- Set bundle to consume after 5 seconds

- Give bundle to player

- Pretend the bundle was never in the player's inventory

They would have liked to make the bundle auto-disappear. It's still in the inventory, without a consume duration, but has no function at all and can't be "consumed" multiple times.

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.

brendan avatar image brendan commented ·

Actually, setting the consume time (Usage Period, as stated above) to 5 seconds makes the bundle item clean itself up automatically, so that it's no longer in the player inventory.

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.