Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by NJ · Jan 16 at 12:34 PM · dataIn-Game EconomyTitle Data

Economy category item one to many relationship

Hello, I've one to many relationship category and item. item can have only one category and category can have many items such as:

{
  "Categories": [
    {
      "name": "hair",
      "items" : [
        {"name": "hair-1"},
        {"name": "hair-2"}
      ]
    },
    {
      "name": "eyes",
      "items" : [
        {"name": "eye-1"},
        {"name": "eye-2"}
      ]
    }
  ],
}

I am confused where is the right place in playfab to store categories (hair, eyes). For items it's simple I can save them in Economy -> Catalog -> Items(hair-1, hair-2, eyes-1, eyes-2). But for categories it's confusing. Is the title data right place to store categories? Also should I specify category in item's -> item class or in item's -> tag?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Made Wang · Jan 17 at 08:04 AM

You can define item categories in the Item->Item class. Item Tag also implements the similar feature, but items cannot be sorted by Item Tag in Game Manager. You can refer to Catalogs - PlayFab | Microsoft Docs to learn more.

In addition, Title data is not attached to the item, so it is not suitable for storing item categories.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image NJ · Jan 17 at 09:03 AM 0
Share

But I also want to store additional information about categories, such as icon and other properties. So I need to define them separately. One option is to save this information inside item's custom data but this will cause a lot of duplication. Another option is to save categories separately ( for example in title data) and link them to items via item class property. But I am not sure if it's the best practice

avatar image Made Wang NJ · Jan 18 at 08:47 AM 0
Share

Do icons and properties under the same category need to be reused?, if so, you can save data templates of different categories in Title Data, and then use GetTitleData to get the template. If you need to update the data in the item or create a new item, you can call UpdateCatalogItems, SetCatalogItems, etc.

One thing to note is that Title Data works best with global constants/static data, updates can be delayed up to 15 minutes, refer to Title Data - PlayFab | Microsoft Docs to learn more.

You can also use Duplicate in Game Manager->Economy->Catalog to generate items of the same category or use Bulk edit to modify items of the same category.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    9 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    News with Claimed Rewards 1 Answer

    Best way to make weekly rotation. 1 Answer

    Best practices for versioning title data and Azure Functions 1 Answer

    Where to begin for Mobile implementation and what to focus on? 1 Answer

    the dynamic database features that all users can access,The dynamic database features that all users can access 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges