> For the complete documentation index, see [llms.txt](https://devmosaic.gitbook.io/devmosaic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devmosaic.gitbook.io/devmosaic/resources/devmosaic-dm-tennis/courts.md).

# Courts

The 16 included courts, what each field means, and how to add a court from your own map.

Courts are listed in one open file:

```
shared/courts.lua
```

Every vanilla court in Los Santos is already there and playable. Each court gets its own terminal, blip and lobby, so several matches can run at the same time on different courts.

### Included Courts

<figure><img src="https://1989732204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqTcxlijq9VUZLAPYtqr%2Fuploads%2Fgit-blob-b360964d9e964d7aa8649a2b490bb9bf30e1ba17%2Fdm-tennis-court-vinewood.jpg?alt=media" alt="The Vinewood Hills court"><figcaption><p>The Vinewood Hills court</p></figcaption></figure>

| Id                   | Location                     | Net      |
| -------------------- | ---------------------------- | -------- |
| `rockford`           | Rockford Hills residence     | wide     |
| `hawick`             | Hawick                       | wide     |
| `vinewood`           | Vinewood Hills               | wide     |
| `richman`            | Richman                      | standard |
| `ulsa`               | ULSA campus                  | standard |
| `canals`             | Vespucci Canals              | standard |
| `morningwood`        | Morningwood                  | standard |
| `pacific`            | Pacific Bluffs               | standard |
| `beach1` to `beach8` | Vespucci Beach public courts | standard |

### A Court Entry

```lua
{ id = 'beach3', label = 'Vespucci Beach 3', coords = vec3(-1183.005, -1626.045, 3.173), heading = 215.04, surface = 'hard', net = 'standard' },
```

| Field      | What it means                                                                                                                             |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `id`       | Unique short name. Used in the console and in stats.                                                                                      |
| `label`    | Name shown in the terminal and on the blip.                                                                                               |
| `coords`   | Centre of the net, on the ground.                                                                                                         |
| `heading`  | Direction the court runs along, in degrees.                                                                                               |
| `surface`  | `hard`, `clay` or `grass`. Changes the ball's bounce.                                                                                     |
| `doubles`  | `false` if the court has no doubles lines. Defaults to `true`.                                                                            |
| `net`      | `standard`, `wide` or `regulation`. Pick the one that matches the net model on that court so the ball clips the tape at the right height. |
| `terminal` | Optional. Where the court terminal stands; see below.                                                                                     |

### Adding A Court

1. Stand at the centre of the net on your custom court and note the coordinates and the heading along the court.
2. Copy one block in `shared/courts.lua` and change `id`, `label`, `coords`, `heading` and `surface`.
3. Pick the `net` profile that matches the net prop on that court. If the court has no doubles alleys, add `doubles = false`.
4. Restart `dm-tennis`. The terminal, blip and lobby appear on the new court.

{% hint style="info" %}
The court lines themselves come from the map. The resource measures a regulation court from the net centre and heading you give it, so match those two values carefully and the calls will line up with the painted lines.
{% endhint %}

### Moving The Terminal

<figure><img src="https://1989732204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqTcxlijq9VUZLAPYtqr%2Fuploads%2Fgit-blob-a1ab77938fae8b8c8bd84e81693e6ee07b07fbae%2Fdm-tennis-court-terminal.jpg?alt=media" alt="The terminal in its default spot beside the net post"><figcaption><p>The terminal in its default spot beside the net post</p></figcaption></figure>

By default the terminal stands 1.3 m outside the net post and 1.5 m along the court, facing the court, like an umpire's chair. If that spot is blocked on your map, add a `terminal` table to the court, measured in metres from the net centre:

```lua
{ id = 'mycourt', label = 'My Court', coords = vec3(100.0, 200.0, 30.0), heading = 90.0, surface = 'clay', net = 'standard',
  terminal = { x = 7.5, y = 0.0, facing = { x = -1.0, y = 0.0 } } },
```

* `x` is sideways (positive = right of the net post), `y` is along the court.
* `facing` is the direction the screen looks at.

### Removing Courts

Delete the block, or comment it out, and restart the resource. The blip and terminal disappear with it.
