> 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/game-mechanics/game-limits-and-crashes.md).

# Game Limits and Crashes

## GTA V Game Engine limits

Internally the game has a fixed amount of .ymt files that can be loaded in total. This limit seems to be ~~80 (before mpg9ec)~~ **around 100 (since mpg9ec)** .ymt files **per gender** in total. With every GTA: Online DLC that is pushed, R\* adds new clothes and therefore takes up more .ymt files - until the limit is reached.

Additionally there is a limit of components/props that can be added per drawable/component type.

## Component / Prop Related Limits

Clothes are categorized into **components** and **props**, where components are everything you wear as clothes (Shirts, Pants, Shoes etc) and props are everything you can put on top of your model (like hats, glasses, watches, ear rings etc.)

{% hint style="info" %}
Internally we call all these types together **drawable types**, the game currently has 25 drawable types in total. Some of them are unused tho.
{% endhint %}

### 128 drawables (component / prop) per type, per gender

Durty Cloth Tool uses **128 cloth items per drawable type and gender** as compatibility guidance for components and props. The tool warns above 128 and refuses to build more than 255 drawables of one type.

> For example, you can have 128 cloth items of type PV\_COMP\_JBIB (Component id 11 / Shirts) for your male in one addon cloth resource. With 26 variations per cloth item, this would be 128 \* 26 = 3.328 shirt variations. Going beyond 128 requires matching runtime support and careful testing.

{% hint style="info" %}
The legacy 128 synchronization boundary does not apply to Singleplayer in the same way. Other file, loading and Durty Cloth Tool limits still apply and should not simply be ignored.
{% endhint %}

