> For the complete documentation index, see [llms.txt](https://docs.cuxial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cuxial.com/scripts/core/cuxial-appearance/installation.md).

# Installation

Install Cuxial Appearance step by step: dependencies, items, convars and start order.

Cuxial Appearance needs no SQL import. It creates its tables on first start and fills the shop list with the default shops.

{% stepper %}
{% step %}

## Check the dependencies

These must be installed and working first:

* `ox_lib`
* `oxmysql`
* `cuxial_bridge`, with one of the supported frameworks: QBox, QBCore or ESX
* OneSync enabled on the server

Optional, each one unlocks a part of the script:

* An inventory (`ox_inventory` or `qb-inventory`): garments as items, outfit items, bags, trimmer and second hand.
* A target (`sleepless_interact`, `ox_target` or `qb-target`): the outfit bag placed on the ground.
* `cuxial_appearance_photos` plus `screencapture` or `screenshot-basic`: catalogue photos.
* `cuxial_emotes`: poses in the menu and the trimmer.
  {% endstep %}

{% step %}

## Remove other clothing scripts

Stop any other appearance or clothing resource. Two of them fight over the same ped and the same events.

{% hint style="danger" %}
The resource creates tables named `appearance` and `outfits`. If your database already has tables with those names from another script, back up the database before the first start.
{% endhint %}
{% endstep %}

{% step %}

## Copy the resources

Place `cuxial_appearance` and `cuxial_appearance_photos` inside your `resources` directory. Keep the folder names as they are.
{% endstep %}

{% step %}

## Add the items

Add these items to your inventory. The example is for `ox_inventory`:

{% code title="ox\_inventory/data/items.lua" %}

```lua
['cuxial_clothing'] = {
    label = 'Garment',
    weight = 220,
    stack = false,
    close = true,
    description = 'A garment from your wardrobe. Use it to put it on.',
    client = { export = 'cuxial_appearance.useClothing' },
},

['cuxial_garmentbag'] = {
    label = 'Garment bag',
    weight = 300,
    stack = false,
    close = false,
    consume = 0,
    description = 'Holds loose garments.',
},

['cuxial_outfit'] = {
    label = 'Outfit set',
    weight = 350,
    stack = false,
    close = true,
    description = 'A complete outfit, packed. Use it to wear it.',
},

['cuxial_outfitbag'] = {
    label = 'Outfit bag',
    weight = 800,
    stack = false,
    close = true,
    description = 'Holds up to 5 outfits to wear anywhere.',
},

['cuxial_trimmer'] = {
    label = 'Trimmer',
    weight = 350,
    stack = false,
    close = true,
    description = 'Shaves a head clean. Hair takes a while to grow back.',
},
```

{% endcode %}

Then copy the icons from the `install` folder of the resource into the image folder of your inventory.

{% hint style="info" %}
The item names can be changed in `shared/config.lua` (`wardrobe.item`, `wardrobe.bag.item`, `outfits.setItem`, `outfits.bagItem`, `trimmer.item`). `cuxial_garmentbag` is only used in inventory mode.
{% endhint %}

{% hint style="warning" %}
Garment items must never stack: each one carries its own piece, drawable and texture.
{% endhint %}
{% endstep %}

{% step %}

## Set the convars

All of them are optional.

{% code title="server.cfg" %}

```cfg
# Language (en and es are included)
setr ox:locale "en"

# Inventory mode: 1 = on, 0 = off (default)
setr cuxial_appearance:inventory 0

# Discord webhook for the logs
set cuxial_appearance_webhook "https://discord.com/api/webhooks/..."

# Lets the photo studio save its photos
add_filesystem_permission cuxial_appearance write cuxial_appearance_photos

# Debug traces in the console
setr cuxial_appearance_debug "0"
```

{% endcode %}

{% hint style="warning" %}
Inventory mode needs an `ox_inventory` that provides the clothing panel and the garment bag containers. On a stock inventory leave it at `0`: taking garments off and putting them on from the wardrobe command still works.
{% endhint %}

{% hint style="info" %}
The webhook goes in `server.cfg`, never in `shared/config.lua`. The name of the convar can be changed in `logs.convar`.
{% endhint %}
{% endstep %}

{% step %}

## Start the resources

Start Cuxial Appearance after its dependencies, your framework, your inventory and your target:

{% code title="server.cfg" %}

```cfg
ensure ox_lib
ensure oxmysql
# your framework here (qbx_core, qb-core or es_extended)
# your inventory and your target here
ensure cuxial_bridge
# optional
ensure cuxial_emotes
ensure screencapture
ensure cuxial_appearance_photos
ensure cuxial_appearance
```

{% endcode %}

No SQL to run. On first start the resource creates its tables and inserts the shops of `data/shops.lua`.
{% endstep %}

{% step %}

## Connect your multicharacter

A new character needs the creator. Your multicharacter resource has to call it once the character is spawned:

```lua
exports.cuxial_appearance:InitialCreation(function()
    -- the player has finished the creator
end)
```

Resources that trigger `qb-clothes:client:CreateFirstCharacter` need no change. Cuxial Multichar already does this. The saved appearance is applied on its own every time a character loads.
{% endstep %}

{% step %}

## Check that it works

1. Join with a new character. The creator opens.
2. Walk into a clothing shop and press <kbd>E</kbd>. The menu opens with the price of that shop.
3. Change a garment and confirm. The money is taken and the look is kept after reconnecting.
4. As staff, run `/adminclothing`. The panel opens with the list of shops.
5. Check the server console: there must be no warning about a missing item.
   {% endstep %}
   {% endstepper %}

Next: adjust prices, shops and restrictions in [Configuration](/scripts/core/cuxial-appearance/configuration.md).


---

# 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://docs.cuxial.com/scripts/core/cuxial-appearance/installation.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.
