Skip to main content

Vehicle Layouts

Vehicle layouts define the structural skeleton and bone configuration of your custom vehicle.

Understanding Bones

Bones are the skeletal structure of a vehicle. They define:

  • Seat positions
  • Door mechanisms
  • Light positions
  • Customization part attachment points
  • Deformable body parts

Layout Structure

Vehicle layouts are typically defined in a layout XML file or within vehiclelayouts.xml:

<Layout>
<Name>STANDARD_SEDAN</Name>
<Bones>
<Bone index="0" name="chassis" />
<Bone index="1" name="door_fl" /> <!-- Front left door -->
<Bone index="2" name="door_fr" /> <!-- Front right door -->
<Bone index="3" name="door_rl" /> <!-- Rear left door -->
<Bone index="4" name="door_rr" /> <!-- Rear right door -->
<Bone index="5" name="hood" /> <!-- Engine hood -->
<Bone index="6" name="trunk" /> <!-- Trunk/boot -->
<Bone index="7" name="seat_driver" />
<Bone index="8" name="seat_passenger" />
</Bones>
<Seats>
<Seat index="0" bone="seat_driver" />
<Seat index="1" bone="seat_passenger" />
</Seats>
</Layout>

Common Bones

Structure Bones

BonePurpose
chassisMain vehicle body
door_flFront left door
door_frFront right door
door_rlRear left door
door_rrRear right door
hoodEngine hood (bonnet)
trunkTrunk/boot
windshieldWindshield glass
window_flFront left window
window_frFront right window

Seat Configuration

<Seats>
<Seat index="0" bone="seat_driver" x="0.0" y="0.0" z="0.0" />
<Seat index="1" bone="seat_passenger" x="1.0" y="0.0" z="0.0" />
<Seat index="2" bone="seat_rl" x="-0.5" y="-1.5" z="0.0" />
<Seat index="3" bone="seat_rr" x="0.5" y="-1.5" z="0.0" />
</Seats>

Light Positions

<Lights>
<Light index="0" type="headlight_l" bone="light_l_front" />
<Light index="1" type="headlight_r" bone="light_r_front" />
<Light index="2" type="taillight_l" bone="light_l_rear" />
<Light index="3" type="taillight_r" bone="light_r_rear" />
</Lights>

Deformable Parts

Define which bones can be damaged and repaired:

<DeformableParts>
<Part bone="door_fl" health="100.0" />
<Part bone="door_fr" health="100.0" />
<Part bone="hood" health="150.0" />
<Part bone="trunk" health="150.0" />
<Part bone="window_fl" health="30.0" />
<Part bone="windshield" health="50.0" />
</DeformableParts>

Customization Attachment Points

Define where modifications attach:

<AttachmentPoints>
<Attachment type="spoiler" bone="trunk_ext" />
<Attachment type="bumper_f" bone="bumper_front" />
<Attachment type="bumper_r" bone="bumper_rear" />
<Attachment type="skirt_l" bone="skirt_left" />
<Attachment type="skirt_r" bone="skirt_right" />
<Attachment type="exhaust" bone="exhaust" />
</AttachmentPoints>

Door Configuration

<Doors>
<Door index="0" bone="door_fl" type="NORMAL" />
<Door index="1" bone="door_fr" type="NORMAL" />
<Door index="2" bone="door_rl" type="NORMAL" />
<Door index="3" bone="door_rr" type="NORMAL" />
<Door index="4" bone="hood" type="BONNET" />
<Door index="5" bone="trunk" type="BOOT" />
</Doors>

Door Types

  • NORMAL - Standard hinged door
  • BONNET - Hood/engine cover
  • BOOT - Trunk/boot
  • SLIDING - Sliding door (vans)
  • GULLWING - Upward-opening door

Complete Layout Example

<?xml version="1.0" encoding="UTF-8"?>
<VehicleLayout>
<Name>CUSTOM_SEDAN</Name>

<Bones>
<Bone index="0" name="chassis" />
<Bone index="1" name="door_fl" />
<Bone index="2" name="door_fr" />
<Bone index="3" name="hood" />
<Bone index="4" name="trunk" />
<Bone index="5" name="seat_driver" />
</Bones>

<Seats>
<Seat index="0" bone="seat_driver" />
<Seat index="1" bone="seat_passenger" />
</Seats>

<Doors>
<Door index="0" bone="door_fl" type="NORMAL" />
<Door index="1" bone="door_fr" type="NORMAL" />
<Door index="4" bone="hood" type="BONNET" />
<Door index="5" bone="trunk" type="BOOT" />
</Doors>

<Lights>
<Light index="0" type="headlight_l" bone="light_l_front" />
<Light index="1" type="headlight_r" bone="light_r_front" />
</Lights>

<DeformableParts>
<Part bone="door_fl" health="100.0" />
<Part bone="hood" health="150.0" />
</DeformableParts>
</VehicleLayout>

Best Practices

  1. Use consistent naming - door_fl = front left, etc.
  2. Set proper bone indices - Sequential numbering
  3. Define all doors - Hood, trunk, doors needed for functionality
  4. Position seats carefully - Affects camera view
  5. Test deformable parts - Ensure all damageable parts work
  6. Reference existing vehicles - Use as layout templates

Bone Index Reference

IndexTypical Bone
0chassis
1-4doors (fl, fr, rl, rr)
5hood
6trunk
7+seats and accessories

Testing Layouts

  1. Define all critical bones (doors, hood, trunk)
  2. Set seat positions for proper camera view
  3. Test door opening/closing
  4. Verify damage states work
  5. Check all lights illuminate correctly
  6. Test customization attachments

Common Issues

  • Seats in wrong position - Adjust bone coordinates
  • Doors won't open - Verify door bones and types
  • Missing lights - Check light bone references
  • Invisible parts - Ensure bones are defined in model
  • Camera issues - Wrong seat positioning bone