car
{
  name=Audi S4 Avant
  year=2001 (B5)
  id=audis4avant
  credits=Audi BAM 2.7T 30V "DOHC 5V TWINTURBO" V6, 2671 cm³, 265hp @ 5800rpm, 400Nm @ 1850-3600rpm
  comments=Haldex Traction QUATTRO. Turbine KKK K03 0.7 - 0.9 bar (Booster). 0-100km/h: 5.6 s, Top: 250
  version=053b16
  wheels=4
  ff_factor=0.5
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=shadow.tga
    width=2.8
    length=4.9
    offset_z=0
  }
  cg
  {
    x=0
    y=-0.11	;1398 *0.40 =560
    z=0.1
  }
}
body
{
  mass=1540	;1480kg kerb weight, -140kg unsprung +80kg driver 20kg fuel	
  inertia
  {
    x=3780
    y=4300
    z=760
  }
	width=1.888
	height=1.00
	length=4.473
	manual_box=0
  model
  {
    file=audi_s4.dof
  }
  model_incar
  {
    file=audi_s4.dof
  }
  model_braking_l
  {
  file=brake.dof
  }
 model_light_l
  {
  file=lights.dof
  }
}
steer
{
  x=0.40
  y=0.03
  z=0.42
  radius=10
  xa=20
  lock=1080	
  linearity=0.3
  model
  {
    file=str.dof
  }
}
engine
{
	x=0
	y=0
	z=0
	size=0
	mass=180
	idle_method=1
	idle_throttle=0.05
	idle_rpm=900
	min_warn_rpm=6700
	max_warn_rpm=7000
	max_rpm=7000
	start_rpm=1300
	stall_rpm=450
	autoclutch=1
	autoclutch_rpm=
	starter=1
	starter_torque=100
	start_stalled=1
	enable_stall=1
	curve_torque=torque.crv
	max_torque=0.55
	torque_reaction=0.25
	braking_coeff=
	braking_offset=
	braking_torque_curve=braking_torque.crv
	friction=0
	cylinders=6
	cylinder_angle=90
	rumble_amplitude=
	rumble_maxrpm=
	inertia
	{
		engine=0.38
	}
	jitter
	{
		amplitude=0.1
		frequency_min=1
		frequency_var=0.1
		time_min=150
		time_var=10
	}
	shifting
	{
		automatic=0
		blip_throttle=0.3
		cut_throttle=1
		fast=1
		shift_up_rpm=6200
		shift_down_rpm=1500
		time_to_declutch=225
		time_in_neutral=225
		time_to_clutch=225
		time_to_declutch_down=225
		time_in_neutral_down=225
		time_to_clutch_down=175
	}
}

fuel
{
	bsfc=6.5e-5
	max=70
	type=0
}

;----------------------drivetrain----------------------

gearbox
{
	gears=7

	gear0
	{
		ratio=-4.107
		inertia=0.02
		linearity=0.5
	}

	gear1
	{
		ratio=3.50
		inertia=0.03
		linearity=1
	}

	gear2
	{
		ratio=1.89
		inertia=0.04
		linearity=1.2
	}

	gear3
	{
		ratio=1.23
		inertia=0.05
		linearity=1.4
	}

	gear4
	{
		ratio=0.970
		inertia=0.06
		linearity=1.6
	}

	gear5
	{
		ratio=0.81
		inertia=0.08
		linearity=1.8
	}

	gear6
	{
		ratio=0.680
		inertia=0.1
		linearity=2
	}
}

differential
{
	type=1
	ratio=4.11
	inertia=0.16
	locking_coeff=100 ;25
	output2=2
	output3=3
}

clutch
{
	max_torque=440 
}

handbrakes
{
	wheels=23
}

aero
{
	body
	{
		center=0 0 0
		cx=0.33
		area=2.03
	}
	wings=1
	wing0
	{
		name=lift
		span=1
		cord=1
		coeff_drag=0
		coeff_down=0
		center=0 0 0
		angle=0
		angle_offset=10
	}
}

