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 bealke · Dec 12, 2016 at 02:03 AM · dataTitle Data

Representing relational data in Title Data,How to represent relational data in Title Data

What is the preferred method of having foreign key relations in Title Data? The system seems very limited to me when compared to an actual RDBMS.

Is the only solution to just have specific JSON tokens I will encounter that the client / cloud scripts can parse which will then lookup things in another key?

For example if I want to have a weapon that references abilities, stat boosts, element damages, and a rarity table I would need to resolve these references somehow.

Is Title Data not where this should be?

,
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 Brendan · Dec 12, 2016 at 02:13 AM

Well, first and foremost, PlayFab is not a relational database service. Some of the most common issues that online games run into are due to the issues that occur with data systems at scale - especially when they use open queries (since one bad query can kill performance for the whole game). We provide services specifically designed to meet the needs of games, which can scale to any number of players.

What's usually best is to describe your game's needs at a high level - the gameplay itself, rather than specific implementations - so that we can help advise on the best ways to use PlayFab to achieve your goals. For example, when it comes to items, we would recommend storing all your global configuration elements - those that should be the same for all players, across all instances of the items - in the Catalog as CustomData or else in Title Data or the Content service, so that you can update it there, and have it be the same for all players. For customization of an item on a player, each inventory item instance also has a distinct CustomData that can be used to provide that level of extra information.

Comment
bealke

People who like this

1 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 bealke · Dec 12, 2016 at 02:39 AM 0
Share

Thanks for the reply. I'm just evaluating playfab at the moment so I'm still new. I looked into Catalogs but I can't seem to find a way to add CustomData to an item on the website? The approach as you describe sounds like it will work just fine - I will try to find documentation for this.

At a very high level the gameplay of this game would be:

Player goes on quest, quests take X amount of time (30 minutes). After 30 minutes they would complete the quest and get some randomly generated items, let's say like 3 of them.

The server should be the authority on the items received and thus should do the generation.

I guess the complexity of the randomization is the sticky part.

avatar image Brendan ♦♦ bealke · Dec 12, 2016 at 05:27 AM 0
Share

When you're editing items in the Catalog (in the Game Manager), it's in the lower right hand corner. You can edit Custom Data as a plain string (which it is, under the covers) or you can choose to edit it as JSON key/value pairs.

And no worries - what you describe is extremely simple in our service. We have Random Result Tables (also called Drop Tables in places) that get you the random loot drop. Just put items from your Catalog in one, set the weights for the randomization, and then you can either use EvaluateDropTable or put them in a Container or Bundle, and give that to the player.

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

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Is there a way to Send Data between Clients ? 1 Answer

    Create table in data explorer(advanced) 2 Answers

    Recover previous version of Title Data 1 Answer

    Playfab Website, Server Performance Issues 1 Answer

    Hey i wanted to get the catalog CustomData.do can i do it only by using cloud script ? 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