{% hint style="success" %}
FiveM builds that include this [component synchronization update](https://github.com/citizenfx/fivem/commit/a6f68afb776e6df44a56816efecfef46fdceb36f) support component IDs `0` through `255`. Both the client and server must include the update. This applies to component synchronization only and does not remove other YMT or build limits.
{% endhint %}

### 255 global prop index boundary

Older runtimes store parts of the **global prop index** in 8 bits. Because base-game and DLC props also use those indices, addon props beyond the global 255 boundary may fail to appear. This is not a limit of 255 items inside one custom collection.

{% hint style="info" %}
Use a FiveM version that includes the prop-index patch. Singleplayer requires a separate limit adjuster, described below.
{% endhint %}

{% hint style="warning" %}
On an unpatched runtime this will usually not cause a crash; props at affected global indices can instead appear invisible.
{% endhint %}

{% hint style="success" %}
FiveM patched the affected 8-bit global prop-index paths ([#](https://github.com/citizenfx/fivem/pull/2421)). This fixes props becoming invisible at the old boundary, but does not make the overall streamed-prop capacity unlimited.
{% endhint %}

#### **Bypassing the prop limits for Singleplayer**

GTA5Mods users Zombieguy and William Halverd have made an ASI version of the FiveM patch for Singleplayer. It removes the affected 8-bit prop-index truncation. Treat it as a fix for invisible props past the old boundary, not as unlimited prop capacity.

> This patch was tested on the game build 3095 Chop Shop Update and it will work at least the older game build / version 2372 (Los Santos Tuners).

To install it, simply drag and drop into the root folder of GTA V. You will need the latest ASI loader and [ScriptHookV](https://dev-c.com/gtav/scripthookv/) for it to work as intended.

**Download the ASI file here:** <https://www.gta5-mods.com/scripts/pedprop-limit-adjuster> (Credits: Zombieguy and FiveM team)

### High heels at global component indices above 255

High-heel height is stored in component expression metadata. Older lookup paths could truncate the **global component index** used to find that expression data. This was an index-resolution issue, not a documented limit of 255 high-heel configurations.

{% hint style="warning" %}
On an affected unpatched path, items beyond the truncated global component index may have no working high-heel effect.
{% endhint %}

{% hint style="success" %}
The affected component-expression lookup was patched on FiveM ([#](https://github.com/citizenfx/fivem/pull/2579)). This fixes the old high-heel lookup boundary, but does not make the overall clothing capacity unlimited.
{% endhint %}

*Durty Cloth Tool warns above 128 and refuses to build more than 255 drawables of one type. Always test the complete resource set on the GTA V and multiplayer build you use.*

## YMT Limit in detail

YMT limit **applies to each gender seperately**.

{% hint style="info" %}
For example, if we talk about 10 additional free .ymt slots available, it means you have 10 .ymt slots for female and 10 .ymt slots for male ped.
{% endhint %}

Lets take a look at **how Rockstar Games takes up the free .ymt slots every update**:

* In game version **b1604** (mpchristmas2018) we had **14 additional free .ymt slots to be used**
* In game version **b1737** (mpvinewood) we had **12 additional free .ymt slots to be used**
* In game version **b1868** (mpheist3) we had **10 additional free .ymt slots to be used**
* In game version **b2060** (mpsum) we had **8 additional free .ymt slots to be used**
* In game version **b2189** (mpheist4) we had **6 additional free .ymt slots to be used**
* In game version **b2372** (mptuner) we had **4 additional free .ymt slots to be used**
* In game version **b2545** (mpsecurity) we have **2 additional free .ymt slots to be used**
* In game version **b2612** (mpg9ec), R\* seems to have increased the YMT limit, we have **about 20 additional free .ymt slots to be used**
* In game version **b2699** (mpsum2), we have **about 16 additional free .ymt slots to be used**
* In game version **b2802/b2824/b2845** (mpchristmas3), we have **about 14 additional free .ymt slots to be used**
* In game version **b2944** (mp2023\_01), we have **about 12 additional free .ymt slots to be used**
* In game version **b3095** (mp2023\_02), we have **about 10 additional free .ymt slots to be used**
* In game version **b3258** (mp2024\_01), we have **about 8 additional free .ymt slots to be used**
* In game version **b3407** (mp2024\_02), we have **about 6 additional free .ymt slots to be used**
* In game version **b3570** (mp2025\_01), we have **about 5 additional free .ymt slots to be used**
* In game version **b3717** (mp2025\_02), we have **about 4 additional free .ymt slots to be used**
* In game version **b3889** (mp2026\_01), we have **about 3 additional free .ymt slots to be used**

### creaturemetadata YMT files

Please note that adding high heels or head-prop hair expression modifiers to your pack can create an additional YMT file known as `creaturemetadata`, which counts towards the game-build YMT capacity. For example, gamebuild **b3095** (mp2023\_02) has ***about*** 10 additional free .ymt slots.

A pack with male and female clothing plus female high heels normally creates three YMT files: male clothing, female clothing, and the shared creature metadata file.

```markdown
mp_m_freemode_01_mp_m_yourpack.ymt
mp_f_freemode_01_mp_f_yourpack.ymt
mp_creaturemetadata_yourpack.ymt
```

{% hint style="warning" %}
If a resource contains only **Remove Hairs** or only **Custom Cut Hairs** head props, verify that the built resource contains `mp_creaturemetadata_<collection>.ymt`. Without it, the hair modifier will not work.
{% endhint %}

### Effects of reaching the YMT limit

Using up more than the additional free .ymt slots for one gender in the given versions, will end up with your **game crashing or other weird issues**.

For example in **FiveM** you will end up with crashes like:

![Example GTA V game crash when hitting the games cloth related YMT limit](https://i.imgur.com/zRSs2zX.png)

* b1604: `oven-happy-sad` || GTA5.exe!sub\_1406B14FC (0xf)
* b2189: `earth-august-saturn` || FiveM\_b2189\_GTAProcess.exe!sub\_1406D21B0 (0xf)
* b2372: `yellow-stairway-december` || FiveM\_b2372\_GTAProcess.exe!sub\_14070E7A8 (0xf)
* b2545: `zebra-east-berlin` || GTA5\_b2545.exe!sub\_140712C8C (0xf)
* b2944: `low-cola-sweet` || GTA5\_b2944.exe!sub\_14071C644 (0xf)
* b3095: `iowa-beryllium-missouri` || GTA5\_b3095.exe!sub\_140722454 (0xf)

While you will be receiving errors in the console similar to:

<figure><img src="https://i.imgur.com/zN3AfEC.png" alt=""><figcaption></figcaption></figure>

```log
InvokeNative: execution failed: Error executing native 0x00a1cadd00108836 at address 0x1407a0b54.
SCRIPT ERROR: Execution of native 00a1cadd00108836 in script host failed: Error executing native 0x00a1cadd00108836 at address 0x1407a0b54.
```

### Why not put all clothes in one big .ymt file

Durty Cloth Tool uses **128 (0-127) cloth items per drawable type and gender** as its conservative compatibility range. Drawable types are jbib, feet, teef etc. - each type representing model parts like pants, shirts, hats. Durty Cloth Tool can build above that warning but stops above 255; test larger packs on the runtime you use.

When this compatibility range is reached, create a new .ymt file if you need to stay within 128 items per drawable type and gender.

### How to prevent YMT amount related issues

The most simple way to avoid these issues is to keep your addon cloth packs to a minimum and count YMT files separately for each gender. The available slots depend on the game build and other loaded resources.

You will always need to keep in mind that every cloth collection created for one gender will create one .ymt file. High heels and head-prop hair expression modifiers can additionally create one shared `creaturemetadata.ymt` file.

#### Examples

Lets say we run some multiplayer mod with the GTA Online Update `mptuner`, which has **about 4 free YMT slots per gender**.

We create one basic addon cloth pack with female and male clothes, without high heels or head-prop hair modifiers. It creates one female and one male clothing YMT, using one slot for each gender.

{% hint style="info" %}
High heels and head-prop hair expression modifiers can generate an additional creature metadata YMT that must also be included in the resource budget.
{% endhint %}

Another example would be creating two basic addon cloth packs, each having male and female clothes without those features. This creates two male and two female clothing YMTs, using two of the four slots for each gender before accounting for other resources.

{% hint style="info" %}
Each of our basic addon cloth pack / resource will take up 2 YMTs (1x male clothes, 1x female clothes)
{% endhint %}

Lets do another one with one advanced addon cloth pack. A pack containing female and male clothes plus high heels or head-prop hair modifiers creates the two clothing YMTs and a shared creature metadata YMT. Count all generated files and test the complete resource set on the selected build.

{% hint style="info" %}
High heels and head-prop hair expression modifiers can add the creature metadata YMT needed to make those features work.
{% endhint %}

## `TxdStore Pool Full, Size == 95500` error

Adding more YTD files than a certain limit by either putting new vehicles, new clothes, new MLOs or similar on your server, will possibly cause a **game pool full** error, which essentially means that you have hit the total amounts of YTD files supported by the game.

> This error was previously known as `pool full size == 85500`

For example in **FiveM** you will end up with crashes like:

![GTA V Texture pool full game crash](https://i.imgur.com/nnQ12vb.png)

{% hint style="warning" %}
Best way to fix this is by trying to **shrink down the amounts of YTDs you are adding to your game/server or by optimizing huge YTD files**. This means you will have to remove/optimize either some content (like vehicles / mlos etc) or some clothes from your clothes resource.
{% endhint %}

{% hint style="info" %}
On FiveM platform its meanwhile **possible to increase the YTD related pool size**, this is usually not considered best practice but it is possible. Please see the FiveM Server Docs to learn how to increase the TxdStore Pool Size: <https://docs.fivem.net/docs/server-manual/server-commands/#increase_pool_size-poolname-increase>
{% endhint %}

## RAGE Error: ERR\_MEM\_MULTI\_ALLOC\_FREE

### **What is ERR\_MEM\_MULTI\_ALLOC\_FREE?**

This error can be related to the **Ped Alternate Variations** feature (`pedalternatevariations.meta`). This feature defines alternative models for clothing or hairstyles to prevent visual glitches when certain clothing items, like large masks or hoodies, are worn. The capacity is 128 results before GTA V build b2189, 160 from b2189 onward, and 512 on FiveM builds that include the related limit fix.

{% hint style="warning" %}
**This error is not only caused by GTA V clothing related things.** A lot of other stuff can also cause this but recently it seems like we are hitting this more often in scenarios related to clothing. Keep this in mind as anything written below might only be a possible cause and solution.
{% endhint %}

### **Possible Cause of the Error**

On an affected legacy build, exceeding the alternate-variation working capacity can cause this error. For example, this can happen when many addon hairstyles or clothing items use the Ped Alternate Variations system. The capacity is build/runtime-dependent and the same crash name can have unrelated causes.

* For instance, on a legacy 160-entry path, 81 existing hairstyles plus 79 custom hairstyles can fill the working set required by a large mask that alters every hairstyle.

### **How to Fix when caused by Alternate Variations Limit**

1. **Temporary Workaround**: You can delete the `pedalternatevariations.meta` file and its reference in the `fxmanifest` file. Keep in mind that this will disable some features, such as removing or cutting hair with large masks or hoods.
2. **DCT v3 Patch .7**: The Durty Cloth Tool includes an option called "Disable extra alternate variations," which helps mitigate the crash by limiting the number of ped alternate variations generated. This prevents the game from hitting the hardcoded limit, although some features like hair cutting with masks might not work as intended.

### **Long-Term Solution for Alternate Variations Limit**

Use a FiveM client build that includes the **512** alternate-variation fix. If the crash still occurs, report it on the [FiveM GitHub](https://github.com/citizenfx/fivem/issues/2760) with the client/server build, crash dump and a resource that reproduces the problem.

{% hint style="info" %}
The related FiveM fix was merged in [PR #3195](https://github.com/citizenfx/fivem/pull/3195). The same `ERR_MEM_MULTI_ALLOC_FREE` crash can also have unrelated causes.
{% endhint %}

## Tattoo related game limits

There is no specific limit to the amounts of tattoos that can be added in total to the game or per tattoo collection. The total amount of tattoos that can be added is limited by the following game limits:

* **TxdStore Pool Size as tattoos are YTD based:** [#txdstore-pool-full-size-95500-error](#txdstore-pool-full-size-95500-error "mention")
* **Imported YTD size:** Durty Cloth Tool rejects imported YTD files that are 100 MB or larger.
* **Generated tattoo files:** Durty Cloth Tool creates one YTD per tattoo instead of placing every tattoo texture in one large YTD.

{% hint style="info" %}
Durty Cloth Tool performs its normal tattoo texture optimization during the build. Optimize unusually large source textures if the resource still consumes too much texture memory.
{% endhint %}

## Replacing vanilla / R\* clothes

In case these limits don't satisfy your needs of adding hundreds of more modding clothes, the only case to workaround these limits is currently by overwriting clothes provided by the game itself. (So called replace mods / clothes)

Durty Cloth Tool supports this through the advanced **Replace GTA DLC clothes** build option. It replaces the complete selected clothing collection, not one individual model or texture. Replacing a collection can remove original items and shift later global drawable IDs, so addon clothing remains the safer default.

> **Pleb Masters: Forge** is a useful tool to **figure out texture & model file paths of clothes** you want to replace, as you will need the file names and collection names for replacing them. See <https://forge.plebmasters.de/clothes/>

<figure><img src="https://i.imgur.com/01P6nHY.png" alt=""><figcaption><p>Pleb Masters: Forge Cloth details with file paths</p></figcaption></figure>

## Credits

Thanks to `FumaPraQue` for his contribution to researching this over at the FiveM forums: <https://forum.cfx.re/t/setplayermodel-crash-when-you-have-too-much-ymts-assigned-to-a-freemode-ped-model/1934063>
