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 Julien SEGERS · May 03, 2021 at 02:23 AM · Player Dataunity3ddataCharacter DataCharacters

Which way for monsters' data?

Hello,

I'm using Unity to build a monster-taming game, similar to Pokémon or Temtem.

The difference is that the tamer (player) also have statistics (e.g. strength, vitality, ...) and a level system.

I'm a bit confused about how I should handle the data in PlayFab. The game is mainly single player but 1v1 battles will take places online.

1) Should the tamer attributes be written in Player => Statistics?

2) Should I use Player Data or Characters for the tamer's monsters team (which also have levels, health, spells, etc...)? Something else?

3) Where should I save the Vector3 position and the scene the player is in or such informations so that it is loaded upon logging in?

Thank you for your precious help!

Kind regards

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 · May 04, 2021 at 08:29 AM

  1. PlayFab Statistics can do the job, but Player Read-Only Data is preferred based on the design purpose. PlayFab Statistic is aimed at recording scores, which will reflect on the leaderboard.
  2. I don’t think it is necessary to use the Character feature for monsters, because Character is a substitute of a player. To manage monsters' data easily, it is recommended to use items. You can use Custom Data in items to store strength, vitality values. Consider Catalog items as C# class while the inventory item is instance. The Custom Data isn’t inherited from Catalog items. This behavior matches the design of Pokémon – for example, the Charmander’s base stat is pre-defined (store in Catalog item Custom Data) while the one that the player catches will have different IVs (store in Inventory item Custom Data).
  3. I believe Player Data is able to store a Vecor3 data since it can be updated by the client. It depends on your requirement to use Player Data, Player Read-Only Data.
Comment
Julien SEGERS

People who like this

1 Show 6 · 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 Julien SEGERS · May 12, 2021 at 08:29 PM 0
Share

Thank you for your answer!

I'm trying to understand how to implement server authority with CloudScript.

For example, I want to send an input that the player choose an attack, but on the server, I want to make sure it's the correct attack/damage etc...

For now, I have:

- an Attack class (which stores the data about an attack: damage, precision, element, etc)

- a Monster class (which contains the monster's stats used to calculate the damage).

I'm wondering for example where should I store the monster's attack, as they are items?

Thank you for your help!

avatar image SethDu ♦ Julien SEGERS · May 13, 2021 at 02:05 AM 0
Share

May I ask does the game contain PVP contents? There are many solutions for server authority, but it depends on the design of your game. Here is an example from external community: networking - Should damage calculation in a competitive multiplayer game be done client-sided or server-sided? - Game Development Stack Exchange

>>I'm wondering for example where should I store the monster's attack, as they are items?

Please check the 2nd paragraph of my previous answer.

avatar image Julien SEGERS SethDu ♦ · May 13, 2021 at 09:24 AM 0
Share

Thank you for your answer.

Indeed, it contains PVP. I will have a look at the link, thank you!

About my monster's attack, sorry I didn't mean the "attack" stat but instead I meant the "skills", "spells", etc... I should have been more precise, sorry!

Should this also be stored in Custom Data?

For now, I have a Monster class which has reference to a list of Spell (another class). I understand that I should use Playfab Items for my monster class, but I don't know where I should "store" my spells class.

Show more comments
Show more comments

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

    After trying to delete userdata (for testing) with DeleteAll() function, it doesnt work anymore? 1 Answer

    Stay logged in when the scene changes 1 Answer

    Questions about limits 1 Answer

    Soccer Manager - Handling of soccer players / data 1 Answer

    Save and Load player location or other data in UE4 Blueprints? 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