Items Position Number
Learn about our 'Cloth Position' Feature
Last updated
Learn about our 'Cloth Position' Feature
Last updated
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.
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.
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.
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.
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").
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.
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.
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.
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.
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.
Check out related documentation for more details. alt:V Wiki: https://docs.altv.mp/gta/articles/ped/clothing.html FiveM Wiki: https://docs.fivem.net/docs/scripting-manual/using-new-game-features/collection-based-natives/
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.
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.