car
{
	name=Toyota Supra (beta)
	year=Fredric Aasbo
	credits=Some1, Cosmo° and FSR
  	comments=Team Japan Auto
  	id=supra_aasbo_beta
  	version=090
	wheels=4
  	shadow
  	{
    		texture=shadow.tga
    		width=2.07
    		length=4.48
    		offset_z=-0.03
		intensity_dark=0.7
		intensity_light=0.5
  	}
  	cg
  	{
    		x=0
		; 0.440m?
		; Lowered a little to improve handling
    		y=-0.317; -0.213
		; 55% front / 45% rear
    		z=0.29
  	}
  	ff_factor=0.25
	ff_gain=1.00
	ff_damping=1
	ff_friction=1
	ff_stickfriction=1
	ff_inertia=1
}

ai
{
	grip_factor=1.2
	oversteer_correct=20
	understeer_correct=20
}

abs
{
	enable=0
	braking_factor=1.2
	max_velocity_ratio=1.3
	min_velocity_ratio=1.1
	min_velocity=1.944
}

traction_control
{
	enable=0
	max_velocity_ratio=1.2
	min_velocity_ratio=1.1
	min_velocity=1.944
}

body
{
	; 1280kg + 85kg driver - 160kg unsprung
  	mass=1205
  	inertia
	{
		; Increased values to correct weird behavior in Racer 0.8.3x
		x=4200 ;2100
		y=6840 ;2280
		z=900 ;450
	}
  	model
  	{
		file=body.dof
		offset
		{
			x=0
			y=0
			z=0
		}
  	}
	model_incar
 	{
  		file=body_incar.dof
 	}
	model_collide
	{
		file=collision.dof
	}
	model_reverse_l
	{
		file=lights_reverse.dof
	}
 	model_braking_l
 	{
  		file=lights_brake.dof
 	}
 	model_lightroad_l
 	{
  		file=lights.dof
 	}
  	width=1.810
  	height=1.145
  	length=4.520
  	manual_box=0
	box_offset=0
}

steer
{
 	x=-0.380
 	y=0.057
 	z=0.172
 	radius=10
 	xa=10
 	lock=718
	linearity=1
 	model
 	{
  		file=sw.dof
 	}
}

engine
{
	x=0
	y=0
	z=0
	size=0
  	mass=0
	idle_method=1
	idle_throttle=0
  	idle_rpm=850
	min_warn_rpm=6700
	max_warn_rpm=7200
  	max_rpm=7200
	rev_limiter_time=20
  	start_rpm=2000
  	stall_rpm=500
	autoclutch=0
  	autoclutch_rpm=0
	launch_control=0
  	starter=1
  	starter_torque=150
  	start_stalled=0
	enable_stall=1

	; Stock engine
	;curve_torque=torque.crv

	; Fredric's engine
  	curve_torque=engine_torque.crv

	max_torque=1.15
  	braking_coeff=1
	braking_offset=0
	braking_torque_curve=engine_braking.crv
  	torque_reaction=0.4
	friction=0
	cylinders=6
	cylinder_angle=0
	rumble_amplitude=0
	rumble_maxrpm=7200
  	inertia
  	{
    		engine=0.36 ;0.18
  	}
	jitter
	{
		amplitude=1.0
		frequency_min=0
		frequency_var=10
		time_min=0
		time_var=750
	}
  	shifting
  	{
    		automatic=0
		blip_throttle=0
		cut_throttle=1
		fast=0
    		shift_up_rpm=6900
    		shift_down_rpm=4250
    		time_to_declutch=100
    		time_in_neutral=50
    		time_to_clutch=100
    		time_to_declutch_down=100
    		time_in_neutral_down=50
    		time_to_clutch_down=100
  	}
	speedlimiter
	{
		velocity=0
		time=0
	}
}

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

clutch
{
	max_torque=1200
}