antirollbar
{
	count=2
	arb0
	{
		susp_left=0
		susp_right=1
		k=41000
	}
	arb1
	{
		susp_left=2
		susp_right=3
		k=34000
	}
}

susp_front
{
  y=-0.2
  z=1.321
  restlen=0.45			;293	395kg
  minlen=0.0
  maxlen=0.23
  k=27000			;@ static load and 1.316 NF SR
  bump_rate=1350		;0.7	1944
  rebound_rate=4600		;0.7	6531		
  bump_function=0
  bump_max=1500
  rebound_function=0
  anti_pitch=0.1
  camber_change_per_m=0.067
  caster_offset=0.015
	roll_center
	{
		x=0
		y=-0.552	;60mm
		z=0
	}
}

susp_rear
{
  y=-0.2
  z=-1.580
  restlen=0.40			;305	275kg
  minlen=0.0
  maxlen=0.25
  k=24500			;@ static load and 1.502 NF SR
  bump_rate=1400		;0.75	1852
  rebound_rate=4200	;0.8	5191
  bump_function=0
  bump_max=1500
  rebound_function=0
  anti_pitch=0.1
  camber_change_per_m=0.14
	roll_center
	{
		x=0
		y=-0.554	;120mm
		z=0
	}
}

susp0~susp_front
{
  x=0.7885
  camber_change_steering=0.15	;0.25 rad ~ 14.5 degree camber with 1 radian rotation of steering @ 8 degree caster
  toe_change_per_m=0.1		;8 degrees static caster -0.0235
}
susp1~susp_front
{
  x=-0.7885
  camber_change_steering=-0.15	;0.25 rad ~ 14.5 degree camber with 1 radian rotation of steering @ 8 degree caster
  toe_change_per_m=-0.1		;5.78 degrees static caster -0.0235
}
susp2~susp_rear
{
  x=0.770
  toe_change_per_m=0.07
}
susp3~susp_rear
{
  x=-0.770
  toe_change_per_m=-0.07
}
;----------------------tyres----------------------

tire_model_front
{
	damping_predict_lat=0
	damping_predict_long=0
}
tire_model_rear
{
	damping_predict_lat=0
	damping_predict_long=0
}
pacejka
{
	a0=1.25
	a1=-35
	a2=1200
	a3=2000
	a4=8
	a5=0.015
	a6=-0.25
	a7=0.1
	a8=-0.03
	a9=-0.001
	a10=-0.15
	a111=-8.5
	a112=-0.29
	a12=17.8
	a13=-2.4
	b0=1.5
	b1=-70
	b2=1350
	b3=20
	b4=325
	b5=0.08
	b6=0
	b7=0.05
	b8=-0.025
	b9=0
	b10=0
	b11=0
	b12=0
	c0=2.2
	c1=-4
	c2=-3
	c3=-1
	c4=-7
	c5=0.0
	c6=0.0
	c7=0.044
	c8=-0.58
	c9=0.18
	c10=0.043
	c11=0.048
	c12=-0.0035
	c13=-0.18
	c14=0.14
	c15=-1.029
	c16=0.27
	c17=-1.1

	optimal_slipratio=0.11
	optimal_slipangle=0.145
}

skidding_default
{
	long_start=0.1
	long_max=1.0
	long_start_n=0.1
	long_max_n=1.0
	lat_start=0.1
	lat_max=1.0
}

wheel_front
{
	y=0
	z=0
	steering=1
	powered=1
	lock=50
	mass=35
	inertia=1.4
	radius=0.31715
        width=0.225		
	rolling_coeff=0.0180
	max_braking=1400 ;1500
	braking_factor=1
	tire_rate=250000
	pacejka~pacejka
	{
	}
}

