Skip to main content

carvariations.xml

The carvariations.xml file defines visual customization options for vehicles, including paint colors, wheels, bumpers, spoilers, and other cosmetic modifications.

File Structure

<?xml version="1.0" encoding="UTF-8"?>
<CVehicleVariationsFile>
<Variations>
<Item>
<modelName>adder</modelName>
<colors>
<color id="0">
<primaryColour>0</primaryColour>
<secondaryColour>0</secondaryColour>
<pearlColor>0</pearlColor>
</color>
</colors>
<wheels>
<wheel id="0" modelName="wheel_sr1" />
<wheel id="1" modelName="wheel_sr2" />
</wheels>
</Item>
</Variations>
</CVehicleVariationsFile>

Color Variations

Define available paint color combinations for a vehicle:

<colors>
<color id="0">
<primaryColour>0</primaryColour> <!-- Main color (black) -->
<secondaryColour>0</secondaryColour> <!-- Stripe/trim color -->
<pearlColor>0</pearlColor> <!-- Pearl effect -->
</color>
<color id="1">
<primaryColour>3</primaryColour> <!-- Green -->
<secondaryColour>1</secondaryColour> <!-- White stripe -->
<pearlColor>27</pearlColor> <!-- Metal pearl effect -->
</color>
</colors>

Color Component References

ElementPurposeSource
primaryColourMain vehicle colorcarcols.xml ID
secondaryColourStripe/accent colorcarcols.xml ID
pearlColorPearl/metallic effectcarcols.xml ID
wheelColorWheel colorcarcols.xml ID

Wheel Variations

Define available wheel options:

<wheels>
<wheel id="0" modelName="wheel_sport_01" />
<wheel id="1" modelName="wheel_sport_02" />
<wheel id="2" modelName="wheel_lowrider_01" />
<wheel id="3" modelName="wheel_muscle_01" />
<wheel id="4" modelName="wheel_suv_01" />
</wheels>

Common Wheel Types

  • wheel_sport_ - Sports/racing wheels
  • wheel_tuner_ - Tuner/street wheels
  • wheel_lowrider_ - Lowrider wheels
  • wheel_muscle_ - Muscle car wheels
  • wheel_suv_ - SUV/truck wheels
  • wheel_offroad_ - Off-road wheels

Exterior Modifications

<modShop>
<ModType id="0">
<ModName>Bumper_F</ModName>
<Modification id="0" modelName="bumper_f_1" />
<Modification id="1" modelName="bumper_f_2" />
<Modification id="2" modelName="bumper_f_custom" />
</ModType>
<ModType id="1">
<ModName>Bumper_R</ModName>
<Modification id="0" modelName="bumper_r_1" />
<Modification id="1" modelName="bumper_r_2" />
</ModType>
<ModType id="2">
<ModName>Spoiler</ModName>
<Modification id="0" modelName="spoiler_1" />
<Modification id="1" modelName="spoiler_2" />
</ModType>
</modShop>

Common Modification Slots

TypeSlotItems
Bumper_F0Front bumpers
Bumper_R1Rear bumpers
Spoiler2Spoilers
Skirts3Side skirts
Hoods4Engine hoods
Roof5Roof options
Doors6Door variations
Windows7Window tints
Exhaust8Exhaust pipes
Turbo9Turbo upgrades

Livery Variations

Define paint jobs and decal options:

<liveries>
<livery id="0" modelName="livery_racing_01" />
<livery id="1" modelName="livery_tribal_01" />
<livery id="2" modelName="livery_flames_01" />
<livery id="3" modelName="livery_camo_01" />
</liveries>

Full Example

<?xml version="1.0" encoding="UTF-8"?>
<CVehicleVariationsFile>
<Variations>
<Item>
<modelName>mycustom</modelName>

<colors>
<color id="0">
<primaryColour>0</primaryColour>
<secondaryColour>0</secondaryColour>
<pearlColor>27</pearlColor>
</color>
<color id="1">
<primaryColour>2</primaryColour>
<secondaryColour>1</secondaryColour>
<pearlColor>0</pearlColor>
</color>
</colors>

<wheels>
<wheel id="0" modelName="wheel_sport_01" />
<wheel id="1" modelName="wheel_tuner_01" />
<wheel id="2" modelName="wheel_lowrider_01" />
</wheels>

<modShop>
<ModType id="0">
<ModName>Spoiler</ModName>
<Modification id="0" modelName="spoiler_carbon" />
<Modification id="1" modelName="spoiler_aggressive" />
</ModType>
</modShop>

<liveries>
<livery id="0" modelName="livery_custom_01" />
<livery id="1" modelName="livery_custom_02" />
</liveries>
</Item>
</Variations>
</CVehicleVariationsFile>

Best Practices

  1. Reference existing models - Use proven wheel/mod names
  2. Keep it organized - Group similar modifications
  3. Test all variations - Ensure models exist and load
  4. Consistent naming - Use clear, logical names
  5. Document options - Note what each ID represents

Testing Variations

  1. Spawn vehicle in-game
  2. Use modshop to test modifications
  3. Apply each color combination
  4. Try each wheel option
  5. Verify liveries display correctly