gearbox
{
	gears=7
	gear0
	{
		ratio=-3.280
		inertia=0.12
		engine_map=0.10
	}
	gear1
	{
		ratio=3.827
		inertia=0.14
		engine_map=0.10
	}
	gear2
	{
		ratio=2.360
		inertia=0.10
		engine_map=0.10
	}
	gear3
	{
		ratio=1.685
		inertia=0.08
		engine_map=0.10
	}
	gear4
	{
		ratio=1.312
		inertia=0.06
		engine_map=1.00
	}
	gear5
	{
		ratio=1.000
		inertia=0.04
		engine_map=1.00
	}
	gear6
	{
		ratio=0.793
		inertia=0.02
		engine_map=1.00
	}
}

differentials
{
	count=1
	diff0
	{
		type=4
		ratio=4.27
		inertia=0.05
		friction=120
		;preload=120
		output0=2
		output1=3
		;power_ratio=7.5
		;coast_ratio=5
	}
}

handbrakes
{
	wheels=23
}

aero
{
  	body
  	{
    		center=0.000 0.000 0.000
    		cx=0.33
    		area=1.94
  	}
	draft
	{
		scale_lat_rear=0.4
		scale_lon_rear=1
		scale_lat_front=0.08
		scale_lon_front=0.2
	}
	wings=1
	wing0
	{
		; neutral?
		name=body_lift
		span=1.0
		cord=0.1
		coeff_drag=0
		coeff_down=0
		center=0.000 0.000 0.1625
		angle=0
		angle_offset=1
	}
}

antirollbar
{
	; ~1.8°/g
	; 60% front bias
  	count=2
  	arb0
  	{
    		susp_left=0
    		susp_right=1
		k=14620
  	}
  	arb1
  	{
    		susp_left=2
    		susp_right=3
		k=25045
  	}
}

susp_front
{
  	y=0.000
  	z=1.310
  	restlen=0.500
  	minlen=0.315
  	maxlen=0.480
	warplen=0.390
	;
	; sprung corner mass		333kg
	; spring rate			18kg/mm
	; installation ratio		~0.67:1
	; wheelrate			118268N/m
	; critical damping		12551N/m/s
	;
	k_curve=suspension_spring_front.crv
	damper_curve=suspension_damper_front.crv
	bumpstop_len=0.025
	bumpstop_k=100000
	bumpstop_damping=5000
	reboundstop_len=0.010
	reboundstop_k=100000
	reboundstop_damping=5000
  	anti_pitch=0.30
  	roll_center
  	{
    		x=0
		; 0.060m?
    		y=-0.650
    		z=0
  	}
}

susp0~susp_front
{
    	x=0.710 ;0.760
  	camber_change_per_m=0.20
    	camber_change_steering=0.10
	; 2.000° (ignored for drivability)
	caster_angle=0.05
    	caster_offset=-0.05
	; -9.583° (ignored for drivability)
	kingpin_angle=-0.20
	kingpin_offset=0.01
    	toe_change_per_m=0.05
	model
	{
		file=
	}
}
susp1~susp_front
{
    	x=-0.710 ;-0.760
  	camber_change_per_m=0.20
    	camber_change_steering=-0.10
    	; 2.000°
	caster_angle=0.05
    	caster_offset=-0.05
    	; -9.583°
	kingpin_angle=-0.20
	kingpin_offset=-0.01
    	toe_change_per_m=-0.05
	model
	{
		file=
	}
}

susp_rear
{
  	y=0.000
  	z=-1.240
  	restlen=0.500
  	minlen=0.315
  	maxlen=0.460
	warplen=0.360
	;
	; sprung corner mass		265kg
	; spring rate			9kg/mm
	; installation ratio		~0.72:1
	; wheelrate			63547N/m
	; critical damping		8207N/m/s
	;
	k_curve=suspension_spring_rear.crv
	damper_curve=suspension_damper_rear.crv
	bumpstop_len=0.025
	bumpstop_k=100000
	bumpstop_damping=5000
	reboundstop_len=0.010
	reboundstop_k=100000
	reboundstop_damping=5000
  	anti_pitch=0.25
  	roll_center
  	{
    		x=0
		; 0.090m?
    		y=-0.601 ;-0.570
    		z=0
  	}
}

