question

Markus Henschel avatar image
Markus Henschel asked

Matchmaking: Rule to ensure unique selection

Hello,

I'm trying to find a way to let playfab matchmaking 2.0 create matches where every user has a unique value in an attribute. An example would be players selecting characters before matchmaking and then matchmaking should ensure that every player in a match uses a different character. Is this somehow possible? Looking at the rules available I don't see an obvious solution.

Thanks!

Markus

Matchmaking
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

·
Markus Henschel avatar image
Markus Henschel answered

Answering my own question...

One way to solve it would be the match total rule.

Every player supplies an attribute in this form:

"CharacterA": 1

Then I could add a match total rule for "CharacterA" that ensures that the sum of "CharacterA" is at max 1 for all players. If I have 10 different selectable chracters it would mean that I would need 10 such rules for CharacterB, CharacterC, CharacterD ...

This raises more questions for me:

  • If I don't supply an attribute for a match total rule: Is it implicitely counted as 0?
  • Is there a limit for the number of match total rules I can set for a queue that would limit the number of characters possible?
    Edit: There seem to be a limit of 20 rules total. Would it be possible to raise this limit for a title?
  • Is there a better solution?

Thanks

4 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.

Sarah Zhang avatar image Sarah Zhang commented ·

>> If I don't supply an attribute for a match total rule: Is it implicitly counted as 0?

The Attribute path is a required value for a match total rule. You seem cannot “don’t supply an attribute” for a match total rule.

>> Is there a limit for the number of match total rules I can set for a queue that would limit the number of characters possible?
Edit: There seem to be a limit of 20 rules total. Would it be possible to raise this limit for a title?

This limit is mentioned in the documentation, not in the Title limits page, so it would be a global limit that cannot be changed for the specific title. You can try to add a feature request to request relaxing rules’ quantity limit of a matchmaking queue.

>> Is there a better solution?

The solution that you point up is the recommended one in our official documentation -- Matchmaking scenario and configuration examples. You can check the 2nd example of this section Host/Searcher or Role Based Requirements for more details.

0 Likes 0 ·
Markus Henschel avatar image Markus Henschel Sarah Zhang commented ·

Thanks. I think I was unclear about my first question. If there is a match total rule and the attribute referenced in the rule isn't contained in a users matchmaking ticket, will this be counted as an implicit zero value? To stay in the example above would every user have to supply this if not wanting to play with character A?

"CharacterA" : 0

I stumpled upon a related problem. Assuming I don't want to have a hard rule to force people using unique characters but a soft one so matchmaking favors matches where everybody selected a different character. Would I be able to do this somehow with playfab matchmaking 2.0?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Markus Henschel commented ·

>> If there is a match total rule and the attribute referenced in the rule isn't contained in a users matchmaking ticket, will this be counted as an implicit zero value?

If you don’t set a match total rule for an attribute, its min and max value would be “random”, not “zero”.

>> To stay in the example above would every user have to supply this if not wanting to play with character A?

Yes, it needs to stay as “0”.

>> Would I be able to do this somehow with playfab matchmaking 2.0?

Yes, you can refer to this section -- Expansion of number of players over time, then set the MinOverrides and SecondsBetweenExpansions for every match total rule.

0 Likes 0 ·
Show more comments

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.