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 Raf · Mar 12, 2020 at 05:31 AM · CloudScriptPlayer DataLeaderboards and Statistics

What's the best way to get a custom segment of players based on the user's current stats?

Hi there,

I have an asynchronous PVP feature in my game where the player can attack a specific enemy team from a list I provide them. I'm wanting this list to include some opponents harder than them and some easier (based on team power).

Currently, I'm using the leaderboard system and finding players around the user in power but I'm wanting these options to be more extreme (100 players might have nearly identical team power for example). Is there a better way to do something like this? Essentially I'm wanting a way of getting a player 20% stronger and 20% weaker.

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 Sarah Zhang · Mar 12, 2020 at 08:20 AM

>> Is there a better way to do something like this? Essentially I'm wanting a way of getting a player 20% stronger and 20% weaker.

There is no such API that can directly return a player list which 20% stronger than a specific player. PlayFab Player Segments filter conditions do not support statistics filtering which takes a specific player as the baseline. Besides, there a number limit of PlayFab Player Segments that may affect your use. Generally, for Essential tier users, the number of segments cannot exceed 10. PlayFab Player Segments would not be the best practice for this case. API GetLeaderboardAroundPlayer or GetLeaderboard return the “StatValue” of every player in the list, this “statistics value” can be used for calculation directly. So you can consider to request the leaderboard lists then filter the segments you need via calculation on CloudScript or on your own clients.

Comment
Raf

People who like this

1 Show 1 · 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 Raf · Mar 12, 2020 at 02:54 PM 0
Share

Thanks, Sarah! That's kind of what we were suspecting. GetLeaderboardAroundPlayer should work for us just fine though. I appreciate the help. Cheers

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

    Leaderboard related Questions 1 Answer

    Email Templates variables 1 Answer

    Leaderboard amount limitations & dynamic creation? 1 Answer

    Playfab cloudcripts Wondering 2 Answers

    Error : CloudScriptAPIRequestCountExceeded 2 Answers

    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