> 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/essential-knowledge/items-position-number.md).

# Items Position Number

Learn about our 'Cloth Position' Feature

## Introduction

The **Items Position Number** is an essential feature within the **Cloth Drawable Details** section of Durty Cloth Tool. This field allows users to control the **relative position** of a drawable item within its **drawable type category** (such as shoes, jackets, or hats) in a specific cloth resource. The position number determines the order in which items are **loaded and presented** by the game, and it will in many cases directly influence how clothing items appear in-game, for example, in clothing stores or customization menus.

{% hint style="warning" %}
The **Items Position Number** does not represent the **absolute Drawable ID**. Instead, it affects the **relative Drawable ID** within the cloth resource, which then interacts with the game’s overall loading process, determined by Rockstar's GTA cloth resources and additional / addon cloth resources.
{% endhint %}

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-d930ecceee39cbd180d1888d6ea824961e717275%2Fimage.png?alt=media" alt="Item Details of Male 16 top on the General tab with the Name, Gender, Drawable type and Position fields, Position set to 0."><figcaption><p>Durty Cloth Tool Item Position Field</p></figcaption></figure>

## Purpose

The **Items Position Number** is used to control the **load order** of clothing items within the game. When you add multiple clothing items of the same drawable type (such as multiple types of shoes), their **relative position** in the resource is determined by this number. This, in turn, influences:

* **The order in which the items appear** in various in-game menus, such as clothing stores or player customization screens.
* **How the items are indexed internally** when the game processes the cloth resource.

## Functionality

### Default Behavior

* **Starting at Zero**: When a cloth item is added to a drawable type (e.g., shoes, tops, pants), its default position will be set to `0`. Subsequent items will have their **Items Position Number** automatically incremented by `+1`.
* **Relative to Drawable Type**: The position number is relative to the specific drawable type category. For instance, the position number for shoes is distinct from the position number for jackets or pants. Each drawable type has its independent numbering sequence within the cloth resource.

### Resorting & Behaviour Options

**Options > Items > Fill unused positions** sets where a new cloth drawable lands (or press **Ctrl+K** and paste `@Fill unused`). To renumber the existing ones so no gaps are left between positions, use **Project > Resort item positions** (or press **Ctrl+K** and paste `>Resort`). It asks first, because items can get other numbers in game, so outfits and server scripts that use the old numbers need updating.

