Resources & Server Setup

What is data_file in FiveM?

data_file is the fxmanifest.lua directive that tells the game what kind of data a file contains so it can be loaded by the right system. Each line pairs a type, such as HANDLING_FILE or VEHICLE_METADATA_FILE, with the path of a file in the resource. Sending a meta file to players is not enough on its own: without a matching data_file line the game never reads it, which is why a car can have a perfect vehicles.meta and still fail to spawn.

Syntax

lua
files {
    'data/handling.meta',
}

data_file 'HANDLING_FILE' 'data/handling.meta'

There are two halves and both are required. The files entry adds the file to the set that clients download. The data_file line tells the game to mount that file as a particular type. The path is relative to the resource root and has to be identical in both places. Glob patterns are accepted, so one line such as data_file 'HANDLING_FILE' 'data/**/handling.meta' can register a file for every car in a pack.

Types used by vehicle resources

TypeFile
HANDLING_FILEhandling.meta
VEHICLE_METADATA_FILEvehicles.meta
CARCOLS_FILEcarcols.meta
VEHICLE_VARIATION_FILEcarvariations.meta
VEHICLE_LAYOUTS_FILEvehiclelayouts.meta
CONTENT_UNLOCKING_META_FILEContent unlocks file shipped with some DLC-style mods
AUDIO_GAMEDATA, AUDIO_SOUNDDATA, AUDIO_SYNTHDATA, AUDIO_WAVEPACKCustom engine sound data and wave packs

The type names are the game's own. They are the same identifiers that appear as fileType in the content.xml of a single-player dlc.rpf, which makes that file a reliable checklist when converting a mod.

Writing the manifest by hand? The FXManifest Generator produces a valid one. Open the FXManifest Generator

A complete vehicle block

lua
files {
    'data/vehiclelayouts.meta',
    'data/handling.meta',
    'data/vehicles.meta',
    'data/carcols.meta',
    'data/carvariations.meta',
}

data_file 'VEHICLE_LAYOUTS_FILE' 'data/vehiclelayouts.meta'
data_file 'HANDLING_FILE' 'data/handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'CARCOLS_FILE' 'data/carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'
Conventional order: layouts, handling, vehicles, carcols, carvariations

Only include lines for files the mod actually has. Most cars have no vehiclelayouts.meta, and many have no carcols.meta. The order shown is the convention most vehicle resources follow, with each file declared after the ones it refers to.

Common errors and fixes

  • Car will not spawn although the files are present: the VEHICLE_METADATA_FILE line is missing or its path is wrong, so the model name was never registered. See invalid model.
  • Handling changes are ignored: the handling file is listed under files but has no HANDLING_FILE line.
  • Wrong type for the file: registering carvariations.meta as CARCOLS_FILE, or the reverse, makes the game parse it as the wrong structure.
  • Path differs by case: Data/vehicles.meta and data/vehicles.meta are different files on a Linux server.
  • Metas placed in the stream folder: the stream folder is for binary assets. Metas go in a data folder or the root, with files and data_file entries.

The FXManifest Generator writes matching files and data_file entries, and the Resource Inspector flags metas that are present in a resource but not registered.

Frequently asked questions

Which data_file type is used for vehicles.meta?

VEHICLE_METADATA_FILE. handling.meta uses HANDLING_FILE, carcols.meta uses CARCOLS_FILE and carvariations.meta uses VEHICLE_VARIATION_FILE.

Do I need both files and data_file for a meta file?

Yes. The files entry sends the file to players and the data_file line tells the game how to load it. If either is missing the meta has no effect.

Do .yft and .ytd files need a data_file line?

No. Models and textures are placed in the stream folder and are registered automatically by file name.

More in Resources & Server Setup: fx_version 'cerulean', stream folder, server.cfg (ensure / start), Spawn Name & Model Hash, Add-On vs. Replace

Skip the manual work

Paste a gta5-mods.com vehicle link and get a FiveM-ready resource with the manifest and metas in place. 3 free conversions, no signup.

  • 3 conversions free, no account needed
  • 2 more free if you leave an email
  • After that: $15 once for unlimited conversions and the Pro tools, no subscription