carvariations.meta
The file that ties everything together: which colour combinations a vehicle spawns with, which mod kit it uses, which liveries are available, and which plates and lights it gets.
File structure
carvariations.meta holds one <Item> per vehicle inside <variationData>. It is the link between a model, its mod kit and its paint options. A vehicle with no entry here spawns in a default colour and has no mod kit at all.
<CVehicleModelInfoVariation>
<variationData>
<Item>
<modelName>mycar</modelName>
<colors>
<Item>
<indices content="char_array">
<Item value="12" />
<Item value="12" />
<Item value="12" />
<Item value="0" />
</indices>
<liveries>
<Item value="true" />
<Item value="false" />
</liveries>
</Item>
</colors>
<kits>
<Item>1234_mycar_modkit</Item>
</kits>
<windowsWithExposedEdges />
<plateProbabilities>
<Probabilities>
<Item>
<Name>Standard White</Name>
<Value value="100" />
</Item>
</Probabilities>
</plateProbabilities>
<lightSettings value="0" />
<sirenSettings value="0" />
</Item>
</variationData>
</CVehicleModelInfoVariation>Fields
| Name | Type | Description |
|---|---|---|
| modelName | string | Must match modelName in vehicles.meta exactly, in lowercase. |
| colors | block | List of colour combinations the vehicle can spawn with. The game picks one at random each time it spawns naturally. |
| kits | list | Mod kit names from carcols.meta. Normally exactly one. An empty list means no mod shop options. |
| windowsWithExposedEdges | list | Windows whose edges must be rendered when rolled down. Without this, a lowered window can show a visible seam. |
| plateProbabilities | block | Weighted list of plate designs. Values are relative weights, so a single entry at 100 forces that plate. |
| lightSettings | integer | Index into vehiclelights.meta, controlling headlight corona shape and colour. 0 is the default set. |
| sirenSettings | integer | Index into the siren definitions in carcols.meta. 0 for a vehicle with no sirens. |
Colour combinations
Each <Item> in <colors> is one combination, made of four indices into the game’s global colour table. The order is fixed.
| Name | Description |
|---|---|
| Index 0 | Primary colour — the main body paint. |
| Index 1 | Secondary colour — stripes, trim and secondary panels. |
| Index 2 | Pearlescent colour — the shift tint over the primary paint. |
| Index 3 | Wheel colour. |
Liveries
The <liveries> block sits inside each colour combination and is a list of booleans — one per livery the model carries, in order. true means that livery is available with this colour combination, false hides it.
The count must match the number of liveries in the model. Too few entries and the last liveries are unavailable; too many and the extras are ignored.
- The model must contain the livery meshes or texture variants, named in the order the booleans follow.
- FLAG_HAS_LIVERY must be present in the vehicles.meta flag list, or nothing appears in the shop.
- Modern add-ons often use VMT_LIVERY_MOD in carcols.meta instead, which gives more than the classic livery limit and puts them in their own shop slot.
Plate designs
| Name | Description |
|---|---|
| Standard White | Blue on white — the default San Andreas plate. |
| Yellow on Black | Yellow characters on a black plate. |
| Yellow on Blue | Yellow characters on a blue plate. |
| North Yankton | North Yankton state plate. |
Values are weights, not percentages — they are normalised against each other. Two entries at 50 and 50 give an even split, and so do two entries at 1 and 1.
Wiring it all together
The three meta files have to agree with each other. When a vehicle misbehaves, walk this list in order.
- 1vehicles.meta declares the model, and modelName matches the .yft file name in lowercase.
- 2handling.meta contains an entry whose handlingName equals the handlingId in vehicles.meta.
- 3carcols.meta declares a kit with a globally unique id.
- 4carvariations.meta references that kit by its exact kitName, and its modelName matches vehicles.meta.
- 5Liveries: the boolean count matches the model, and FLAG_HAS_LIVERY is set.
- 6The resource manifest streams the .yft, .ytd and every meta file, and the meta files are declared with the correct data file types.
