Log in to reply

Stopping the same cars from spawning in traffic

  • I am trying to replace as many cars in the game as possible by their real counterparts. What happens after replacing 20/30 cars is that only two/three car models spawn:

    1. The car that you drive spawns
    2. Cars that were parked will now spawn.

    I thought that I would look into vehicles.meta . There are the following lines in the code for every vehicle:

    <identicalModelSpawnDistance value="20" />
    <maxNumOfSameColor value="10" />

    <defaultBodyHealth value="1000.000000" />
    <pretendOccupantsScale value="1.000000" />
    <visibleSpawnDistScale value="1.000000" />
    <trackerPathWidth value="2.000000" />
    <weaponForceMult value="1.000000" />
    <frequency value="100" />
    <maxNum value="999" />

    I put in bold what I think is important for the car spawn. Even when I change the frequency value and maxNum value to 0, identicalModelSpawnDistance to 1000, and maxNumofSameColor to 0, the game somehow overrides the vehicles.meta and still spawns the cars that I told it not to spawn.

    I understand that the game doesn't like replacing vehicles with models that weigh 5-15 Mb, but I would rather have the game crash on me when I swap too many cars, than seeing the same 3 models all over again. Does anyone have any idea how to add more variety to the traffic even with modded cars? Thanks.

  • @Scavenger23
    This post explains the values, but you pretty much have all the important ones highlighted there :thumbsup:


    The '<swankness>' value can affect frequency of spawns also, certainly on 'SWANKNESS_5'. That makes vehicles really rare to spawn, irrespective of other values & even works like that if a vehicle is the only one set to spawn on the streets, & even if it has a really high '<frequency value'.
    Any spawn rate differences in 'SWANKNESS_1>4' are pretty hard to see, & possibly don't even have any effect (I never tested them to fully confirm, but it looked like they didn't have any effect on spawning).

    <maxNum value=:

    <maxNum value=1 should work & only allow one of that specific vehicle to spawn. That has always worked for me. Try setting it to '1' instead of '0'. :thumbsup:

    <frequency value=:

    Have a look through your installed 'vehicles.meta' files & make sure the '<frequency' values are all roughly in the same range of numbers. I use values between 15 & 100, but there are no hard rules about it. Just make sure there are no odd crazy values in there.
    For example, if most vehicles are set to 15>100, but one vehicle has a value of 20000 etc. That might cause some funky behaviour & unbalance the spawning system.


    Also, perhaps make sure you don't have any scripts that might be negatively affecting or messing with traffic spawning (rename 'scripts' folder (if exists) temporarily & test load game to confirm etc).

    vehicles.meta location:

    What 'vehicles.meta/s' are you editing? What are their locations in the game files?
    You want to edit the main 'vehicles.meta' here:

    ...\mods\update\ update.rpf \common\data\levels\gta5\vehicles.meta

    & for dlc vehicles, if more than one 'vehicles.meta' exists for any given dlc, you want to make sure you edit the ones in this folder structure:

    ...\mods\update\ update.rpf \ dlc_patch \

    If for any given dlc, no 'vehicles.meta' exists within dlc_patch then you're safe to edit the ones in 'dlcpacks' folder structure here:

    ...\mods\update\x64\ dlcpacks \


    In 'settings.xml' here:

    C:\Users\ YOUR WINDOWS USERNAME HERE \Documents\Rockstar Games\GTA V\settings.xml

    there is a '<VehicleVarietyMultiplier value':

        <VehicleVarietyMultiplier value="1.000000" />

    Make sure it is set to at least 1.000000, or perhaps test increasing the value further to see what difference it makes etc.


    From a diagnostic point of view, it might be helpful to use 'popgroups.ymt' here:


    to remove any vehicles you have added to traffic one by one (or in groups, whatever works for you) & confirm that they are all functioning correctly & none of them are messing with vehicle spawning. If one of your added vehicles is a bit funky, it might be messing the whole spawning system up & causing issues for other vehicles etc


    The gameconfig.xml file has traffic related values in it. Not spawn frequency values per se, but traffic density & spacing values etc (all in the '<ConfigPopulation>' section).
    Perhaps test out the vanilla version of the file just to rule it out etc.
    If you have any issues with a vanilla gameconfig crashing the game, just use the vanilla '<ConfigPopulation>' section to replace the one in your modded gameconfig.
    As always, make a backup of any files before you edit them.

    Hopefully something there^ helps you out. Any specific questions or you run into any other issues, give me a shout :thumbsup:


    the reason the game starts spawning only a few models is probably on account of you replacing the game models with high poly real life models with large ytd texture archives. The game simply can't handle it all, goes into panic mode trying to restrict the memory use for vehicles to prevent crashing, which it eventually does

    Lore-Friendly LOD vehicles are basically the only sane choice when it comes to replacing

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.