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 tombatsford · Sep 14, 2017 at 08:40 AM · Player InventoryPlayStreamCharacters

Questions regarding characters, player_added_title play stream event, same characters for multiple users and shared inventory across player account.

Hi, in the game i am working on currently, all players have access to all of our characters at any time and all of our items are potentially shared across all of those characters. I have three questions about characters relating to this.

1. Because our characters are not user created is it possible to add our characters to each players account as a rule that triggers on the player_added_title play stream event? I intend to use characters to track stats and inventories.

2. Is it possible for the same characters to be added to each users account? same name etc but of course their own instance of each character

3. Is it possible to have a shared inventory across a players account? If i move an item to a characters inventory i am assuming that it removes that item from the users inventory and moves it to the characters? What id like to achieve is using the characters inventories as a record of what they have equipped but still pull all items a user has by using "GetUserInventory" API call.

Thanks!

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 Brendan · Sep 14, 2017 at 08:43 AM

All instances of characters are unique to the players they belong to, so yes, you can indeed add the same type of character to many players. They won't be sharing a single character record, obviously, but you can certainly use the same definition information for setting up all of them.

For shared inventory across the player account, we would recommend just using the player inventory, rather than having the inventory items belong to the characters.

For item 1 though, the question is, how many characters do you need to create? If it's only two or three, that's not a problem. But if you need to create a lot of characters on first sign-in, you'll need to drive that from the client, rather than a PlayStream action-driven Cloud Script call.

Comment

People who like this

0 Show 4 · 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 tombatsford · Sep 14, 2017 at 09:24 AM 0
Share

Ok great, yeah i will be needing to create upwards of 10-15 characters and i am currently trying to do that using a play stream cloud script event, should i be doing this from the client api instead and in that case i will need to add client character creation items?

avatar image Brendan ♦♦ tombatsford · Sep 14, 2017 at 04:00 PM 0
Share

Well first, what are all the characters for, exactly? How does the game use characters, and are there other characters the player account might have later? The reason I ask is, that's a lot of characters - and given that the total inventory for the player is the player inventory + all character inventories, having so many does limit how many items each can have.

What I would recommend, if that many is required, would be to do so from Cloud Script - possibly more than one, as part of setup. Key to having effective Cloud Script handlers is doing solid testing and reviewing the time each takes to complete. If they're exceeding 80% of the total time limit, you should really be looking at splitting the logic up.

To be clear, Cloud Script is meant for relatively lightweight operations. If you have a need for frequent calls to run server authoritative actions, you may need to consider moving that logic to a custom game server. There, you could have any level of interaction with the client, with the server periodically updating the service (every minute or so, and at the end of a game session).

avatar image tombatsford · Sep 15, 2017 at 08:30 AM 0
Share

My intention is to use characters to record character specific stats as well as keep a record of what items a player has equipped on that character. Equipped items will be stored in the character data and the player inventory used to hold all of a players items, i do not intend to use the character inventory api. If more characters are added it will be to all players when we release a DLC for example.

Thanks

avatar image Brendan ♦♦ tombatsford · Sep 15, 2017 at 07:59 PM 0
Share

The character system was originally designed to support the common MMO model where you create one character at a time, hence the reason the API calls are set up that way (that, and the fact that bulk creation of characters would be a fairly expensive operation). If you're using a custom game server, you could do all the setup for the player's characters the first time they connect. Otherwise, you'll want to do that via Cloud Script, and only do some of the work on each pass. One possibility would be to simply show the player all the characters as if they were set up on the account, but only truly "instance" them in the player account when the player clicks into one for the first time.

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

    ModifyItemUSes On Character Inventory... 2 Answers

    Trading between characters 1 Answer

    GrantItemsToCharacter gives VC to Player not Character? 1 Answer

    Updating Character Inventory from Server 1 Answer

    How to give player EXP after battle? and How to reward player after level up? 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