Common Issues

  • Missing wheels - Verify model names exist
  • Modifications not appearing - Check mod shop references
  • Colors not applying - Verify IDs in carcols.xml
  • Liveries broken - Ensure texture files are included
  • Crashed on spawn - Invalid model name reference

carvariations.meta Breakdown

Root Vehicle Model Definition

PropertyPurpose
<modelName>Unique vehicle identifier - must match vehicles.meta modelName (e.g., 07gal)
<txdName>Texture dictionary reference (usually same as modelName) (e.g., 07gal)

Color Variations Configuration

PropertyPurpose
<indices>Array of 6 color ID values: primary1, secondary1, primary2, secondary2, primary3, secondary3 (e.g., [92, 27, 4, 1, 92, 0])
<liveries>Array of 8 boolean flags controlling active livery/paint job variations (e.g., [false, false, false, false, false, false, false, false])
<platformId>License plate style identifier (e.g., VPT_FRONT_AND_BACK_PLATES)

Understanding the Indices Array

The indices array maps to these color slots in carcols.meta:

  1. indices[0] - Primary Color 1 (Main vehicle color, carcols.xml ID e.g., 92)
  2. indices[1] - Secondary Color 1 (Stripe/trim, carcols.xml ID e.g., 27)
  3. indices[2] - Primary Color 2 (Hood/roof accent, carcols.xml ID e.g., 4)
  4. indices[3] - Secondary Color 2 (Door stripe, carcols.xml ID e.g., 1)
  5. indices[4] - Primary Color 3 (Body accents, carcols.xml ID e.g., 92)
  6. indices[5] - Secondary Color 3 (Trim details, carcols.xml ID e.g., 0)

Modification Kits & Customization

PropertyPurpose
<kitItem id="">References a mod kit from carcols.meta by ID (e.g., id="2998" references kit with id 2998)
<kitName>The kit identifier string to match with carcols.meta (e.g., 2998_07gal_modkit)
<allowRandomMods>Whether NPCs can randomly apply these mods to traffic spawns (Boolean: true/false)
<randomWeight>How often this mod appears on random traffic (Float 0.0-1.0, higher = more frequent)

Window & Physical Configuration

PropertyPurpose
<windowBreakability>How easily windows break (Float value, higher = more fragile)
<bodyHealth>Starting body/chassis health value (Float HP amount)

License Plate Configuration

PropertyPurpose
<plateIndex>Which plate style to use from plateTypes list (Integer ID)
<plateProbability>Probability-weighted options for random plates (Container element)
<Item>Individual plate option with name and weight (e.g., <Item><name>Standard White</name><weight>25</weight></Item>)
<weight>Chance percentage this plate appears (Integer 0-100, all items total ~100)

Lighting & Siren Configuration

PropertyPurpose
<lightSettings id="">Links to lighting configuration in carcols.meta by ID (e.g., id="902")
<sirenSettings id="">Links to siren/emergency light setup (e.g., id="0" for no custom siren)

This section details every XML element in carvariations.meta for color and modification definitions:

Root & Model Definition

ElementPurposeExample
<variationData>Container for all variationsParent element
<modelName>Vehicle model this variation applies to07gal

Color Variations

ElementPurposeNotes
<colors>Container for color combinationsParent element
<Item>Single color variant setRepeatable
<indices>Color IDs in sequence6 values: primary1, secondary1, primary2, secondary2, primary3, secondary3
<liveries>Livery availability flags8 boolean values

Indices Format Explanation

The <indices> element contains 6 color IDs:

  1. Primary color 1 - First color combo main
  2. Secondary color 1 - First combo accent
  3. Primary color 2 - Second combo main
  4. Secondary color 2 - Second combo accent
  5. Primary color 3 - Third combo main
  6. Secondary color 3 - Third combo accent

Kits & Modifications

ElementPurposeExample
<kits>Container for mod kit referencesParent element
<Item>Kit name reference2998_07gal_modkit

Window & Physical Configuration

ElementPurposeNotes
<windowsWithExposedEdges>Windows with visible edge polygonsList of window names

License Plate Configuration

ElementPurposeExample
<plateProbabilities>Plate spawn probability weightsContainer
<Name>Plate style nameStandard White
<Value>Probability percentage25 (out of 100)

Lighting & Siren Configuration

ElementPurposeExample
<lightSettings>Light configuration ID reference902
<sirenSettings>Siren sound configuration ID0

Example Complete Variation Entry

<Item>
<modelName>07gal</modelName>
<colors>
<Item>
<indices content="char_array">
92
27
4
1
92
0
</indices>
<liveries>
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
</liveries>
</Item>
<Item>
<indices content="char_array">
88
0
88
1
27
0
</indices>
<liveries>
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
</liveries>
</Item>
</colors>
<kits>
<Item>2998_07gal_modkit</Item>
</kits>
<windowsWithExposedEdges />
<plateProbabilities>
<Probabilities>
<Item>
<Name>Standard White</Name>
<Value value="25" />
</Item>
<Item>
<Name>Blue Plate</Name>
<Value value="10" />
</Item>
</Probabilities>
</plateProbabilities>
<lightSettings value="902" />
<sirenSettings value="0" />
</Item>
📺 Live Stream