> For the complete documentation index, see [llms.txt](https://striga.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://striga.gitbook.io/docs/striga-text-ui/installation-and-configuration.md).

# Installation & Configuration

Install Striga Text UI and set it up in a few minutes.

{% stepper %}
{% step %}

### Add the resource

Put the `striga-text-ui` folder in your `resources` folder.
{% endstep %}

{% step %}

### Start it in server.cfg

Start `striga-core` **first** (after ox\_lib, oxmysql and your framework), then Striga Text UI:

```
ensure ox_lib
ensure oxmysql
ensure qb-core        # or qbx_core / es_extended
ensure striga-core
ensure striga-text-ui
```

{% endstep %}

{% step %}

### Check striga-core

Open `striga-core/config.json`. Keep the default:

```json
"textui": "auto"
```

With `auto`, striga-core picks Striga Text UI by itself. You can also set `"textui": "striga-text-ui"` to force it.

All Striga scripts (Tokyo HUD, Inventory...) now show their prompts with Striga Text UI.
{% endstep %}

{% step %}

### Catch your other scripts

Do the one-line step for your framework on the [Integration](/docs/striga-text-ui/integration.md) page, so **every** script on your server uses the new design.
{% endstep %}

{% step %}

### Restart the server

Restart the whole server (not only the resource) and you are done.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
**Striga Text UI needs striga-core 0.1.0 or newer.**

* If striga-core is missing, Striga Text UI does not start.
* If striga-core is too old, striga-core stops Striga Text UI and prints a red error in the console. Update striga-core.
  {% endhint %}

{% hint style="info" %}
**Updates:** striga-core checks GitHub for new versions of your Striga scripts. When one is out, it prints a red `UPDATE` line with the download link in the server console. To turn this off, set `"versionCheck": false` in `striga-core/config.json`. More on [Updates & Versions](/docs/updates-and-versions.md).
{% endhint %}

***

## 2D or 3D mode

Each player picks one of two modes in `/textuisettings` or `/hud` → **Mode**. You set the default with `Config.Ui.Depth`.

| Mode          | What shows                                                                                                                                      |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **Flat (2D)** | Only the screen prompt. 3D points are not drawn in the world: the nearest point in reach shows as the screen prompt                             |
| **3D**        | Only the world. Nothing is drawn on the screen: 3D points stay in place, and screen prompts are pinned in front of the player **like graffiti** |

Script authors write the same code for both modes. The player decides how it shows. The full guide is on [3D Prompts](/docs/striga-text-ui/3d-prompts.md).

***

## Config

File: `editable/config.lua`

### General

| Option            | Default            | What it does                                                                                                                                        |
| ----------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Locale`          | `'auto'`           | `'auto'` follows the striga-core server language; a code (`ar de en es fr it nl pl pt ru tr`) pins this script to it (files in `editable/locales/`) |
| `SettingsCommand` | `'textuisettings'` | Command for the player settings panel. `false` = no command                                                                                         |
| `TestCommand`     | `false`            | Set e.g. `'textuitest'` to show every type for 3 s each and a 3D sample                                                                             |
| `Capture.Esx`     | `true`             | `false` = do not answer `esx_textui` (ESX only)                                                                                                     |

### Look (`Config.Ui`)

| Option                | Default      | What it does                                                               |
| --------------------- | ------------ | -------------------------------------------------------------------------- |
| `Accent`              | `'#f43f5e'`  | Main color when there is no HUD theme and the player picked none           |
| `Style`               | `'card'`     | `card`, `pill`, `minimal`                                                  |
| `KeyStyle`            | `'keycap'`   | `keycap`, `tile`, `plain`                                                  |
| `Position`            | `'auto'`     | `auto` (the script decides, else left), `left`, `right`, `top`, `bottom`   |
| `OffsetX` / `OffsetY` | `32` / `120` | Distance from the screen edge (px at 1080p), for left/right and top/bottom |
| `Opacity`             | `70`         | Background opacity, 30 to 100                                              |
| `Size`                | `100`        | Size in %, 80 to 140                                                       |
| `Blur`                | `8`          | Background blur, 0 to 16 (0 = off)                                         |
| `Depth`               | `'2d'`       | Default mode: `2d` on the screen only, `3d` in the world only              |
| `Settings`            | `true`       | `false` = players cannot change anything (no panel, no `/hud` section)     |

### 3D prompts (`Config.World`)

| Option               | Default                   | What it does                                                   |
| -------------------- | ------------------------- | -------------------------------------------------------------- |
| `Enabled`            | `true`                    | `false` = no 3D prompts at all                                 |
| `Distance`           | `6.0`                     | Range (m) in which a point shows its key                       |
| `ActiveDistance`     | `2.0`                     | The **nearest** point in this range (m) shows the whole prompt |
| `MaxVisible`         | `6`                       | Most 3D prompts on screen at once                              |
| `Occlusion`          | `true`                    | A prompt behind a wall or an object is hidden                  |
| `OcclusionTolerance` | `0.3`                     | A wall hit this close (m) to the point still counts as seen    |
| `SelfDistance`       | `3.0`                     | 3D mode: a pinned screen prompt is hidden this far (m) away    |
| `SelfOffset`         | `vector3(0.35, 0.6, 0.3)` | 3D mode: where a screen prompt is pinned (right, forward, up)  |

`Distance` and `ActiveDistance` are defaults. Every point can set its own.

***

## Player settings

Players change their settings in two places. Both change the same settings:

* `/textuisettings`, the Striga Text UI panel
* `/hud`, the Striga Tokyo HUD menu, **Interaction prompt** section (only when the HUD runs, through the striga-core settings hub)

The `Config.Ui` values are the **defaults**. Set `Config.Ui.Settings = false` to lock them: everyone then sees your config look and mode.

### Color priority

The color follows the HUD theme unless the player picks a color.

1. The color the player picked in `/textuisettings` or `/hud`
2. The Striga Tokyo HUD theme color (if the HUD runs)
3. `Config.Ui.Accent`

Info prompts use this color. Success, Warning and Error keep their own colors.

***

## Test it

1. Set `Config.TestCommand = 'textuitest'` and restart the resource.
2. In game, type `/textuitest`. You see an Info, Success, Warning and Error prompt for 3 s each, and a **3D prompt 2 m in front of you for 15 s**.
3. Walk behind a wall to see the 3D prompt hide, walk away to see only its key.
4. Type `/textuisettings` and try the looks and the mode.
5. Set `TestCommand` back to `false` when you are done.

{% content-ref url="/pages/rV1kWQ4RM6X6Xk2gf6sM" %}
[Integration](/docs/striga-text-ui/integration.md)
{% endcontent-ref %}

{% content-ref url="/pages/PqKTMAkBHOBXwi0J8ktc" %}
[3D Prompts](/docs/striga-text-ui/3d-prompts.md)
{% endcontent-ref %}


---

# 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://striga.gitbook.io/docs/striga-text-ui/installation-and-configuration.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.
