feat(gta-core-five): raise the shop ped apparel item limit#4061
Open
xalva98 wants to merge 1 commit into
Open
Conversation
xalva98
force-pushed
the
ShopPedApparelPool
branch
2 times, most recently
from
July 11, 2026 14:07
48624c2 to
86c6fba
Compare
xalva98
marked this pull request as draft
July 11, 2026 17:23
xalva98
force-pushed
the
ShopPedApparelPool
branch
from
July 11, 2026 22:10
86c6fba to
0b3059d
Compare
xalva98
marked this pull request as ready for review
July 11, 2026 22:12
chromium-cfx
suggested changes
Jul 13, 2026
xalva98
force-pushed
the
ShopPedApparelPool
branch
from
July 13, 2026 09:42
0b3059d to
80188ac
Compare
chromium-cfx
suggested changes
Jul 13, 2026
xalva98
force-pushed
the
ShopPedApparelPool
branch
2 times, most recently
from
July 13, 2026 19:04
42e9777 to
a7ee78b
Compare
…onvar Registering more than ~65,520 shop ped apparel items crashes clients on join: the global name lookup used to resolve apparel items overflows and corrupts memory once it grows past that count, which no convar or pool size can currently work around. Keep a wider (eastl::hash_map) lookup on the side and divert the routine that rebuilds it plus both copies of the lookup helper. The hash lookup is also faster than the engine's binary search (O(1) vs O(log n)). Opt-in and off by default via game_enableExtendedApparelShopLimit.
xalva98
force-pushed
the
ShopPedApparelPool
branch
from
July 14, 2026 11:03
a7ee78b to
28f31eb
Compare
chromium-cfx
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal of this PR
Raise the limit on how much addon clothing (
SHOP_PED_APPAREL_META_FILEitems) a server can use. Today, once a server reaches roughly 65,520 clothing items in total across all packs, players crash while joining — and removing any handful of items anywhere makes it work again, which is what shows it's a fixed limit and not a broken item.That limit can't be raised with any convar or
increase_pool_size, and it's hit well before the streaming pools run out — so in practice it's the real ceiling on how much clothing a server can add (around ~29.5k addon items on build 3095, since the base game already uses a large chunk of it). With it removed, raising the relevant pools finally lets servers add far more clothing. It should also help some setups that currently run into what looks like a "YMT limit," since this limit is reached sooner than that.The change is opt-in and off by default.
How is this PR achieving the goal
The game keeps a single list of every clothing item, looked up by name. That list can only hold about 65,520 entries, and the release build doesn't guard against going past it — so once a server crosses that number the overflow corrupts memory and crashes the client. It happens on join because that's when every clothing pack loads and the list gets rebuilt.
This PR keeps its own, larger list on the side and points the game at it — both the code that rebuilds the list and the code that looks items up in it. When the fix is off (the default), everything behaves exactly as it does today.
Enable it server-side with:
Here's a clip of a large clothing pack (over 30k+ addon clothing) with the convar set to false
https://youtu.be/QoKaBW9ue0E
As you can see the game crashes as soon as the clothing packs load.
Here's a clip of that same clothing pack with the convar set to true:
https://youtu.be/CakPxO7zUjc
The game fully loads in and all 1400+ clothing pieces for jackets are available (and more is possible probably)
This PR applies to the following area(s)
FiveM, Client
Successfully tested on
Game builds: 3258
Platforms: Windows
Checklist
Fixes issues
https://discord.com/channels/779705925577080842/842554061734936596/1525121266275586211
b1da67e0-faf7-471a-a8f7-5f5fbf2df96b.dmp
PS: Even if my fix is not accepted I think everyone would highly appreciate this limit being increased to make full use of the pool size increases