wheel_rear
{
	y=0
	z=0
	steering=0
	powered=1
	power_gearing=0.6	;40% rear drive, no diff, equal drive :eek:
	mass=35
	inertia=1.35
	radius=0.31715
        width=0.225		;225/40 ZR18
	rolling_coeff=0.0180
	max_braking=500
	braking_factor=1
	max_handbrake_torque=8400
	tire_rate=230000
	pacejka~pacejka
	{
		optimal_slipratio=0.11
		optimal_slipangle=0.155
	}
}

wheel0~wheel_front
{
	x=0
	ackerman=1.15
	toe=-0
	camber=0.007	;-0.6
  model
  {
    file=left.dof
  }
   model_brake
  {
    file=
  }
}
wheel1~wheel_front
{
	x=0
	ackerman=-1.15
	toe=0
	camber=0.007
  model
  {
    file=right.dof
  }
  model_brake
  {
    file=
  }
}
wheel2~wheel_rear
{
	x=0
	toe=-0.21	;toe in, goes to out under bump like M3 Z axle
	camber=-0.588	;-1.5
  model
  {
    file=left.dof
  }
   model_brake
  {
    file=
  }
}
wheel3~wheel_rear
{
	x=0
	toe=0.21	;toe in, goes to out under bump like M3 Z axle
	camber=-0.588
  model
  {
    file=right.dof
  }
 model_brake
  {
    file=
  }
}
;	------------------ Artyfishul Intellygents -----------------
     
ai
{
	grip_factor=1.1
}

camera0
{
  name=Driver
  fov=55
  model=0
  wheels=0
  view=0
  offset
  {
    x=0.44
    y=0.44
    z=-0.5
  }
  offset_to
  {
    x=0.44
    y=-1
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=1
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  offset
  {
    x=0.000000
    y=-0.150000
    z=-5.600000
  }
  angle
  {
    x=10
    y=-180
    z=0
  }
  name=Chase High
  follow
  {
    pitch=0
    yaw=1
    roll=0
    velocity=5
  }
  fov=60
  model=0
  wheels=0
  view=0
}
camera2
{
  offset
  {
    x=0.000000
    y=0.200000
    z=2.100000
  }
  angle
  {
    x=0.000000
    y=180.000000
    z=0.000000
  }
  name=Bumper
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  fov=60.000000
  model=2
  wheels=0
  view=2
}
camera3
{
  name=Hood
  fov=55
  model=0
  wheels=0
  view=0
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0
    y=-0.6
    z=0.6
  }
  angle
  {
    x=5
    y=180
    z=0
  }
}
camera4
{
  offset
  {
    x=1.150625
    y=-0.006667
    z=-0.020000
  }
  angle
  {
    x=-2.205518
    y=-175.472336
    z=-1.017359
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  fov=80.000000
  model=0
  wheels=0
  view=0
  name=Rear Side
}
camera5
{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0.000000
    y=-0.600000
    z=-5.500000
  }
  angle
  {
    x=6.000000
    y=30.853992
    z=0.000000
  }
  name=Side High
  fov=60.000000
  model=0
  wheels=1
  view=0
}
camera6
{
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=-0.679687
    y=0.118751
    z=-3.359994
  }
  angle
  {
    x=3.861111
    y=33.853992
    z=-14.322908
  }
  fov=80.000000
  model=0
  wheels=1
  view=0
  name=Front Side
}
camera7
{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0.000000
    y=0.200000
    z=-9.000000
  }
  angle
  {
    x=20.000000
    y=180.000000
    z=0.000000
  }
  fov=35.000000
  model=0
  wheels=1
  view=0
  name=Front High
}
camera8
{
  offset
  {
    x=0.000000
    y=-0.593750
    z=-1.155000
  }
  angle
  {
    x=0.000000
    y=180.000000
    z=0.000000
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  fov=65.000000
  model=1
  wheels=0
  view=1
  name=Inside Center
}
camera9
{
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0.385000
    y=-0.400000
    z=-0.395000
  }
  angle
  {
    x=7.000000
    y=-180.000000
    z=0.000000
  }
  fov=61.000000
  ; Type of model to use; 0=outside, 1=inside, 2=none
  model=1
  wheels=0
  view=1
  name=Inside Driver
}
;	------------------ 5.1 ALPHA AUDIO COMPATABILTY -----------------

