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!
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.
Thanks, Sarah! That's kind of what we were suspecting. GetLeaderboardAroundPlayer should work for us just fine though. I appreciate the help. Cheers
Leaderboard related Questions 1 Answer
Email Templates variables 1 Answer
Leaderboard amount limitations & dynamic creation? 1 Answer
Playfab cloudcripts Wondering 2 Answers