Koja Scripts
Cloth Tool

Items and Textures

An item is one garment or prop.

Items and Textures

Items

An item is one garment or prop. Its options live in the right-hand editor:

OptionWhat it does
Cloth typeComponent (body part) or Prop (hat, glasses, ears, watches…).
Drawable type / slotThe body slot the item fills — Top (jbib), Legs (lowr), Undershirt (accs), Feet, Hands, Mask (berd), Hair, Teeth (teef), Hat (p_head) and so on.
NumberThe drawable number the item takes within that slot.
GenderMale or Female. Items are per-gender; use Copy to other gender to duplicate across.
NameA friendly label for you — not used by the game.
First-person modelAn optional alternate model used in first-person view.
Audio presetThe cloth/foley audio profile.
Mesh physicsCloth simulation data, where the garment provides it.
Behaviour flagse.g. armoured / lightly armoured, remove hat in vehicle (masks).
Hoodie hairsHair-alternation handling so hoods and hats don't clip hair.

Texture variants

Each item can carry multiple texture variants — the colour / pattern options a player scrolls through in-game. They show as swatches in the editor.

  • Import one or more .ytd files; each becomes a variant, lettered a, b, c… in order.
  • Use the 📎 button on a row to attach or replace a variant's .ytd / .dds.
  • Right-click a variant for: Optimize, Replace, Replace with dummy, Show in Explorer, Export (DDS / PNG / XML) and copy helpers (letter, game name, file path).

Embedded textures

Some .ydd models carry textures baked inside the model (typically the normal and specular maps) rather than in an external .ytd.

  • Right-click an item → View embedded textures… to open the viewer. It decodes and shows each embedded texture with its size, format and mip count.
  • The viewer is editable: Optimize (single / all), Replace, Rename (experimental) and Export.
  • 3D Preview — The centre panel renders your garment on an actual mpmfreemode01 / mpffreemode01 ped, with your real .ytd textures applied.
  • Building — When your project is ready, hit Build and choose the FiveM target.
  • Importing — Select an item and click Import .ydd / .ytd (or right‑click an item → import).
  • Interface — The main window is split into three panels.
  • 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