Skip to content
Reference

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.

Skeleton
<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

NameTypeDescription
modelNamestringMust match modelName in vehicles.meta exactly, in lowercase.
colorsblockList of colour combinations the vehicle can spawn with. The game picks one at random each time it spawns naturally.
kitslistMod kit names from carcols.meta. Normally exactly one. An empty list means no mod shop options.
windowsWithExposedEdgeslistWindows whose edges must be rendered when rolled down. Without this, a lowered window can show a visible seam.
plateProbabilitiesblockWeighted list of plate designs. Values are relative weights, so a single entry at 100 forces that plate.
lightSettingsintegerIndex into vehiclelights.meta, controlling headlight corona shape and colour. 0 is the default set.
sirenSettingsintegerIndex 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.

The four indices, in order
NameDescription
Index 0Primary colour — the main body paint.
Index 1Secondary colour — stripes, trim and secondary panels.
Index 2Pearlescent colour — the shift tint over the primary paint.
Index 3Wheel 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

Plate names accepted by plateProbabilities
NameDescription
Standard WhiteBlue on white — the default San Andreas plate.
Yellow on BlackYellow characters on a black plate.
Yellow on BlueYellow characters on a blue plate.
North YanktonNorth 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.

  1. 1vehicles.meta declares the model, and modelName matches the .yft file name in lowercase.
  2. 2handling.meta contains an entry whose handlingName equals the handlingId in vehicles.meta.
  3. 3carcols.meta declares a kit with a globally unique id.
  4. 4carvariations.meta references that kit by its exact kitName, and its modelName matches vehicles.meta.
  5. 5Liveries: the boolean count matches the model, and FLAG_HAS_LIVERY is set.
  6. 6The resource manifest streams the .yft, .ytd and every meta file, and the meta files are declared with the correct data file types.