> For the complete documentation index, see [llms.txt](https://docs.cuxial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cuxial.com/scripts/leisure/cuxial-domino/commands.md).

# Commands & permissions

Commands, keys and permissions of Cuxial Domino: the admin tablet, calibration tools and how to play.

Players need no commands: they sit at a table and play. The commands are for staff and for calibrating the script.

## Commands

| Command                        | Who                                             | What it does                                                                                                                                                                                    |
| ------------------------------ | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/domino_admin`                | Staff with the ACE `command.domino_admin`       | Opens the admin tablet. The name can be changed in `admin.command`.                                                                                                                             |
| `/domino_tune`                 | Anyone seated at a table; staff when not seated | Starts or stops the live adjustment of the board camera and the player hand. Not seated, it creates a 1 player test table in front of you and sits you at it, which needs the staff permission. |
| `/domino_tune print`           | Everyone                                        | Prints the current camera and hand values to the client console (F8), ready to paste into `shared/config.lua`.                                                                                  |
| `/domino_tune preview`         | Everyone                                        | Shows or hides a sample hand of tiles.                                                                                                                                                          |
| `/domino_tune stop`            | Everyone                                        | Ends the adjustment, stands you up and deletes the test table.                                                                                                                                  |
| `/domino_dui <option> <value>` | Everyone                                        | Adjusts the flat board texture. Only useful with `dui.enabled = true`.                                                                                                                          |
| `/domino_dragdebug`            | Everyone                                        | Turns drag traces in the client console on or off.                                                                                                                                              |

{% hint style="info" %}
`/domino_tune`, `/domino_dui` and `/domino_dragdebug` only change what the player who runs them sees. Nothing is saved: copy the values you like into `shared/config.lua`.
{% endhint %}

### Options of /domino\_dui

| Option     | Value      | What it does                     |
| ---------- | ---------- | -------------------------------- |
| `rotation` | degrees    | Turns the texture.               |
| `mirror`   | `0` or `1` | Mirrors the texture.             |
| `size`     | metres     | Side of the square.              |
| `z`        | metres     | Height above the surface.        |
| `show`     | none       | Redraws with the current values. |

## Admin tablet

| Tab        | What you can do                                                                                                                                                                                                                 |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Tables** | See every table with its distance, teleport to one, or delete it. To delete you must be within `table.deleteDistance` metres of the table.                                                                                      |
| **Create** | Choose the style (luxury, wood or classic), the players (1, 2, 3, 4 or 4 in teams), the game type (classic or All Fives), a name and the minimum and maximum bet. The table is placed in front of you, facing the way you face. |

Deleting a table stands up everyone seated at it and returns any bet already charged.

## Keys

### Adjustment mode (/domino\_tune)

| Key                       | What it does                                                          |
| ------------------------- | --------------------------------------------------------------------- |
| <kbd>←</kbd> <kbd>→</kbd> | Changes the parameter.                                                |
| <kbd>↑</kbd> <kbd>↓</kbd> | Changes the value. Hold <kbd>Shift</kbd> for steps five times larger. |
| <kbd>Enter</kbd>          | Prints the values to the client console (F8).                         |
| <kbd>Backspace</kbd>      | Leaves the adjustment mode.                                           |

### At the table

| Key                                                    | What it does                                                         |
| ------------------------------------------------------ | -------------------------------------------------------------------- |
| Mouse drag                                             | Picks a tile from your hand and drops it on an open end of the line. |
| <kbd>←</kbd> <kbd>→</kbd> or <kbd>A</kbd> <kbd>D</kbd> | Selects a tile in your hand.                                         |
| <kbd>Enter</kbd>                                       | Plays the selected tile.                                             |
| <kbd>Space</kbd>                                       | Draws a tile when you have nothing to play.                          |
| Right mouse button (hold)                              | Zooms in. In first person it also lets you look around.              |
| <kbd>Esc</kbd>                                         | Closes the leave confirmation or the admin tablet.                   |

The camera buttons on screen switch between board view, first person and third person.

## How a table works

* **Seats.** 2 player tables use opposite chairs. On a 1 player table you sit and the AI plays against you. In team tables, opposite seats are partners.
* **Starting.** Every seat must be taken. With bets enabled, one player proposes the amount and the others accept; without bets, every player confirms they are ready.
* **Dealing.** Seven tiles each. In All Fives with three or four players, five tiles each.
* **Opening.** In classic, the highest double opens the first round and must be the first tile. In All Fives, the player with the highest double opens with any tile. If nobody holds a double, the heaviest tile takes its place. From the second round, the winner of the last round opens with any tile.
* **Scoring.** The winner of a round scores the pips left in the other hands. A blocked round goes to the hand with the fewest pips. In All Fives, a move that leaves the open ends adding up to a multiple of five scores that total at once, and round points are rounded to the nearest five.
* **Match.** Rounds follow one another until a player or team reaches the target score.
* **Leaving.** If a player leaves during a round and two or more remain, the round is cancelled and bets are returned. If only one remains, that player wins.

## Permissions

| Feature                                      | Requirement                                                      |
| -------------------------------------------- | ---------------------------------------------------------------- |
| Sit and play                                 | None                                                             |
| Admin tablet: open, create and delete tables | ACE `command.<admin.command>`, by default `command.domino_admin` |

When the resource starts, the permission is granted to the principal named in `admin.ace`. To grant it yourself, add a line to `server.cfg`:

{% code title="server.cfg" %}

```cfg
add_ace group.admin command.domino_admin allow
```

{% endcode %}

{% hint style="warning" %}
`admin.ace` is used as written, so write the full name of the principal. The default `'group.admin'` gives the permission to the admin group.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/leisure/cuxial-domino/commands.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