susp2~susp_rear
{
    	x=0.740
  	camber_change_per_m=0.01
    	camber_change_steering=0
	caster_angle=0
    	caster_offset=0
	kingpin_angle=0
	kingpin_offset=0
    	toe_change_per_m=0.007
	model
	{
		file=
	}
}

susp3~susp_rear
{
    	x=-0.740
  	camber_change_per_m=0.01
    	camber_change_steering=0
	caster_angle=0
    	caster_offset=0
	kingpin_angle=0
	kingpin_offset=0
    	toe_change_per_m=-0.007
	model
	{
		file=
	}
}

pacejka
{
	a0=1.3		; Shape factor
	a1=-15		; Load infl. on lat. friction coeff (*1000)
	a2=1300		; Lateral friction coefficient at load = 0 (*1000)
	a3=2600		; Maximum stiffness
	a4=10		; Load at maximum stiffness
	a5=0.015	; Camber infiuence on stiffness
	a6=-0.25	; Curvature change with load
	a7=1		; Curvature at load = 0
	a8=-0.03	; Horizontal shift because of camber
	a9=-0.001	; Load influence on horizontal shift
	a10=-0.15	; Horizontal shift at load = 0
	a111=0		; Camber influence on vertical shift
	a112=-0.29	; Camber influence on vertical shift
	a12=-50	; Load influence on vertical shift
	a13=-2.4	; Vertical shift at load = 0

	b0=1.1		; Shape factor
	b1=-20		; Load infl. on long. friction coeff (*1000)
	b2=1340		; Longitudinal friction coefficient at load = 0 (*1000)
	b3=20		; Curvature factor of stiffness
	b4=550		; Change of stiffness with load at load = 0
	b5=0.08		; Change of progressivity of stiffness/load
	b6=0		; Curvature change with load
	b7=0.05		; Curvature change with load
	b8=-0.025	; Curvature at load = 0
	b9=0.015	; Load influence on horizontal shift
	b10=0.4		; Horizontal shift at load = 0
	b11=-50		; Load influence on vertical shift
	b12=0		; Vertical shift at load = 0

	c0=2.5		; Shape factor
	c1=-4		; Load influence of peak value
	c2=-4		; Load influence of peak value
	c3=-1		; Curvature factor of stiffness
	c4=-10		; Change of stiffness with load at load = 0
	c5=0		; Change of progressivity of stiffness/load
	c6=0		; Camber influence on stiffness
	c7=0.044	; Curvature change with load
	c8=-0.58	; Curvature change with load
	c9=0.18		; Curvature at load = 0
	c10=0.043	; Camber influence of stiffness
	c11=0.048	; Camber influence on horizontal shift
	c12=-0.0035	; Load influence on horizontal shift
	c13=-0.18	; Horizontal shift at load = 0
	c14=0.14	; Camber influence on vertical shift
	c15=-1.029	; Camber influence on vertical shift
	c16=0.27	; Load influence on vertical shift
	c17=-1.1	; Vertical shift at load = 0

    	optimal_slipratio=0.12
    	optimal_slipangle=0.14
}

wheel_front
{
	y=0
	z=0
	powered=0
  	steering=1
	reverse_steering=0
	lock=96
	ackerman=1.3
	; 17x9				9.5kg
	; 235/40 R17			10.5kg
	; rotor				8.0kg
	; caliper			4.0kg
	mass=40
	inertia=2.366 ;1.188
	radius=0.3215
	width=0.235
	rolling_coeff=0.011
	friction_road=1
	max_braking=3600
	max_handbrake_torque=0
	braking_factor=0.70
	inboard_brakes=0
	brake_dissipation=0.00010
	brake_heating=0.00009
	brake_max_temp=800
	tire_rate=220000
	tire_damping=300
	tire_damping_lowspeed=2500
	tire_damping_threshold=5
	pacejka~pacejka
	{
	}
}

