question

tombatsford avatar image
tombatsford asked

Item Reward Keys

Hi,

We are looking at implementing reward keys for our game. This will be a text field that a user can type a key and then we reward them with an item if the code is correct.

There are two types that we want to use:
1 - Global key that anybody can use once and everybody receives the same reward.
2 - Individual keys that we can give out at events or to competition winners that gives only the person who enters that key and item and the key only has one use.

Does playfab have anything in built for this? If not, what would you recommend is the best way to implement something like this? For global keys i was thinking a list of available keys and thier reward in the app title data and then marking the key as claimed in their players data. But i have no idea what the best way to do individual keys would be.

Thanks!

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

·
Joshua Strunk avatar image
Joshua Strunk answered

Playfab does not, to my knowledge, directly support number 1, but your solution seems fine enough. If you care about anyone being able to get the global keys just be sure to store them in internal TitleData.

Number 2 Playfab directly supports through coupon codes which you can issue for the individual items in bulk through the game manager. These can then be redeemed only once by one player. (Pretty much exactly like steam keys)

See.

https://api.playfab.com/documentation/client/method/RedeemCoupon

https://api.playfab.com/docs/tutorials/landing-commerce/coupons

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 ·

Absolutely correct - and we'll be offering more options with coupons in a future release.

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.