📄 Data Files
vehicles.meta

vehicles.meta

Vehicle naming

<modelName>tow_truck</modelName>
<txdName>tow_truck</txdName>
<handlingId>tow_truck</handlingId>
<gameName>tow_truck</gameName>
<vehicleMakeName>20FORD</vehicleMakeName>

The modelName defines the .yft name within the stream folder. The txdName is the name of the texture dictionary that the vehicle uses. The handlingID links directly to the handling.meta name. The gamename doesn't have a lot of use (that we know of) so is best to set it to the same as the modelname. The vehicleMakeName is what company made the vehicle. E.G:

LabelDisplayed string
ALBANYAlbany
ANNISAnnis
BENEFACBenefactor
BFBF
BOLLOKANBollokan
BRAVADOBravado
BRUTEBrute
BUCKINGBukingham
CANISCanis
CHARIOTChariot
CHEVALCheval
COILCoil
DECLASSEDeclasse
DEWBAUCHDewbauchee
DINKADinka
DUNDREARDundreary
EMPEROREmperor
ENUSEnus
FATHOMFathom
GALLIVANGallivanter
GROTTIGrotti
HIJAKHijak
HVYHVY
IMPONTEImponte
INVERTOInvetero
JACKSHPJacksheepe
JOBUILTJobuilt
KARINKarin
KRAKENKraken
LAMPADALampadati
LCCLCC
MAIBATSUMaibatsu
MAMMOTHMammoth
MAXWELLMaxwell
MTLMTL
NAGASAKINagasaki
OBEYObey
OCELOTOcelot
OVERFLODOverflod
PEGASSIPegassi
PFISTERPfister
PRINCIPLPrincipe
PROGENProgen
RUNERune
SCHYSTERSchyster
SHITZUShitzu
SPEEDOPHSpeedophile
STANLEYStanley
TRUFFADETruffade
UBERMACHUbermacht
VAPIDVapid
VULCARVulcar
VYSSERVysser
WEENYWeeny
WESTERNWestern
WILLARDWillard
ZIRCONIUZirconium

These are all the base game manufacturer that are used. With Rockstars new policy / TOS on RP servers it may be a good idea to stick with these when making vehicles.

Animations

The animations are created in zmodeler 3 but are defined within the vehicles.meta. The following code will allow you hold H when inside the vehicle in game to play the animation.

<animConvRoofDictName>AnimationDictName</animConvRoofDictName>
<animConvRoofName>AnimationName</animConvRoofName>

The animConvRoofDictName is set to what the .ycd file is called once it has been exported from zmodeler and put into the vehicles stream folder. The animConvRoofName is the name of the animation within the .ycd file. Get this from the animation window within zmodeler.

Usually, these two are the same name.

Vehicle Audio

The vehicle audio is used to define what audio is used for the vehicle.

<audioNameHash>fbi2</audioNameHash>

The value inside the tags can be changed almost any vehicle in the game. Here is a list of different sounds and desciptions to use. (opens in a new tab)

VFX Info

The VFX info mainly defines the type of effects used on the vehicle.

<vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>

This is will have the standard vehicle smoke but VFXVEHICLEINFO_TRUCK_RIG will set the vehicle to have a diesel exhaust smoke effect.

Wheel Scale

The wheel scale defines how much of the rubber tyre is actually removed when the trye is bursted. This value is normally set to 0.292300 but the exact value of the wheel can be found in zmod by scaling down the wheel col.

<wheelScale value="0.292300" />
<wheelScaleRear value="0.292300" />

LOD Distances

The LOD Distances defines how far away from the vehicle you have to be for the different levels of details are rendered. Its best to leave these as standard but good to know what they do.

<lodDistances content="float_array">
  35.000000
  45.000000
  150.000000
  250.000000
  500.000000
  500.000000
</lodDistances>

Swankness

This isn't important to the vehicle but it defines whether the AI will take notice in your car. For example, if you are in a high end expensive car with the swankness level being 5 they will be more likely to stop and take a picture of your vehicle.

<swankness>SWANKNESS_1</swankness>

Extras

Most of the content here was originally provided by a63nt-5m1th (opens in a new tab) at the link below!

Source: [ Tutorial ] How to make specific vehicle EXTRAS appear on a vehicle EVERY spawn. | GTA5-Mods.com Forums (opens in a new tab)

Flags

FLAG_EXTRAS_REQUIRE

Always spawns with EXACTLY 1 RANDOM extra.

FLAG_EXTRAS_ALL

Always spawns with ALL extras

FLAG_EXTRAS_RARE

Spawns with only one random extra but ONLY ~15% of the time. (85% of the time, no extras will spawn)

Forcing Extras

Below is how you can force specific extras to be enabled when the vehicle spawns. This specific method does NOT prevent other extras from also spawning.

  1. Change <extraIncludes /> to <extraIncludes>
  2. Change <requiredExtras /> to <requiredExtras> <requiredExras />
  3. Fill the requiredExtras tag with the extras you want to force separated by spaces.

Example

<requiredExtras>EXTRA_4 EXTRA_5</requiredExtras>

In this example, the vehicle will now always spawn with Extra 4 and Extra 5. Again, it could also spawn with other extras depending on the rest of the setup, but now it will always spawn with 4 and 5.

Both tags must be changed correctly, or the vehicle will revert to the default behavior of spawning with random extras.

These two settings above work in combination with any flags set in the <flags> line.

For example if I was to add FLAG_EXTRAS_REQUIRE to the <flags> line also, then EXTRA_4, EXTRA_11 & one random EXTRA would be enabled.