For targeted changes, select multiple drawables of the same gender and drawable type, then drag them as one block or use **Edit and organize > Auto-order selection** from the context menu (or press **Ctrl+K** and paste `>Auto-order`). DCT keeps the selected items together and recalculates the affected positions. Dragging is unavailable while a search, a non-project display sort or a filter other than gender, component or prop, and drawable type is active, because the visible order would not represent the saved project order. A filter such as **Gender: Female** keeps every list it shows complete, so dragging works there. **Auto-order selection** needs every filter and sort cleared. Dropping them on a row or the heading of another drawable type moves them to that type instead, see [Change the drawable type](https://docs.gta.clothing/basics/essential-knowledge/user-interface.md#change-the-drawable-type). In the **Sections by tag** view, drawables can only be dragged within their own tag section, where they keep their tags, see [Drawable Filters & Tags](https://docs.gta.clothing/basics/good-to-know/drawable-filters-and-tags.md#sections-by-tag).

To put selected drawables at a position number in one step, use **Edit and organize > Move to position...** (or press **Ctrl+K** and paste `>Move to position`). It works on the full list in project order, so it is also available while a filter, a search or a sort is active. See [Move to position](https://docs.gta.clothing/basics/essential-knowledge/user-interface.md#move-to-position).

To give whole lists new positions in a random order that you can repeat with the same seed, use **Edit and organize > Shuffle drawable order** (or press **Ctrl+K** and paste `>Shuffle`). It keeps the first drawables of each list and reserved dummy slots in place, and high heels in front of flat shoes. See [Shuffle drawable order](https://docs.gta.clothing/basics/essential-knowledge/user-interface.md#shuffle-drawable-order).

Texture variations under one drawable can likewise be dragged as a block. Their position and texture index are updated together.

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-24554287ee7a5d83d88fd3a6bb9e38182e1081b2%2Fimage.png?alt=media" alt="Options > Items with In the item list and Adding items, including Select newly added items in the list and Fill unused positions with its description."><figcaption><p>Durty Cloth Tool Items Position Related Options</p></figcaption></figure>

{% hint style="info" %}
See [App & Project Settings](https://docs.gta.clothing/basics/good-to-know/app-and-project-settings.md) for more details.
{% endhint %}

### When Items Share the Same Position

* **Alphabetical Ordering**: When multiple items of the same drawable type are given the same **Items Position Number**, they will be sorted alphabetically by their name when Durty Cloth Tool builds the resource.

  For example, if two types of shoes both have a position of `1`, Durty Cloth Tool may place "Running Shoes" before "Sneakers" based on their names.

## How It Affects the Absolute Drawable ID

While the **Items Position Number** controls the relative positioning within a cloth resource, it influences the **absolute Drawable ID** based on the overall **load order of resources** in the game.

* **GTA V’s/R\* Cloth Resources**: The game first loads the default Rockstar clothing resources. Any custom or modded resources (like addon cloth resources) will be layered on top of these.
* **Addon Resources**: The final absolute Drawable ID of a clothing item is determined by the combination of Rockstar’s native resources and any addon clothing resources.
* **Ordering Impact**: By adjusting the **Items Position Number**, you can indirectly influence the Drawable ID, because the game assigns Drawable IDs based on the order in which items are loaded. However, this is still managed on a **relative** basis within each drawable type.

{% hint style="warning" %}
Due to this, a content update containing new cloth resources can cause a shift in affected absolute drawable ids from addon cloth resources. This happens when an additional cloth resource is loaded between existing addon cloth resources and the basegame ones.\
\
A special case for FiveM is changing the server target gamebuild, which can cause the same issue as described.
{% endhint %}

### Example: Adding New Shoes

Let’s say you're adding new shoes to a cloth resource:

* **Position 0**: The first pair of shoes added is automatically assigned an **Items Position Number** of `0`.
* **Position 1**: The second pair of shoes is assigned `1`, and so on.

If you want to reorder the shoes (for example, to ensure that a particular pair appears first in the list in a clothing store), you can manually adjust the **Items Position Number**. The game will then use this information to determine how to display the shoes in the list.

### Influence on In-Game Presentation

This ordering directly affects how clothing is presented in-game. For example, in a clothing store interface:

* Items with **lower Items Position Numbers** will in most cases appear first.
* Items with **identical position numbers** will be sorted alphabetically by Durty Cloth Tool while building the resource.

## Relative and Absolute Drawable Id

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-2a51e861896a4a0a48a8d19f02a16be5b1a996fd%2Fimage.png?alt=media" alt="The Shoes list with Male 2 shoes and the selected Female 1 shoes, which shows Relative ID 000 and Absolute ID 177."><figcaption><p>Showcase of Relative and Absolute Drawable Id in Durty Cloth Tool</p></figcaption></figure>

In the appearance items list on the left side, the selected clothing item shows its **Relative ID** (the collection-local drawable ID), which is `000` in this case, and a rough estimate of its **Absolute ID**, which is 177 for these female shoes in this example.

{% hint style="info" %}
The absolute drawable id is not reliable as it is influenced by which game build you are running and which cloth resources are loaded in before this one.
{% endhint %}

{% hint style="info" %}
A drawable type holds at most **256 items per gender**, positions `0` through `255`, and FiveM collection natives can address 255 of them. Automatic resource splitting starts another collection before that boundary. See [Game Limits and Crashes](https://docs.gta.clothing/game-mechanics/game-limits-and-crashes.md).
{% endhint %}

## FiveM Specific Functionality

There is a special case for **FiveM**, which provides an API for developers to **directly set a clothing item** using the generated cloth collection name and the item's **relative Drawable ID**. This allows for direct control over which clothing item to load, bypassing the need for calculating absolute Drawable IDs.

### Example in FiveM

Instead of relying on the load order of the clothing resources to determine the final Drawable ID, developers can use a command to load a specific clothing item by:

* **Collection Name**: The generated clothing collection/DLC name, which is not necessarily the server resource folder name.
* **Relative Drawable ID**: The collection-local drawable index within that drawable type.

This makes it much easier to manage clothing in multiplayer environments, as the system does not rely on how the game loads all resources together, but allows direct access to specific items.

{% hint style="info" %}
**Check out related documentation for more details.**\
\
FiveM Wiki: <https://docs.fivem.net/docs/scripting-manual/using-new-game-features/collection-based-natives/>
{% endhint %}

## Best Practices

* **Start with Defaults**: When creating new cloth resources, allow the tool to assign default positions for new drawables.
* **Manual Adjustments**: Use the **Items Position Number** to fine-tune the load order when needed, especially if you want to control how items are displayed in menus or sorted in-game.
* **Avoid Conflicting Positions**: If two items share the same **Items Position Number**, ensure that their names are distinct so Durty Cloth Tool can resolve the order alphabetically.
* **Leverage the FiveM API**: For FiveM developers, take advantage of the API that allows direct control over the drawable ID using the generated cloth collection name and relative position. This makes managing clothing resources more efficient.

## Summary

The **Items Position Number** is a powerful tool for managing the relative order of clothing drawables within a cloth resource. It helps to control how items are loaded, ordered, and displayed in-game. Although it doesn't directly control the absolute Drawable ID, it significantly influences how items are presented both in singleplayer and on multiplayer platforms like FiveM.

By understanding and using this feature effectively, developers can ensure that their clothing resources are organized and displayed exactly as intended, whether in modding singleplayer DLCs or customizing multiplayer servers.