wheel0~wheel_front
{
	x=0
	; -2.500°
	camber=-1.3
	; 0.000°
	toe=-0.078
  	model
  	{
    		file=left_front.dof
		offset
		{
			x=0.12
		}
  	}
 	model_brake
 	{
  		file=caliper_lf.dof
  		offset
  		{
   			x=0.17
  		}
 	}
}

wheel1~wheel_front
{
  	x=0
	; -2.500°
	camber=-1.3
	; 0.000°
	toe=-0.078
  	model
  	{
    		file=right_front.dof
		offset
		{
			x=-0.12
		}
  	}
 	model_brake
 	{
  		file=caliper_rf.dof
  		offset
  		{
   			x=-0.17
  		}
 	}
}

wheel_rear
{
	y=0
	z=0
	powered=1
	steering=0
	reverse_steering=0
	lock=0
	ackerman=0
	; 17x10				10.0kg
	; 295/40R17			14.5kg
	; rotor				6.5kg
	; caliper			3.0kg
	mass=40
  	inertia=3.284 ;1.642
  	radius=0.332
	width=0.295
  	rolling_coeff=0.011
  	friction_road=1
  	max_braking=3600
  	max_handbrake_torque=20000
  	braking_factor=0.30
	inboard_brakes=0
	brake_dissipation=0.00010
	brake_heating=0.00009
	brake_max_temp=800
  	tire_rate=240000
	tire_damping=300
	tire_damping_lowspeed=2500
	tire_damping_threshold=5
  	pacejka~pacejka
	{
		a2=1320		; Lateral friction coefficient at load = 0 (*1000)

		;optimal_slipratio=0.08
		optimal_slipangle=0.26
	}
}

wheel2~wheel_rear
{
  	x=0
	; -0.500°
	camber=-1
	; -0.179°
  	toe=-0.2 ;-0.236
  	model
  	{
    		file=left_rear.dof
		offset
		{
			x=0.07
		}
  	}
 	model_brake
 	{
  		file=caliper_lr.dof
  		offset
  		{
   			x=0.1
  		}
 	}
}

wheel3~wheel_rear
{
  	x=0
	; -0.500°
	camber=-1
	; 0.179°
  	toe=0.2 ;0.236
  	model
  	{
    		file=right_rear.dof
		offset
		{
			x=-0.07
		}
  	}
 	model_brake
 	{
  		file=caliper_rr.dof
  		offset
  		{
   			x=-0.1
  		}
 	}
}

graphics
{
	shadow
	{
		intensity=1
		model
		{
			;file=shadow.dof
			;use_shaders=0
		}
	}
}

lights
{
	light0
	{
		aspect=5
		color=
		far=75
		fov=50
		pitch=0
		texture=
		z=1
	}
}

particles
{
	backfire
	{
		exhaust0
		{
			pos=0.545 -0.435 -2.190
			normal=0.075 0.000 -1.000
		}
		type=backfire
		min_rpm=3000
		max_rpm=7000
		;likeliness_percentage=100
	}
}

animation
{
	flash_lights=0
}

camera0
{
	name=Inside Driver
	fov=65
	model=1
	wheels=0
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset
	{
		x=-0.38
		y=-0.29
		z=-0.27
	}
	angle
	{
		x=4
		y=180.0
		z=0
	}
}

