> 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-clothing-studio/designing.md).

# Designing clothes

Design RedM clothing in game with CAS Clothing Studio: pick a garment, paint it with cloth, patterns, lettering, emblems, pictures and AI Design on a live 3D preview, then export and hand it out.

Staff open the studio with `/clothingstudio` (the command is `Config.Command`). Who may open it: the ACE `cas.clothingstudio`, or a group in `Config.AdminGroups`.

## 1. Pick a garment

Every design starts from one of the game's own garments, so it fits, folds and moves like the original.

* Open the **Garments** tab, choose **Men** or **Women**, and filter by piece or search by name.
* The pieces: vests, shirts, coats, closed coats, trousers, skirts and ponchos.
* Press **Start a design on it**.

{% hint style="info" %}
A built design keeps its garment. To put the same look on another garment, start a new design.
{% endhint %}

## 2. The screen

| Part              | What it does                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| **3D Preview**    | The garment, live as you paint. Drag to turn, wheel to zoom, **Front**, **Side** and **Back**.    |
| **Pattern Sheet** | The flat sheet the texture is made of. **Seams** shows the garment's pieces, **Whole** the sheet. |
| **Layers** tab    | The design's layers, top to bottom, and the settings of the chosen one.                           |
| **Garments** tab  | The garment library.                                                                              |
| **Saved** tab     | Your designs: drafts, waiting, live, needs export.                                                |
| Footer            | Garments loaded, free slots, and whether AI Design is on.                                         |

## 3. The tools

| Tool          | What it does                                                                                           |
| ------------- | ------------------------------------------------------------------------------------------------------ |
| **Move**      | Drag a layer on the sheet. Corners size it, the red knob turns it. Body pieces drag on the 3D garment. |
| **Brush**     | Paint on the sheet. Alt + drag pans. Colour and size are in the bar above the sheet.                   |
| **Erase**     | Rubs out paint strokes (on a paint layer).                                                             |
| **Picture**   | Adds a PNG or JPG, up to 6 MB. A clear PNG keeps its shape.                                            |
| **Letters**   | Adds lettering; set the words on the right.                                                            |
| **Fill**      | Click the sheet to recolour the chosen layer, or add cloth in this colour.                             |
| **Pick**      | Click the sheet to take a colour.                                                                      |
| **Emblem**    | Adds an emblem; pick its shape on the right.                                                           |
| **Pattern**   | Adds a cloth pattern; pick it on the right.                                                            |
| **AI Design** | Describe the cloth; the AI paints the pieces.                                                          |

**Undo** and **Redo** work on every step.

## 4. Layers

| Layer                  | Settings                                                                                                                                                                             |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Cloth**              | 16 period colours: charcoal, black, bone, cream, gold, brass, oxblood, red, navy, slate, forest, olive, brown, tan, grey, silver.                                                    |
| **Pattern**            | Pinstripe, Chalk Stripe, Ticking, Banker's Stripe, Gingham, Buffalo Check, Tartan, Windowpane, Houndstooth, Herringbone, Polka Dot, Harlequin. First and second colour, scale, turn. |
| **Lettering**          | Words (up to 40 letters), type (Lino or Slab), curve, thread colour, outline, width, height, turn, and a finish: embroidered, printed or worn.                                       |
| **Emblem**             | Lawman's Star, Lone Star, Horseshoe, Cross, Diamond, Ring, Shield, Banner, Heart, Spade, Arrow, Crescent. Thread colour, size, turn, finish.                                         |
| **Picture**            | Your own picture or an AI answer. Choose another picture, width, height, turn, finish.                                                                                               |
| **Paint**              | Brush strokes. Clear the strokes in one go.                                                                                                                                          |
| **Seams and Stitches** | From the game: keeps the garment's folds, seams and stitches over your design.                                                                                                       |

Every layer has a **Strength** (how strongly it shows). A lettering, emblem or picture layer goes **On the body** (placed on the front or the back of the 3D garment) or **On the sheet**. Every layer can move **Up** and **Down**, be **Duplicated**, **Mirrored** or deleted.

## 5. AI Design

Needs your own key in `server.cfg` (see [Configuration](/script-documentation/cas-clothing-studio/configuration.md#ai-design)).

* **Describe it:** write what the cloth should look like, for example *Deep oxblood silk brocade with an antique gold paisley pattern*.
* **Quick design:** pick a look to start from (Lawman, Outlaw, Gambler, Rancher, Preacher, Railroad, Saloon, Trapper, Doctor) and the AI makes a fitting cloth for this garment.
* **Paint:** the whole sheet, the front only or the back only. **Keep my other layers on top** leaves your lettering and emblems over the AI cloth.
* An answer takes about 20 seconds, one request at a time on the server. It is added as a movable layer.

## 6. Save and export

**Save** keeps the design as a draft. **Export** builds it into a real game texture:

1. Design saved
2. Texture built
3. Sent to the server
4. Written to a slot
5. Live after the restart

The export window shows the piece, its name, its garment and the free slots. A design is one of these:

| Status             | Meaning                                                                 |
| ------------------ | ----------------------------------------------------------------------- |
| **Draft**          | Saved, never exported.                                                  |
| **Waiting**        | Exported; goes live at the next restart.                                |
| **Live**           | In the game.                                                            |
| **Update waiting** | A live design was changed; players keep the old look until the restart. |
| **Needs export**   | A live design whose files are gone from `stream/`: export it again.     |

## 7. Hand it out

In the export window, pick one or more:

* **Clothing shops:** a price and the towns that sell it (from `Config.Towns`). Players buy it in that town's clothing store. See [Where players get designs](/script-documentation/cas-clothing-studio/clothing-stores.md).
* **A job:** free for a job from `Config.Jobs`, from a grade up.
* **One player:** straight into the chosen online players' wardrobes.

Press **Save the hand out**. You can change the hand out later from the **Saved** tab without exporting again.

## Changing and deleting

* A live design can be changed: the change waits for the next restart, and players keep the old look until then.
* **Delete** frees the design's slot after the next restart. Whoever wore it wears the plain garment.
* There are 400 slots. When every slot is in use, delete an old design first.

{% hint style="warning" %}
Players see a new or changed design only after a server restart and a rejoin. Never restart `cas-clothingstudio` on its own while players are online after an export.
{% endhint %}
