Koja Scripts
Cloth Tool

Building

When your project is ready, hit Build and choose the FiveM target.

Building

When your project is ready, hit Build and choose the FiveM target. The tool assembles a complete, drop-in resource.

What gets generated

your_pack/
├─ stream/
│  ├─ mp_m_freemode_01_koja/
│  │  └─ jbib/
│  │     ├─ mp_m_freemode_01_koja^jbib_000_u.ydd
│  │     ├─ mp_m_freemode_01_koja^jbib_diff_000_a_uni.ytd
│  │     └─ mp_m_freemode_01_koja^jbib_diff_000_b_uni.ytd
│  ├─ mp_m_freemode_01_koja.ymt        ← registers the drawables
│  └─ ...
├─ mp_m_freemode_01_koja_shop.meta      ← makes items appear in shops/menus
├─ mp_f_freemode_01_koja_shop.meta
├─ pedalternatevariations.meta
├─ first_person_alternates.meta
└─ fxmanifest.lua
  • stream/ — every model and texture, renamed to the exact GTA add-on convention (ped + collection name, component token, drawable number, variant letter, _u / _uni suffixes). Files are sorted into per-ped / per-component subfolders. You never rename anything by hand. See Naming Conventions.
  • .ymt (CPedVariationInfo) — registers each add-on drawable and its texture count. Without this the files stream but nothing shows in the clothing menu.
  • *_shop.meta (one per gender) — the SHOP_PED_APPAREL_META_FILE that lists the items for shops / menus.
  • pedalternatevariations.meta and first_person_alternates.meta — the alternate-variation metas (each can be turned off in the build options).
  • fxmanifest.lua — generated and ready, with every meta registered via data_file.
  • Optionally clothes_info.json — a human-readable dump of every packed item, if you enable it.

Gender handling

Items are per-gender, so a male item builds under mp_m_freemode_01 and a female item under mp_f_freemode_01. Use Copy to other gender on an item if you want it on both peds.

Installing the result

  1. Copy the built folder into your server's resources/ directory.
  2. Add ensure your_pack (or start your_pack) to your server.cfg.
  3. Restart the server (or start the resource).

Auto-generated metadata (.ymt)

The component-variation metadata that makes garments selectable in-game is what turns a folder of files into real, scrollable clothing. Keep an eye on the limits — this metadata is where the 128-per-component ceiling and .ymt file counts come into play.

  • 3D Preview — The centre panel renders your garment on an actual mpmfreemode01 / mpffreemode01 ped, with your real .ytd textures applied.
  • Importing — Select an item and click Import .ydd / .ytd (or right‑click an item → import).
  • Interface — The main window is split into three panels.
  • Items and Textures — An item is one garment or prop.
  • Texture Optimization — Hand-made clothing packs are usually bloated and full of textures the game doesn't like — odd sizes, no mipmaps, wrong compression.
  • Team Collaboration — The Cloth Tool has Git‑based collaboration built in, so a team can work on the same pack without emailing folders around — and you get a full, restorable history of every change.
  • About the Tool — back to the section overview