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

# Designing skins

Design RedM weapon skins in game with CAS Weapon Studio. The 73 weapons, the texture sheet and its four views, layers, metal and wood zones, ready looks, pictures, lettering, emblems, paint and AI Des

Staff open the studio with `/weaponstudio`. It needs the ACE `cas.weaponstudio` or a group in `Config.AdminGroups`.

A design is a stack of layers on one weapon. Nothing reaches the game until you export it. See [Exporting and handing out](/script-documentation/cas-weapon-studio/exporting.md).

## The screen

| Part             | What it is                                                                                                                                |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Top bar          | The design's name (up to 48 letters), its status, AI Design, Save, Export, close                                                          |
| Tool rail (left) | Move, Brush, Erase, Picture, Letters, Fill, Pick, Emblem, Pattern, AI Design, then Undo and Redo                                          |
| 3D Preview       | The real weapon with your design on it, "Live as you paint". Drag to turn, wheel to zoom. The Left and Right buttons turn it to that side |
| Texture Sheet    | The flat drawing you work on                                                                                                              |
| Sidebar tabs     | Layers, Weapons, Custom, Saved                                                                                                            |
| Bottom line      | Weapons loaded, free slots, the next restart, AI on or off                                                                                |

The Custom tab only shows when `Config.Editions.enabled` is `true`. It is covered in [Custom weapons](/script-documentation/cas-weapon-studio/custom-weapons.md).

Keys: `Esc` closes a window, then the studio. `Ctrl+Z` is Undo, `Ctrl+Y` is Redo (up to 60 steps).

## The weapons

The Weapons tab lists every weapon model of the game, 73 of them, with a search field and a filter by class: All, Revolvers, Pistols, Repeaters, Rifles, Shotguns, Bows, Knives, Hatchets, Machetes, Other Melee, Throwing. Click a weapon, then "Start a design on it". With no design open, one click starts it.

A new design is named " Skin" and starts empty, so the weapon shows through.

Weapons that share one model share one entry and one skin: the Rusted Hunter Hatchet wears the Hunter Hatchet's, Sadie's Carbine Repeater the Carbine Repeater's. The lasso, the fishing rod, the lanterns, the torch, the bolas, the binoculars, the camera and the metal detector are tools, not weapons, and are not in the studio.

