question

brendan avatar image
brendan asked

Intended use of Catalogs / Title Data / User Data

swivelhead
started a topic on Thu, 15 January 2015 at 8:07 AM

So, I'm combing the APIs and learning how to implement PlayFab for a time-based Unity simulation. A couple of approach questions came up that I'm hoping for some best practice direction on:

  1. Would the catalog structure be the best place to house in-game structure upgrades within? Example, if I have a town hall that costs (x) lumber, and (y) metal to upgrade, and has certain xp and other structure dependencies... would I define lumber and metal as currencies and "sell" that to the user as a non-consumable? Most of the examples deal with consumables that take a traditional (gold like) virtual currency.

  2. What is the difference between TitleData and Publisher Data? The description talks about TitleData as containing things like level requirements, game balance, etc., so what is the intent for Publisher Data?

  3. Is User Data exposed anywhere on the dashboard? I intend to use that for the heavy lifting of storing progress, state, etc. Is that a correct assessment?

Really liking the platform so far! Keep up the great work :)

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

·
brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Fri, 16 January 2015 at 12:05 PM

Thanks!

  1. You can enable this, but not via the catalog. Currently, the catalog is designed for in-game purchases (both real and virtual economies), but it isn't designed for costs which are a combination of currencies. So, you could have an item which can be purchased for X lumber or Y metal, but not X lumber and Y metal.

Right now, the way to do this would be to use Cloud Script - something we're about to release a lot more info on. Cloud Script allows you to host custom JavaScript logic for your game which has access to the Client and Server API methods in our service. A script which checks that the player has the right balances, subtracts them, then adds the appropriate item would be easy to put together. You would still set these items up in the Catalog, but don't add any prices to them - just use the CustomData field to add the info on the resources needed to purchase it. We'll have documentation walking through how to use Cloud Script soon, but feel free to email us at devrel@playfab.com if you'd like to dig on the details.

  1. Nice catch - we only just posted those APIs, and we'll be adding more docs concerning them, but the quick version is:

Title Data is storage for a single games, readable by any client (and, of course, readable/writeable by the developer via Server or Admin API calls).

Publisher Data is storage which spans multiple games. While it's possible to share data via a sign-in on the other Title ID, or by sharing Secret Keys in server logic, this provides a simple mechanism for doing so. Publisher Data mirrors the other data types: User Data (all three kinds - normal, Read Only, and Internal) and Title Data, so that you have the full range available.

  1. Also timely - we're about to release our (vastly) updated Game Manager, which does indeed let you view and manage User Data for your players. You'll see an announcement about this shortly.

Brendan


2 Comments
Brendan Vanous said on Fri, 16 January 2015 at 12:05 PM

Thanks!

  1. You can enable this, but not via the catalog. Currently, the catalog is designed for in-game purchases (both real and virtual economies), but it isn't designed for costs which are a combination of currencies. So, you could have an item which can be purchased for X lumber or Y metal, but not X lumber and Y metal.

Right now, the way to do this would be to use Cloud Script - something we're about to release a lot more info on. Cloud Script allows you to host custom JavaScript logic for your game which has access to the Client and Server API methods in our service. A script which checks that the player has the right balances, subtracts them, then adds the appropriate item would be easy to put together. You would still set these items up in the Catalog, but don't add any prices to them - just use the CustomData field to add the info on the resources needed to purchase it. We'll have documentation walking through how to use Cloud Script soon, but feel free to email us at devrel@playfab.com if you'd like to dig on the details.

  1. Nice catch - we only just posted those APIs, and we'll be adding more docs concerning them, but the quick version is:

Title Data is storage for a single games, readable by any client (and, of course, readable/writeable by the developer via Server or Admin API calls).

Publisher Data is storage which spans multiple games. While it's possible to share data via a sign-in on the other Title ID, or by sharing Secret Keys in server logic, this provides a simple mechanism for doing so. Publisher Data mirrors the other data types: User Data (all three kinds - normal, Read Only, and Internal) and Title Data, so that you have the full range available.

  1. Also timely - we're about to release our (vastly) updated Game Manager, which does indeed let you view and manage User Data for your players. You'll see an announcement about this shortly.

Brendan


swivelhead said on Fri, 16 January 2015 at 2:08 PM

Thanks for the feedback Brendan. I look forward to seeing the updates soon!

10 |1200

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

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.