# UI Config

This guide configures the racing Native User Interface (NUI) defaults in `config/ui.lua` so race setup forms, leaderboard limits, and safety caps match your server rules.

## Before You Start

* VibesEZ-Race installed and running.
* Built UI in `web/dist/`.
* Access to edit `config/ui.lua`.

## Configure Race Setup Defaults

1. Open `config/ui.lua`.
2. Set values in `UI.raceSetup`.

```lua
-- File: config/ui.lua
raceSetup = {
	defaultRaceType = 'public',    -- EDIT THIS
	defaultRankingMode = 'casual', -- EDIT THIS
	defaultMaxPlayers = 20,        -- EDIT THIS
	defaultLapCount = 1,           -- EDIT THIS
	defaultCurrency = 'Cash',      -- EDIT THIS
	defaultGhostMode = 'Disabled', -- EDIT THIS
	defaultCarClass = 'Open'       -- EDIT THIS
}
```

## Configure UI Safety Limits

1. Open `config/ui.lua`.
2. Set values in `UI.SafetyCaps`.

```lua
-- File: config/ui.lua
SafetyCaps = {
	tracks = 1500, -- EDIT THIS
	crews = 1000   -- EDIT THIS
}
```

> **Warning:** Setting safety caps too high can increase UI payload size and increase client memory usage.

## Configure Ranking And Admin View Limits

1. Open `config/ui.lua`.
2. Set values in `UI.ranking`.
3. Set values in `UI.admin`.

```lua
-- File: config/ui.lua
ranking = {
	leaderboardLimit = 50, -- EDIT THIS
	hallOfFameLimit = 8     -- EDIT THIS
},
admin = {
	topTracksLimit = 1000, -- EDIT THIS
	topRacersLimit = 20    -- EDIT THIS
}
```

> **Tip:** Keep leaderboard limits conservative on high-population servers to reduce callback payload size.

## Verify

1. Restart the `VibesEZ-Race` resource.
2. Open the laptop racing app.
3. Create one race and verify default values in the setup form.
4. Open ranking and admin views and confirm list limits.

> **Note:** Production UI is served from `web/dist/index.html` through `fxmanifest.lua`.

## See Also

* [Configuration Overview](/vibesez/docs/configuration/overview.md)
* [Initial Setup](https://github.com/VibesEZ/VibesEZ-Race/blob/claude-docs/docs/getting-started/initial-setup.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vibesez.gitbook.io/vibesez/docs/configuration/ui-config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
