<!-- fivemad.com, Markdown source of https://fivemad.com/docs/tools/ymt-creator -->
> Source: https://fivemad.com/docs/tools/ymt-creator
> Section: Tools
> Tags: clothing, ymt, addon clothes, freemode, shop meta
> Tool: https://fivemad.com/tools/ymt-creator
> Last updated: 2026-09-22
> Site map for assistants: https://fivemad.com/llms.txt

# YMT Creator

Turn a folder of addon clothing .ydd and .ytd files into a streamable pack: ped variation .ymt, shop meta, fxmanifest and correctly renamed stream files.

The YMT Creator builds the ped variation `.ymt` for an addon clothing pack from the names of its `.ydd` and `.ytd` files. Drop the pack, and you get the `CPedVariationInfo` XML, the shop `.meta` that registers the collection, the `fxmanifest.lua`, and every stream file renamed to the name the game expects. It is for server owners who stream clothing for `mp_m_freemode_01` and `mp_f_freemode_01`.

## What it is for

Addon clothing needs three things to show up in game: files named in a strict pattern with the collection prefix, a `.ymt` that lists every drawable and texture per component, and a shop meta loaded with `SHOP_PED_APPAREL_META_FILE`. Get one number wrong and a top is invisible, a texture is purple or the whole pack does not load.

Use this tool when you:

- bought or made a clothing pack that ships loose files (`jbib_000_u.ydd`, `jbib_diff_000_a_uni.ytd`) and no ymt,
- want to add, remove or reorder drawables in an existing pack without renaming 300 files by hand,
- have a `.ymt.xml` from someone else and want to check or edit it.

## Quick start

1. Open **Add files**, **Files** tab, and drop the pack folder (or use **Pick a folder**). Put male files in a `male` folder and female files in a `female` folder, or use files that already carry the `mp_m_freemode_01_<name>^` prefix.
2. Set **Collection name** in the **Pack** panel. It must be unique on your server, lowercase.
3. Fix what the issue list in the right column points out. Click an issue to jump to the drawable.
4. Reorder drawables with the arrow buttons if you want another order in game. The number on each card is the number the drawable gets.
5. In **Export**, **Files** tab, press **Download my_clothes.zip** (named after your collection). It contains `stream/` with every file renamed, `fxmanifest.lua`, the `.meta` files and a `convert_in_codewalker/` folder with the ymt XML.
6. Convert the XML in CodeWalker (steps in the **Convert** tab) and put the `.ymt` files in `stream/`.
7. `ensure` the resource, restart the server and reconnect.

Want to see it with data first? The **Names** tab has **Fill an example**, and opening the tool with `?example` in the URL loads the same made up pack.

## Input file names

The tool reads everything from file names, so they must follow the game's pattern. Folders are allowed, and the `^` prefix is optional on input.

| File | Pattern | Example |
|---|---|---|
| Component model | `<slot>_<000>_<u or r>.ydd` | `jbib_000_u.ydd` |
| Component texture | `<slot>_diff_<000>_<letter>_<race>.ytd` | `jbib_diff_000_a_uni.ytd` |
| Alternate model | `<slot>_<000>_<u or r>_<1-9>.ydd` | `hair_000_u_1.ydd` |
| Cloth physics | `<slot>_<000>_<u or r>.yld` | `jbib_000_u.yld` |
| Prop model | `p_<anchor>_<000>.ydd` | `p_head_000.ydd` |
| Prop texture | `p_<anchor>_diff_<000>_<letter>.ytd` | `p_head_diff_000_a.ytd` |

- `_u` drawables use `_uni` textures. `_r` drawables draw skin and use a race suffix, usually `_whi`.
- Texture letters run `a` to `z`, so at most 26 textures per drawable.
- Prop textures have no race suffix.
- Only diffuse textures (`_diff_`) belong in the ymt. Normal and specular maps are skipped with a message.
- Names that almost match (1 or 2 digit numbers, a missing `_u`, a missing race suffix) are still read and get a note on the card. The export renames them to the standard form.
- `.ymt.xml` files dropped here are imported (see Import below).

**Gender** comes from, in this order: a `mp_m_freemode_01...` or `mp_f_freemode_01...` prefix, then the nearest folder called `male`, `female`, `men`, `women`, `m`, `f` and similar (also inside names like `[female]` or `my_pack_female`). Files with neither go to **Gender for files without one**, and the log tells you how many did.

**Collection name**: if all dropped files share one prefix (`mp_m_freemode_01_mybrand^...`) and the pack is still empty with the default name, the name is taken from that prefix.

### Names tab