| Weapon                  | Key                      | Class           | Sheet       |
| ----------------------- | ------------------------ | --------------- | ----------- |
| Algernon's Revolver     | `doubleaction_exotic`    | Revolver        | 1024 x 1024 |
| Calloway's Revolver     | `schofield_calloway`     | Revolver        | 1024 x 1024 |
| Cattleman Revolver      | `cattleman`              | Revolver        | 1024 x 1024 |
| Double-Action Revolver  | `doubleaction`           | Revolver        | 1024 x 1024 |
| Flaco's Revolver        | `cattleman_mexican`      | Revolver        | 1024 x 1024 |
| Granger's Revolver      | `cattleman_pig`          | Revolver        | 1024 x 1024 |
| High Roller Revolver    | `doubleaction_gambler`   | Revolver        | 1024 x 1024 |
| LeMat Revolver          | `lemat`                  | Revolver        | 1024 x 1024 |
| Lowry's Revolver        | `navy_crossover`         | Revolver        | 1024 x 1024 |
| Micah's Revolver        | `doubleaction_micah`     | Revolver        | 1024 x 1024 |
| Navy Revolver           | `navy`                   | Revolver        | 1024 x 1024 |
| Otis Miller's Revolver  | `schofield_golden`       | Revolver        | 1024 x 1024 |
| Schofield Revolver      | `schofield`              | Revolver        | 1024 x 1024 |
| M1899 Pistol            | `m1899`                  | Pistol          | 1024 x 1024 |
| Mauser Pistol           | `mauser`                 | Pistol          | 1024 x 1024 |
| Midnight's Pistol       | `mauser_drunk`           | Pistol          | 1024 x 1024 |
| Semi-Automatic Pistol   | `semiauto`               | Pistol          | 1024 x 1024 |
| Volcanic Pistol         | `volcanic`               | Pistol          | 1024 x 1024 |
| Carbine Repeater        | `carbine`                | Repeater        | 2048 x 1024 |
| Evans Repeater          | `evans`                  | Repeater        | 2048 x 1024 |
| Lancaster Repeater      | `winchester`             | Repeater        | 2048 x 1024 |
| Litchfield Repeater     | `henry`                  | Repeater        | 2048 x 1024 |
| Bolt Action Rifle       | `boltaction`             | Rifle           | 2048 x 1024 |
| Carcano Rifle           | `carcano`                | Rifle           | 2048 x 1024 |
| Elephant Rifle          | `elephant`               | Rifle           | 2048 x 1024 |
| Rolling Block Rifle     | `rollingblock`           | Rifle           | 2048 x 1024 |
| Springfield Rifle       | `springfield`            | Rifle           | 2048 x 1024 |
| Varmint Rifle           | `varmint`                | Rifle           | 2048 x 1024 |
| Double-Barreled Shotgun | `doublebarrel`           | Shotgun         | 2048 x 1024 |
| Pump-Action Shotgun     | `pump`                   | Shotgun         | 2048 x 1024 |
| Repeating Shotgun       | `repeating`              | Shotgun         | 2048 x 1024 |
| Sawed-Off Shotgun       | `sawedoff`               | Shotgun         | 1024 x 1024 |
| Semi-Auto Shotgun       | `semiautoshotgun`        | Shotgun         | 2048 x 1024 |
| Bow                     | `bow`                    | Bow             | 2048 x 1024 |
| Charles' Bow            | `bow_charles`            | Bow             | 2048 x 1024 |
| Improved Bow            | `bow_improved`           | Bow             | 2048 x 1024 |
| Antler Knife            | `knife_bear`             | Knife           | 1024 x 1024 |
| Bill's Knife            | `knife_bill`             | Knife           | 1024 x 1024 |
| Charles' Knife          | `knife_charles`          | Knife           | 1024 x 1024 |
| Civil War Knife         | `knife_civilwar`         | Knife           | 1024 x 1024 |
| Dutch's Knife           | `knife_dutch`            | Knife           | 1024 x 1024 |
| Hosea's Knife           | `knife_hosea`            | Knife           | 1024 x 1024 |
| Hunting Knife           | `knife`                  | Knife           | 1024 x 1024 |
| Javier's Knife          | `knife_javier`           | Knife           | 1024 x 1024 |
| Jawbone Knife           | `knife_jawbone`          | Knife           | 1024 x 1024 |
| John's Knife            | `knife_john`             | Knife           | 1024 x 1024 |
| Kieran's Knife          | `knife_kieran`           | Knife           | 1024 x 1024 |
| Lance Knife             | `knife_trader`           | Knife           | 1024 x 1024 |
| Lenny's Knife           | `knife_lenny`            | Knife           | 1024 x 1024 |
| Micah's Knife           | `knife_micah`            | Knife           | 1024 x 1024 |
| Ornate Dagger           | `knife_vampire`          | Knife           | 1024 x 1024 |
| Sean's Knife            | `knife_sean`             | Knife           | 1024 x 1024 |
| Uncle's Knife           | `knife_uncle`            | Knife           | 1024 x 1024 |
| Wide-Blade Knife        | `knife_miner`            | Knife           | 1024 x 1024 |
| Cleaver                 | `cleaver`                | Hatchet         | 1024 x 1024 |
| Double Bit Hatchet      | `hatchet_doublebit`      | Hatchet         | 1024 x 1024 |
| Hatchet                 | `hatchet`                | Hatchet         | 1024 x 1024 |
| Hewing Hatchet          | `hatchet_hewing`         | Hatchet         | 1024 x 1024 |
| Hunter Hatchet          | `hatchet_hunter`         | Hatchet         | 1024 x 1024 |
| Stone Hatchet           | `hatchet_stone`          | Hatchet         | 1024 x 1024 |
| Viking Hatchet          | `hatchet_viking`         | Hatchet         | 1024 x 1024 |
| Aguila Machete          | `machete_collector`      | Machete         | 2048 x 1024 |
| Machete                 | `machete`                | Machete         | 2048 x 1024 |
| Zavala Machete          | `machete_horror`         | Machete         | 2048 x 1024 |
| Broken Pirate Sword     | `broken_sword`           | Melee Weapon    | 2048 x 1024 |
| Hammer                  | `hammer`                 | Melee Weapon    | 1024 x 1024 |
| Ancient Tomahawk        | `tomahawk_ancient`       | Throwing Weapon | 1024 x 1024 |
| Dynamite                | `dynamite`               | Throwing Weapon | 1024 x 1024 |
| Fire Bottle             | `molotov`                | Throwing Weapon | 1024 x 1024 |
| Javier's Throwing Knife | `throwing_knives_javier` | Throwing Weapon | 1024 x 1024 |
| Throwing Knife          | `throwing_knives`        | Throwing Weapon | 1024 x 1024 |
| Tomahawk                | `tomahawk`               | Throwing Weapon | 1024 x 1024 |
| Toxic Moonshine         | `poisonbottle`           | Throwing Weapon | 1024 x 1024 |

