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 iniside · Mar 24, 2019 at 12:17 AM · Player DatadataPlayer InventoryTrading

Randomly Generated items - best practices

I have a game with randomly generated items.

Items are split into two parts. Metadata which is shared between instances of the same item (like class, rarity, icons, data needed to generate stats) and item instance itself.

Once player get item (drop, grant doesn't matter), new instance with random stats derived from metadata is generated and should be saved to player inventory. Pretty standard item generation like Diablo or Path of Exile.

Players should be able to trade item to other players, sell it to vendor, deconstruct etc.

The Item generation is handled on my own server.

My question is. How to best store those generated items on PlayFab ? The data about item can be quite hefty (more than 1KB per item, as there is a lot of generated/customization data), but i don't expect to be that much items.

And if there is no feasible way to do it right now, is there any system planned, which would allow to handle such cases, where there is not that much entries, but the entries on their own are quite complex ?

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 Andy · Mar 24, 2019 at 12:57 AM

We provide you the ability to store metadata on an item instance in a player's inventory. (https://docs.microsoft.com/en-us/rest/api/playfab/server/player-item-management/updateuserinventoryitemcustomdata?view=playfab-rest) We do limit the size of the meta data values and the number of values that can be updated at once. You can find these listed on your title's limits page.

The other option is to store the item customization data as part of player data. Limits there are more generous, but it's not quite as elegant a solution.

Comment
iniside

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 iniside · Mar 25, 2019 at 08:03 PM 0
Share

Hey

Thanks for answer :).

If I understand that right, to give any item to inventory, it first must be in Catalog ? That would mean I would need store every randomly generated Item possible in Catalog first and then move it to player inventory ?

avatar image Andy ♦♦ iniside · Mar 26, 2019 at 06:12 AM 0
Share

You need something in the catalog, yes. The breadth of items you choose to put in the catalog is up to you. For instance, you could have a Sword entry to which you just add instance-specific info when it's created. You could, also have a rapier entry that has some basic data to differentiate it from other swords, but then is further customized by instance data. How far you take that is up to you.

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

    Azure SQL server with PlayFab. How and what to store? 1 Answer

    Soccer Manager - Handling of soccer players / data 1 Answer

    How do i get the player inventory from javascript? 1 Answer

    Playfab Player Data Fields ? 1 Answer

    ,How Can I get other player VC with their ID's ? 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