fivem icon indicating copy to clipboard operation
fivem copied to clipboard

tweak(game/five): expand support for weapon info entries

Open Effectss opened this issue 7 months ago • 33 comments

Goal of this PR

Prevent server crashes caused by exceeding the default CWeaponInfoBlob limit.

How is this PR achieving the goal

By increasing the CWeaponInfoBlob allocation limit from 512 to 1024, this PR ensures stability for servers with a large number of custom or modified weapons. Without this adjustment, servers crash when the default limit is surpassed.

This PR applies to the following area(s)

This change impacts the FiveM runtime environment.

Successfully tested on

Wasn't tested on anything

Checklist

  • [ ] Code compiles and has been tested successfully.
  • [ ] Code explains itself well and/or is documented.
  • [ x ] My commit message explains what the changes do and what they are for.
  • [ ] No extra compilation warnings are added by these changes.

Fixes issues

Fixes weapon limits to fix crashing issue once the limit is passed

Effectss avatar Jun 02 '25 11:06 Effectss

I hope CFX pulls this as its a big problem for servers adding in guns

CronusWaxxed avatar Jun 09 '25 08:06 CronusWaxxed

This is desperately needed

TheManduhhShow avatar Jun 09 '25 08:06 TheManduhhShow

This is desperately needed

Yes brigade the GitHub issue, that'll work!

ook3D avatar Jun 09 '25 08:06 ook3D

This would be AMAZING!

ProblemXXL avatar Jun 09 '25 08:06 ProblemXXL

This would be amazing to have since it helps servers!!!

DarkenessQueen avatar Jun 09 '25 08:06 DarkenessQueen

This would be amazing to have since it helps servers!!!

Yes spam it some more, you guys really think brigading this issue with garbage comments like this will do anything to help you? And this shouldn't even be an issue, unless you have horribly optimized weapon resources

ook3D avatar Jun 09 '25 08:06 ook3D

Hear me out... what if you just used CWeaponInfoBlob less. You can have all of your weapons in one blob.

If the limit is raised then i'm sure this limit would be breached again with 512 more garbage definitions.

AdrianIsBored avatar Jun 09 '25 08:06 AdrianIsBored

This would be amazing to have since it helps servers!!!

Yes spam it some more, you guys really think brigading this issue with garbage comments like this will do anything to help you? And this shouldn't even be an issue, unless you have horribly optimized weapon resources

The weapon meta limit is set to 512. Regardless if it is combined in 1 meta file or in separate resources it still counts towards the limit so "optimizing" those resources wont help. You obviously don't know what you are talking about.

CronusWaxxed avatar Jun 09 '25 09:06 CronusWaxxed

Hear me out... what if you just used CWeaponInfoBlob less. You can have all of your weapons in one blob.

If the limit is raised then i'm sure this limit would be breached again with 512 more garbage definitions.

Are you just trying to say put all the metas in 1 meta file because that does not work.

CronusWaxxed avatar Jun 09 '25 09:06 CronusWaxxed

This would be something that would be good to have. Resource optimization isnt really a factor in this, and theres no negative impact to the server by raising. Even if you put them in one "blob" it doesnt matter, they all still count.

riedling11 avatar Jun 09 '25 10:06 riedling11

It would be extremely helpful if we could increase the CWeaponInfoBlob limit to at least double its current capacity. Right now, this limitation makes it difficult—or even impossible—for servers to add more weapons, especially as they grow and become more successful.

By raising the limit, it would open the door for more weapon variety and creativity, allowing community servers to thrive and expand their gameplay options without being restricted by engine constraints.

Thanks for considering this!

supersam792 avatar Jun 09 '25 11:06 supersam792

It's not impossible for servers to add more weapons.

weapon variety

Weapon Components 😁

creativity

Respectfully, I doubt the entities reaching this limit have any creativity

But also, AI Slop... really??

AdrianIsBored avatar Jun 09 '25 11:06 AdrianIsBored

Right now, this limitation makes it difficult—or even impossible—for servers to add more weapons.

GTA 5 has ~102 base weapons. So you have the ability to add 410 unique weapons lol. I can only load 10 audiobanks and I am already hitting a limit. You're making it sound like this is the end of the world. Masterclass ragebait :trollface:

ChatDisabled avatar Jun 09 '25 12:06 ChatDisabled

Is this a joke?

ESK0 avatar Jun 09 '25 12:06 ESK0

This would be amazing to have since it helps servers!!!

Yes spam it some more, you guys really think brigading this issue with garbage comments like this will do anything to help you? And this shouldn't even be an issue, unless you have horribly optimized weapon resources

