Solved Traffic vehicle group for specific map

Discussion in 'World Editor' started by Murokmakto, Jul 29, 2025.

  1. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    Hello, how do I set a vehicle group as traffic default for a specific map?

    Some vanilla maps (like WCUSA) have a vehicle group within the levels/levelname folder. I did that aswell but how to tell the game to only use this vehicle group for the traffic?

    Thanks!
     
  2. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
  3. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    bump, still no solution found
     
  4. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    bump
    anyone got an idea?
     
  5. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    Has anyone figured this out?
    The same problem applies to the speedlimits the traffic bots drive.

    I created a zone with the corresponding tags:

    "zones":[
    {
    "bot":{
    "active":false,
    "normal":[
    0,
    0,
    -1
    ],
    "pos":[
    56965.576171875,
    7485.5014648438,
    78.832710266113
    ]
    },
    "color":[
    1,
    1,
    1
    ],
    "customFields":{
    "names":[
    "traffictype"
    ],
    "tags":[
    "africa"
    ],
    "types":{
    "traffictype":"string"
    },
    "values":{
    "traffictype":"africa"
    }
    },
    "name":"trafficzone",
    "oldId":3414,
    "top":{
    "active":false,
    "normal":[
    0,
    0,
    1
    ],
    "pos":[
    56965.576171875,
    7485.5014648438,
    91.84489440918
    ]
    },
    "vertices":[
    [
    57181.228515625,
    8058.0961914063,
    84.073699951172
    ],
    [
    56481.21875,
    8371.2998046875,
    84.396957397461
    ],
    [
    56496.9375,
    6790.2983398438,
    83.832710266113
    ],
    [
    57449.93359375,
    6599.703125,
    86.84489440918
    ]
    ]

    I created this vehicle group and put it in the root folder of the map:

    {
    "data":[
    {
    "config":"afr_traffic_miramar_ute",
    "model":"miramar",
    "paintName":"Alpine White",
    "paintName2":"Cream White",
    "paintName3":"Champagne"
    },
    {
    "config":"afr_traffic_pessima_1",
    "model":"pessima",
    "paintName":"Bermuda Blue",
    "paintName2":"White",
    "paintName3":"Steel Gray"
    },
    {
    "config":"DX_M",
    "model":"midsize",
    "paintName":"White",
    "paintName2":"Pearl White"
    },
    {
    "config":"afr_traffic_ETK_800",
    "model":"etk800"
    },
    {
    "config":"afr_traffic_covet",
    "model":"covet",
    "paintName":"White"
    },
    {
    "config":"afr_traffic_ETK_I",
    "model":"etki"
    },
    {
    "config":"d15_fleet_M_facelift",
    "model":"pickup",
    "paintName":"White"
    },
    {
    "config":"h15_vanster",
    "model":"van",
    "paintName":"White"
    },
    {
    "config":"4wd_facelift",
    "model":"roamer"
    },
    {
    "config":"d15_farmhand_M",
    "model":"pickup",
    "paintName":"White"
    }
    ],
    "name":"africa",
    "tags":["africa", "traffic", "generic"],
    "type":"custom"
    }

    The traffic in WCUSA is setup identical. I can´t figure out why it works in WCUSA but does not in my map. The same logic applies to the speedlimits within a zone. It does not work either.

    Has anyone set this up correctly before and has an idea why it does not work in this case?
     
  6. SupraTech

    SupraTech
    Expand Collapse

    Joined:
    Jan 6, 2025
    Messages:
    830
    Got no idea sadly.
     
    • Agree Agree x 1
  7. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
  8. AgentMooshroom5

    AgentMooshroom5
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Oct 29, 2017
    Messages:
    1,259
    As far as I'm aware this doesn't work in west coast either (or if it does its something hardcoded into career specifically maybe), I remember trying to overwirte it for a mod experiment a while back and it changed nothing. There's a chance the police version does work somehow but I'm not entirely sure there, was a while back and don't think I tested that after the first part didn't work.
    This should work and be functional via the region tag in the map and config info files (this is what you should be actually seeing happen in west coast, before that it purely went on the vehicle origin country iirc) so if you make that something unique and relevant and then make sure you have configs set up with a matching region tag it should function how you intend.

    Can't speak for the speed limit part as I'm not familiar with that but I think thats controlled via the individual decal road speed limits more than anything (been ages since I touched this though so might be wrong)
     
    • Like Like x 3
  9. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    Thank you for your reply! This cleared up some, but not all things. So the zones won´t do anything, thats good to know!

    So I tested it.. I added a region tag to the info.json file of the map (any more files I need to change anything?). The vehicle group I created has the same tag.
    Upon spawning traffic on the map, there were indeed different cars than before. But... the game only spawned Cherrier Vivaces... So, obviously, it does not recognize the traffic group I created (where there are multiple cars and configs, see above). I have no idea where it pulls the information from to only spawn Cherrier Vivaces...

    Did I miss something?
    You write:
    is there a difference? I thought the "region tag in the map" is the same as the one in the info.json?
    I assume my vehicle group is correctly set up (see 2 posts above) since its created with the editor and double checked vs the vanilla vehicle groups for any mistakes... I put a copy of the vehicle group both in the root folder of the level aswell as in BeamNGdrive/settings/editor/vehicleGroups. Not sure which of the 2 the game prefers but apparently none since it does not recognize the group I made.
     
  10. AgentMooshroom5

    AgentMooshroom5
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Oct 29, 2017
    Messages:
    1,259
    The game doesn't use the groups at all for this, it looks at the "region" tag in the map info.json file and then looks for vehicle config info_config.json files with a matching region tag to spawn. If the simplified vehicles option is enabled, it checks for configs tagged traffic with this region and if disabled it should look for normal cars with the region tag instead.
    This does mean if you want to use a stock vehicle config you will need to duplicate it so you can add its own info_config.json file that does include the region if you wish to only use a new custom region.
    I did look into this further though and it seems like at the moment this only actually functions properly for the simplified traffic vehicles option at the moment so I will see if I can get this fixed on the game end for a future update, for now you will have to make sure your traffic configurations are only for the simplified vehicles if you want this to work sadly
     
    • Like Like x 2
  11. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    Ah okay, makes more sense now. I doubt I would have figured out myself that the vehicle groups don´t have anything to do with the traffic (but what is their purpose instead?).

    So the map info.json only reads only from the vehicle files? But I can´t see any way the game distinguishes between "normal" configs and simplified. When I open up the folder of a vanilla vehicle, I find the info.json files of all the different vehicle configs, but what about the simplified versions? Do they have their own config files somewhere else, or how does it work?

    ___________
    edit: Ok, are we talking about the info_vehiclename.json files within /content/vehicles/simple_traffic.zip? Some of these do have a region tag within their info file.
    if yes, would it be possible to create new versions of these? because some of them are based on existing vehicle configs, for example:
     
    #11 Murokmakto, Dec 9, 2025
    Last edited: Dec 9, 2025
  12. AgentMooshroom5

    AgentMooshroom5
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Oct 29, 2017
    Messages:
    1,259
    Yes, you would have to copy the configs to create new ones with the region tag set to your own map one instead as there isnt a nicer solution at the moment for this specific thing.
     
    • Like Like x 1
  13. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    Are you sure it works like this? Maybe I am missing something..

    I tested it, but I still only get Cherrier Vivaces spawned in. (simplified traffic turned on)

    • made a copy of info_pessima_standart.json and renamed it to "info_pessima_africa.json" . and also replaced the region tag with "africa"
    • put this copy into /BeamNG.drive/current/vehicles/simple_traffic/ which should be the equivalent to the vanilla folder if I am not mistaken
    • added the region tag "africa" to my map
    I know, there are a hundred minor things in BeamNg that can go wrong... I am sure I have no error in the .json files. so maybe in the file setup?
    So I think there can be several possibilites:
    - it simply does not work this way
    - the game does not read from the folder I put the file into (but if so, from where does it read then?)
    - it is somehow hardcoded into the game to only use the vanilla configs for simplified traffic and therefore its not possible to add new ones

    thank you for your help and patience, I really appreciate it, this is something I am trying to figure out for quite a while now..
     
  14. AgentMooshroom5

    AgentMooshroom5
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Oct 29, 2017
    Messages:
    1,259
    There's a chance this is hardcoded on the game end, for the region field I would guess (but probably shouldn't be), I will properly check this out and see what improvements I can get to happen on the game end when I have more time because its starting to seem like a bit complicated and broken right now annoyingly :(
    I know the region field is supposed to be what determines this though, it was added pretty recently to solve exactly this problem with the simple traffic
     
  15. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    I did more testing and it looks like it is hardcoded to only use vanilla config names for the simplified traffic vehicles.
    It works now (v 0.38).
    One thing left I wonder how to do... is it possible to somehow determine the colour variability of the traffic cars? Within the config files there is the line "default paint name", but it does not make any difference whatever I write into this line. Traffic cars will be random colour nevertheless.
     
  16. AgentMooshroom5

    AgentMooshroom5
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Oct 29, 2017
    Messages:
    1,259
    In a recent update colour population values got added which controls how common a given colour is, though at the moment it is only properly supposrted on a per vehicle basis (in the main car info.json file) instead of per config.
    This is still possible with a bit of trickery (i do it on my mod here) but requires overwriting the default population value to set it to 0 on each config and then redefining a new set of colours and population values available for that specific config. This is good enough to make traffic function with it but doesn't have support in the ui etc at the moment
     
    • Like Like x 1
  17. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    Ah ok I see. I might look into it at a later point, it is not that important atm. Thank you for your tips, I would have never figured this out by myself, I was really stuck on that zoning approach which does not work at all apparently.
     
  18. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    326
    For anyone wondering:
    using custom or modded police cars for traffic is much easier. Just open up the police.vehGroup.json file in the level root folder and add the vehicle configs you want to see on the map.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice