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 /
  • API and SDK Questions /
avatar image
Question by David Lindskog · Mar 23, 2020 at 07:03 AM · Player DataLeaderboards and StatisticsPlayer Inventory

Avatars as inventory items

Hi!

I would like to have a system where the player gets to choose from a couple of predefined avatars including their FB pic (if they have linked their FB account).

I was thinking that I could have all the avatar pictures in the game and save them as ints in a dictionary.

Then I only had to get the kvp from the players player data for displaying in various places like leader boards and stuff. Except for the FB pic of course.

But I also wan't to be able to reward players that reach a specific level or gets an achievement. Or straight up buys an avatar pack from the store. Is player data safe enough?

Or can I pair an inventory item in some way?

To be clear, I don't want to store the avatars in a bunch of URL:s.

Any suggestions?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Citrus Yan · Mar 23, 2020 at 08:37 AM

So you want to encode avatar pictures into ints and save them directly into player data, is that correct? In that case, I want to remind you that the default Player data value size is 10,000 bytes, hence you’ll need to make sure that the avatars’ sizes won’t exceed that limit.

Read-only player data should be safe enough for your use case, which only the sever can modify but the client can only read. And, you can pair an inventory item to a specific avatar, however, since you are not using URLs to store the avatars and the default size for a catalog item custom data value (1000 bytes) may not be enough to directly store the raw avatar data, therefore, you may need to maintain a look-up table of avatars for the inventory items to refer to, this could be done using Title Data.

Comment

People who like this

0 Show 0 · 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

Answer by David Lindskog · Mar 23, 2020 at 02:39 PM

No no, I just want to pass an int via Playfab. All the avatar pics is already in the build. So when the a leaderboard shows the result I swap that int to a picture via a dictionary.

Comment

People who like this

0 Show 0 · 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

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

    Creating dummy player from cloud script 1 Answer

    How can I change a players statistics ? 1 Answer

    How to give player EXP after battle? and How to reward player after level up? 1 Answer

    Work With Playfab - Facebook Together 2 Answers

    Referral system by code in the game. 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