car
{
   name=Subaru Impreza WRX STi
   year=2011
   credits=Szytmon
   comments=Subaru Impreza WRX STi BEta
   id=scwrx
   version=090
   wheels=4
   skid
   {
      sample=SKID.wav
   }
   cg
   {
      x=0
      y=-0.3
      z=0.13
   }
}
  ff_factor=1.0
  ff_friction=0.8
  ff_stickfriction=0.35
  ff_damping=1.0
  ff_inertia=1.0
  ff_gain=1.0
}
ai
{
  understeer_correct=9999
  oversteer_correct=9999
  grip_factor=1.0
  cg_factor=0
  rc_factor=0
  spring_lat_factor=0
  spring_dir_factor=0
  max_velocity=50.0
}
damage
{  
  chassis
  {
    damage=0.0
    fade=0.0000
    speed_factor=0.00005
    force_factor=0.0000002
    damage_factor=0.0
    damage_engine_factor=0.5
    damage_engine_from=0.99
    damage_engine_to=0.0
    damage_engine_time=5000
    texture_damage
    {
      enable=0
      ray_lod=0
      dent_factor=1.0
      dent_linearity=1.8
      radius_factor=15.0
      radius_min=1
      uv_randomness=0.2f;
    }
  }    
}
graphics
{
  shadow
  {
    model
    {
      ;file=shadown.dof
      use_shaders=1
    }
  }
  generic
  {
    model0
    {
      file=
    }
    model1
    {
      file=silnik.dof
    }
    model2
    {
      file=maska.dof
    }
  }
}
lights
{
  light0
  {
    texture=light.tga
    fov=55.0
    aspect=5.0
    z=2
    far=140
    pitch=0
    color=2.35 2.35 3
  }
}
flares
{
  ; Front lights
  flare0
  {
    pos=-0.6629 0.0192 2.2
    ;normal=0 0 1
    normal=-0.05 0.1 0.6
    color=42 40 45
    z_offset=-3000
    size_factor=2
  }
  flare1
  {
    pos=0.6629 0.0192 2.2
    ;normal=0 0 1
    normal=-0.05 0.1 0.6
    color=42 40 45
    z_offset=-3000
    size_factor=2
  }
}
;-----------------------------------------------------
;-----------------------------------------------------
body
{
   mass=1470
   inertia
   {
      x=4056
      y=4345
      z=534
   }
   x=0
   y=0
   z=0
   restitution_coeff=0.28
   length=4.415
   width=1.74
   height=1.44
   manual_box=0
  model
  {
    file=body.dof
  }
  model_incar
  {
     file=body.dof
  }
  model_braking_l
  {
    file=stop.dof
  }
  model_lightroad_l
  {
    file=lights.dof
  }
  model_light_l
  {
    file=lights_in.dof
  }
  model_reverse_l
  {
    file=recul.dof
  }
  model_collide
  {
    file=colli.dof
  }
}
steer
{
   ; Position (stub gfx)
   x=0.39
   y=0.245
   z=0.3889
   radius=10
   xa=15
   lock=900
   model
   {
      file=kierownica.dof
   }
}
engine
{
  x=0
  y=0
  z=0
  size=0
  mass=0
  idle_rpm=950
  curve_torque=sti.crv
  max_torque=0.90
  idle_method=1
  idle_throttle=0.0
  max_rpm=6650 ;K9K 732 +/- 150tr/min
  min_warn_rpm=6000
  max_warn_rpm=6600
  rev_limiter_time=1
  torque_reaction=3
  autoclutch_rpm=1300
  autoclutch=1
  launch_control=1
  starter=0
  starter_torque=200
  stall_rpm=725
  start_rpm=975
  start_stalled=0
  enable_stall=1
  braking_coeff=2.5
  braking_offset=0
  braking_torque_curve=C_a.crv
  friction=0
  cylinders=6
  cylinder_angle=60
  rumble_amplitude=1000
  rumble_maxrpm=6650
  shifting
  {
    automatic=0
    blip_throttle=0
    cut_throttle=1
    fast=1
    shift_up_rpm=5000
    shift_down_rpm=1000
    time_to_declutch=1
    time_in_neutral=1
    time_to_clutch=1
    time_to_declutch_down=1
    time_in_neutral_down=1
    time_to_clutch_down=1
  }
  inertia
  {
    engine=0.8
  }
  jitter
  {
    amplitude=0.25
    frequency_min=4
    frequency_var=4
    time_min=50
    time_var=180
  }
  speedlimiter
  {
    velocity=20
    time=25
  }
}
gearbox
{
   gears=7
   gear0
   {
      inertia=0.2
      ratio=-3.545
   }
   gear1
   {
      ratio=3.636
      inertia=0.25
   }
   gear2
   {
      ratio=2.375
      inertia=0.13
   }
   gear3
   {
      ratio=1.761
      inertia=0.08
   }
   gear4
   {
      ratio=1.346
      inertia=0.06
   }
   gear5
   {
      ratio=1.062
      inertia=0.04
   }
   gear6
   {
      ratio=0.842
      inertia=0.01
   }
}
clutch
{
   max_torque=900
}
abs
{
max_velocity_ratio=1.7
min_velocity_ratio=1.3
enable=1
}
handbrakes
{
   wheels=23
}
differential
{
  type=1
  ratio=3.9
  power_angle=70
  coast_angle=30
  clutches=3
  clutch_factor=1.0
  locking_coeff=70
}

