Matchmaking queue
How players find a ranked opponent close to their MMR, or a random unranked opponent, without challenging anyone.
Ranked duels come from the queue. Players cannot pick their ranked opponent, so two friends cannot arrange games to push each other up the leaderboard. The unranked queue finds a random opponent for players who just want a fight.
By default, /duel <player> challenges are always unranked. See Ranked in challenges to change that.
Commands
/duel queue ranked [kit]
/duel queue unranked [kit]
/duel queue leave
/duel queue
/ranked [kit]
/unranked [kit]| Command | What it does |
|---|---|
/duel queue ranked [kit] | Join the ranked queue with a kit |
/duel queue unranked [kit] | Join the unranked queue with a kit |
/duel queue leave | Leave the queue |
/duel queue | Shows your queue, kit, waiting time and, in ranked, your MMR and search range. When you are not queued it shows how to join |
/ranked [kit] | Same as /duel queue ranked |
/unranked [kit] | Same as /duel queue unranked |
Running the same queue command again with no kit leaves that queue, so /ranked works as an on and off switch. Joining the other queue moves you there.
/ranked and /unranked are set in commands.yml under shortcuts. An empty list turns that command off.
Picking a kit
With a kit name, the player joins straight away. Without one, the kit picker opens and lists every kit the player may use, and in ranked only kits with ranked-allowed: true. When only one kit fits, the picker is skipped and that kit is used.
Players are only matched with someone who queued with the same kit.
How players are matched
The queue checks for matches every second.
Ranked. Each player has a search range that starts at start-range MMR and grows by widen-by every widen-every-seconds they wait, up to max-range. Two players are matched when the MMR gap between them fits inside both their ranges. When several players fit, the one with the closest MMR is picked.
With the defaults, a player at 1200 MMR is first matched with players between 1100 and 1300. After 10 seconds the range is 150, after 20 seconds 200, and so on, up to 600.
Before a ranked match starts, the anti abuse checks run: same IP address, the same opponent limit, and a season that is ending. If one fails, those two players are not matched with each other for 30 seconds, and both keep searching.
Unranked. Players are matched in the order they joined, with no MMR check.
When a match is found
- A random free arena that allows the kit is reserved. Queue matches never use Fight here and never have a wager.
- Both players get a message with the opponent, kit and arena, and the
queue-foundsound. - Any pending duel requests are cancelled, and a player who was spectating stops watching.
- The duel starts the same way as any other: snapshot, teleport, countdown, fight. See Duels and protection.
If no arena is free, both players stay in the queue and are told once. The match starts as soon as an arena frees up.
Leaving the queue
A player leaves the queue when they:
- run
/duel queue leave, or the same queue command again - leave the server
- accept a duel request, which opens a setup menu
- can no longer use the kit they queued with, or it was deleted. They are told why
A player cannot join a queue while in a duel, a countdown or a setup menu.
While waiting, the action bar shows the kit, waiting time and, in ranked, the MMR and search range. Turn it off with queue.action-bar: false, or edit queue.action-bar-ranked and queue.action-bar-unranked in the language file.
Settings
In config.yml under queue:
queue:
# Let players find an opponent with /duel queue ranked and /duel queue unranked
enabled: true
# Allow ranked in the setup menu of a /duel <player> challenge, when false ranked duels only come from the ranked queue
ranked-challenges: false
# Show the search status in the action bar while a player waits in a queue
action-bar: true
ranked:
# Largest MMR difference allowed between two players when they join the ranked queue
start-range: 100
# MMR added to the allowed difference each time the wait below passes
widen-by: 50
# Seconds of waiting before the allowed difference grows
widen-every-seconds: 10
# Largest MMR difference the search can grow to, 0 means no limit
max-range: 600| Key | What it does | Default |
|---|---|---|
enabled | Turns both queues on or off. Turning it off removes everyone who is waiting | true |
ranked-challenges | Brings back the Ranked button in the setup menu of a challenge | false |
action-bar | Shows the search status in the action bar | true |
ranked.start-range | MMR gap allowed when a player joins the ranked queue | 100 |
ranked.widen-by | MMR added to the range each step | 50 |
ranked.widen-every-seconds | Seconds between steps | 10 |
ranked.max-range | Largest range, 0 for no limit | 600 |
The sounds queue-joined and queue-found are under sounds in config.yml.
Ranked in challenges
With ranked-challenges: false, the mode button in the setup menu is a locked Unranked button that points players to /duel queue ranked. Set it to true to let two players pick Ranked in a challenge again, with the anti abuse checks as before.
Permissions
| Permission | What it allows | Default |
|---|---|---|
zrivalsduels.queue | Join and leave the queues, /ranked and /unranked | everyone |
zrivalsduels.ranked | Join the ranked queue | everyone |