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 Alexander Paul · Jul 26, 2021 at 02:19 AM · In-Game EconomyPlayer Inventory

For my card collection I am using Scriptable Objects. What would be the best approach to have them has catalog items and make them unlockable in the Deck Builder?

Hi!

In my Unity Project I have a Deck Builder Scene where all cards get loaded in. The cards are scriptable objects. If I want to add an economy system to my game and make cards unlockable in the Deck Builder, what would be the best approach to do that?

Since I have all the information about the cards such as values and illustrations etc. in the scriptable objects called Card Assets I am not exactly sure how to make it work with a Catalog.

I assume the best solution in my case would be to create Items in the Catalog with the same name as the Card Assets and then just compare the strings of the Card Assets and the item_ID. So all the items the player ones will be compared with my Card Assets and based on that I can load my card collection accordingly right? Then I could flag those who are found in the catalog as choosable for a deck for example.

Or are there any other / better solutions?

Thanks in advance!

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 SethDu · Jul 26, 2021 at 08:04 AM

I think you are on the right track. It is necessary to define each card as an item in the Catalog, and it is optional to set them stackable. The properties like “Class” and “Tags” can help categorize the cards. In this case, Inventory items will be the cards that a player owns.

Regarding a single card, you may define attributes in Custom Data, which is read-only for players and when GetCatalogItems API is called, all information of an item, including attributes will be returned in the callback. You may define a card class in your client to handle all the attributes.

When building the deck, the client will compare the whole catalog data with inventory items, you can dim those cards that the player doesn’t own (or simply hide them) and highlight the owned ones. The deck is a specific to a player, you can store the deck collection in Player Read-Only Data.

Comment
Alexander Paul

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 Alexander Paul · Jul 26, 2021 at 12:37 PM 0
Share

thanks for the quick response. I ll try things out and maybe come back if I have more questions about this topic.

Just to clarify, with "You may define a card class in your client to handle all the attributes." you mean handling all the card values within the game itself (unity - my scriptable objects) right?

And thanks for the inventory input, thats helps and is a good idea.

avatar image SethDu ♦ Alexander Paul · Jul 27, 2021 at 02:01 AM 1
Share

>>handling all the card values within the game itself

Yes. Please also note that Item Class has been defined in PlayFab SDK, you may direct refer to use it if it satisfies your requirement.

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

    Limiting the Number of Specific Items in the Inventory?,Limit Number of One Type of Item in Inventory? 1 Answer

    Inventory items are being auto added once a day 1 Answer

    Video Tutorial or Guide to Implement Real Money Purchase 1 Answer

    Catalog item with more states 2 Answers

    Player purchased an item bundle but the contents weren't given to the player 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