question

aphexyuri avatar image
aphexyuri asked

How do get the virtual currencies include in a bundle/container with PurchaseItem response?

PurchaseItemResult.Items (and ItemInstance.BundleContents) does not include any virtual currencies that would be obtained from unlocking the container. Is there another way to obtain this?

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

1 Answer

·
pfnathan avatar image
pfnathan answered

You would need to create a bundle. A bundle is an inventory object that unpacks automatically and can contain Virtual Currency. "Example would be like; player buys a "Gem bundle" and the bundle deletes itself and grants a bunch of Virtual Currency"

5 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.

aphexyuri avatar image aphexyuri commented ·

So there's no way to get the virtual currencies container in a Container?

0 Likes 0 ·
brendan avatar image brendan aphexyuri commented ·

Virtual currencies can be added to the player account via Bundles and Containers. The issue you're highlighting is the fact that the VC added to the player account is not in the PurchaseItemResult info, yes? We do have an open work item on that, but I'd recommend adding it in our Feature Requests forum, so that others can "like" the idea, which helps with prioritization.

1 Like 1 ·
Good Guy avatar image Good Guy brendan commented ·

4 years later, any chance of adding this? It's a pretty basic feature in F2P games to award currency or buy bundles of them and accessing the amount granted in the PurchaseItemResults would be simpler and intuitive.

0 Likes 0 ·
kristindragos avatar image kristindragos commented ·

@Bendan What would I use to get access to the player events? I'm working on something similar and am pretty new to PlayFab. Is the playstream events returned somewhere in GetPlayerCombinedInfo? Thanks.

0 Likes 0 ·
brendan avatar image brendan kristindragos commented ·

No events are part of the PlayStream, and are the information concerning things that occurred in the game, some for the player, some not. You can review events in the Game Manager, have them sent to you via the Webhook and Event Archive options, and search on the full set of events for the lifetime of the game in Snowflake. If you want to take an action based upon an event occurring, you can use a Rule to set that up. I'd recommend reviewing these tutorials: https://api.playfab.com/docs/tutorials#landing-analytics

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.