> 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-wagon-livery-studio/cas-horse-and-wagon-livery-studio.md).

# CAS Wagon Livery Studio

CAS Wagon Livery Studio for RedM: staff design painted wagon liveries in game, the server builds real game textures, and players buy them at the stables. 19 wagon models, VORP, RSG and standalone, wit

**An in-game livery designer for RedM: staff paint lettering and logos on the sides and the back of wagons, and the server builds every design into a real game texture that every player sees.**

{% hint style="success" %}
Players buy liveries at the stables and put them on their own wagon with `/livery`. With CAS Stables the wagon a player takes out of the stable carries their livery; it also runs standalone.
{% endhint %}

CAS Wagon Livery Studio is a design studio for server staff. Open it with `/liverystudio`, pick one of the 19 wagons CAS Stables sells, and paint its livery on a 3D preview that updates as you work: painted lettering and logos on the left side, the right side and the back.

Lay down fills and patterns, add lettering and emblems, place your own pictures, paint by hand, or let the AI paint it for you. Press Export and the server builds the design into a real game texture, right inside the resource: no CodeWalker, no OpenIV, no tools outside the game. In the same window you hand it out: sold at the stables of the towns you choose, free for a job from a grade, or straight to chosen players. After the next server restart the livery is live.

## Highlights

* **Design in game.** A 3D preview of the wagon that turns and zooms, next to the texture sheet with each livery area outlined and named. See [Designing liveries](/script-documentation/cas-wagon-livery-studio/designing.md).
* **19 wagons.** Buggies, carts, the chuckwagon, covered, farm, freight and supply wagons, coaches and stagecoaches, the hunting wagon: each with its own livery areas, measured on the wagon itself.
* **Real game textures.** Each design is written into a free slot inside the resource's own `stream` folder. Nothing to convert, nothing to upload.
* **Layers like a paint program.** Base colour in 16 period colours, 12 patterns, lettering with a curve and an outline in two period typefaces, 12 emblems (Lawman's Star, Lone Star, Horseshoe, Shield, Banner, Spade...), your own PNG, JPG and WebP pictures, a brush, an eraser, fill and colour pick. Undo and redo.
* **Both sides in one click.** Copy the left side to the right, and the sign reads the right way round on both sides.
* **AI Design** with your own key (fal, Google or OpenAI). Describe the look, or start from one: General Store, Medicine Show, Freight Company, US Mail, Undertaker. It lands as a layer you can move.
* **Hand out three ways.** For sale at the stables with a price and the towns that sell it, free for a job from a grade, or given to chosen players.
* **The livery book.** Players type `/livery` at a stable to buy, and to put a livery on their wagon or take it off. See [The livery book](/script-documentation/cas-wagon-livery-studio/livery-book.md).
* **Everyone sees it.** The server tells every player what each wagon carries; each game draws it.
* **CAS Stables or standalone.** With CAS Stables, liveries follow the wagon a player takes out. Without it, the wagon they drive. See [CAS Stables and standalone](/script-documentation/cas-wagon-livery-studio/cas-stables.md).
* **8 languages** shipped: English, Turkish, German, French, Spanish, Portuguese (Brazil), Russian and Polish. See [Languages](/script-documentation/cas-wagon-livery-studio/languages.md).
* **VORP, RSG or standalone**, with oxmysql.

## At a glance

* **Frameworks:** VORP Core, RSG Core or standalone.
* **Database:** oxmysql; five tables made on the first start.
* **Stables:** CAS Stables 1.0.0 or newer (optional, recommended), or standalone.
* **Wagons:** the 19 wagons CAS Stables sells, each with a left side, a right side and a rear where it has a back panel.
* **Slots:** 32 livery designs at the same time.
* **AI Design:** optional, your own key: fal, Google or OpenAI.
* **Languages:** en, tr, de, fr, es, pt-BR, ru, pl; add your own with one JSON file.
* **Tools needed:** none: no CodeWalker, no OpenIV.

{% hint style="warning" %}
Tested in game: liveries on the Covered Wagon (left, right and rear, from the studio's own export, on an owned CAS Stables wagon), applying them in the livery book, and the livery staying on after a relog. Not verified in game yet at the time of writing: the livery panels of the other 18 wagons, and a second player seeing a livery. Try a design on each wagon you sell on a test server first. Each page says where a part is not tested yet.
{% endhint %}

## Where to start

* [Installation](/script-documentation/cas-wagon-livery-studio/installation.md): what you need, `server.cfg`, the database, the first start.
* [Configuration](/script-documentation/cas-wagon-livery-studio/configuration.md): every setting in `config.lua`: stable towns, counters, distances, wagons, jobs, AI.
* [Designing liveries](/script-documentation/cas-wagon-livery-studio/designing.md): the studio, the 19 wagons, export and hand out.
* [The livery book](/script-documentation/cas-wagon-livery-studio/livery-book.md): how players buy liveries and put them on their wagon.
* [CAS Stables and standalone](/script-documentation/cas-wagon-livery-studio/cas-stables.md): whose wagon gets a player's liveries.
* [Languages](/script-documentation/cas-wagon-livery-studio/languages.md): the shipped languages and how to add your own.
* [Commands](/script-documentation/cas-wagon-livery-studio/commands.md): the staff and player commands, and the debug commands.
* [For developers](/script-documentation/cas-wagon-livery-studio/developers.md): the state bags, the events and how slots and props are named.
* [Troubleshooting](/script-documentation/cas-wagon-livery-studio/troubleshooting.md): restarts, slots, modded wagons, the livery book, AI errors.
* [Changelog](/script-documentation/cas-wagon-livery-studio/changelog.md): the release history.
