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 Muhammad Qasim · Jul 30, 2018 at 05:07 PM · dataCharacter DataCharacters

GetCharacterData is not working properly ?

GetCharacterData is working when I update the data from client but it is not working when I am setting data from playfab catalog item [returns nothing].

Detail:
I am using these catalog items as my characters/vehicles and then these vehicles have properties like speed, brake, steer etc which I am saving during item creation in catalog.

What could be the possible issue, Thanks.

....

What I was thinking is that the data may be private, but their is no option to make it public in dashboard.

Comment
Muhammad Qasim

People who like this

1 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 · Jul 31, 2018 at 06:32 AM

Can you clarify your flow and your expectations? Character data is data specific to a character. It has nothing whatsoever to do with the catalog or inventory items. If you mean you're updating custom data on an item in the catalog, can you clarify what your expectations are? The custom data on the items in the catalog is just that - at the catalog level. It's there so that it can be used as global settings, common to all players/characters, and it is always read from the catalog.

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 Muhammad Qasim · Jul 31, 2018 at 07:55 AM 0
Share

I have 4 vehicles and they have their specific properties such as speed, steer, color, rim etc

What I want is these value should be loaded from server and every vehicle should have their own property value.

What I have done is,
I have created a catalog of these 4 cars and set flag for character to true, also I have set their price and the above mentioned properties value in the custom field data.

After that,
I have bought a car and granted its access to the specific user, everything is working fine but when I get the character's custom data by passing character id using GetCharacterData() it doesn't returning me anything, in this case.
But

when I update these custom fields by using UpdateCharacterData() then it is getting the data by GetCharacterData().

So,
Should I have to get the custom data from the catalog and update it to the character/vehicle when I am granting access to it or their is any other simple solution ?

Thanks.

avatar image Brendan ♦♦ Muhammad Qasim · Aug 01, 2018 at 01:55 AM 0
Share

I think there's a disconnect in the way you're using "token for character" in the catalog. By checking that option, you're saying that the inventory item is a token which can be exchanged for a character, using https://api.playfab.com/documentation/client/method/GrantCharacterToUser. An inventory item on its own is not a character.

It sounds like what you want to do is this:

1. Put the default values for speed, etc., in the catalog's custom data. Read the catalog to get those values.

2. Put any override for those values on the custom data of the inventory item instance.

There's no need to use the character system to accomplish this.

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

    UpdateCharacterReadOnlyData Vs UpdateCharacterData 0 Answers

    Updating Character Data 1 Answer

    Bytecode storage for character avatar in the cloud 1 Answer

    Updating Character Inventory from Server 1 Answer

    Accessing the history of a character's statistics 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