When the files are on your server and not on this PC, paste the names, one per line, with or without folders and the `^` prefix. The output of `dir /b /s` or `ls -R` works too. Press **Add names**. Everything works the same except the zip, which needs the real files.

### Import tab

Open a ped variation `.ymt.xml` exported from CodeWalker (**Open .ymt.xml**) or paste it and press **Load pasted XML**. It replaces the drawables of that gender (undo brings them back). The gender comes from the file name (`mp_f_freemode_01...`), otherwise from the Male / Female switch next to the button. The collection name is read from the file.

Kept from an import: propMask, alternates, cloth flag, texture races, audio, flags, heel and hat values, inclusions and exclusions, prop render flags, and `aSelectionSets` as raw XML. The log lists anything odd in the file (unused component blocks, prop ids with gaps, wrong texture counts) and ends with a **Re-export check** line that says whether the generated XML has the same content as the file.

## Pack settings

| Field | What it does | Default |
|---|---|---|
| Collection name | The collection (DLC) name. Files become `mp_m_freemode_01_<name>^jbib_000_u.ydd`. Lowercase letters, digits and `_`; other characters are replaced when you leave the field. | `my_clothes` |
| Gender for files without one | Where files go when neither prefix nor folder says the gender. | Male |
| Male ped / Female ped | Under **Ped names and header flags**. Change only for an addon ped with its own ymt. | `mp_m_freemode_01`, `mp_f_freemode_01` |
| bHasTexVariations and bHasDrawblVariations true | Writes `true` in both header fields. The game's DLC clothing ymts write false, grzyClothTool writes true, both load. | off |

The **Pack** panel also has **Undo** (last add, move, delete or import, 40 steps) and **Clear** (removes every drawable, keeps name and peds). Your pack is saved in the browser. Dropped files themselves are not kept after a reload, so drop them again before you download the zip.

## Drawables

The **Drawables** panel has a **Male** and **Female** tab with counts. Drawables are grouped by slot, each group shows its drawable and texture count and an **Add** button for an empty drawable. **Start another slot...** plus **Add drawable** at the bottom starts a slot that has nothing yet.

Each card shows the number it will get (`000`, `001`...), the race suffix, one chip per texture letter (amber when the race does not fit the drawable), and the source file with its memory size. The buttons move it one number up or down, or remove it. Click the card to open it.

### Card fields

| Field | What it does |
|---|---|
| Slot | Moves the drawable to another component or prop anchor. It is appended at the end of that slot. |
| Race suffix | `_u` or `_r`. Switching updates the textures (`_uni` or `_whi`) and the skin bit of propMask. Components only. |
| propMask | `1` plain (`_u` clothing), `17` with skin (`_r` clothing), `19` with skin variant. Presets also list 3, 5, 9 (game hair), 11 (game hair, masks) and 65. |
| numAlternatives | Extra models named `_u_1.ydd`, `_u_2.ydd` (hair under hats). 0 to 9. |
| Cloth physics | **Has .yld cloth** when a `.yld` ships with the model (ownsCloth). Set automatically when you drop one. |
| Audio | `pedXml_audioID` for components, `audioId` for props. Suggestions per slot, like `shoe_trainers`, `shoe_heels`, `cloth_upper_jacket_leather`, `cloth_lower_pants_denim`. `none` is fine. New shoes default to `shoe_trainers`. |
| High heels | Shoes (feet) only. Heel height, the game's heels use `1`. `0` is off. |
| Hair scale under the hat | Hats (`p_head`) only. Squashes hair so it does not poke through. Game hats use `0.5`. `0` is off. |
| renderFlags | Props only: none, `PRF_ALPHA`, `PRF_DECAL`, `PRF_CUTOUT`. |
| compInfo flags / propFlags | Bulky, Job, Sunny, Wet, Cold, Not in car, Bike only, Not indoors, Fire retardant, Armoured, Lightly armoured, High detail, Default helmet, Random helmet, Script helmet, Flight helmet, Hide in first person, Use physics hat 2, Pilot helmet, Wet: more wet, Wet: less wet. |
| Textures | One row per letter with its race (`uni`, `whi`, `bla`, `chi`, `lat`, `ara`, `bal`, `jam`, `kor`, `ita`, `pak`) and file. **Add texture** adds the next letter, up to 26. |

The right side of an open card shows **Streams as** (the final file names) and the Lua line to put it on a ped.

### Components and props