audio
{
	horn
	{
		sample=horn.wav
	}
  skid
  {
      sample=skid.wav
      sample2=skid2.wav
  }
  acc_all
  {
    attack=2600
    decay=2600
    min_vol=0
    max_vol=5
  }
	gearwhine
	{
		smp0
		{
		sample=driveshaft.wav
		natural=240
		volume=0.1
		}
	}
  accelerate_out
  {
    volume=1.5
    smp0~audio.acc_all
    {
      sample=idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=1300
    }
    smp1~audio.acc_all
    {
      sample=e55-6000.wav
      min=1500
      max=8001
      natural=4800
    }
    smp2~audio.acc_all
    {
      sample=6_13_onhigh_ex.wav
      min=5000
      max=8001
      volume=0.1
      natural=5200
    }
    smp3~audio.acc_all
    {
      sample=turbo2.wav
      min=2700
      max=3901
      volume=0.4
      natural=1500
    }
    smp4~audio.acc_all
    {
      sample=turbo3.wav
      min=4000
      max=8501
      volume=0.45
      natural=2500
    }
  }
  decelerate_out
  {
    volume=1.5
    smp0~audio.acc_all
    {
      sample=idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=1300
    }
    smp1~audio.acc_all
    {
      sample=e55-6000.wav
      min=1500
      max=8001
      natural=4800
    }
    smp2~audio.acc_all
    {
      sample=6_13_onhigh_ex.wav
      min=5000
      max=8001
      volume=0.1
      natural=5200
    }
    smp3~audio.acc_all
    {
      sample=turbo2.wav
      min=2700
      max=3901
      volume=0.4
      natural=1500
    }
    smp4~audio.acc_all
    {
      sample=turbo3.wav
      min=4000
      max=8501
      volume=0.4
      natural=2500
    }
  }
  accelerate_in
  {
    volume=0.5
    smp0~audio.acc_all
    {
      sample=idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=1300
    }
    smp1~audio.acc_all
    {
      sample=e55-6000.wav
      min=1500
      max=8001
      natural=4800
    }
    smp2~audio.acc_all
    {
      sample=6_13_onhigh_ex.wav
      min=5000
      max=8001
      volume=0.1
      natural=5200
    }
    smp3~audio.acc_all
    {
      sample=turbo2.wav
      min=2700
      max=3901
      volume=0.2
      natural=1500
    }
    smp4~audio.acc_all
    {
      sample=turbo3.wav
      min=4000
      max=8501
      volume=0.25
      natural=2500
    }
  }
  decelerate_in
  {
    volume=0.5
    smp0~audio.acc_all
    {
      sample=idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=1300
    }
    smp1~audio.acc_all
    {
      sample=e55-6000.wav
      min=1500
      max=8001
      natural=4800
    }
    smp2~audio.acc_all
    {
      sample=6_13_onhigh_ex.wav
      min=5000
      max=8001
      volume=0.1
      natural=5200
    }
    smp3~audio.acc_all
    {
      sample=turbo2.wav
      min=2700
      max=3901
      volume=0.2
      natural=1500
    }
    smp4~audio.acc_all
    {
      sample=turbo3.wav
      min=4000
      max=8501
      volume=0.2
      natural=2500
    }
  }
   wind
   {
      smp0
      {
         volume=0.7
         sample=wind1.wav
         pitch_scale=2
         pitch_offset=2
         ; Speeds in m/s
         min=.5
         max=9999
         natural=20
      }
   }
}


;----------------------driving aids----------------------
abs
{
  enable=1
  max_velocity_ratio=1.09 
  min_velocity_ratio=1.08
  min_velocity=1
}
traction_control
{
  	enable=1
  	min_velocity=1.667
  	max_velocity_ratio=1.050
  	min_velocity_ratio=1.300

}