In this scenario it is also possible for the FLAG_EXTRAS_REQUIRE random extra to also be either EXTRA_4 or EXTRA_11 (rather than a different random extra) resulting in only EXTRA_4 & EXTRA_11 appearing some of the time.

FLAG_EXTRAS_ALL will overwrite this effects and will still force all extras to spawn.

For FLAG_EXTRAS_RARE see below.

Preventing Specific Extras from Spawning

Short answer: There's no way to 100% prevent certain extras from spawning.

The closest possible solution is using <extraIncludes> and <requiredExtras> in combination with FLAG_EXTRAS_RARE. With this setup, you will get only EXTRA_4 and EXTRA_11, but 10-15% of the time there will be a random extra in addition.

Extra: I'm not sure how much use this will be or whether it even applies to any cars other than the Dodge Dart (opens in a new tab) I was testing but I'll mention it anyway.

I was able to enter 'FLAG_EXTRAS_RARE' & 'FLAG_EXTRAS_SCRIPT' in the '' line in combination with the two edits & was able to have EXTRA_4 & EXTRA_11 spawn all of the time but restict the random (~10%>15% of the time) EXTRA to only be able to select EXTRA_1, EXTRA_2 or EXTRA_3 (no other higher numbered random EXTRAS appeared in ~350 or so spawns). It may be pure luck GTA unicorns but it worked out rather well so try it out if you think that it might suit your need

Type

The type flag defines what type of vehicle it is. This works in conjunction with the txdRelationships. You can set the following values within the type flag:

EnumNameDescription
-1VEHICLE_TYPE_NONEDefault/Invalid type.
0VEHICLE_TYPE_CARCars. Used for all non-special land vehicles.
1VEHICLE_TYPE_PLANEPlanes.
2VEHICLE_TYPE_TRAILERTrailers. Allows vehicle to be towed by semi trucks.
3VEHICLE_TYPE_QUADBIKEQuadbikes. Essentially a bike with support for more than two wheels.
4VEHICLE_TYPE_DRAFTHorse carriages. Unused.
5VEHICLE_TYPE_SUBMARINECARSubmarine cars. Uses convertible roof functions to convert into submarine mode & back. Added in b467 (Xbox360/PS3 Update 1.11).
6VEHICLE_TYPE_AMPHIBIOUS_AUTOMOBILEAmphibious automobiles. Essentially the Car vehicle type, but with the ability to traverse water as well. Added in b944.
7VEHICLE_TYPE_AMPHIBIOUS_QUADBIKEAmphibious quadbikes. Similar to the above - a quadbike that can drive on water in addition to land. Added in b944.
8VEHICLE_TYPE_HELIHelicopters.
9VEHICLE_TYPE_BLIMPBlimps. Essentially a helicopter that can propel forwards.
10VEHICLE_TYPE_AUTOGYROAutogyro. Appears to be glitchy. Unused.
11VEHICLE_TYPE_BIKEMotorcycles.
12VEHICLE_TYPE_BICYCLEBicycles. Similar to motorcycles but with a different control set and ability to bunny hop/lean.
13VEHICLE_TYPE_BOATBoats. A lot of vehicle features such as doors and weapons are disabled.
14VEHICLE_TYPE_TRAINTrains. Hardcoded to prevent the player from pathfinding to enter the vehicle.
15VEHICLE_TYPE_SUBMARINESubmarines. Allows controls for sumberging/surfacing.

Plate Type

The plate type defines what type of plate the vehicle will have. E.G:

EnumNameDescription
0VPT_FRONT_AND_BACK_PLATESFaces the back of the vehicle.
1VPT_FRONT_PLATESFaces the front of the vehicle.
2VPT_BACK_PLATESFaces the back of the vehicle.
3VPT_NONEDisables the category in Los Santos Customs.

Vehicle class

EnumNameDescription
0VC_COMPACTCompacts. Default class when the class is invalid or undefined.
1VC_SEDANSedans.
2VC_SUVSUVs.
3VC_COUPECoupes.
4VC_MUSCLE MuscleHardcoded(since b1604) to enable the handbrake wheelie Advanced Flag on vehicles in this class.
5VC_SPORT_CLASSICSports Classics.
6VC_SPORTSports.
7VC_SUPERSuper.
8VC_MOTORCYCLEMotorcycles.
9VC_OFF_ROADOff-Road.
10VC_INDUSTRIALIndustrial.
11VC_UTILITY UtilityAlso includes trailers.
12VC_VANVans.
13VC_CYCLECycles.
14VC_BOATBoats.
15VC_HELICOPTERHelicopters.
16VC_PLANEPlanes.
17VC_SERVICEService.
18VC_EMERGENCYEmergency.
19VC_MILITARYMilitary.
20VC_COMMERCIALCommercial.
21VC_RAILTrains.
22VC_OPEN_WHEELOpen Wheel. Added in b1868.

Trailers

The trailers flag defines what trailers can be attached to the vehicle. To ensure they fully work, you will need to either have an attach_male or attach_female bone in your vehicle.

<trailers>
  <Item>trailer_small</Item>
</trailers>

TXD Relationships

This is used for linking a different .ytd to this vehicle to share textures. This is mainly used for dials.

 <txdRelationships>
   <Item>
     <parent>vehicles_feroci_interior</parent>
     <child>tow_truck</child>
   </Item>
 </txdRelationships>

The parent is the seperate .ytd that you are trying to import. The child is the .ytd that will have the other textures imported into and used within your vehicle.