question

appgame avatar image
appgame asked

​​POST https://titleId.playfabapi.com/Match/CreateMatchmakingTicket

| POST https://titleId.playfabapi.com/Match/CreateMatchmakingTicket
|
|
| | How to do a Game "LEVEL": "Expert_Level" for Matchmaking Ticket ??????? |
|
|
|
|
| | var xhr = new XMLHttpRequest(); | xhr.open("POST", completeUrl, true); | xhr.setRequestHeader("Content-Type", "application/json"); | xhr.setRequestHeader("X-PlayFabSDK", "JavaScriptSDK-1.63.200402"); |
| | xhr.onloadend = function () {var result = JSON.parse(xhr.responseText);} |
|
| | xhr.send(requestBody); | xhr.onreadystatechange = function () { | if(this.readyState === 4) {var xhrResult = JSON.parse(xhr.responseText); | if (this.status === 200) { | console.log("------- xhrResult -------"); | console.log(xhrResult); | return true; | } else { | console.log("------- xhrResult ERROR ------"); | return false; | } | } | }; |
|
|
|
| |/* --------------- Quick Match: --------------- */ | | "Player_Match" | |/* ---------- Entry Level Matches ----------- */ | | "Master_Level" | "Expert_Level" | "Candidate_Level" | "Beginner_Level" |
|
|
|
|
|
| | /* --------------- Request Body xhr.send(requestBody) --------------- */ | | >>>>> #1 | { "Creator": { | "Objects": [ { "ObjectName": "playerSkill", "DataObject": { "skillDetail": { "LEVEL": "Expert_Level" } } } ], | "Entity": { "Id": "A8140AB9109712B", "Type": "title_player_account", "TypeString": "title_player_account" } | }, | "GiveUpAfterSeconds": 120, | "MembersToMatchWith": [], | "QueueName": "QuickMatch_2_Player" | } | | OR >>>>> #2 | { | "Creator":"PlayFabId", | "GiveUpAfterSeconds": 120, | "MembersToMatchWith": [ "Type": "StringEqualityRule", "Attribute": { "Path":"Expert_Level", "Source": "User", } } ], | "QueueName": "QuickMatch_2_Player" | } | | OR >>>>> #3 | { | "Creator":"PlayFabId", | "GiveUpAfterSeconds": 120, | "MembersToMatchWith": [ {"AttributeNotSpecifiedBehavior":"UseDefault","Weight": 1, "Name": "Expert_Level"} ], | "QueueName": "QuickMatch_2_Player" | } | | OR >>>>> #4 | { | "Creator":"PlayFabId", | "GiveUpAfterSeconds": 120, | "MembersToMatchWith": [{Level:"Expert_Level"}]], | "QueueName": "QuickMatch_2_Player" | }
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

·
Citrus Yan avatar image
Citrus Yan answered

If I understand it correctly, you want to match players with the same level (Expert_Level, Master_Level, etc.), is that correct? In that case, first you’ll need to config a Queue that uses the String equality rule which ensures that a string attribute is the same across all tickets in a match, please follow this tutorial to learn how to do that: Configuring matchmaking queues. After setting up the Queue, you’ll need to specify attributes with your tickets, please follow this tutorial to learn more: Specifying attributes with your tickets. Moreover, here is a tutorial demonstrating some Matchmaking scenario and config samples you may find helpful: Matchmaking scenario and configuration examples

2 comments
10 |1200

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

appgame avatar image appgame commented ·

Hello & Thank You

Expert_Level, Master_Level, etc. are in Game Options and do not reflect on the skill level of each players in a game.

Its very well could be Apples against Apples or Bananas against bananas.

Best Guess:

CreateMatchmakingTicket POST BODY:

{

"Creator": {

"Entity": {

"Id": "PlayFabId",

"Type": "title_player_account",

"TypeString": "title_player_account"

},

"Attributes": {

"DataObject": {

"GameMode": "Expert_Level"

}

}

},

"MembersToMatchWith": [],

"GiveUpAfterSeconds": 2,

"QueueName": "QuickMatch_2_Player"

}

Matchmaking Queue attributes:

"Rules":[

{

"Type": "StringEqualityRule",

"Difference": 1,

"Attribute": {

"Path": "GameMode",

"Source": "User"

},

"AttributeNotSpecifiedBehavior": "MatchAny",

"Weight": 1,

"Name": "Difficulty",

"SecondsUntilOptional": 120

}

]

Player Match Guess:

Skill level to be matched with others Players looking to play with.

POST:

{

"ObjectName": "playerSkill",

"DataObject": {

"skillDetail": { "mu": 16.0, "sigma": 2.0 }

}

}

Queue Attribute "Path": "$.playerSkill.skillDetail.mu"

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan appgame commented ·

Yes, that's correct. Please let us know if you have any further questions.

0 Likes 0 ·

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.