The key is the name used in `Config.Weapons` and in the state bag. See [For developers](/script-documentation/cas-weapon-studio/developers.md).

{% hint style="info" %}
A design keeps its weapon once it was exported. To use the same idea on another weapon, start a new design.
{% endhint %}

## The sheet and its four views

The Texture Sheet reads like a drawing of the gun. It shows the weapon four times, all at one scale:

| View       | What it shows                                        |
| ---------- | ---------------------------------------------------- |
| Left side  | The gun seen from its left. The muzzle points left   |
| Right side | The gun seen from its right. The muzzle points right |
| Top        | The gun seen from above                              |
| Bottom     | The gun seen from below                              |

Each view is outlined and named on the sheet. What you put on a view lands on that side of the weapon in the 3D Preview.

| Control                                   | What it does                                                                                                                                           |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Whole, Left side, Right side, Top, Bottom | Dims the sheet around one view so you can work on it. A new picture, lettering or emblem lands in the view you picked (the Left side when Whole is on) |
| Mesh lines                                | Shows or hides the weapon's mesh lines on the sheet                                                                                                    |
| Wheel, `+`, `-`, `1:1`                    | Zoom the sheet from 50 % to 400 %, and back to 100 %                                                                                                   |
| Middle mouse button, or `Alt` and drag    | Move the sheet                                                                                                                                         |

The sheet keeps transparency. Where you put nothing, the weapon stays as the game made it.

## Layers

The Layers tab lists the layers, the top one first. "Add" offers six kinds:

| Layer       | What it is                        |
| ----------- | --------------------------------- |
| Base colour | One colour over the gun           |
| Pattern     | One of 20 patterns in two colours |
| Lettering   | Words in one of two typefaces     |
| Emblem      | One of 19 emblems                 |
| Picture     | Your own PNG, JPG or WebP         |
| Paint       | Brush strokes                     |

Click a layer to choose it. The eye hides or shows it. Every layer has these settings:

