question

brendan avatar image
brendan asked

Best approach to characters & skins

Firestorm Studio
started a topic on Wed, 24 June 2015 at 12:11 AM

I wanted some advice when handling multiple characters and skins. The system we will be using would be similar to those of heroes of the storm and league of legends where players can unlock or purchase different characters and those characters will each have several skins.

Our initial idea was to have a usable item that unlocks a character and 3 different items that unlock skins.

The issue is how to know what characters and skins someone has unlocked? Would we need to create a item in the json for each character and there skins?

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

·
brendan avatar image
brendan answered

8 Comments
Brendan Vanous said on Wed, 24 June 2015 at 3:12 PM

You can use GetAllUsersCharacters (https://api.playfab.com/Documentation/Server/method/GetAllUsersCharacters) to get the list of all characters a player has - the key with characters is that you sell or grant to the user the catalog item which can be exchanged for a Character. For skins, I would recommend making it an inventory item which you sell the player, and which your code checks for when retrieving the inventory for the player. Does that make sense, or do you have other questions concerning this?

Brendan


Firestorm Studio said on Wed, 24 June 2015 at 9:21 PM

Ok so each player can have multiple characters and each character can have inventory is this correct if so thats pretty cool. So I would set each character with inventory (skins) that you need a key for to unlock (like the chest in the demo). Then I just sell keys in store.

For example
The store will sell 4 keys (Bronze, Silver, Gold, Character)

To unlock a character they will need to purchase a character key then that character will become available. Each character will have inventory (skins) that need to be unlocked using the appropriate key from the store. These skins will be like to boots in the demo.

Is this possible


Brendan Vanous said on Thu, 25 June 2015 at 12:26 AM

That's absolutely correct - characters, in addition to the user owning the characters, can have inventory and statistics.

The difference between the chest concept and your skin concept is that you wouldn't want to make the skin a consumable, since you want it to remain in the user's inventory, so that you can check that it's there (to let the player use it, and to make sure you don't present it to the user in your in-game store).

Brendan


Firestorm Studio said on Thu, 25 June 2015 at 6:46 AM

OK. So the next step is creating a character and that's where I get confused. Do I just add an item in the catalog in my case its called mageDemon. Then do I create the skins as items also and add them under the bundle section of the mageDemon. How do i tell the system that this is a character and not a regular item?

Perhaps it might be best to pay someone to run through the basics of everything as im using unity and this will be our first server type game Im feeling a tad overwhelmed and I cant seem to find any tutorials on the c# coding side of playfab.


Robin said on Fri, 21 August 2015 at 3:04 AM

" I cant seem to find any tutorials on the c# coding side of playfab. "

This. ^ As a novice developer/designer I run into the same problem.

Every tutorial I've found so far is explaining the back-end and uses (out-dated) projects. The current SDK doesn't have the prefabs (anymore?). I would love to see some tutorials about the C3 in Unity. For example how to process the return strings.


Brendan Vanous said on Fri, 21 August 2015 at 8:41 AM

Firestorm - My apologies for the delay. I don't know why our support site didn't notify us that there was a response on this thread, but we'll check into that. If you ever don't see a response for a couple of days, feel free to ping us at devrel@playfab.com. In answer to your question, a bundle is something which comes with other items "for free", so no, you wouldn't want to have the skins bundles with the character. Anything which can be sold as a distinct transaction should be a separate catalog item. You can group things which are intended only for players with a certain character using the "store" concept in our system. The character itself isn't sold, though - instead you can either grant characters to players using the Server API call, or sell an item in your catalog which can be turned into a character via the Client call, in which case the CharacterType is set to the original item's ItemId.

Robin - We are continually working on adding more docs and sample projects. Since we're committed to not having any breaking changes in our service, all the existing projects are still valid. One example project would be the Union demo, which is a simple MOBA-type game. Specific to your question, all the returned data is processed for you in our SDKs into classes which you can then use to evaluate the info. For example, the response to GetUserInventory is returned in GetUserInventoryResult, and there's always a callback function (in this case, GetUserInventoryCallback) which is used to receive the response so that you can create your own version of the callback with your custom logic.

Brendan


Robin said on Sun, 23 August 2015 at 5:07 AM

Hi Brendan, thank you for your reply. Let me rephrase 'outdated projects' to pre-unity 5 projects used in the tutorials I've found. Having difficulties to start using the service is of course primarily due to my lack of knowledge & experience. Would be great if the getting started guide was extend with getting started in Unity and show & explain the creation of the Angry Bots prefabs for example.

Maybe I have to put my money where my mouth is and do the vids myself once I get comfortable with the service.


Brendan Vanous said on Sun, 23 August 2015 at 12:54 PM

Hi again,

While we have a number of SDKs available for developers to use, we do expect some level of familiarity with those SDKs, as we need to focus our resources on getting started with and using the PlayFab features, specifically. We do try to make it as easy as possible to do so, and we'll be adding more as we proceed, but for tutorials on getting started with the development environments themselves (like Unity), I'd have to point you to the site for the engine in question.

Brendan

10 |1200

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

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.