Request to Increase Head Prop Limit in FiveM

Dear Cfx Forum Members,

I propose an increase in the head prop limit per gender in FiveM. The latest game build introduced 19 new heads, reducing the addon head capacity significantly. Currently, we face the need to remove over 10 addon heads due to this limitation.

The existing limit of 255 prop heads per gender seems insufficient with these new additions. An increase in this limit is crucial to avoid the issue of disappearing heads, a problem many servers are already encountering.

Thank you for considering this adjustment to enhance the game experience.

Best regards,
Benton

4 Likes

That’s a GTA V limitation, not a FiveM one. You can find more info here Question about clothing slots and here YMT game limit and crash issues · DurtyFree/durty-cloth-tool Wiki · GitHub

Sadly, R* most likely won’t increase their limit until it’s needed for Online (like they did in b2612).

I remember there being a discussion about increasing the limit through fivem, and how it’s more complicated than it looks, but I can’t find it on the forums so it might have been in a chat.

Anyway, as the github post suggest, you might want to start replacing existing props, if you’re not satisfied with the addon limit.

Yes, you’re correct that the limitation is with GTA V itself, not FiveM. Since FiveM is now owned by Rockstar, they might consider your request to increase the limits, especially if it aligns with their interests. This could potentially lead to an update in GTA V too, enhancing the game experience.

As the GitHub post suggests, a practical workaround for now would be to start replacing existing props if you find the addon limit to be restrictive. This could be a temporary solution until there’s an official update addressing these limitations.

1 Like

You might want to just convert them to be non prop clothing. Generally if you know want you’re doing, making hats decals or another category won’t cause any issues.

You’re right, it doesn’t bother me, it’s just unpleasant that you have to remove x caps and rewrite them with every update.

yeah definitely annoying, I made a huge conversion when I hit the initial limit a few months ago. Hopefully we get a fix soon :+1:

2 Likes

Can anyone provide a resource with enough “addon” ped props to reach and exceed the limit so that I could assess how difficult it will be to “bypass” this limit?

4 Likes

Hello,

I’ve included a test resource with a stream folder that contains 101 identical helmets. Additionally, I’ve created a folder named stream_100heads, which contains only 100 helmets.

Upon surpassing the game limit, the observed behavior is that all addon helmets become invisible, along with some, but not all, base game helmets.

Notably, in the 101 helmets version, there is one fewer base game helmet that becomes invisible. This suggests that adding addon helmets might progressively restore some of the previously invisible helmets.

I have also included two test commands (client.lua file) just to update the helmet :
/headyes : set the current helmet to id 31 which is visible
/headno : set the current helmet to id 32 which is invisible
The test was done in b2802.

Thank you very much for taking time to investigate this problem.

hats.zip (11.7 MB)

1 Like

Hey, thanks for the repro resource.

I’ve found the potential reason behind this behavior. I assume this limit wasn’t initially intended in the game, but due to some compiler optimizations, it led to what we have in the final game. I’m currently trying to understand what regressions this change could cause, but overall it looks good.

And a slightly edited last-indexed hat just to ensure indexes aren’t “luckily” overflowing:

warning: professional 3D modelling skills ahead :')

(of course, all the hats from the original game work as it was intended too)

5 Likes

Hello, any update on the subject?
This fix would really be appreciated. :blush:
Thank you

1 Like

Fingers crossed

I have published a PR intended to address this issue:

There was a bit more functions that needed to be patched than I initially thought, so it took a bit longer.

4 Likes

Actually while we are on this topic of the 255 limit.
This same 255 limit exists for the carcols siren id values across the server.

Client mods as you know exist to mitigate this.
However nothing for FiveM has ever been implemented on the server side.

(This is the client mod: https://www.lcpdfr.com/downloads/gta5mods/scripts/44272-sirensetting-limit-adjuster-fixed-for-every-fivem-build/)

Is that something that may be also adjustable in this same fashion as this PR for server side? Pertaining to the issue of 8-bit vs 32-bit integers.

Thank you for your work, I appreciate it.

1 Like

There are various game limitations, but the nature of these limitations isn’t necessarily the same. Each case should be reviewed separately, based on the dependent game system(s). Some might be easy to fix, while others might be tricky. I would really appreciate it if you could create a separate topic (or find an existing one) and upload a reproduction resource that I could use to test the mentioned limitations.

1 Like

So given this PR is merged, what would be the new limit? since its 8 v 32 bit integers, would that mean four times the initial limit?

I don’t know if there are more limits anywhere in the code, but I expect it to be at least 65535. 32-bit integers are limited to 4294967295, but I believe it’s not a good idea to stream that many ped props :stuck_out_tongue:

There’s still a limit for the number of CPedVariationInfo meta (.ymt) files to be streamed. So I assume this is going to be the closest limit to hit.

1 Like

Really awesome, thanks Disquse

1 Like

the update need to push to beta/stable not only in lasted(unstable)…

Yeah it would be nice if this was pushed to release builds, it seems to be working with no issues atm.