aero
{
   body
   {
      center=0 0 0
      cx=0.34
      area=2.2
   }
   wings=2
   wing0
   {
      name=Overall Lift
      span=1
      cord=1
      coeff_drag=0
      coeff_down=-4.3
      center=0.000 0.000 0.100
      angle=0
      angle_offset=1
   }
   wing1
   {
      name=Rear Wing
      span=1
      cord=1
      angle=0
      angle_offset=1
      coeff_drag=0
      coeff_down=55
      center=0.000 0.000 -1.360
   }
}
antirollbar
{
   count=2
   arb0
   {
      susp_left=0
      susp_right=1
      k=30000
   }
   arb1
   {
      susp_left=2
      susp_right=3
      k=20000
   }
}
susp0
{
   x=0.85
   y=0
   z=1.4213
   restlen=0.42
   minlen=0.2
   maxlen=0.5
   k=64353.6
   bump_rate=8000
   rebound_rate=7500
   anti_pitch=0.12
   roll_center
   {
      x=0
      y=-0.54
      z=0
   }
}
susp1
{
   x=-0.85
   y=0
   z=1.4213
   restlen=0.42
   minlen=0.2
   maxlen=0.5
   k=64353.6
   bump_rate=8000
   rebound_rate=7500
   anti_pitch=0.12
   roll_center
   {
      x=0
      y=-0.54
      z=0
   }
}
susp2
{
   x=0.85
   y=0
   z=-1.4570
   restlen=0.42
   minlen=0.2
   maxlen=0.5
   k=80442
   bump_rate=7000
   rebound_rate=6000
   anti_pitch=0.12
   roll_center
   {
      x=0
      y=-0.47
      z=0
   }
}
susp3
{
   x=-0.85
   y=0
   z=-1.4570
   restlen=0.42
   minlen=0.2
   maxlen=0.5
   k=80442
   bump_rate=7000
   rebound_rate=6000
   anti_pitch=0.12
   roll_center
   {
      x=0
      y=-0.47
      z=0
   }
}
tire_model
{
   damping_predict_lat=0.492
   damping_predict_long=0.018
}
pacejka
{
; Lateral force
a0=1.350
a1=-46.000
a2=1345.000
a3=1675.000
a4=11.000
a5=0.013
a6=-0.140
a7=0.140
a8=0.019
a9=-0.019
a10=-0.180
a111=-11.000
a112=-0.021
a12=0.480
a13=10.200
a13=-2.400
; Longitudinal force
b0=1.350
b1=-90.000
b2=1425.000
b3=23.300
b4=400.000
b5=0.000
b6=0.007
b7=0.055
b8=-0.024
b9=0.014
b10=0.260
b11=-86.000
b12=350.000
; Aligning moment
c0=2.10
c1=-3.900
c2=-3.900
c3=-1.260
c4=-8.200
c5=0.025
c6=0.000
c7=0.044
c8=-0.580
c9=0.180
c10=0.043
c11=0.048
c12=-0.003
c13=-0.180
c14=0.140
c15=-1.029
c16=0.270
c17=-1.100
optimal_slipratio=0.14
optimal_slipangle=0.16
}


