question

Alexander Paul avatar image
Alexander Paul asked

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!

In-Game EconomyPlayer Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

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.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alexander Paul avatar image Alexander Paul commented ·

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.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Alexander Paul commented ·

>>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.

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.