How to increase the ped limit from 256?
-
I am attempting to spawn in many peds but at 256 peds they stop spawning. Is there a way to increase this number or somehow freeze peds so that they persist while allowing more to spawn in? Any help would be greatly appreciated!
-
It's hardcoded as far as I know. The game engine doesn't like being pushed beyond what it was designed for when it comes to ped memory management.
-
@jctwood said in How to increase the ped limit from 256?:
I am attempting to spawn in many peds but at 256 peds they stop spawning. Is there a way to increase this number or somehow freeze peds so that they persist while allowing more to spawn in? Any help would be greatly appreciated!
And the next thing that will happen is you come complaining your game crashes all the time. There' a reason for the limit.
-
That makes sense, I recently discovered the peds pool size in gameconfig.xml and have tried editing that with no luck. I am trying to go through old gameconfigs which do it but can't figure out how to increase the memory allocation to allow more peds to exist.
-
@Cyron43 said in How to increase the ped limit from 256?:
There' a reason for the limit
Yup.
Short-sighted gamedevelopers at R* or their puppeteers at T2 not wanting to support to a thriving modding communtiy is one for starters.@jctwood you have not only edited the peds pool size but also the values more down that included limits on the amount of ambient peds?
All in all there's 3 or 4 numbers involving the ped population
-
@ReNNie Thank you for mentioning the ambient ped values, I had not seen those. I will try tweaking them all now.
-
please tell me also which no. we have to increase in gameconfig file i am searching for it a very long time
-
i increase ped pool value and ambient value and max ped value and all other ped values to 500 but still error can u help me plzzzz
-
It's hardcoded
-
@vaibhavv5220 256 is more than plenty, the issue is that the game, at no point, ever spawns anything close to that amount. The only way to increase ambient peds is to dial back on extended distance scaling. More peds will spawn, but still nothing close to 256. My "A New GTA" mod creates more peds with manually placed scenario spawns. 256 might as well be a million peds, because this 256 "follows you"...it means where ever I happen to be/walking/driving/looking, there is always 256 within my line of sight.
-
Hmm. Everybody is right and everybody is wrong.
No doubt, the cped limit is real. It's coded firmly into the engine in a way where trying to reverse engineering that pool and also cpedfactory in the .exe leads to crashes because the pool is dependent on a whole "unknown" stack of data that instantly crashes the game if someone fucks with it.
That is the layman's explanation. A guy like Alex would be able to explain this part in a much more technical, yet understandable way.
But I digress.
Next we have to ask ourselves, when is 256 too small a number, if ever.
The game can easily be pushed to spawn 256 peds via a trainer, but also ambiently if you know how to edit the gameconfig the right way. Hint : no gameconfig on this site does that, either intentionally or because those that are attempting to do give you "10x peds" simply don't know how, and are consistently raising the wrong numbers or raising the right numbers to a wrong value. Or a combination of the two.
With a correctly boosted gameconfig you can hit both the 256 peds limit and also the 300 vehicles limit.
However, when you do that, you do not get a Los Santos flooded with people like you might would imagine. You do get significantly more peds than before, and it IS very visible, but the reality of the numbers will not match up to your initial hopes and expectations.
Why is that ?
Well, firstly, most of the "new" peds you can spawn with your modified gameconfig will be scenario peds being FORCED to spawn. A large majority of them will be static peds standing at a fixed point performing animations. The other group of peds, the AMBIENT peds using the Wandering task will also be increased, but only ever so slightly compared to the increase in numbers of scenario peds.
The reason for this have not been fully understood, even though it has been meticulously researched for 3 years. What we do know is that data in the navmesh polys(flags) play a part, but the extent of their influence has yet to be determined. Then we have barely legible files like Zonebind.ymt and other potential candidates behind capping the number of allowed Wandering peds in a given area.
There are ways to overcome this though. But they are not perfect, and needs a lot of curation and micro management to work even remotely okay.
I recorded this video a bit more than a year ago. And the methods applied in this video, later inspired other people to create work following this blueprint, including them Eshenk and his population mods.
[link text]
(link url)This video might look overwhelming and impressive at first, but even in this video the 256 ped limit isstill a fact of life. So yes, you see a huge sea of people walking down the promenade, but for every ped you see right there in front of you, another ped is being culled from somewhere else.
What does that entail ?
Basically, given the hard fact that 256 peds are the absolute maximum limit, the game wants to spread those 256 peds out as far as possible within the limits of your in-game/settings.xml settings. Since most of the peds spawning in this game are scenario peds, the game constantly spawns and culls scenario peds in an attemp to give you the illusion of a dynamic world. This is one long dance of give and take. Would you rather have a lot of peds right in your face and no peds in the distance, or do you want to achieve an even distribution of peds both near and far ?
Eshenk's mod is quite good at finding this balance. What he does is manually placing a LOT of scenario peds, using the Walk scenario and then tweaks that scenario type using the method i found in 2018. To enforce that the peds spawn we use a flag called HighPriority, and by doing so, we automatically override the priorities of lesser important spawns pushing our Walk peds to the front of the spawning "line".
We also make sure that the peds don't remain Walk peds for more than a second, in order to allow the game to "transform" them into Ambient peds the moment they exit their Walk scenario. Since both the Walk scenario and their Ambient behavior both uses the same move_m/move_f walking style OnFoot animation clipsets, the transformation is completely invisible to the user.
One of the caveats of this method, is not being able to control all the minute details of the spawning itself. This will sometimes lead to one or two peds popping into existence way too close to the player.
It is jarring and immersion breaking, but it does not happen that often, and the overall improvement of the atmosphere in the game, significantly outweighs the few negatives of the method.There are other ways of spawning 256 peds in a way that is both balanced and strikingly visually impressive. I might delve deeper into telling you about those in a later post.
Until then, as always...
Take care and happy modding
Jevi.
footnote(lol) : The length and degree of detail in this post was directly inspired by this year's 5Mods M.V.T.P (Most valuable teamplayer), no other than the walking helpline himself, Mr. @a63nt-5m1th
-
@grateful_for_mods said in How to increase the ped limit from 256?:
Mr. a63nt-5m1th
Look out Mr. a63nt-5m1th, there's a "new sheriff" in town, LOL
-
no no no no no.
Have you looked at the formatting and the overall structure of his posts ?
His shit sometimes reads like a professional document, top shelf content and style, from top to bottom.So nah.
Nobody is gonna dethrone the HelpKing any time soon.
:o)
-
@grateful_for_mods Of course, long time fan of his.....only MAYBE LeeC202 could compete. Both remarkable in their delivery, is thorough and precise.
-
True. Lee was barely mortal when it came to any aspect of this here shit.
-
@grateful_for_mods He was the ultimate "I know a little about everything" guy.