> For the complete documentation index, see [llms.txt](https://docs.gta.clothing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gta.clothing/basics/good-to-know/auto-cloth-data-resolving.md). Agents can also search and read this documentation through its [MCP server](https://docs.gta.clothing/~gitbook/mcp).

# Auto Cloth Data Resolving

Learn about our automatic Cloth Data resolving Feature

## Introduction

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-0340d7be025b7cf7d065b0bfbbddd790bdf103ab%2Fimport-poster.webp?alt=media" alt="Imported clothing in the drawable list."><figcaption><p>Imported clothing in the drawable list.</p></figcaption></figure>

Durty Cloth Tool provides a robust feature known as **Auto Cloth Data Resolving**, designed to streamline the process of importing and configuring clothing items by automatically extracting key details from the file names of the clothing resources. This feature is particularly useful for large clothing packs, such as **EUP Packs**, by automating the setup of drawables, textures, alternation models, and mesh physics files.

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-23b6e35c656947c39fc65fa0b7fb81e9b72188a6%2Fitem-list-resolved.png?alt=media" alt="The appearance item list after adding clothing files: each item sorted under its drawable type, such as Head Prop, Shoes and Top, with its gender, position, triangle count and thumbnail."><figcaption><p>Added files land under the drawable type and gender their names and models tell</p></figcaption></figure>

## How It Works

The auto-resolve feature identifies and resolves relevant attributes of the clothing files based on their naming patterns. It supports key properties like **drawable type**, **gender**, **skin type**, **related textures**, **alternation models**, and **mesh physics files**. However, for the system to function correctly, certain guidelines in the file structure and naming must be followed.

### Attributes Resolved by the System

1. **Gender**:
   * The system recognizes gender from file name prefixes such as `mp_m_` for male clothing or `mp_f_` for female clothing.
   * If the filename does not identify the gender, folder imports can use a containing folder named exactly `male` or `female`, up to the folder you selected. **Add from folder(s)** under **Add > Only male** or **Add > Only female** takes priority over automatic detection.
   * If neither the name nor the folder says it, DCT may suggest the gender from the model. Otherwise the **Drawable Options** dialog asks once per folder and uses your answer for the other models in that folder whose gender cannot be told.
2. **Drawable Type**:
   * The tool identifies the type of clothing item (e.g., tops, shoes, masks) from specific keywords in the file name, such as `jbib`, `feet`, `berd`, etc.
   * If the file name does not contain one, the tool reads the model itself: hair and shoes are recognized without asking, and props are recognized as props (you still choose where they attach). For other models the type is suggested in the **Drawable Options** dialog, because the same kind of item can be placed in different slots.
3. **Skin Type**:
   * The system automatically assigns **skin type** based on the filename. If the clothing item requires skin tone data (e.g., shoes that reveal the legs or arms), it assigns the appropriate classification.
   * Universal skin tone items are marked with `_u` (universal, no skin tone data) or `_r` (skin tone-specific clothing). This is resolved from the filename. For a model whose name does not resolve, its texture names can settle it; otherwise you choose. The model itself can only suggest the skin type in the **Drawable Options** dialog.
4. **Related Textures**:
   * Texture files (`.ytd`) with matching prefixes to the drawable (`.ydd`) files are automatically grouped and assigned. The texture files must follow the naming pattern of their associated drawable for correct resolution.
   * A model with a free-form name, such as `hoodie.ydd`, takes the textures that repeat its name and add the variation letter: `hoodie_a.ytd`, `hoodie_b.ytd` or `hoodie_diff_a.ytd`, optionally followed by a skin suffix such as `_uni`.
   * Clothing textures added without their model, for example in a second **Add** or from another folder, go to the drawable of the project whose model they are named after: the same prefix, drawable type and number, as `jbib_diff_003_b_uni.ytd` for `jbib_003_u.ydd`. Textures that match no drawable, or more than one, are named in the log; add their model first, or add them to the right drawable in **Item Details**.
5. **Alternation Models**:
   * The system can also automatically detect **alternation models**. These are additional drawable models that complement the main clothing piece and are typically denoted by suffixes such as `_1`, `_2`, etc.
   * For example, these alternation models might be used for clothing variations that accommodate large masks or other accessories, preventing visual clipping of hairs.
   * An alternation model is never a drawable of its own. It comes in with its main model when the drawable type can use one, see [Model Alternations](https://docs.gta.clothing/game-mechanics/model-alternations.md). After the **Add**, the status bar says how many came in with their main model and how many were left out, for example the `_1` of a mask, which cannot use one, or one whose main model was not part of the **Add**. The log names the files left out.
6. **Mesh Physics Files**:
   * If the clothing requires a mesh physics file (`.yld`), the tool will attempt to resolve it automatically by searching for a file with the same base name but ending in `.yld`.

{% hint style="info" %}
See [Files Naming](https://docs.gta.clothing/game-mechanics/files-naming.md) for more details regarding the required game files naming.
{% endhint %}

## Important Folder Structure Requirements

For the auto-resolve system to work correctly, **all related files** (such as textures, alternation models, and mesh physics files) must be placed in the **same folder** as the primary clothing drawable. The tool relies on this folder structure, along with the matching file name patterns, to accurately link related files together.

* **Textures**: Must share a matching prefix with the drawable file to be resolved.
* **Alternation Models**: Must have the same base name as the primary model, with suffixes like `_1`, `_2`, etc., to indicate the alternation.
* **Mesh Physics Files**: Should share the same base name as the clothing model and end in `.yld` for automatic resolution.

{% hint style="info" %}
When adding local files or folders, automatic related-file discovery also includes matching CodeWalker `.ytd.xml`, `.yld.xml` and `_1`, `_2` or `_3` `.ydd.xml` companions in the same folder. Main model XML files use the `.ydd.xml` extension and the usual drawable name. Keep referenced DDS textures at the paths recorded in the XML. Files with unrelated names still need to be assigned manually.
{% endhint %}

## Handling Missing Information

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-a1e3a3dbb3ae6d6d72697ce89633e1ca549f20d8%2Fdrawable-options-review.png?alt=media" alt="The Drawable Options window asking about hoodie.ydd: a preview of the model, the line Pre-selected from the model: Top, the Gender and Drawable type lists, the link How to name files so DCT can tell, the buttons Add and Skip this model, and below them Just add all and Cancel all"><figcaption><p>Drawable Options asking about a model whose name DCT could not read</p></figcaption></figure>

If a file name doesn’t fully resolve all the necessary properties and the model itself cannot settle them, the tool will prompt the user with a **Drawable Options** dialog (as shown in the image), prefilled with any information the system was able to extract, including a suggestion with a short note. It asks you to choose what DCT could not tell from the file name, and while you add several models it shows which one it is asking about, for example **Model 3 of 12** (the number counts every model of the add, also those that needed no question). When the suggestion is right, **Add** is all that is needed. From there, users can manually adjust or fill in missing details like:

* **Gender**: Asked once per folder when nothing tells it; the answer is used for the other models in that folder.
* **Drawable type**: Specific item type, such as hats, shoes, masks, or torso items. One list holds the components first and the props after them, so picking a prop type makes the item a prop.
* **Skin type**: For heads, bodies, legs and shoes, which can use skin tone adjustments, users can select the appropriate type (`_u` for universal/`_r` for skin tone data).

**Add** (or **Enter**) adds the model with your choices. **Skip this model** (or **Esc**) leaves that model out and goes on with the next one. While you add several models, a second row below holds the choices for the whole add: **Just add all** uses these choices for the remaining models wherever their files do not tell, and **Cancel all** cancels the whole add, so none of its models is added. The link **How to name files so DCT can tell** opens [Model and Texture File Naming](https://docs.gta.clothing/game-mechanics/files-naming.md): files named that way are added without this question.

## Use Case: Large Clothing Packs (EUP Packs)

When working with large clothing packs like **EUP Packs**, this feature becomes highly valuable. Users can mass import hundreds of files, and the system will resolve most of the critical details automatically. This minimizes manual setup time and ensures accuracy when integrating third-party resources.

## Drag and drop directly from OpenIV / CodeWalker

Making it **easier than ever to import files**. With this feature, you can:

* **Effortlessly import files by simply dragging and dropping** them into the tool, whether they're from Windows File Explorer, OpenIV, or CodeWalker.
* Save time and streamline your workflow by **eliminating the need to manually export & import files** one-by-one.
* Enjoy a **more user-friendly and intuitive experience adding files** from GTA V file explorers

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2F1VNF6kV75slN8MKTeRrn%2Fimage.gif?alt=media&amp;token=850d40f7-3fc5-43ad-8855-38385708ef71" alt=""><figcaption><p><strong>Example of dragging and dropping files from OpenIV and CodeWalker</strong></p></figcaption></figure>

## Benefits of Auto Cloth Data Resolving

* **Efficiency**: The ability to resolve multiple properties (textures, alternation models, etc.) automatically from file names significantly speeds up the workflow.
* **Accuracy**: By following proper naming conventions, the tool reduces the risk of errors during manual input.
* **Mass Import Support**: Ideal for working with large clothing packs, allowing for fast and reliable import and configuration.

## Summary

Durty Cloth Tool’s **Auto Cloth Data Resolving** feature is an essential tool for cloth maintainers dealing with large collections of clothing items. It ensures fast, accurate, and reliable resolution of cloth properties based on file names, reducing manual work and increasing productivity. By adhering to recommended file-naming conventions and keeping related files in the same folder, users can fully benefit from this powerful feature.