The weapon meta limit is set to 512. Regardless if it is combined in 1 meta file or in separate resources it still counts towards the limit so "optimizing" those resources wont help. You obviously don't know what you are talking about.

No idea, you're right. I guess every server out there somehow manages to reach you 400 add-on components by knowing what they are doing :D

ook3D avatar Jun 09 '25 13:06 ook3D

I really don’t see any server adding 400+ lore friendly add-on components right now. This limit seems fine as-is unless you’re breaking TOS.

Scullyy avatar Jun 09 '25 14:06 Scullyy

Could you please post one or more crash hashes that are associated with reaching this limit, so we can check if this needs an actual increase?

As other commenters have pointed out, this limit shouldn‘t be reached in any normal circumstances.

tens0rfl0w avatar Jun 09 '25 20:06 tens0rfl0w

I really don’t see any server adding 400+ lore friendly add-on components right now. This limit seems fine as-is unless you’re breaking TOS.

Its really not about being compliant or not. Most of the comments are just comments about keeping it the same the way it is. The servers simply want to add more weapons to their server without being limited to 512. Why is everyone so against it if it doesn't hurt or break anything to just change the value.

CronusWaxxed avatar Jun 09 '25 21:06 CronusWaxxed

I could understand if it actually was a valid reason to not increase it but nobody has stated anything valid, simply don't use that many weapons which is not a valid or logical reason to not increase the value.

CronusWaxxed avatar Jun 09 '25 21:06 CronusWaxxed

I could understand if it actually was a valid reason to not increase it but nobody has stated anything valid, simply don't use that many weapons which is not a valid or logical reason to not increase the value.

how about provide an actual reason why it should be increased with actual metrics and reproduction, limits are there for a reason, not to be increased just because.

increase the limit platform wide because someone wants to use even more weapons than they currently are?

ook3D avatar Jun 09 '25 21:06 ook3D

I could understand if it actually was a valid reason to not increase it but nobody has stated anything valid, simply don't use that many weapons which is not a valid or logical reason to not increase the value.

how about provide an actual reason why it should be increased with actual metrics and reproduction, limits are there for a reason, not to be increased just because

Reason: The current CWeaponInfoBlob limit restricts servers to approximately 409 custom weapon entries, which significantly hinders larger and content-rich servers from expanding their weapon systems. Increasing the blob limit would enable high-population servers to introduce a broader variety of weapons, supporting advanced gameplay mechanics such as specialized factions, role-based loadouts, and tiered progression systems. This adjustment would enhance customization potential, improve player engagement, and accommodate the growing demand for content diversity in modern FiveM communities.

CronusWaxxed avatar Jun 09 '25 21:06 CronusWaxxed

Without using AI maybe ?

Mathu-lmn avatar Jun 09 '25 21:06 Mathu-lmn

I could understand if it actually was a valid reason to not increase it but nobody has stated anything valid, simply don't use that many weapons which is not a valid or logical reason to not increase the value.

how about provide an actual reason why it should be increased with actual metrics and reproduction, limits are there for a reason, not to be increased just because

Reason: The current CWeaponInfoBlob limit restricts servers to approximately 409 custom weapon entries, which significantly hinders larger and content-rich servers from expanding their weapon systems. Increasing the blob limit would enable high-population servers to introduce a broader variety of weapons, supporting advanced gameplay mechanics such as specialized factions, role-based loadouts, and tiered progression systems. This adjustment would enhance customization potential, improve player engagement, and accommodate the growing demand for content diversity in modern FiveM communities.

your reply is exactly why this should not be increased, you dont even know what the limit is. its not weapons, its weapon components.

ook3D avatar Jun 09 '25 21:06 ook3D

I could understand if it actually was a valid reason to not increase it but nobody has stated anything valid, simply don't use that many weapons which is not a valid or logical reason to not increase the value.

how about provide an actual reason why it should be increased with actual metrics and reproduction, limits are there for a reason, not to be increased just because

Reason: The current CWeaponInfoBlob limit restricts servers to approximately 409 custom weapon entries, which significantly hinders larger and content-rich servers from expanding their weapon systems. Increasing the blob limit would enable high-population servers to introduce a broader variety of weapons, supporting advanced gameplay mechanics such as specialized factions, role-based loadouts, and tiered progression systems. This adjustment would enhance customization potential, improve player engagement, and accommodate the growing demand for content diversity in modern FiveM communities.

your reply is exactly why this should not be increased, you dont even know what the limit is. its not weapons, its weapon components.

The limit is 512 I clearly stated that several times. Correction 410 because of GTA native 102 weapons.

CronusWaxxed avatar Jun 09 '25 21:06 CronusWaxxed

The limit is 512 I clearly stated that several times. Correction 410 because of GTA native 102 weapons.

did you even read what i said? its not weapons, its WEAPON COMPONENTS, these are 2 different things

edit: actually it is weapons, making this even worse, how can you have 400 weapons? what are you possibly adding

ook3D avatar Jun 09 '25 21:06 ook3D

I could understand if it actually was a valid reason to not increase it but nobody has stated anything valid, simply don't use that many weapons which is not a valid or logical reason to not increase the value.

how about provide an actual reason why it should be increased with actual metrics and reproduction, limits are there for a reason, not to be increased just because

Reason: The current CWeaponInfoBlob limit restricts servers to approximately 409 custom weapon entries, which significantly hinders larger and content-rich servers from expanding their weapon systems. Increasing the blob limit would enable high-population servers to introduce a broader variety of weapons, supporting advanced gameplay mechanics such as specialized factions, role-based loadouts, and tiered progression systems. This adjustment would enhance customization potential, improve player engagement, and accommodate the growing demand for content diversity in modern FiveM communities.

your reply is exactly why this should not be increased, you dont even know what the limit is. its not weapons, its weapon components.

I am aware there are 2 different things CWeaponComponentInfo / CWeaponInfoBlob

This issue is not about CWeaponComponentInfo that limit is able to be managed but this is a request to increase CWeaponInfoBlob

CronusWaxxed avatar Jun 09 '25 21:06 CronusWaxxed

I could understand if it actually was a valid reason to not increase it but nobody has stated anything valid, simply don't use that many weapons which is not a valid or logical reason to not increase the value.

how about provide an actual reason why it should be increased with actual metrics and reproduction, limits are there for a reason, not to be increased just because

Reason: The current CWeaponInfoBlob limit restricts servers to approximately 409 custom weapon entries, which significantly hinders larger and content-rich servers from expanding their weapon systems. Increasing the blob limit would enable high-population servers to introduce a broader variety of weapons, supporting advanced gameplay mechanics such as specialized factions, role-based loadouts, and tiered progression systems. This adjustment would enhance customization potential, improve player engagement, and accommodate the growing demand for content diversity in modern FiveM communities.

your reply is exactly why this should not be increased, you dont even know what the limit is. its not weapons, its weapon components.

I am aware there are 2 different things CWeaponComponentInfo / CWeaponInfoBlob

This issue is not about CWeaponComponentInfo that limit is able to be managed but this is a request to increase CWeaponInfoBlob

i dont think you understand just how many 400 weapons is, if a server wants to add more than that that is their problem

ook3D avatar Jun 09 '25 21:06 ook3D

The limit is 512 I clearly stated that several times. Correction 410 because of GTA native 102 weapons.

did you even read what i said? its not weapons, its WEAPON COMPONENTS, these are 2 different things

edit: actually it is weapons, making this even worse, how can you have 400 weapons? what are you possibly adding

We are just adding in more weapons. This isnt an issue just specific to 1 server this is an issue for many servers we simply want to add MORE WEAPONS. Look at this post as well: https://github.com/citizenfx/fivem/issues/2992

CronusWaxxed avatar Jun 09 '25 21:06 CronusWaxxed

I could understand if it actually was a valid reason to not increase it but nobody has stated anything valid, simply don't use that many weapons which is not a valid or logical reason to not increase the value.

how about provide an actual reason why it should be increased with actual metrics and reproduction, limits are there for a reason, not to be increased just because

Reason: The current CWeaponInfoBlob limit restricts servers to approximately 409 custom weapon entries, which significantly hinders larger and content-rich servers from expanding their weapon systems. Increasing the blob limit would enable high-population servers to introduce a broader variety of weapons, supporting advanced gameplay mechanics such as specialized factions, role-based loadouts, and tiered progression systems. This adjustment would enhance customization potential, improve player engagement, and accommodate the growing demand for content diversity in modern FiveM communities.

your reply is exactly why this should not be increased, you dont even know what the limit is. its not weapons, its weapon components.

I am aware there are 2 different things CWeaponComponentInfo / CWeaponInfoBlob This issue is not about CWeaponComponentInfo that limit is able to be managed but this is a request to increase CWeaponInfoBlob

i dont think you understand just how many 400 weapons is, if a server wants to add more than that that is their problem

Why do you think it is a bad idea to increase?

CronusWaxxed avatar Jun 09 '25 21:06 CronusWaxxed

i dont think you understand just how many 400 weapons is, if a server wants to add more than that that is their problem

Why do you think it is a bad idea to increase?

because 512 is more than enough for 99.9% of servers. there is no reason to increase it

ook3D avatar Jun 09 '25 21:06 ook3D