Koja Scripts
Cloth Tool

Validation

Before a build, the pack is checked against a list of rules.

Validation

Before a build, the pack is checked against a list of rules. Each item in the list carries a status dot, so a problem is visible where the item is rather than buried in a log after a failed build.

The checks are saved in the project, so everyone on a team is held to the same standard.

Severity

Every rule sits at one of four levels:

LevelEffect
offNot checked at all.
infoNoted, nothing more.
warningFlagged, the build still runs.
errorBlocks the build.

Raise a rule to error to make it stop a build; drop it to off if it does not apply to how you work. The panel tells you how many checks differ from their defaults, so a project with unusual settings never looks like a stock one.

Thresholds

These are numbers rather than on/off, under Pre-build checks.

SettingWhat it governs
Largest modelPer file, not per pack — one heavy .ydd stalls streaming even inside a pack that is otherwise fine.
Largest textureAnything bigger is reported as oversized.
Smallest textureBelow this a garment texture is almost always a placeholder. 0 turns it off.
Longest namePast this the game's own naming starts to truncate.
Textures per itemThe game addresses variants by letter, a–z, so 26 is the format's own ceiling.
Size limitTotal pack size that blocks the build. 0 turns it off.
Size warningTotal pack size that earns a warning. 0 turns it off.
Require power-of-two texturesThe game needs them. Turn off only if you know your loader tolerates otherwise.

The rules

Files that are not there, or are not what they claim

RuleWhat it catches
The model file is gone from diskThe .ydd a item points at no longer exists.
A texture file is gone from diskSame, for a texture source.
A texture variant with no file behind itA placeholder that was never filled in.
A file is not really a game assetEmpty (0 bytes), a Git LFS pointer rather than the real file, or missing the RSC7 header that marks a compiled game file.
A file is the wrong type for its fieldThe build copies it as-is and the game will not read it.
A raw image is linked where a .ytd must go
The project has nothing to buildA build would produce an empty pack.

Names and slots

RuleWhat it catches
Item name is empty
Item name is longer than the limit
Name will be changed to be file-safeThe tool tells you what it will become.
The name says one component, the slot says anotherIt builds as the slot, not as the name.
Item gender is neither Male nor Female
The model is rigged for the other pedThe name or model says one gender, the item is set to the other.
A paired item's toggles disagreeOne gender has a flag enabled that its counterpart does not.

Duplicates

RuleWhat it catches
Two items claim one drawable numberNames the items that collide.
Two items in one slot share a name
Two variants share one letterOnly one will load.
One item ships the same texture twiceThey will be identical in game.
Two items ship the same model twiceTells you roughly how much of the pack is the same geometry repeated.
Authored letters are not the letters that shipThe build assigns letters by position — a, b, c — so an out-of-order list does not ship as written.

Textures

RuleWhat it catches
Texture dimensions are not powers of two
Texture is larger than the limit
Texture is small enough to be a placeholder
One item's variants are different sizes
Item has no textures
More texture variants than the format allows26 is the ceiling.

Cloth and hair

RuleWhat it catches
A .yld is set but cloth physics is offThe file ships and does nothing.
Cloth physics on, but no .yld set
The cloth physics file is gone
Cloth physics on a propProps do not support it; the setting and the .yld are dropped from the build.
Hair with no cut-down alternateMasks and hoods will never flatten it.
The hair alternate file is gone
Hair alternate set on a non-hair itemIt is ignored.
A mask that does not hide hairHair will clip through it.
Hair-hiding set on something that cannot hide hairOnly berd (mask) components can.

Fit and size

RuleWhat it catches
High-heel offset outside the feet slotIt raises the whole ped whenever the item is worn.
A single model is over the per-file limitMeshes this size cause pop-in and streaming stalls.
The pack is over its size budgetWarning and hard limit are separate settings.
A slot is over one collection's limitThe build splits it across more collections.

Reading the findings

When many items share a problem, it is collapsed into one line with a count and a few examples rather than repeated forty times.

A finding names the file or the texture it is about, so you can go straight to it.

  • Building — what happens after the checks pass.
  • Limits — the format's own ceilings, which no setting can raise.
  • Naming — the conventions several of these rules enforce.
  • Common Errors — what to do when a build is blocked.
  • 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.
  • 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.
  • About the Tool — back to the section overview