question

Phil Woods avatar image
Phil Woods asked

Matchmaking MatchTotalRule error with Expansion

Hi,

We are configuring our matchmaking queues automatically using the PlayFabMultiplayerAPI in Python but are having difficulties using an expansion on a match total rule.

When we try to use the following request:

"MatchmakingQueue": {
	"Name": "PlayerExpansionOverTime",
	"MinMatchSize": 8,
	"MaxMatchSize": 50,
	"ServerAllocationEnabled": False,
	"MatchTotalRules": [
		{
			"Attribute": {
				"Path": "PlayerCount",
				"Source": "User"
			},
			"Min": 50,
			"Max": 50,
			"Weight": 1,
			"SecondsUntilOptional": 30,
			"Name": "PlayersRequiredRule"
		}
	]
}

A matchmaking queue is created correctly.

If we try and include expansion like as follows:

"MatchmakingQueue": {
	"Name": "PlayerExpansionOverTime",
	"MinMatchSize": 8,
	"MaxMatchSize": 50,
	"ServerAllocationEnabled": False,
	"MatchTotalRules": [
		{
			"Attribute": {
				"Path": "PlayerCount",
				"Source": "User"
			},
			"Min": 50,
			"Max": 50,
			"Weight": 1,
			"Expansion": {
				"MinOverrides": [
					50,
					45,
					40,
					35,
					25,
					16,
					8
				],
				"Type": "Custom",
				"SecondsBetweenExpansions": 10
			},
			"SecondsUntilOptional": 30,
			"Name": "PlayersRequiredRule"
		}
	]
}

Then we get the error message “error: Unable to contact PlayFab server”.

Note that we can manually edit the match total rule within the Game Manager to use expansion, we just cannot figure out how to configure the match total rule to use expansion within our Python script.

Please also note that if we try the example expansion-of-number-of-players-over-time, then a matchmaking queue is created which contains no rules.

Any ideas what may be wrong?

Thanks,

Phil.

game managerMatchmaking
1 comment
10 |1200

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

Rick Chen avatar image Rick Chen ♦ commented ·

I will do some test about this issue, and will be back to you later. It could take some time, your patience is appreciated.

1 Like 1 ·

1 Answer

·
Rick Chen avatar image
Rick Chen answered

The “error: Unable to contact PlayFab server” may indicate some network issue for that request or the relevant service in PlayFab was unavailable at that moment.

According to my test on Postman, with request body similar to your 2nd code snippet, I received the error "Only one of the following properties can be defined: Min, MinOverrides". Here is an example of request body that works on Postman:

  "MatchmakingQueue": {
                
"Name": "rickTestExpansionQueue",
"MinMatchSize": 8,
"MaxMatchSize": 8,
"MaxTicketSize": 0,
"ServerAllocationEnabled": false,
"MatchTotalRules": [
{
"Attribute": {
"Path": "PlayerCount",
"Source": "User"
},
"Weight": 1.0,
"Expansion": {
"MinOverrides": [
{
"Value": 8.0
},
{
"Value": 6.0
},
{
"Value": 4.0
},
{
"Value": 2.0
}
],
"MaxOverrides": [
{
"Value": 8.0
},
{
"Value": 8.0
},
{
"Value": 8.0
},
{
"Value": 6.0
}
],
"Type": "Custom",
"SecondsBetweenExpansions": 10
},
"Name": "TestExpansion",
"SecondsUntilOptional": 30
}
]
}

You could use the SetMatchmakingQueue API with the request body similar to above or use the Game Manager to create the matchmaking queue.

1 comment
10 |1200

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

Phil Woods avatar image Phil Woods commented ·

Thanks, that example with expansion worked for us.

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.