> For the complete documentation index, see [llms.txt](https://k0ssek-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://k0ssek-scripts.gitbook.io/docs/scripts/squash/customization.md).

# Customization

Languages, notifications, the look of the HUD and the files you can edit.

## Editable files

These are not encrypted:

| File or folder                               | What it holds                                                                                                |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `config/`                                    | All settings, see [Configuration](/docs/scripts/squash/configuration.md)                                     |
| `bridge/`                                    | Framework and target integration, see [Frameworks & Targets](/docs/scripts/squash/frameworks-and-targets.md) |
| `locales/`                                   | Every text shown to players                                                                                  |
| `client/editable.lua`, `server/editable.lua` | Notifications and the E prompt                                                                               |
| `web/dist/theme.css`                         | The look of the HUD, the panel and the scoreboards                                                           |

## Language

English and Polish are included. By default the script follows your server's ox\_lib language:

```cfg
setr ox:locale pl
```

`Config.Language = 'en'` or `'pl'` forces one for this script only.

To add a language, copy `locales/en.json` to a new file named after its code (`de.json`, for example), translate the values and keep the keys and the `%s` / `%d` placeholders as they are.

## Notifications and the prompt

ox\_lib and the game's own are built in and picked in the config:

* `Config.Notify`: `'ox_lib'` or `'gta'` (above the minimap)
* `Config.Prompt.style`: `'ox_lib'` or `'gta'` (help text in the top left corner)

To use another notify or text UI resource, edit the functions in `client/editable.lua` and `server/editable.lua`. Every notification and prompt of the script goes through them.

## HUD theme

`web/dist/theme.css` is loaded after the built UI, so anything in it wins. No source or rebuild is needed.

Colours, font and scale are CSS variables at the top of the file:

```css
:root {
    --sq-scale: 1;                /* size of the whole HUD: 1.2 = 20% bigger */
    --sq-font: "Inter", system-ui, sans-serif;
    --sq-accent-start: #11998e;   /* gradients, your score, wins */
    --sq-accent-end: #38ef7d;
    --sq-loss: #ef4444;           /* lost points, misses */
    --sq-highlight: #ffc800;      /* serve ball, tags */
    --sq-panel-bg: rgba(9, 9, 11, 0.82);
}
```

For a full redesign, restyle the classes. Their names are stable and listed in the header of the file:

| Class            | Element                                 |
| ---------------- | --------------------------------------- |
| `.board`         | Scoreboard on the screen                |
| `.banner`        | Result banner                           |
| `.shot`          | Readout of your last shot               |
| `.meter`         | Serve power meter                       |
| `.leave`         | Bar of the leave key                    |
| `.menu`          | The squash panel (play, stats, ranking) |
| `.wallboard`     | Scoreboards in the world                |
| `.layout-editor` | The `/squashhud` editor                 |

{% hint style="info" %}
Keep the scoreboards in the world still. Their screens are drawn again only when a score changes, and an animation there would keep that page busy for every player nearby.
{% endhint %}

## HUD layout

Positions are not set in the theme. The server's defaults are `Config.Ui.layout`, and each player can move the elements with `/squashhud`. That is saved on their own PC.
