> ## Documentation Index
> Fetch the complete documentation index at: https://ugcore.urging.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Clothing

> Clothing slots around the character, in toggle or items mode.

Fourteen clothing slots sit around the character: `hat`, `glasses`, `ears`, `mask`, `chain`, `top`, `undershirt`, `gloves`, `vest`, `bag`, `watch`, `bracelet`, `legs` and `shoes`. `clothingPieces` picks which ones show and their order: the first half on the left, the rest on the right.

The slots read the player's ped, so they match whatever dressed it.

## Toggle mode

`clothingMode = 'toggle'`, the default. A click takes a piece off with an animation, and a second click puts it back on.

* The ped changes on the client. Each piece is remembered to put it back.
* Nothing becomes an item, so nothing can be duplicated.
* Pieces taken off go back on when the resource stops.

## Items mode

`clothingMode = 'items'`. A piece comes off as an item that MAY be stored, given or dropped, and is worn again by using it or dragging it onto its slot.

* Needs [ug-appearance](https://ugcore.urging.ch/ug-appearance/introduction.md) started before ug-inventory. It saves what is worn.
* ug-inventory registers one item per piece (`clothing_hat`, `clothing_top`, ...) with the model, drawable and texture as metadata.
* Taking a piece off adds the item first, then saves the appearance without it. Wearing an item swaps it with the piece worn.
* Every step is undone when the next one fails, and a player runs one change at a time.
* Clothes made for another model do not fit.

> [!WARNING]
>
> ug-appearance outfits and uniforms still dress for free. Give clothing items no resale value in shops.

## Add-on peds

Pieces taken off use the base game's drawables of the freemode models. Add-on peds show their props only, until `clothingNaked` lists their components:

```lua config.lua theme={"dark"}
clothingNaked = { my_addon_ped = { top = 15, legs = 21 } },
```

The bare legs, feet and undershirt values of the freemode models SHOULD be checked on a live server.

## Animations

Each piece plays an animation from `clothingAnimations` while it changes. See [Look and sounds](https://ugcore.urging.ch/ug-inventory/configuration-look.md#animations).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.