wheel0
{
   x=0
   y=0
   z=0
   powered=1
   power_gearing=0.15
   steering=1
   lock=46
   ackerman=1.41
   toe=0
   camber=-1
   mass=12
   radius=0.355
   max_braking=2900
   braking_factor=0.8
   max_handbrake_torque=0
   inertia=0.7
   rolling_coeff=0.015
   tire_rate=290000
   pacejka~pacejka
   {
   }
   model
   {
      file=lf.dof
   }
   model_brake
   {
      file=brake_l.dof
   }
   width=0.225
}
wheel1
{
   x=0
   y=0
   z=0
   powered=1
   power_gearing=0.15
   steering=1
   lock=46
   ackerman=-1.41
   toe=0
   camber=-1
   mass=12
   radius=0.385
   max_braking=2900
   braking_factor=0.8
   max_handbrake_torque=0
   inertia=0.7
   rolling_coeff=0.015
   pacejka~pacejka
   {
   }
   tire_rate=290000
   model
   {
      file=rf.dof
   }
   model_brake
   {
      file=brake_r.dof
   }
   width=0.225
}
wheel2
{
   x=0
   y=0
   z=0
   powered=1
   power_gearing=0.35
   steering=0
   lock=0
   ackerman=
   toe=0
   camber=-1
   mass=12
   radius=0.385
   max_braking=1900
   braking_factor=0.8
   max_handbrake_torque=9800
   inertia=0.7
   rolling_coeff=0.015
   tire_rate=290000
   pacejka~pacejka
   {
   }
   model
   {
      file=lf.dof
   }
   model_brake
   {
      file=brake_l.dof
   }
   width=.225
}
wheel3
{
   x=0
   y=0
   z=0
   powered=1
   power_gearing=0.35
   steering=0
   lock=0
   ackerman=
   toe=0
   camber=-1
   mass=12
   radius=0.355
   max_braking=1900
   braking_factor=0.8
   max_handbrake_torque=9800
   inertia=0.7
   rolling_coeff=0.015
   tire_rate=290000
   pacejka~pacejka
   {
   }
   model
   {
      file=rf.dof
   }
   model_brake
   {
      file=brake_r.dof
   }
   width=.225
}
;----------------------------------------------------------------------------
; Cameras
;----------------------------------------------------------------------------
camera0
{
  name=Driver
  fov=58
  model=1
  view=0
  wheels=0
  offset
  {
    x=0.36
    y=0.5061
    z=-0.0912
  }
  offset_to
  {
    x=0.37
    y=-0.2
    z=10
  }
  src
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  name=Driver, left
  fov=63
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.4102
    y=0.5073
    z=0.1106
  }
  offset_to
  {
    x=10
    y=0.5
    z=10
  }
  src
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Driver, right
  fov=63
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.4102
    y=0.5073
    z=0.1106
  }
  offset_to
  {
    x=-10
    y=0.5
    z=10
  }
  src
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Driver, rear
  fov=-65
  model=0
  wheels=0
  view=0
  offset
  {
    x=0.4102
    y=0.5073
    z=0.1106
  }
  offset_to
  {
    x=-1
    y=0.5
    z=-10
  }
  src
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera4
{
  name=Chase
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=1.65 ;y=0.6
    z=-5   ;z=-4.5
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  angle
  {
    x=0   ;x=14
    y=0 ;y=180
    z=0   ;z=0
  }
  src
  {
    mass=1
    k=200
    damping=10
    maxdist=1.5
  }
  dst
  {
    mass=1
    k=200
    damping=10
    maxdist=1.5
  }
}
camera5
{
  name=Free exterior
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-7
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  angle
  {
    x=15
    y=270
    z=0
  }
}
camera6
{
  name=Chase rear
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-7
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  angle
  {
    x=15
    y=0
    z=0
  }
}
camera7
{
	name=Side
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=1.2
		y=-0.3
		z=-2.6
	}
	angle
	{
		x=0
		y=-170
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}

}
camera8
{
  ;name=Chase
  fov=45
  model=0
  wheels=0
  view=0
  offset
  {
    x=3.95
    y=1.112 ;y=0.6
    z=-5   ;z=-4.5
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  angle
  {
    x=0
    y=0
    z=0
  }
  src
  {
    mass=1
    k=200
    damping=10
    maxdist=1.5
  }
  dst
  {
    mass=1
    k=200
    damping=10
    maxdist=1.5
  }
}
camera9
{
  name=Far
  fov=45
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0
    y=-0.5
    z=-6
  }
  angle
  {
    x=10
    y=-43
    z=0
  }
}
audio
{
   skid
   {
      volume=1
      sample=skid.wav
   }

	acc_all
	{
	attack=1000
	decay=1000
	}

   accelerate_in
   {
	smp0
      {
         sample=IDLE - IN.wav
	   volume=1
         min=300
         max=900
         natural=750
         decay=800
      }
      smp1
      {
         sample=LUGGING - IN.wav
	   volume=3
         min=800
         max=2000
         natural=1600
         decay=700
      }
      smp2~audio.acc_all
      {
         sample=2000 - ACC - IN.wav
	   volume=1
         min=2000
         max=3200
         natural=2000
         decay=1000
         attack=1000
      }
      smp3
      {
         sample=4000 - ACC - IN.wav
	   volume=1.5
         min=3200
         max=5000
         natural=4000
         decay=800
         attack=1000
      }
      smp4
      {
         sample=6000 - ACC - IN.wav
	   volume=0.9
         min=5300
         max=6800
         natural=6000
         attack=1500
	   decay=800
      }
      smp5
      {
         sample=LIMITER - IN.wav
	   volume=1
         min=7200
         max=20000
         natural=7500
         attack=300
      }
	smp6
      {
	   volume=.3
         sample=turbo1.wav
         min=2000
         max=5000
         natural=3500
	   attack=3000
         decay=500
      }
	smp7
      {
	   volume=.3
         sample=turbo2.wav
         min=5000
         max=9000
         natural=8000
	   attack=300
         decay=10
      }
   }

   decelerate_in
   {
      smp0
      {
	   volume=1
         sample=IDLE - IN.wav
         min=100
         max=900
         natural=750
	   attack=500
   ;      decay=0
      }
      smp1
      {
         sample=2000 - DEC - IN.wav
	   volume=1
         min=900
         max=2800
         natural=1500
         attack=1000
         decay=500
      }
	smp2~audio.acc_all
      {
         sample=4000 - DEC - IN.wav
	   volume=.7
         min=2800
         max=4700
         natural=3500
         attack=1000
         decay=1000
      }
      smp3~audio.acc_all
      {
         sample=6000 - DEC - IN.wav
	   volume=0.6
         min=4700
         max=8000
         natural=6000
	   attack=1000
         decay=1000
      }
 	smp4
      {
         sample=LIMITER - IN.wav
	   volume=.7
         min=8000
         max=20000
         natural=7500
         decay=100
      }
   }

   accelerate_out
   {
	smp0
      {
         sample=IDLE - OUT.wav
	   volume=1
         min=300
         max=1100
         natural=750
         decay=300
      }
      smp1
      {
         sample=LUGGING - OUT.wav
	   volume=1
         min=1000
         max=2000
         natural=1600
         decay=500
      }
      smp2
      {
         sample=2000 - ACC - OUT.wav
	   volume=1
         min=2000
         max=3500
         natural=2000
         decay=1000
         attack=1700
      }
      smp3~audio.acc_all
      {
         sample=4000 - ACC - OUT.wav
	   volume=.7
         min=3500
         max=5000
         natural=4000
         decay=1000
         attack=1000
      }
      smp4
      {
         sample=6000 - ACC - OUT.wav
	   volume=.6
         min=5000
         max=7000
         natural=6000
         attack=1000
	   decay=10
      }
      smp5
      {
         sample=LIMITER - OUT.wav
	   volume=.5
         min=7000
         max=20000
         natural=7500
         attack=10
      }
	smp6
      {
	   volume=.4
         sample=turbo1.wav
         min=2000
         max=4300
         natural=3500
	   attack=2500
         decay=700
      }
	smp7
      {
	   volume=.5
         sample=turbo2.wav
         min=4500
         max=9000
         natural=8000
	   attack=600
         decay=150
      }
   }

   decelerate_out
   {
      smp0
      {
	   volume=1
         sample=IDLE - OUT.wav
         min=100
         max=1000
         natural=750
	   attack=100
         decay=1000
      }
      smp1~audio.acc_all
      {
         sample=1500 - DEC - OUT.wav
	   volume=1
         min=1000
         max=3000
         natural=1500
         attack=1000
         decay=1000
      }
	smp2~audio.acc_all
      {
         sample=3000 - DEC - OUT.wav
	   volume=1
         min=3000
         max=4000
         natural=3000
         attack=1000
         decay=1000
      }
      smp3~audio.acc_all
      {
         sample=6000 - DEC - OUT.wav
	   volume=.6
         min=4000
         max=8000
         natural=6500
	   attack=1000
         decay=1000
      }
 	smp4
      {
         sample=LIMITER - OUT.wav
	   volume=0.4
         min=8000
         max=20000
         natural=7500
         decay=100
      }
   }
  wind
  {
    smp0
    {
	volume=2
      sample=wind.wav
      pitch_scale=2
      pitch_offset=2
      ; Speeds in m/s
      min=.5
      max=9999
      natural=20
    }
    smp1
    {
	volume=.5
      sample=driveshaft.wav
	pitch_scale=.5
      pitch_offset=.7
      ; Speeds in m/s
      min=.5
      max=9999
      natural=22
    }
  }
}

