> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-sign-and-poster-studio/installation.md).

# Installation

Install CAS Sign & Poster Studio on a RedM server: requirements, server.cfg, staff access, restart times, AI Design keys and the database tables.

## What you need

* A RedM server with **oxmysql**.
* **VORP Core** or **RSG Core** for characters, jobs and money. The studio also runs standalone.
* Nothing else: no CodeWalker, no OpenIV, no external tools.

## Steps

1. Put the `cas-signstudio` folder in your `resources` folder.
2. Add it to `server.cfg`, after oxmysql and your framework:

```cfg
ensure oxmysql
# ... your framework ...
ensure cas-signstudio

# who may open the studio (framework admin groups in config.lua work too)
add_ace group.admin cas.signstudio allow

# when your server restarts (server local time); shown as "live after the next restart"
set ss_restart_times "06:00,18:00"

# optional: AI Design with your own key (fal, google or openai)
set ss_ai_provider "fal"
set ss_ai_key "YOUR_KEY"
# set ss_ai_model ""   (only to use another model than the default)
```

3. Set the language and the rest in `config.lua`. See [Configuration](/script-documentation/cas-sign-and-poster-studio/configuration.md).
4. Restart the server. The console shows:

```
[cas-signstudio] framework: vorp
[cas-signstudio] 0 live design(s)
[cas-signstudio] ready: 250 slots (250 free), 0 sign(s) placed, AI fal
```

{% hint style="info" %}
Keep the AI key in `server.cfg`, never in `config.lua`. The key stays on the server; players never see it. If you also run CAS Clothing Studio, the Sign Studio uses its `cs_ai_provider` and `cs_ai_key` when `ss_ai_*` are not set.
{% endhint %}

## The database

Three tables are made on the first start:

| Table                     | What it holds                                                   |
| ------------------------- | --------------------------------------------------------------- |
| `cas_signstudio_designs`  | every design: its name, shape, layers, picture, slot and status |
| `cas_signstudio_pictures` | the pictures used in designs, one row each                      |
| `cas_signstudio_signs`    | every sign placed in the world                                  |

Designs with large pictures need MySQL's packet limit raised: in `my.ini` under `[mysqld]` set `max_allowed_packet=16M` (or more) and restart MySQL.

## Restarts

A new design reaches players after the next **server restart**, and each player rejoins to load it. Placing does not wait: place a design right after its export, and the sign shows for everyone from the restart on.

{% hint style="danger" %}
Never restart `cas-signstudio` on its own while players are online after an export. Streamed files that change under a running game can crash clients. Restart the whole server.
{% endhint %}