| Id | Component | Holds | Prop anchor | Holds |
|---|---|---|---|---|
| 0 | `head` | Heads | `p_head` | Hats |
| 1 | `berd` | Masks | `p_eyes` | Glasses |
| 2 | `hair` | Hair | `p_ears` | Earrings |
| 3 | `uppr` | Arms (torso) | `p_mouth` | Mouth |
| 4 | `lowr` | Legs | `p_lhand` | Left hand |
| 5 | `hand` | Bags and parachutes | `p_rhand` | Right hand |
| 6 | `feet` | Shoes | `p_lwrist` | Watches |
| 7 | `teef` | Chains, ties | `p_rwrist` | Bracelets |
| 8 | `accs` | Undershirts | `p_hip` | Hip |
| 9 | `task` | Body armor | `p_lfoot` | Left foot |
| 10 | `decl` | Decals | `p_rfoot` | Right foot |
| 11 | `jbib` | Tops | `p_ph_l_hand` | Left hand (ph) |
| 12 | | | `p_ph_r_hand` | Right hand (ph) |

> [!IMPORTANT]
> Drawable numbers are positions. The game reads the Nth model of a slot as drawable N, so numbers must run 000, 001, 002 without gaps. The tool numbers drawables in list order and renames the files to match, so a gap in your source files closes up and later files get new numbers.

## Checks

| Severity | Check |
|---|---|
| Error | No collection name; a game collection name (`male_heist`, `female_freemode_beach` and the like); empty ped name; drawable with no texture; more than 26 textures; more than 256 drawables in one slot; two models with the same number; texture in a folder of the other gender than its drawable; file without a valid game header (broken, encrypted or renamed); a file over 48 MiB of memory; a gender whose drawables have no textures at all. |
| Warning | Collection name with capitals or symbols; name over 40 characters; textures without a matching `.ydd`; files not used (with the reason); the same texture letter twice (`_a_uni` and `_a_whi`); race suffix mismatch; skin bit on a `_u` drawable; `_r` drawable without the skin bit; `.ydd.xml` models instead of binary; files over 16 MiB of memory; files over 16 MB on disk; ownsCloth without a `.yld`; numAlternatives higher than the alternates dropped; heel height on something that is not a shoe; hair scale above 1. |
| Note | Gaps in drawable numbers (files get renamed); texture letters with gaps or not starting at `a`; names that do not follow the pattern; heel height above 1.5; addon heads (freemode characters use head blends, masks go in `berd`). |

## Output

### Export tabs

- **YMT**: the `mp_m_freemode_01_<name>.ymt.xml` for the selected gender (switch appears when the pack has both).
- **Files**: a table of every stream file, source name on the left and final name on the right; **Download <name>.zip**; and a copy script.
- **Resource**: the folder layout, `fxmanifest.lua`, the shop `.meta`, and the creature metadata XML when needed.
- **Convert**: the CodeWalker steps.

### Stream file names

| File | Name |
|---|---|
| Component model | `mp_m_freemode_01_<name>^jbib_000_u.ydd` |
| Component texture | `mp_m_freemode_01_<name>^jbib_diff_000_a_uni.ytd` |
| Alternate model | `mp_m_freemode_01_<name>^hair_000_u_1.ydd` |
| Cloth physics | `mp_m_freemode_01_<name>^jbib_000_u.yld` |
| Prop model | `mp_m_freemode_01_p_<name>^p_head_000.ydd` (note the `_p_`) |
| Prop texture | `mp_m_freemode_01_p_<name>^p_head_diff_000_a.ytd` |
| Variation data | `stream/mp_m_freemode_01_<name>.ymt` |
| Shop meta | `mp_m_freemode_01_<name>.meta` in the resource root |
| Creature metadata | `stream/mp_creaturemetadata_m_<name>.ymt` (only with heels or hat hair scale) |

Female files use `mp_f_freemode_01` the same way. The `^` stands for a folder: FiveM streams `a^b.ydd` as `b.ydd` inside `a`, the same layout as the game's DLC archives.

### Zip and copy script

**Download <name>.zip** renames the dropped files into `<name>/stream/`, adds `fxmanifest.lua`, the `.meta` per gender, and `convert_in_codewalker/` with the `.ymt.xml` (and `.ymt.rbf.xml` for creature metadata). Files added by typed name or import have no source and are left out; the message after the download says how many. Packs over 1.5 GB are too big for a browser zip, use the script instead.

The copy script comes as **PowerShell** or **bash**. Set **Output folder** (defaults to the collection name) and run it inside the folder you dropped. It copies every file to `<output>/stream/<final name>` and never moves or deletes anything.

