> For the complete documentation index, see [llms.txt](https://docs.av-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.av-scripts.com/laptop-pack/racing/admin-panel/matchmaking.md).

# Matchmaking

Matchmaking is an automated way to create **ranked races**. Instead of an admin manually setting up an event, racers put themselves in a queue, and the server groups people of a similar skill level together and builds a race for them. Everyone gets to vote on the track, drives to the start line, and races for ELO and a server‑funded prize.

The whole point is to keep competitive races flowing without anyone having to organize them.

{% hint style="info" %}
Matchmaking is **disabled by default**, make sure to read and configure everything before enable it.
{% endhint %}

<figure><img src="/files/DgKA9jseYvcuFMjpsJjN" alt=""><figcaption></figcaption></figure>

#### General

<table><thead><tr><th width="147">Field</th><th width="110">Default</th><th>What it does</th></tr></thead><tbody><tr><td><strong>Max Racers</strong></td><td><code>30</code></td><td>Hard cap on how many racers a single lobby can hold.</td></tr><tr><td><strong>Min Racers</strong> <em>(read‑only)</em></td><td><code>2</code></td><td>Minimum racers required to lock a lobby. This value lives in the ELO config (<code>server/editable/_elo.lua</code>, <code>Config.MinEloRacers</code>) because it also decides when a <strong>normal</strong> race counts toward ELO. It is shown here for reference only — edit it in the ELO config.</td></tr><tr><td><strong>Fill Min Core</strong></td><td><code>1</code></td><td>How many racers must <strong>explicitly pick a class</strong> before wildcard ("Fill any lobby") racers are allowed to top that class up. <code>1</code> means as soon as a single racer wants that class. Raise it if you only want wildcards pulled into busier classes.</td></tr><tr><td><strong>Tick Interval (s)</strong></td><td><code>5</code></td><td>Seconds between matchmaking attempts — how often the server tries to form lobbies.</td></tr><tr><td><strong>Queue Update (s)</strong></td><td><code>3</code></td><td>Seconds between the live queue‑count updates pushed to waiting racers.</td></tr><tr><td><strong>Track Cache (s)</strong></td><td><code>60</code></td><td>How long the list of ranked‑eligible tracks is cached before it is re‑read from the database.</td></tr></tbody></table>

{% hint style="warning" %}
**Min Racers is shared.** Because it is `Config.MinEloRacers`, lowering it also lowers the threshold at which normal (non‑matchmaking) races start affecting ELO. Keep that in mind when tuning it for a small server.
{% endhint %}

#### ELO Bracket

Matchmaking pairs racers of a similar skill level. The bracket starts strict and **widens the longer a racer waits**, so nobody is stuck in the queue forever on a low‑population server.

<table><thead><tr><th width="161">Field</th><th width="115">Default</th><th>What it does</th></tr></thead><tbody><tr><td><strong>Initial ±</strong></td><td><code>150</code></td><td>ELO range accepted the moment a racer joins the queue.</td></tr><tr><td><strong>Widen Every (s)</strong></td><td><code>30</code></td><td>Every N seconds a racer waits, the accepted ELO range grows.</td></tr><tr><td><strong>Widen By ±</strong></td><td><code>100</code></td><td>How much the accepted range grows on each widen step.</td></tr><tr><td><strong>Max ±</strong></td><td><code>2000</code></td><td>The range never widens past this. A high value effectively means "match anyone".</td></tr></tbody></table>

**Example** — with the defaults, a racer's tolerance is `±150` at 0s, `±250` after 30s, `±350` after 60s, and so on up to `±2000`.

#### Invite & Vote

<table><thead><tr><th width="162">Field</th><th width="108">Default</th><th>What it does</th></tr></thead><tbody><tr><td><strong>Invite Seconds</strong></td><td><code>45</code></td><td>How long a racer has to accept a match invite before it expires.</td></tr><tr><td><strong>Starts In (min)</strong></td><td><code>10</code></td><td>Minutes until the race starts once the lobby locks — time for racers to reach the start line and check in.</td></tr><tr><td><strong>No‑show Cooldown (min)</strong></td><td><code>10</code></td><td>Minutes a racer is locked out of the queue if they accept a match but never check in.</td></tr><tr><td><strong>Track Voting</strong></td><td><code>On</code></td><td>When on, racers vote on which track to race. When off, a random eligible track is picked automatically.</td></tr><tr><td><strong>Vote Candidates</strong></td><td><code>3</code></td><td>How many tracks are put to the vote each time.</td></tr><tr><td><strong>Vote Seconds</strong></td><td><code>20</code></td><td>How long racers have to cast their vote.</td></tr></tbody></table>

{% hint style="info" %}
If fewer eligible tracks exist than **Vote Candidates**, the vote simply offers all of them. If only one track qualifies, voting is skipped and that track is used.
{% endhint %}

#### Generated Race

These control the ranked race that matchmaking creates once a lobby locks.

<table><thead><tr><th width="150">Field</th><th width="145">Default</th><th>What it does</th></tr></thead><tbody><tr><td><strong>Money Account</strong></td><td><code>cosmo</code></td><td>Account the prize pot is paid from. Must be one of your configured money accounts (<code>Config.MoneyAccounts</code>).</td></tr><tr><td><strong>Phasing</strong></td><td><code>Full Race – Racers Only</code></td><td>Collision phasing used for the ranked race. Options come from <code>Config.PhasingOptions</code>, plus <strong>No phasing</strong>.</td></tr><tr><td><strong>Prize Pot Min</strong></td><td><code>25</code></td><td>Lower bound of the server‑funded prize pot.</td></tr><tr><td><strong>Prize Pot Max</strong></td><td><code>100</code></td><td>Upper bound. A random amount in the <code>min–max</code> range is used per race.</td></tr><tr><td><strong>Laps Min</strong></td><td><code>1</code></td><td>Fewest laps rolled for circuit tracks.</td></tr><tr><td><strong>Laps Max</strong></td><td><code>3</code></td><td>Most laps rolled for circuit tracks.</td></tr><tr><td><strong>Reversed</strong></td><td><code>Off</code></td><td>Enables backwards races (see note below).</td></tr></tbody></table>

{% hint style="info" %}
**There is no buy‑in in matchmaking.** Racers are placed into a lobby whose class they may not own a car for, so charging an entry fee would be unfair. Ranked races are free to enter — ELO and the no‑show cooldown are the incentives. The prize pot is **funded by the server** using the Prize Pot range above.
{% endhint %}

{% hint style="info" %}
**Reversed is a chance, not a guarantee.** With **Reversed** enabled, the server does **not** run every race backwards. For each race it rolls `1–5` and only reverses on a `2` — roughly a **20% chance** — so the direction stays a surprise. With **Reversed** disabled, every race runs in the normal direction.
{% endhint %}

### Related settings outside this tab

Two values that matchmaking depends on live elsewhere, in `server/editable/_elo.lua`:

<table><thead><tr><th width="211">Setting</th><th width="112">Default</th><th>Why it matters to matchmaking</th></tr></thead><tbody><tr><td><code>Config.MinEloRacers</code></td><td><code>10</code></td><td>The minimum racers needed to lock a lobby (shown as <strong>Min Racers</strong> in the tab). Also the threshold at which any race affects ELO.</td></tr><tr><td><code>Config.MinCheckpoints</code></td><td><code>50</code></td><td>A track needs at least this many checkpoints to be <strong>ranked‑eligible</strong>. Only ranked‑eligible tracks are offered in the vote and used for matchmaking races.</td></tr></tbody></table>

{% hint style="warning" %}
If **no** track meets `Config.MinCheckpoints`, matchmaking cannot create a ranked race and the lobby is cancelled. Make sure you have at least one qualifying track before enabling matchmaking.
{% endhint %}
