Alexander / Aebian

Who am I?

Musician, Programmer, Linux Geek and what not.  more...


The Categories



Stuff

Arma CodeList
GitHub Projects
Media (Gallery)
Privacy Policy
My Hardware
My Wishlist


April 20th at 12:53pm
Report a website issue
For best viewing experience use a 4k screen.

nethavn Logo

❬ Back to Blog


AddOn Cars in traffic [GTA V]


Want your added cars in the GTA traffic without the need of having a script running? Or want another vanilla / dlc gta vehicle in traffic? Here's how

Greetings folks,

this post will cover how you can add cars into traffic without a script.

What do you need?

  • OpenIV (http://OpenIV.com)
  • popgroups.ymt
  • popcycle.dat
  • OPTIONAL: dispatch.meta (examples for the three files above are below the blog post at the bottom)

popgroups.ymt (V\mods\update\update.rpf\x64\levels\gta5\popgroups.ymt)

The popgroups.ymt is responsible for defining a set of cars that will be spawned in the game by the popcycle.dat and the general GTA engine.

I have Highway Patrol cars as addon cars included into my game which is pretty neat.
Since I want them to be patrolling on the highway I set them in a group called VEH_HWAYCOP.

By GTA default there will be only the policeb in it. You can create your own groups also! The names are the vehicles.meta model names!
Second thing you can do is to look after VEH_FREEWAY.

There you can define also some cars that should be spawned on the highways. All cars there are in a pool and GTA randomly fetches a car from the list.
You can extend for other areas also, just search trough the file.


popcycle.dat (V\mods\update\update.rpf\common\data\levels\gta5\popcycle.dat)

The popcycle.dat is responsible for populating GTA with cars and peds.

In this example I added the Highway Patrol cars from the popgroups.ymt above into the countryside. So I would then see them driving around more often.
The values PercCopCars and PercCopPed will define how many cops and copcars per percentage will be spawned.

You can change the file also to fit your needs. There are also some sections for the highways in. Just make sure the group exist in the popgroups.ymt
So you can also add more groups into this file and give it a percentage, e.g.: VEH_YOURAWESOMEDLCCARS 15

If you want the areas I recommend:


dispatch.meta (V\mods\update\update.rpf\common\data\dispatch.meta)

Obvious name, obvious function. The dispatch.meta defines which cars will respond in wich area to e.g. accidents.

As you can see, I can also change the file to fit my needs. In this case I defined that on highways there should be my addon cars responding.
Same is possible for EMS and Fire.


Files

Since the files are pretty big, please go directly to https://gist.github.com/Aebian/22f126fdba7b47f1b7ab582fcb8d1db4 Please don't paste them directly into your game.
In these files there are some cars and groups defined you probably don't have.


That's it!

Over and Out,

Aebian