```powershell title="rename_my_clothes.ps1"
# Copies the clothing files of "my_clothes" into my_clothes/stream with the names the ymt expects.
# Run it in the "my_clothes" folder. Your files are copied, not moved.
$ErrorActionPreference = 'Stop'
New-Item -ItemType Directory -Force -Path 'my_clothes/stream' | Out-Null
Copy-Item -LiteralPath 'male/jbib_000_u.ydd' -Destination 'my_clothes/stream/mp_m_freemode_01_my_clothes^jbib_000_u.ydd'
Copy-Item -LiteralPath 'male/jbib_diff_000_a_uni.ytd' -Destination 'my_clothes/stream/mp_m_freemode_01_my_clothes^jbib_diff_000_a_uni.ytd'
Copy-Item -LiteralPath 'male/jbib_diff_000_b_uni.ytd' -Destination 'my_clothes/stream/mp_m_freemode_01_my_clothes^jbib_diff_000_b_uni.ytd'
Write-Host "Copied 3 files to my_clothes/stream"
```

### The ymt XML

For a male pack with one top and two textures:

```xml title="mp_m_freemode_01_my_clothes.ymt.xml"
<?xml version="1.0" encoding="UTF-8"?>
<CPedVariationInfo name="my_clothes">
 <bHasTexVariations value="false" />
 <bHasDrawblVariations value="false" />
 <bHasLowLODs value="false" />
 <bIsSuperLOD value="false" />
 <availComp>255 255 255 255 255 255 255 255 255 255 255 0</availComp>
 <aComponentData3 itemType="CPVComponentData">
  <Item>
   <numAvailTex value="2" />
   <aDrawblData3 itemType="CPVDrawblData">
    <Item>
     <propMask value="1" />
     <numAlternatives value="0" />
     <aTexData itemType="CPVTextureData">
      <Item>
       <texId value="0" />
       <distribution value="255" />
      </Item>
      <Item>
       <texId value="0" />
       <distribution value="255" />
      </Item>
     </aTexData>
     <clothData>
      <ownsCloth value="false" />
     </clothData>
    </Item>
   </aDrawblData3>
  </Item>
 </aComponentData3>
 <aSelectionSets itemType="CPedSelectionSet" />
 <compInfos itemType="CComponentInfo">
  <Item>
   <pedXml_audioID>none</pedXml_audioID>
   <pedXml_audioID2>none</pedXml_audioID2>
   <pedXml_expressionMods>0 0 0 0 0</pedXml_expressionMods>
   <flags value="0" />
   <inclusions>0</inclusions>
   <exclusions>0</exclusions>
   <pedXml_vfxComps>PV_COMP_HEAD</pedXml_vfxComps>
   <pedXml_flags value="0" />
   <pedXml_compIdx value="11" />
   <pedXml_drawblIdx value="0" />
  </Item>
 </compInfos>
 <propInfo>
  <numAvailProps value="0" />
  <aPropMetaData itemType="CPedPropMetaData" />
  <aAnchors itemType="CAnchorProps" />
 </propInfo>
 <dlcName>hash_8AB05D7E</dlcName>
</CPedVariationInfo>
```

What the main fields mean:

| Field | Meaning |
|---|---|
| `availComp` | 12 numbers, one per component: the index of its block in `aComponentData3`, `255` when the pack has none. |
| `numAvailTex` | Total textures of all drawables in the component. |
| `propMask` | `1` plain clothing, `17` for `_r` drawables that draw skin. |
| `texId` | Texture race for components: 0 uni, 1 whi, 2 bla, 3 chi, 4 lat, 5 ara, 10 pak. For props, the texture position. |
| `distribution` | Random pick weight, 255 on every game texture. |
| `compInfos` | One entry per drawable: audio, expressionMods (heel height in the 5th value), flags. |
| `aAnchors` | Per prop anchor, the texture count of each prop drawable. |
| `dlcName` | Hash of the collection name. Must match `dlcName` in the shop meta. |

### Resource files

```lua title="fxmanifest.lua"
fx_version 'cerulean'
game 'gta5'

files {
  'mp_m_freemode_01_my_clothes.meta',
  'mp_f_freemode_01_my_clothes.meta'
}

data_file 'SHOP_PED_APPAREL_META_FILE' 'mp_m_freemode_01_my_clothes.meta'
data_file 'SHOP_PED_APPAREL_META_FILE' 'mp_f_freemode_01_my_clothes.meta'
```

```xml title="mp_m_freemode_01_my_clothes.meta"
<?xml version="1.0" encoding="UTF-8"?>
<ShopPedApparel>
  <pedName>mp_m_freemode_01</pedName>
  <dlcName>my_clothes</dlcName>
  <fullDlcName>mp_m_freemode_01_my_clothes</fullDlcName>
  <eCharacter>SCR_CHAR_MULTIPLAYER</eCharacter>
  <creatureMetaData>mp_creaturemetadata_m_my_clothes</creatureMetaData>
  <pedOutfits />
  <pedComponents />
  <pedProps />
</ShopPedApparel>
```

The `.meta` registers the collection. Without it the game never loads the `.ymt` and the addon drawables do not exist. It goes next to `fxmanifest.lua`, not in `stream/`. A pack with only one gender gets one meta and one line.

```text
my_clothes/
  fxmanifest.lua
  mp_m_freemode_01_my_clothes.meta
  stream/
    mp_m_freemode_01_my_clothes.ymt
    mp_m_freemode_01_my_clothes^jbib_000_u.ydd
    mp_m_freemode_01_my_clothes^jbib_diff_000_a_uni.ytd
    mp_m_freemode_01_my_clothes^jbib_diff_000_b_uni.ytd
```

### Heels and hats

Set **High heels** on a shoe or **Hair scale under the hat** on a hat and the **Resource** tab adds `mp_creaturemetadata_<m|f>_<name>.ymt.rbf.xml`. Keep the `.ymt.rbf.xml` name so CodeWalker converts it in the right format, then stream the resulting `mp_creaturemetadata_m_<name>.ymt`. The shop meta always names it in `creatureMetaData`; when you use neither heels nor hat hair scale, that file simply does not exist, which is harmless.

### Converting to binary

1. Download `mp_m_freemode_01_<name>.ymt.xml` (YMT tab) into an empty folder. Keep the double extension.
2. In CodeWalker open **RPF Explorer**, then **File, Open Folder** on that folder.
3. Turn on **Edit mode** and use **Edit, Import XML** (or drag the file in). CodeWalker writes the `.ymt`.
4. Do the same for the other gender and for any creature metadata file.
5. Put the `.ymt` files in `stream/` with the renamed `.ydd` and `.ytd`, keep the `.xml` files out of it.
6. `ensure` the resource, restart the server and reconnect.

## Using the clothes in scripts

Addon drawables come after the game's own, so their global number shifts whenever the game adds clothes. Use the collection natives with your collection name and the local number shown on each card:

```lua title="client.lua"
local ped = PlayerPedId()

-- top 000 of my_clothes, texture a
SetPedCollectionComponentVariation(ped, 11, 'my_clothes', 0, 0, 0)

-- hat 000 of my_clothes, texture a
SetPedCollectionPropIndex(ped, 0, 'my_clothes', 0, 0, true)

-- how many tops the pack added
print(GetNumberOfPedCollectionDrawableVariations(ped, 11, 'my_clothes'))
```

More on these natives: [collection based natives](https://docs.fivem.net/docs/scripting-manual/using-new-game-features/collection-based-natives/).

## Common mistakes

- **Nothing shows up.** The `.meta` is missing from `files` or `data_file`, the ymt is still XML, or its name does not match the `^` prefix of the files.
- **Invisible or wrong drawable.** A gap in the numbers, or the ymt lists more drawables than there are files. Stream the renamed files from the zip or script, not your originals.
- **Purple or missing texture.** Texture letter or race suffix does not match: `_u` needs `_uni`, `_r` needs `_whi`.
- **Skin looks broken.** `_r` drawable with propMask 1. Use 17.
- **Two packs clash.** Every pack on the server needs its own collection name.
- **Server console size warnings.** FiveM warns above 16 MiB of memory per asset and calls anything over 48 MiB oversized. Downsize the textures (2048 px is usually enough for clothing).

> [!TIP]
> Adding clothes to a pack later? Import the pack's `.ymt.xml`, then drop the pack's files plus the new ones. Files with a number the ymt already has are attached to that drawable, new numbers are added at the end of their slot, so existing drawables keep their numbers.

## Limitations

- It writes XML. The binary `.ymt` comes from CodeWalker.
- It does not open or edit the models or textures. Use the other clothing tools for that.
- Only `mp_m_freemode_01` and `mp_f_freemode_01` style packs are the target. Custom ped names work for the file names, but the shop meta still says multiplayer.
- Dropped files stay in your browser and are not uploaded. Only names, sizes and headers are read until you build the zip.

## Related tools

- [Clothing Designer](/docs/tools/clothing-designer)
- [Drawable Studio](/docs/tools/drawable-studio)
- [Texture Editor](/docs/tools/texture-editor)
- [YTD Optimizer](/docs/tools/ytd-optimizer) for oversized textures
- [joaat Hash Calculator](/docs/tools/hash-calculator)