camera1
{
	name=Hood
	fov=67
	model=0
	wheels=2
	offset
	{
		x=-0.0
		y=-0.35
		z=0.7
	}
	angle
	{
		x=2
		y=180
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera2
{
	name=ChaseNormal
	fov=60
	model=0
	wheels=0
	offset
	{
		x=0
		y=2
		z=-7
	}
	follow
	{
		pitch=0
		yaw=0
		roll=0
	}
	src
	{
		mass=6
		k=600
		damping=200
		maxdist=2
	}
	angle
	{
		x=10
		y=180
		z=0
	}
}

camera3
{
	name=ChaseClose
	fov=60
	model=0
	wheels=0
	offset
	{
		x=0
		y=1.5
		z=-5
	}
	follow
	{
		pitch=0
		yaw=0
		roll=0
	}
	src
	{
		mass=6
		k=600
		damping=120
		maxdist=2
	}
	angle
	{
		x=5
		y=180
		z=0
	}
}

camera4
{
	name=FrontBumper
	model=2
	wheels=2
	fov=75
	offset
	{
		x=0
		y=-0.0
		z=2.3
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=2
		y=180
		z=0
	}
}

camera5
{
	name=RearBumper
	model=2
	wheels=2
	fov=75
	offset
	{
		x=0
		y=-0.0
		z=2.3
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=2
		y=0
		z=0
	}
}

camera6
{
	name=Roof
	fov=80
	model=0
	wheels=0
	offset
	{
		x=0
		y=-1.2
		z=-0.6
	}
	angle
	{
		x=10
		y=180
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera7
{
	name=Side
	fov=70
	model=0
	wheels=0
	offset
	{
		x=-1.2
		y=0
		z=0.5
	}
	angle
	{
		x=0
		y=170
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera8
{
	name=Wing
	fov=70
	model=0
	wheels=0
	offset
	{
		x=-1.1
		y=-0.7
		z=-2.0
	}
	angle
	{
		x=0
		y=170
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera9
{
	name=Photo
	fov=35
	model=0
	wheels=0
	offset
	{
		x=-0
		y=-0
		z=-0
	}
	angle
	{
		x=0
		y=0
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

audio
{
	horn
	{
		sample=sounds\horn.wav
	}
	skid
	{
		sample=sounds\skid.wav
		sample2=sounds\scrub.wav
	}
	acc_all
	{
		attack=1400
		decay=1400
	}
	throttle_off
	{
		smp0~audio.acc_all
		{
			sample=sounds\wastegate.wav
			min=4000
			max=5000
			volume=1			;ignored?
		}
	}
	accelerate_out
	{
		volume=1
		smp0~audio.acc_all
		{
			sample=sounds\3200.wav
			min=900
			max=1500
			natural=3200
			attack=500
			decay=500
		}
		smp1~audio.acc_all
		{
			sample=sounds\5100.wav
			min=1500
			max=4500
			natural=5100
			attack=500
			decay=500
		}
		smp2~audio.acc_all
		{
			sample=sounds\6100.wav
			min=4500
			max=5500
			natural=6100
			attack=500
			decay=500
		}
		smp3~audio.acc_all
		{
			volume=1.5
			sample=sounds\6950.wav
			min=5500
			max=7500
			natural=6950
			attack=500
			decay=500
		}
		smp4~audio.acc_all
		{
			volume=1.5
			sample=sounds\turbo.wav
			min=5500
			max=7500
			natural=15000
			attack=1500
			decay=1500
		}
	}
	decelerate_out
	{
		volume=1
		smp0~audio.acc_all
		{
			sample=sounds\3200.wav
			min=900
			max=1500
			natural=3200
			attack=500
			decay=500
		}
		smp1~audio.acc_all
		{
			sample=sounds\4200.wav
			min=1500
			max=7500
			natural=4200
			attack=500
			decay=500
		}
	}
	wind
	{
		volume=0.4
		pitch_scale=0
		pitch_offset=50
		smp0
		{
			sample=sounds\wind.wav
			min=0
			max=300
			attack=0
			decay=0
			natural=80
		}
		smp1
		{
			sample=sounds\road.wav
			min=0
			max=300
			attack=0
			decay=0
			natural=80
		}
	}
	gearwhine
  	{
		smp0
		{
			sample=sounds\gearlow.wav
			volume=0.6
			attack=70
			decay=70
			min=50
			max=200
			natural=300
		}
		smp1
		{
			sample=sounds\gearhigh.wav
			volume=0.4
			attack=70
			decay=0
			min=250
			max=50000
			natural=300
		}
	}
	shiftout
	{
		sample=sounds\shift.wav
	}
}