👚
Durty Cloth Tool - Documentation
WebsitePricingDiscordDownload Latest
  • Welcome
  • Changelogs
  • Getting Started
    • Quickstart
    • License Activation
    • First Cloth Resource
    • Testing Addon Clothes
    • First Addon Tattoo
    • Working Together
    • Frequently Asked Questions
  • Basics
    • Essential Knowledge
      • User Interface
      • Build Options
      • 3D Previewing Clothes
      • Items Position Number
      • Cloth Analysis Report
      • Optimizing Clothes
      • Cutting Hairs
      • High Heels
      • Audio Presets
    • Good to know
      • App & Project Settings
      • First Person & Tint Effects
      • Integrated Search
      • Auto Cloth Data Resolving
      • Placeholders/Dummy Ids
      • Addon Tattoos
    • Useful to know
      • Shortcuts
      • Import & Export Formats
      • Creator Info
      • Dynamic Config Builders
      • Durty Cloth Projects
      • Logs
      • Themes
  • Game Mechanics
    • Game Limits and Crashes
    • Prop Mask Models
    • Mesh Physics (YLD)
    • Model Alternations
    • Drawable Types & Textures
    • Files Naming
    • Behaviour Flags
    • Shop Meta File
Powered by GitBook
On this page
  • Introduction
  • Purpose
  • Functionality
  • Default Behavior
  • Resorting & Behaviour Options
  • When Items Share the Same Position
  • How It Affects the Absolute Drawable ID
  • Example: Adding New Shoes
  • Influence on In-Game Presentation
  • Relative and Absolute Drawable Id
  • alt:V & FiveM Specific Functionality
  • Example in alt:V & FiveM
  • Best Practices
  • Summary

Was this helpful?

  1. Basics
  2. Essential Knowledge

Items Position Number

Learn about our 'Cloth Position' Feature

Previous3D Previewing ClothesNextCloth Analysis Report

Last updated 5 months ago

Was this helpful?

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.

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.

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

In the Durty Cloth Tool Options Window there are options for adjusting the default behaviour when adding a new cloth drawable or resorting the currently existing ones to end up with properly ordered Positions.

See App & Project Settings for more details.

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 in the game menus.

    For example, if two types of shoes both have a position of 1, the game will decide the final order based on their names (e.g., "Running Shoes" may appear before "Sneakers").

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.

Due to this, every time R* releases a content update containing new cloth resources it will cause a shift in all absolute drawable ids from addon cloth resources. This happens as an additional cloth resource is loaded in between existing addon cloth resources and the basegame ones. Special case for FiveM is when changing the server target gamebuild as this causes the same issue as described.

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 their name.

Relative and Absolute Drawable Id

In the appearance items list on the left side, each clothing item has an indicator which displays [R000] for the related Relative Drawable Id. Which is 0 in this case and a rough estimate of the related Absolute Drawable Id, which is 150 in this case for the male clothing and 158 for the female clothing.

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.

alt:V & FiveM Specific Functionality

There is a special case for alt:V and FiveM, these multiplayer platforms provide an API for developers to directly set a clothing item using the cloth resource name and the item's relative Drawable ID (derived from the Items Position Number). This allows for direct control over which clothing item to load, bypassing the need for calculating absolute Drawable IDs.

Example in alt:V & 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:

  • Resource Name: The name of the clothing resource (e.g., "myclothes").

  • Relative Drawable ID: The position number within the cloth resource (e.g., Items Position Number = 2).

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.

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 the game can resolve any conflicts alphabetically.

  • Leverage alt:V & FiveM API: For alt:V & FiveM developers, take advantage of the API that allows direct control over the drawable ID using the cloth resource 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 multiplayer platforms like FiveM, alt:V, and RageMP.

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.

Check out related documentation for more details. alt:V Wiki: FiveM Wiki:

https://docs.altv.mp/gta/articles/ped/clothing.html
https://docs.fivem.net/docs/scripting-manual/using-new-game-features/collection-based-natives/
Durty Cloth Tool Item Position Field
Durty Cloth Tool Items Position Related Options
Showcase of Relative and Absolute Drawable Id in Durty Cloth Tool