# Matchmaker Setup Guide
## What is configured in the config
In `default_platform_config.lua` there are two large groups of matchmaker settings:
- `cvars.*` — global parameters that affect player weight calculation, squad restrictions, regions, low-online mode, debugging, and individual modes.
- `queuesConfigLo` and `queuesConfig` — matchmaker queue lists for low and normal online.
The matchmaker first determines whether a player or group fits any queue, then tries to assemble a battle according to the rules of that queue.
## Basic concepts
### MMV
`MMV` — internal balance weight of a player or group. The higher the `MMV`, the stronger the matchmaker considers the player or group.
`MMV` is influenced by:
- rank and ship strength;
- player efficiency — internal estimate of player performance on ships of the corresponding rank;
- KPM (`kills per match`) — average number of kills per battle;
- win/loss ratio;
- number of battles played;
- squad restrictions and adjustments;
- protective restrictions for new players.
In queues, `MMV` is usually filtered via the `mmValue` field.
### mmRank
`mmRank` — balance rank for fitting into a suitable queue range.
It is not necessarily equal to the visible rank of a single ship. This value is used to split players into queue groups.
### mmSquadRank
`mmSquadRank` — this is a check of ship ranks inside a squad. It applies not to a single player, but to group members: the matchmaker checks that the ships of the players in the squad fall into the range allowed for the queue.
Simply put: `mmRank` limits the overall balance rank of the group, while `mmSquadRank` additionally prevents a squad with unsuitable-rank ships from entering the queue.
For example, if a queue is set as `mmSquadRank = 1..15`, then squad members must pass this range by their ship/balance ranks. If one of the members sticks out too much, the squad may not get into this queue.
### queueSpec and mmParams
A player gets into a queue not only by strength, but also by mode type. For this, flags in `mmParams` are used, for example:
- `mmParams.arcade` — regular PvP;
- `mmParams.pve` — PvE;
- `mmParams.coop_vs_ai` — Coop vs AI;
- `mmParams.practice` — training mode;
- `mmParams.football`, `mmParams.hunger_games`, `mmParams.zombie` and others — brawl/special modes.
In the config, these flags are set in the queue's `query` field.
## Statistics terms
### Player efficiency
Player efficiency is an internal statistical estimate of how effectively a player plays on ships of the corresponding rank. This is not a single visible parameter from the interface, but an aggregated estimate that the server stores by rank.
For matchmaker tuning, the exact origin of each component is not important; the practical meaning is what matters: the higher the efficiency, the higher `MMV` may become, and the stronger the opponents the matchmaker will look for.
The influence of efficiency is controlled by the parameters:
| CVAR | What it changes |
|---|---|
| `mm_effRatingMMVMdBase` | From which efficiency level the contribution to MMV starts. |
| `mm_effRatingMMVMdStep` | How fast efficiency raises MMV. Smaller step — stronger influence. |
| `mm_effRatingMMVMdCap` | Upper limit of the efficiency contribution before the overall cap. |
Example: if you decrease `mm_effRatingMMVMdStep`, players with good efficiency will gain increased `MMV` faster and will more often get into stronger queues.
### KPM
`KPM` means `kills per match` — average number of kills per battle. In the config, this metric is used as one of the indicators of a player's combat performance.
For matchmaker tuning, the important point is: high `KPM` can raise `MMV`, so high-performing players will more often be matched against stronger players.
The influence of KPM is controlled by the parameters:
| CVAR | What it changes |
|---|---|
| `mm_kpmMMVBase` | From which KPM value the contribution to MMV starts. |
| `mm_kpmMMVStep` | How fast KPM raises MMV. Smaller step — stronger influence. |
| `mm_kpmMMVCap` | Upper limit of the KPM contribution before the overall cap. |
Example: if you increase `mm_kpmMMVStep`, KPM will influence matchmaking more weakly. If you decrease it — high-performing players will move faster into a higher `MMV` range.
## Low-online and high-online queues
The config uses two sets of queues:
- `queuesConfigLo` — queues for low online;
- `queuesConfig` — queues for normal/high online.
Switching is set by CVARs:
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_lowOnlineLo` | `250` | If online is below this threshold, the matchmaker switches to low-online mode. |
| `mm_lowOnlineHi` | `300` | If online has risen to this threshold or above, the matchmaker returns to normal mode. |
Practical meaning:
- at low online, queues should usually be wider so that battles assemble faster;
- at high online, queues can be made narrower so that matchmaking quality is higher;
- between `mm_lowOnlineLo` and `mm_lowOnlineHi` there is a "gap" so that the mode does not switch back and forth too often.
## MMV calculation tuning
These parameters determine how strongly a player's statistics affect their balance weight.
### Overall adjustment limit
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_totalMMVMdCap` | `2` | Limits the total MMV adjustment from efficiency, KPM, wins, and other factors. |
If you increase `mm_totalMMVMdCap`, player statistics will influence matchmaking more strongly. Strong players will more often get into stronger queues, but the wait time for them may grow.
If you decrease it — matchmaking will become closer to matchmaking by ships/ranks, but strong players will more often be matched against weaker ones.
### Efficiency
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_effRatingMMVMdBase` | `0` | Base efficiency threshold. |
| `mm_effRatingMMVMdStep` | `25` | Step through which efficiency adds weight. |
| `mm_effRatingMMVMdCap` | `50` | Maximum efficiency contribution before the overall limit. |
Simplified: the smaller the `Step`, the faster efficiency raises MMV. The higher the `Cap`, the larger the potential efficiency contribution.
### KPM
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_kpmMMVBase` | `0` | Base KPM threshold. |
| `mm_kpmMMVStep` | `0.0325` | KPM step for MMV growth. |
| `mm_kpmMMVCap` | `50` | Maximum KPM contribution before the overall limit. |
If you decrease `mm_kpmMMVStep`, KPM will start raising MMV more strongly. If you increase it — the influence of KPM will become softer.
### Win/loss ratio
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_winLoseMMVMinBattles` | `2000` | Minimum number of battles after which win/lose starts to be taken into account. |
| `mm_winLoseMMVBase` | `0.75` | Base win/lose level. |
| `mm_winLoseMMVStep` | `0.012` | Step through which win/lose raises MMV. |
| `mm_winLoseMMVCap` | `50` | Maximum win/lose contribution before the overall limit. |
A high `mm_winLoseMMVMinBattles` means that this factor has almost no effect on new players. If you lower the value, win/lose will start having an effect earlier.
## MMV calculation formulas
### Base modifier by number of battles
Parameters used in the formula:
| Name in formula | What it is | Where it comes from |
|---|---|---|
| `numBattles` | Number of player PvP battles | Player statistics |
| `losStreak` | Current losing streak | Player statistics |
| `isSingleUidOnPC` | Single-player-on-PC flag | Player statistics |
| `highestRank` | Highest ship rank of the player | Player ships |
| `idx` | Index into CVAR lists, equals `highestRank - 1` | Calculated |
| `battles[idx]` | Battle threshold for the rank | CVAR `mm_mmvMdBattles` |
| `penalty[idx]` | Penalty/adjustment for the rank | CVAR `mm_mmvMdPenalty` |
| `uniqFingerprintClamp[idx]` | Upper MMV bound for a new player | CVAR `mm_mmvMdUniqFingerprintClamp` |
| `mmvMin[idx]` | Lower MMV bound for the rank | CVAR `mm_mmvMin` |
| `losStreakDecrease` | List of MMV reductions for a losing streak | CVAR `mm_losStreakMMVDecrease` |
```
if numBattles >= battles[idx]
mmvMod = penalty[idx]
else
mmvMod = 0
losStreakMMVDecrease = losStreakDecrease[ clamp(losStreak - 1, 0, len-1) ] # if losStreak > 0 and the list is set
mmvMod = mmvMod - losStreakMMVDecrease
if numBattles > battles[idx]
mmvMin = mmvMin[idx]
else
mmvMin = 0
if isSingleUidOnPC and numBattles < battles[idx]
mmvMax = uniqFingerprintClamp[idx]
else
mmvMax = +infinity
```
The `losStreakDecrease` list is taken from `mm_losStreakMMVDecrease` and applies only to regular (non-tournament) battles.
### KPM contribution
```
kpmMmValue = (kpm - mm_kpmMMVBase) / mm_kpmMMVStep
kpmMmValue = clamp(kpmMmValue, 0, mm_kpmMMVCap)
```
Where `kpm` is the average number of kills per battle at the current ship rank.
### Efficiency contribution
```
effModMmValue = (effMod3 - mm_effRatingMMVMdBase) / mm_effRatingMMVMdStep
effModMmValue = clamp(effModMmValue, 0, mm_effRatingMMVMdCap)
```
Where `effMod3` is the player efficiency at the current ship rank. Before applying this formula, `effMod3` is rounded to an integer.
### Win/lose contribution
Taken into account only if `numBattles > mm_winLoseMMVMinBattles`.
```
winLose = max(gameWin / gameLost, 0)
winLoseMmValue = (winLose - mm_winLoseMMVBase) / mm_winLoseMMVStep
winLoseMmValue = clamp(winLoseMmValue, 0, mm_winLoseMMVCap)
```
Where `gameWin`, `gameLost` are the numbers of PvP wins and losses.
### Final player MMV
```
skill = max(kpmMmValue, effModMmValue, winLoseMmValue)
mmValue = clamp(skill + mmvMod, mmvMin, mmvMax)
```
For a group (squad/wing), MMV is taken as the maximum over participants:
```
squadMMValue = max(mmValue of participants)
squadSkill = max(skill of participants)
```
In arcade mode, a squad penalty is added to a participant's MMV, and the result is limited by `mm_totalMMVMdCap`:
```
mmValue = clamp(mmValue + squadPenalty(squadSize), -mm_totalMMVMdCap, +mm_totalMMVMdCap)
```
Where the penalty depends on squad size:
| Squad size | Penalty |
|---:|---|
| 2 | `mm_squad2MMVPenalty` |
| 3 | `mm_squad3MMVPenalty` |
| 4 | `mm_squad4MMVPenalty` |
| other | 0 |
### `skilled` parameter (strong player)
```
single player: skilled = (skill >= mm_skilledPlayer)
squad: skilled = (squadSkill >= mm_skilledSquad)
```
This parameter affects matchmaking, including join-in-progress into the losing team.
## New and inexperienced players
These parameters protect players with a small number of battles from an overly sharp evaluation based on statistics.
| CVAR | Current value | What it does |
|---|---|---|
| `mm_mmvMdBattles` | `"200,200,200,200,200,200,200,100,0,0,0,0,0,0,0,0,0,0"` | Battle threshold by ranks/groups, after which additional restrictions kick in. |
| `mm_mmvMdPenalty` | `"30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30"` | MMV adjustment/penalty by the same positions. |
| `mm_mmvMin` | `"30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30"` | Lower bound of the final MMV. |
| `mm_mmvMdUniqFingerprintClamp` | `"30,30,30,30,30,30,30,80,80,80,80,80,80,80,80,80,80,80"` | Upper MMV bound for players with a unique fingerprint while battles are few. |
Important: these values are set as lists. The first number refers to the first position/rank, the second — to the second, and so on. The lengths of related lists must match.
Practical effects:
- increasing `mm_mmvMdBattles` keeps the player longer under new-player logic;
- increasing `mm_mmvMin` raises the player's minimum weight;
- decreasing `mm_mmvMdUniqFingerprintClamp` restricts new players from above more strongly;
- values that are too strict may worsen matchmaking for sparsely populated ranks.
## Squads and wings
These settings determine which groups can enter the queue and how strictly they are restricted.
| CVAR | Current value | What it does |
|---|---:|---|
| `squad_maxNonPremiumSize` | `12` | Squad size that does not require premium to enter the queue. |
| `mm_squad1AsSquad` | `0` | Treat a single player as a one-man squad. |
| `squad_maxNonWingSize` | `4` | Maximum regular squad size that is still not considered a wing. |
| `squad_maxWingSize` | `12` | Maximum wing-group size. |
| `mm_notArcadeSquadRankDiff` | `17` | Allowed ship rank difference inside a squad for non-arcade modes. |
Practical effects:
- if you decrease `squad_maxNonWingSize`, more groups will be considered a wing and will fall under wing restrictions;
- if you decrease `mm_notArcadeSquadRankDiff`, squads with ships of different ranks will have a harder time entering the queue;
- if you enable `mm_squad1AsSquad`, solo players will start going through part of the logic as a squad, which may change matchmaking rules.
### Universe/sector wing
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_sectorMinWingSize` | `5` | Minimum wing size for sector/universe modes. |
| `mm_sectorMaxWingSize` | `8` | Maximum wing size for sector/universe modes. |
If a group is smaller than `mm_sectorMinWingSize`, it may not pass as a full wing in modes where a wing is required.
## Raids
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_enablePveRaids` | `1` | Enables PvE raids. |
| `mm_raidMinWingSize` | `10` | Minimum wing-group size for the raid queue. |
| `mm_raidSquadFilter` | `0` | Squad composition filter for raid queues. |
| `raid_lootAuraInterval` | `1` | Interval in days for re-issuing raid loot auras. |
`mm_raidSquadFilter` values:
| Value | Meaning |
|---:|---|
| `0` | Mixed mode: different group types are allowed if the other conditions are met. |
| `1` | Solo only; regular squads and wings are not allowed. |
| `2` | Solo + regular squads; wings are not allowed. |
| `3` | Regular squads + wings; solo is not allowed. |
| `4` | Wings only. |
If a wing is required for a raid, `mm_raidMinWingSize` additionally applies.
## General matchmaker parameters
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_botsCount` | `6` | Default number of bots for modes where they are used. |
| `mm_defaultGameplay` | `3` | Default gameplay for a created game. |
| `mm_timeInQueueAveragingCf` | `200` | Smoothing of the average queue wait time. |
Usually these parameters do not need to be changed for regular balancing. They are useful when tuning bot modes and when analyzing queues.
## Debugging and diagnostics
| CVAR | Current value | What it does |
|---|---:|---|
| `mm_decisionLog` | `0` | Enables matchmaker decision logging. |
| `mm_decisionDbg` | `0` | Writes the decision log to the debug log immediately, not only on the final decision. |
For normal operation, it is better to keep both values at `0`. For diagnosing disputed matchmaking, you can temporarily enable logging, but it will increase log volume.
## Queue setup
Queues are located in the `queuesConfigLo` and `queuesConfig` tables.
Each queue describes:
- which mode it works for;
- how many players are needed to start;
- which ranks and MMV it accepts;
- which maps/levels are available;
- how long to wait for regional matchmaking;
- which special flags to pass to the created battle.
### Main queue fields
| Field | What it does |
|---|---|
| `minPlayers` | Minimum players to start a battle. |
| `optimalPlayers` | Desired number of players; when this number is reached, the battle may start faster. |
| `maxPlayers` | Maximum players in a battle. |
| `maxTimeInQueue` | How many seconds to wait before launching an incomplete but acceptable battle. |
| `regionLocalizedTimeInQueue` | How many seconds to try to keep regional matchmaking before expanding the search. |
| `maxExpandTime` | How many seconds after creation a battle can still be filled with players. |
| `maxSquadTimeInQueue` | Maximum wait for queues that use `mmSquadRank`, i.e. an additional check of ship ranks inside the squad. |
| `levelsDesc` | List of maps/levels and allowed gameplay types. |
| `query` | Filter for players/groups that can enter this queue. |
| `special` | Created battle parameters: mode, bots, queue flags. |
### Player counts
- Increasing `minPlayers` improves battle quality/completeness, but increases waiting.
- Decreasing `minPlayers` speeds up the start, but creates incomplete battles more often.
- Increasing `optimalPlayers` makes the matchmaker spend longer filling the battle up to a comfortable size.
### Wait times
- Increasing `maxTimeInQueue` improves the chance of assembling a fuller battle with better-balanced teams, but players wait longer.
- Decreasing `maxTimeInQueue` speeds up the start, but increases the risk of a battle with less-balanced teams.
- Increasing `regionLocalizedTimeInQueue` keeps players in the selected region longer.
- `maxExpandTime = 0` disables filling of an already created battle for this queue.
## `query` field
`query` determines who can enter the queue.
Example PvP queue:
```lua
query = {
["mmParams.arcade"] = 1,
mmRank = { ["$gte"] = 1, ["$lte"] = 15 },
mmSquadRank = { ["$gte"] = 1, ["$lte"] = 15 },
mmValue = { ["$gte"] = 0, ["$lt"] = 100 },
}
```
What this means:
- only players with the `arcade` flag enter the queue;
- `mmRank` must be from 1 to 15;
- for a squad, `mmSquadRank` must also be from 1 to 15;
- `mmValue` must be from 0 inclusive to 100 exclusive.
### Filter operators
The config most often uses:
| Operator | Meaning |
|---|---|
| `$gte` | Greater than or equal. |
| `$lte` | Less than or equal. |
| `$gt` | Greater than. |
| `$lt` | Less than. |
Practical rule: if you need to expand a queue, expand the `mmRank`, `mmSquadRank`, and `mmValue` ranges. If you need to make matchmaking stricter — narrow them.
## `InstantiateQueueTemplate` template
The config often uses the function:
```lua
InstantiateQueueTemplate(template, minMMRank, maxMMRank, minMMSquadRank, maxMMSquadRank, minMMValue, maxMMValue, addMods)
```
It copies a queue template and substitutes the ranges:
| Argument | What it sets |
|---|---|
| `minMMRank` | Lower `mmRank` bound. |
| `maxMMRank` | Upper `mmRank` bound. |
| `minMMSquadRank` | Lower `mmSquadRank` bound. |
| `maxMMSquadRank` | Upper `mmSquadRank` bound. |
| `minMMValue` | Lower `mmValue` bound. |
| `maxMMValue` | Upper `mmValue` bound. |
| `addMods` | Additional queue field overrides. |
Example:
```lua
table.insert(queuesConfig,
InstantiateQueueTemplate(arcadeQueueTemplate, 1, 15, 1, 15, 0, 21,
{ special = { queueFlags = { newbie = 1 } }, maxPlayers = 16 }
)
)
```
This creates a PvP queue for the low `mmValue` range (for newbies) from 0 to 21 and limits the battle to `maxPlayers = 16`.
## PvP Arcade queues
In the current config, `arcadeQueueTemplate` sets regular PvP:
```lua
maxPlayers = 24
optimalPlayers = 4
minPlayers = 1
maxExpandTime = 30
regionLocalizedTimeInQueue = 10
maxTimeInQueue = 10
maxSquadTimeInQueue = 0x7FFFFFFF
```
Practical meaning of the current values:
- a battle can start even with a small number of players (`minPlayers = 1`), if the mode allows it;
- the matchmaker tries to gather at least `optimalPlayers = 4`;
- a battle can be filled in for `30` seconds;
- the region is held strictly for only `10` seconds;
- squads in this queue can wait a very long time due to the large `maxSquadTimeInQueue`.
Arcade queues are split by `mmValue` ranges. In normal online mode, the ranges are narrower than in low-online. This gives better matchmaking quality when online is sufficient.
## Coop vs AI queues
`coopQueueTemplate` in the current config:
```lua
maxPlayers = 12
optimalPlayers = 4
minPlayers = 1
regionLocalizedTimeInQueue = 10
maxTimeInQueue = 10
```
Coop queues are filtered by:
```lua
["mmParams.coop_vs_ai"] = 1
```
Here, the balance of two PvP teams is not the main goal. It is more important to assemble a suitable group against the AI and not keep players in the queue for too long.
## PvE queue
Current PvE queue:
```lua
maxPlayers = 1
minPlayers = 1
regionLocalizedTimeInQueue = 10
maxTimeInQueue = 10
query = { ["mmParams.pve"] = 1 }
special = { pve = 1, gameMode = 7 }
```
This means that the base PvE queue is designed for solo launch. For raids and special PvE scenarios, separate restrictions and schedules apply.
## Training queue
The training queue uses:
```lua
query = { ["mmParams.practice"] = 1 }
special = { gameMode = 5, botsCount = 0 }
```
In the current config:
```lua
maxPlayers = 10
minPlayers = 1
regionLocalizedTimeInQueue = 30
maxTimeInQueue = 45
```
It holds the region longer (`30` seconds) than most PvP/PvE queues.
## Brawl and special queues
Brawl queues are set by separate templates. They usually have:
```lua
maxExpandTime = 0
regionLocalizedTimeInQueue = 10
maxTimeInQueue = 10
special = { brawl = 1 }
```
`maxExpandTime = 0` means that the battle is not filled after creation.
Examples of brawl flags in `query`:
| `query` flag | Mode |
|---|---|
| `mmParams.football` | Football. |
| `mmParams.gtdm` | Greedy team death match. |
| `mmParams.atdm` | April team death match. |
| `mmParams.capture_the_base` | Capture the base. |
| `mmParams.hunger_games` | Hunger games. |
| `mmParams.one_against_all` | One against all. |
| `mmParams.zombie` | Zombie. |
| `mmParams.close_distance` | Close distance. |
| `mmParams.autogen_dm` | Autogen deathmatch. |
| `mmParams.three_teams_dm` | Three teams. |
| `mmParams.april_control` | April control. |
For each such mode, you can separately change `minPlayers`, `optimalPlayers`, `maxPlayers`, maps in `levelsDesc`, and `special` parameters.
## `levelsDesc` field
`levelsDesc` sets on which maps and with which gameplay types a queue can start.
Example:
```lua
levelsDesc = {
s1338_devilsjaw = { 9 },
}
```
Meaning:
- `s1338_devilsjaw` — map/level name;
- `{ 9 }` — list of gameplay types allowed on this map.
If the map list is too short, players may see the same maps more often. You need to make sure that all maps correctly support the selected mode.
## `special` field
`special` passes parameters to the created battle.
Examples:
```lua
special = { arcade = 1 }
special = { pve = 1, gameMode = 7 }
special = { coop_vs_ai = 1 }
special = { brawl = 1 }
special = { one_against_all = 1, botsCount = 7 }
special = { queueFlags = { newbie = 1 } }
```
Typical `special` tasks:
- specify the battle mode;
- enable PvE, arcade, coop, or brawl;
- set the number of bots;
- mark the queue as newbie;
- pass additional mode flags.
## How to make matchmaking faster
To speed up matchmaking, you can:
- decrease `minPlayers`;
- decrease `optimalPlayers`;
- decrease `maxTimeInQueue`;
- decrease `regionLocalizedTimeInQueue`;
- expand `mmValue` ranges;
- expand `mmRank` and `mmSquadRank` ranges;
- add wider queues to `queuesConfigLo`;
- reduce the strictness of squad restrictions.
Side effect: teams in battles may become less balanced and smaller.
## How to make matchmaking better
For stricter matchmaking, you can:
- increase `minPlayers`;
- increase `optimalPlayers`;
- increase `maxTimeInQueue`;
- increase `regionLocalizedTimeInQueue`;
- narrow `mmValue` ranges;
- narrow `mmRank` and `mmSquadRank` ranges;
- decrease the allowed squad rank difference via `mm_notArcadeSquadRankDiff`;
- take efficiency, KPM, and win/lose into account more strongly via the corresponding CVARs.
Side effect: wait time will grow, especially for strong players, squads, and unpopular modes.
## How to set up newbie queues
Newbie queues in the config are marked like this:
```lua
special = { queueFlags = { newbie = 1 } }
```
They usually use a low `mmValue` range, for example `0..21`.
`newbie` is a queue flag for beginners or low-MMV players. It is needed to explicitly mark a battle as a newbie battle: such queues usually use a low `mmValue` range, a smaller `maxPlayers`, and softer start conditions.
Important: by itself, the `newbie = 1` flag does not select players. Players get into such a queue because of the conditions in `query`, primarily the `mmValue`, `mmRank`, and `mmSquadRank` ranges. The flag is needed so that the created battle and related systems understand that this is a newbie queue.
To make newbies hit overly strong players less often:
- narrow the newbie `mmValue` range;
- decrease `maxPlayers` so that battles are more compact;
- increase the protective restrictions `mm_mmvMdBattles`;
- decrease `mm_mmvMdUniqFingerprintClamp` for early ranks;
- do not make `maxTimeInQueue` too small, otherwise newbies will be mixed into the general queue faster.
To make newbies find a battle faster:
- expand the newbie `mmValue` range;
- decrease `maxTimeInQueue`;
- decrease `regionLocalizedTimeInQueue`;
- add a similar wide queue to `queuesConfigLo`.
## How to set up squads
If squads wait too long:
- expand `mmSquadRank` in queues;
- expand `mmValue`;
- decrease `maxTimeInQueue`;
- check `maxSquadTimeInQueue` — whether a squad is held too long in a strict queue with an `mmSquadRank` check;
- relax `mm_notArcadeSquadRankDiff` if the problem is the ship rank difference.
If strong squads hit weak players too often:
- narrow `mmValue` ranges;
- narrow `mmSquadRank`;
- increase the influence of statistics via MMV CVARs;
- decrease the allowed squad rank difference;
- split queues for newbies and experienced players.
## How to set up regions
The main parameter in a queue:
```lua
regionLocalizedTimeInQueue = 10
```
If you increase the value:
- players will wait longer for a battle in a suitable region;
- ping/region quality may become better;
- wait time will increase.
If you decrease the value:
- the search will expand to other regions faster;
- battles will be found faster;
- players will more often end up outside the selected region.
For the training queue it is currently `30`, for most PvP/PvE/brawl — `10`.
## How to set up bots
Bots are set via:
- global `mm_botsCount`;
- the `botsCount` field in the `special` of a specific queue.
Example:
```lua
special = { one_against_all = 1, botsCount = 7 }
```
The `botsCount` value in the `special` of a specific queue takes priority over the global `mm_botsCount`;
## Risks when changing settings
Before changing, it is important to consider:
- `mmValue` ranges that are too wide worsen balance;
- ranges that are too narrow increase waiting;
- low `minPlayers` speeds up the start, but creates empty/incomplete battles;
- high `minPlayers` may completely stop battle creation for an unpopular mode;
- small `regionLocalizedTimeInQueue` worsens regional matchmaking;
- high `regionLocalizedTimeInQueue` may greatly increase waiting at night or at low online;
- strict squad restrictions will hit friend groups first;
- strong KPM/efficiency influence may isolate strong players in long queues.
## Recommended tuning order
1. First define the problem: long queues, poor balance, squads, regions, newbies, or a specific mode.
2. Check in which queue set the problem appears: `queuesConfigLo` or `queuesConfig`.
3. Find the specific queue by `query`, for example `mmParams.arcade` or `mmParams.coop_vs_ai`.
4. First change queue fields: `minPlayers`, `optimalPlayers`, `maxTimeInQueue`, `regionLocalizedTimeInQueue`, `mmValue/mmRank` ranges.
5. Only then change the global MMV calculation CVARs, because they affect many modes at once.
6. After the change, check not only the target mode, but also neighboring queues in the same range.
## Quick recipes
### Queues take too long
- Decrease `maxTimeInQueue`.
- Decrease `regionLocalizedTimeInQueue`.
- Expand `mmValue` ranges.
- Expand `mmRank/mmSquadRank`.
- For low-online, add wider queues to `queuesConfigLo`.
### Teams are too unequal
- Narrow `mmValue` ranges.
- Increase `maxTimeInQueue` so the matchmaker looks for suitable players longer.
- Strengthen the influence of efficiency/KPM/win-lose via MMV CVARs.
- Separately check newbie and squad queues.
### Newbies are matched against overly strong players
- Narrow the newbie `mmValue` range.
- Check queues with `queueFlags = { newbie = 1 }`.
- Increase protection via `mm_mmvMdBattles`.
- Decrease the upper clamp for new players via `mm_mmvMdUniqFingerprintClamp`.
### Squads wait too long
- Expand `mmSquadRank`.
- Expand `mmValue`.
- Decrease `maxTimeInQueue`.
- Check that `mm_notArcadeSquadRankDiff` is not too strict.
### Players often end up outside their region
- Increase `regionLocalizedTimeInQueue` in the needed queues.
- Check low-online mode: possibly, at low online, queues expand the region too quickly.
## Mini-checklist before editing
Before changing the file, check:
- whether you are changing the needed queue set: `queuesConfigLo` or `queuesConfig`;
- whether `mmValue` ranges overlap too much;
- whether there are gaps between `mmValue` ranges;
- whether the lengths of the `mm_mmvMdBattles`, `mm_mmvMdPenalty`, `mm_mmvMin`, `mm_mmvMdUniqFingerprintClamp` lists match;
- whether `levelsDesc` fits the selected mode;
- whether you forgot a needed flag in `special`;
- whether `minPlayers` is too small for the mode;
- whether `maxPlayers` is too large for the current online.