| Setting   | What it does                                                  |
| --------- | ------------------------------------------------------------- |
| Covers    | Whole gun, Metal or Wood (see [Zones](#zones-metal-and-wood)) |
| Strength  | How solid the layer is, 0 % to 100 %                          |
| Up, Down  | Moves the layer in the stack                                  |
| Duplicate | A copy of the layer, next to it                               |
| Mirror    | A copy at the mirrored spot across the sheet, left to right   |
| Delete    | Removes the layer                                             |

Colours come from 16 swatches (Charcoal, Black, Bone, Cream, Gold, Brass, Oxblood, Red, Navy, Slate, Forest, Olive, Brown, Tan, Grey, Silver) or a hex value you type, such as `#C49E56`.

## Zones: Metal and Wood

Every weapon knows where it is metal and where it is wood. "Covers" keeps a layer to one of them:

* **Whole gun**: the layer covers everything.
* **Metal**: only the steel parts.
* **Wood**: only the grip, stock and forend.

This is how one design gets nickel steel and pearl grips: a Base colour that covers Metal, and a Pattern that covers Wood. The ready looks are built this way.

## The ready looks

At the top of the Layers tab, "Looks" holds 12 ready designs. One click builds the look out of ordinary layers for the weapon you have open. You can change every layer after.

{% hint style="warning" %}
A look takes the place of the layers you have. Undo brings your own layers back.
{% endhint %}

| Look             | Metal                                    | Wood                                               |
| ---------------- | ---------------------------------------- | -------------------------------------------------- |
| Gold Engraved    | Gold Scroll Engraving                    | Ivory                                              |
| Nickel and Pearl | Nickel                                   | Pearl                                              |
| Blued Scroll     | Blue steel Scroll Engraving              | Wood Grain                                         |
| Case Hardened    | Case Hardened                            | Wood Grain                                         |
| Damascus         | Damascus                                 | Wood Grain                                         |
| Lawman           | Nickel                                   | Ivory, with a Sheriff's Star on each side          |
| Outlaw           | Black                                    | Dark Wood Grain, with an inlaid Skull on each side |
| Rattlesnake      | Dark brown                               | Snakeskin                                          |
| Frontier         | Grey brown                               | Brass Tacks, with a red band across                |
| Cavalry          | Dark steel with a yellow stripe along it | Wood Grain, with Crossed Sabres on each side       |
| Royal            | Gold                                     | Oxblood with gold Scroll Engraving                 |
| Bone and Brass   | Brass                                    | Bone coloured Wood Grain                           |

## Patterns

The Pattern tool adds a pattern layer. Pick the pattern on the right:

Scroll Engraving, Checkering, Damascus, Wood Grain, Snakeskin, Pearl, Case Hardened, Brass Tacks, Pinstripe, Chalk Stripe, Ticking, Banker's Stripe, Gingham, Buffalo Check, Tartan, Windowpane, Houndstooth, Herringbone, Polka Dot, Harlequin.

Settings: First colour, Second colour, Scale (0.3x to 4x) and Turn (-90° to 90°).

## Pictures

The Picture tool opens a file window. Pick a PNG, JPG or WebP, up to 6 MB. A clear PNG keeps its shape.

* The studio scales a picture down to at most 1024 px on its long side and stores it as WebP, so the design stays small.
* Settings: Width, Height, Turn and Effect. "Choose another picture" swaps the file and keeps the place.
* A picture that cannot be made small enough is refused: "A picture is too large to store. Use a smaller or simpler picture."

## Lettering

The Letters tool adds a lettering layer.

| Setting             | What it does                  |
| ------------------- | ----------------------------- |
| Words               | Up to 40 letters              |
| Type                | Lino or Slab                  |
| Curve               | Bends the line, -120° to 120° |
| Colour              | The colour of the letters     |
| Outline             | None, or one of 9 colours     |
| Width, Height, Turn | Size and angle                |
| Effect              | Plain, Inlaid or Worn         |

## Emblems

The Emblem tool adds an emblem. Pick its shape on the right:

Lawman's Star, Lone Star, Sheriff's Star, Skull, Eagle, Horseshoe, Heart, Spade, Club, Diamond, Initials Frame, Tally Notches, Crossed Sabres, Cross, Ring, Shield, Banner, Arrow, Crescent.

Settings: Colour, Width, Turn and Effect. A new emblem lands small on the grip or stock end of the view.

The Tally Notches emblem is a drawing in your design. It is not the same as the [kill notches](/script-documentation/cas-weapon-studio/kill-notches.md) the game adds for kills.

## Effect: Plain, Inlaid, Worn

Pictures, lettering and emblems have an Effect:

| Effect | Look                                                          |
| ------ | ------------------------------------------------------------- |
| Plain  | Drawn as it is                                                |
| Inlaid | A fine texture and a small shadow, as if set into the surface |
| Worn   | Speckled and slightly faded, as if rubbed off                 |

## Moving a layer

With the Move tool, drag a picture, lettering or emblem on the sheet. The corners size it. The red knob turns it.

## Paint

| Tool  | What it does                                                                                                                             |
| ----- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Brush | Paints on the sheet. Colour and Size are in the bar above the sheet                                                                      |
| Erase | Rubs out paint strokes. It works on a paint layer only: choose one first                                                                 |
| Fill  | Click the sheet to recolour the chosen Base colour, Lettering or Emblem layer. With another layer chosen, or none, it adds a Base colour |
| Pick  | Click the sheet to take a colour from it                                                                                                 |

Painting with no paint layer chosen makes a new Paint layer. "Clear the strokes" empties a paint layer.

## Copy the left side to the right

Under the layer list, "Copy the left side to the right" copies what is on the Left side view to the same spot on the Right side view:

* Pictures, lettering, emblems and paint are copied.
* Each copy keeps its distance from the muzzle.
* Lettering is not flipped. It stays readable on both sides.
* The copies are new layers named " right", so you can still move each one.

Base colour and Pattern layers are not copied: they already cover both sides.

## AI Design

AI Design paints a finish on the weapon's sheet from a description. It uses your own key at fal, Google or OpenAI. See [Configuration](/script-documentation/cas-weapon-studio/configuration.md#ai-design).

Open it with the AI Design button in the top bar or the last tool in the rail.

| Control                     | What it does                                                                                                                       |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Describe it                 | Type what it should look like, up to 1500 letters. Example: "Nickel steel with scroll engraving, gold inlay lines and pearl grips" |
| Quick design                | No typing: pick a look and the AI makes a fitting design for this weapon                                                           |
| A look to start from        | Engraved Nickel, Gold and Pearl, Lawman, Outlaw, Snakeskin, Damascus, Frontier                                                     |
| Paint                       | All sides, or only Left side, Right side, Top or Bottom                                                                            |
| Keep my other layers on top | On: the AI picture goes just above the Base colour, under your other layers. Off: it goes on top of everything                     |
| Generate                    | Sends the request                                                                                                                  |

What happens:

1. The studio sends a flat drawing of the weapon (the four views in steel grey and wood brown) and your description to the provider.
2. The answer is cut to the weapon's shape, and to the view you picked.
3. It is added as a Picture layer marked AI. You can move, size and hide it like any picture.

Limits: one request at a time for the whole server, a few seconds between two requests of the same staff member, and a request gives up after 150 seconds. The studio says "about 20 seconds" for a normal answer.

The bottom line of the studio shows "AI: fal" (or your provider) when it is on, "AI off" when it is not.

{% hint style="info" %}
AI requests are billed by your provider, on your own key.
{% endhint %}

## Saving

Save stores the design in the database. The status in the top bar says where it stands:

| Status                  | Meaning                                              |
| ----------------------- | ---------------------------------------------------- |
| NOT SAVED               | A new design that was never saved                    |
| SAVED                   | A saved draft. Not in the game                       |
| WAITING FOR THE RESTART | Exported. Live after the next restart                |
| LIVE                    | In the game                                          |
| UPDATE WAITING          | Live, and a newer export waits for the next restart  |
| NEEDS EXPORT            | It was live, but its files are gone. Export it again |

Rules for a save:

* The name has 1 to 48 letters.
* The layers of one design may take up to 4 MB.
* Saving a live design does not change what players see. Only a new export does.

## The Saved tab

The Saved tab lists every design with its status, weapon and slot. Filter by All, Waiting, Live, Drafts (and Needs export when there are any).

| Button               | What it does                                                      |
| -------------------- | ----------------------------------------------------------------- |
| Open                 | Loads the design into the studio                                  |
| Hand out             | Opens the Export window for it, to change who gets it             |
| Delete, then "Sure?" | Deletes the design. Its slot is free again after the next restart |

Deleting a design takes it away from every player who had it.

## What a skin covers

A skin covers:

* the weapon's body,
* its moving parts (cylinder, hammer, lever, trigger),
* the standard and shop grips, barrels, stocks and forends.

Scopes, sights, wraps and cartridges stay as the game made them.

{% hint style="warning" %}
Code only, not verified in game: a gunsmith part that hangs on a moving part, such as a pump-action forend, keeps its skin still while the part moves during a reload.
{% endhint %}
