;	D1 Professional Drift Grand Prix Series - A Racer mod by FSR
;	---------------------------------------------------------------------
;	Make and model	:		Nissan SILVIA S15 
;	Name		:		HKS S15 Hiper Silvia RS-2
;	Driver		:		Nobuteru "NoOneBetter" Taniguchi
;	---------------------------------------------------------------------
;	Mesh		:		FSR
;	Texturing	:		FSR
;	Interior	:		FSR
;	Wheels		:		Endo & FSR
;	Driver		: 		Stecki
;	Car.ini		:		Cosmo & FSR
;	Sounds		:		TtR
;	Shaders		:		LB
;	---------------------------------------------------------------------
;       Version		:		0.9beta
car
{
  	name=HKS Hiper Silvia S15 RS2
  	id=d1hkss15
  	version=050f
  	credits=D1 Professional Drift Grand Prix Series
  	comments=Nobuteru "NoOneBetter" Taniguchi
    	wheels=4
  	cg
  	{
    		x=0
		;450mm
    		y=-0.035
		;weight distribution 52% front, 48% rear
    		z=0.08
  	}
	skid
	{
		sample=skid.wav
	}
  	shadow
  	{
    	 	texture=shadow.tga
     	 	length=4.4
     	 	width=1.7
      		offset_z=0
  	}
	ff_factor=0.22
}

graphics
{
  	shadow
  	{
    		model
    		{
      			file=body.dof
    		}
  	}
}

body
{
	;1130kg + 75kg NOB - 150kg SR20DET - 160kg unsprung mass
  	mass=895
  	restitution_coeff=0.1
  	inertia
  	{
    		x=2200
    		y=2400
    		z=400
  	}
  	model
  	{
    		file=body.dof
	}
  	model_incar
  	{
    		file=
  	}
  	model_braking_l
  	{
    		file=
  	}
	model_braking_r
	{
		file=
	}
  	model_light_l
  	{
    		file=
  	}
	model_light_r
	{
		file=
	}
  	width=1.9
  	height=1.3
  	length=4.4
  	manual_box=0
  	;cockpit_start=1
  	;cockpit_length=1
}

steer
{
	x=-0.355
	y=0.3
	z=0.2
	radius=18.5
	xa=14
	;2 turns lock-to-lock
  	lock=720
	;setup for 180° wheel, use 0.8 for 900° wheels
	linearity=0.35
  	model
  	{
    		file=
  	}
}

engine
{
  	mass=150
  	max_rpm=8500
  	idle_rpm=1500
  	stall_rpm=800
  	start_rpm=850
  	autoclutch_rpm=3000
  	starter=1
  	starter_torque=80
  	start_stalled=0
  	curve_torque=torque.crv
  	max_torque=0.9
  	torque_reaction=0.15
  	shifting
  	{
    		automatic=0
    		shift_up_rpm=8500
    		shift_down_rpm=4500
    		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
  	}
  	inertia
  	{
    		engine=0.15
    		final_drive=0.1
  	}
  	braking_coeff=1.5
	sample=mid4k.wav
	sample_rpm=4000
}

gearbox
{
   	gears=7
   	gear0
   	{
      		ratio=-3.437
      		inertia=0.1
		engine_map=0.50
   	}
   	gear1
   	{
      		ratio=2.971
      		inertia=0.1
		engine_map=0.75
   	}
   	gear2
   	{
      		ratio=2.094
      		inertia=0.08
		engine_map=1.00
   	}
   	gear3
   	{
      		ratio=1.548
      		inertia=0.06
		engine_map=1.00
   	}
   	gear4
   	{
      		ratio=1.246
      		inertia=0.04
		engine_map=1.00
   	}
   	gear5
   	{
      		ratio=1.000
      		inertia=0.02
		engine_map=1.00
   	}
   	gear6
   	{
      		ratio=0.807
      		inertia=0.01
		engine_map=1.00
   	}
}

clutch
{
   	max_torque=700
}

handbrakes
{
   	wheels=23
}

traction_control
{
  	enable=0
  	max_velocity_ratio=1.25
  	min_velocity_ratio=1
}

abs
{
  	enable=0
  	max_velocity_ratio=1.15
  	min_velocity_ratio=1
}

differential
{
  	type=1
  	ratio=3.690
	inertia=0.1
	locking_coeff=300
	locking_coeffient=300
	output0=2
	output1=3
}

aero
{
  	body
  	{
    		center=0 0 0
    		cx=0.33
    		area=2.2
	}
	wings=3
	wing0
	{
		name=Body
	      	span=1.9
	      	cord=0.1
		angle=0
		angle_offset=0
		coeff_drag=0
		coeff_down=0
		center=0.0 0.0 0.1
	}
	wing1
	{
		name=Front Spoiler
		span=1.5
		cord=0.4
		angle=3
		angle_offset=0
		coeff_drag=0.1
		coeff_down=1.0
		center=0 0.0 2.0
	}
	wing2
	{
		name=Rear
	      	span=1.6
	      	cord=0.2
		angle=2
		angle_offset=0
		coeff_drag=0.2
		coeff_down=3.0
		center=0.0 0.0 -2.0
	}
}

antirollbar
{
   	count=2
   	arb0
   	{
      		susp_left=0
      		susp_right=1
      		k=30000
   	}
   	arb1
   	{
      		susp_left=2
      		susp_right=3
      		k=20000
   	}
}

;HKS Hipermax D, 10kg/mm, 921 bump/1892 rebound @ 0.1m/s, -33mm
susp_front
{
  	y=0.110
  	z=1.272
  	restlen=0.320
  	minlen=0.250 ;0.100
  	maxlen=0.325
  	k=50000
  	bump_rate=6000
	bump_function=3
  	rebound_rate=12000
	rebound_function=0
	anti_dive=0.0
	anti_lift=0.0
	anti_pitch=0.1
	camber_change_per_m=0.04
	caster_offset=-0.03
  	roll_center
  	{
    		x=0
		;175mm
    		y=-0.323
    		z=0
  	}
}

;HKS Hipermax D, 8kg/mm, 205 bump/1167 rebound @ 0.1m/s, -46mm
susp_rear
{
  	y=0.110
  	z=-1.283
  	restlen=0.300
  	minlen=0.250 ;0.100
  	maxlen=0.325
  	k=45000
  	bump_rate=4000 ;2050
	bump_function=3
  	rebound_rate=12000 ; 11670
	rebound_function=0
	anti_rise=0.0
	anti_Squat=0.0
	anti_pitch=0.1
	camber_change_per_m=0.2
  	roll_center
  	{
    		x=0
		;220mm
    		y=-0.253
    		z=0
  	}
}

susp0~susp_front
{
  	x=0.725
	camber_change_steering=0.08
	toe_change_per_m=-0.02
}

susp1~susp_front
{
  	x=-0.725
	camber_change_steering=-0.08
	toe_change_per_m=0.02
}


susp2~susp_rear
{
  	x=0.715
	toe_change_per_m=-0.01
}

susp3~susp_rear
{
  	x=-0.715
	toe_change_per_m=0.01
}

tire_model_front
{
	damping_predict_lat=0
	damping_predict_long=0
}

tire_model_rear
{
	damping_predict_lat=0
	damping_predict_long=0
}

pacejka
{
   	a1=-35
   	a4=10
   	a5=0.014
   	a6=-0.24
   	a7=1.0
   	a8=-0.03
   	a9=-0.0013
   	a10=-0.15
   	a111=-11
   	a112=-0.29
   	a12=17.8
   	a13=-2.4
   	b1=-70
	b3=23.3
   	b4=400
   	b5=0.05
   	b6=0
   	b7=0.055
   	b8=-0.024
   	b9=0
   	b10=0
   	b11=0
   	b12=0
   	c0=2.2
   	c1=-3
   	c2=-3
   	c3=-1.26
   	c4=-4
   	c5=-0.025
   	c6=0
   	c7=0.044
   	c8=-0.58
   	c9=0.18
   	c10=0.043
   	c11=0.048
   	c12=-0.0035
   	c13=-0.18
   	c14=-0.04
   	c15=-1.029
   	c16=0.27
   	c17=-1.1
   	optimal_slipratio=0.1
   	optimal_slipangle=0.15
}

wheel_front
{
  	y=0
  	z=0
  	camber=-2.2 ;-3.48
  	steering=1
  	powered=0
  	lock=80.5
	mass=38
  	inertia=1.4
  	radius=0.32
  	rolling_coeff=0.015
  	max_braking=2100
  	braking_factor=0.6
  	tire_rate=200000
  	pacejka~pacejka
  	{
		a0=1.38
		a2=1400
	   	a3=2200
   	   	b0=1.42
   		b2=1800
 	}
}

wheel_rear
{
  	y=0
  	z=0
  	camber=-1.4 ;-2.0
  	steering=0
  	powered=1
  	mass=42
  	inertia=1.4
  	radius=0.32
  	rolling_coeff=0.015
  	max_braking=2100
  	braking_factor=0.4
 	max_handbrake_torque=5000
  	tire_rate=200000
  	pacejka~pacejka
  	{
		a0=1.38
		a2=1400
	   	a3=2200
		b0=1.42
	   	b2=1800
	}
}

wheel0~wheel_front
{
  	x=0
  	toe=0.05 ; negative value = toe in
	ackerman=1.15
  	model
  	{
    		file=advan-lf.dof
  	}
  	model_brake
  	{
    		file=bl.dof
  	}
}

wheel1~wheel_front
{
  	x=0
  	toe=-0.05
	ackerman=-1.15
  	model
  	{
    		file=advan-rf.dof
  	}
  	model_brake
  	{
    		file=br.dof
  	}
}

wheel2~wheel_rear
{
  	x=0
  	toe=-0.0
  	model
  	{
    		file=advan-lr.dof
  	}
  	model_brake
  	{
    		file=bl.dof
  	}
}

wheel3~wheel_rear
{
  	x=0
  	toe=0.0
  	model
  	{
    		file=advan-rr.dof
  	}
  	model_brake
  	{
    		file=br.dof
  	}
}

audio
{
  skid
  {
    sample=skid.wav
  }
	acc_all
	{
		attack=1000
		decay=1000
	}
	accelerate_out
	{
		smp0~audio.acc_all
		{
			sample=idle.wav
			min=1
			max=2500
			natural=1000
			volume=0.75
		}
		smp1~audio.acc_all
		{
			sample=mid4k.wav
			min=2500
			max=10000
			natural=4000
		}
		smp2~audio.acc_all
   		 {
			volume=0.05
      			sample=turbo2.wav
    			min=4000
 			max=10000
   			attack=1000
   			decay=1000
    			natural=10000
   		 }
	}
  decelerate_out
  {
		smp1~audio.acc_all
		{
			sample=mid4kde.wav
			min=1
			max=10000
			natural=4000
		}
  }
  decelerate_in
  {
		smp1~audio.acc_all
		{
			sample=mid4kde.wav
			min=1
			max=10000
			natural=4000
		}
  }
  wind
  {
    volume_scale=0.1
    volume_offset=0
    pitch_scale=0.01
    pitch_offset=0
    smp0
    {
      sample=wind.wav
      min=0.1
      max=9999
      natural=20
    }
  }
	
}

; CAMERA SETTINGS
; -------------------------------------------------------------
; Type of model to use; 0=outside, 1=inside, 2=none
;
camera0
{
	name=ChaseClose
	fov=60
	model=0
	wheels=0
	view=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
	} 
}

camera1
{
	name=ChaseNormal
	fov=60
	model=0
	wheels=0
	view=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
	} 
}

camera2
{
	name=Bumper
	model=2
	wheels=2
	view=2
	fov=75
	offset
	{
		x=0
		y=-0.5
		z=2.3
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=8
		y=180
		z=0
	}
}
camera3
{	
	name=Hood
	fov=75
	model=0
	wheels=2
	view=0
	offset
	{
		x=-0.0
		y=-0.6
		z=0.8
	}
	angle
	{
		x=6
		y=180
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera4
{
	name=Driver
	fov=75
	model=0
	wheels=2
	view=0
	offset
	{
		x=-0.35
		y=0.5
		z=-0.1
	}
	offset_to
	{
		x=0
		y=0
		z=10
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=1
		y=180
		z=0
	}
	src
	{
		mass=5
		k=750
		damping=75
		maxdist=0.2
	}
	dst
	{
		mass=0
		k=0
		damping=0
		maxdist=0
	}
}

camera5
{
	name=Inboard
	fov=50
	model=0
	wheels=2
	view=0
	offset
	{
		x=0
		y=0.6
		z=-0.5
	}
	offset_to
	{
		x=0
		y=0
		z=10
	}
	angle
	{
		x=4
		y=180
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	src
	{
		mass=1
		k=2000
		damping=200
		maxdist=0.05
	}
	dst
	{
		mass=0
		k=0
		damping=0
		maxdist=0
	}
}

camera6
{
	name=Roof
	fov=70
	model=0
	wheels=2
	view=0
	offset
	{
		x=0
		y=-1.4
		z=-0.6
	}
	angle
	{
		x=20
		y=180
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera7
{
	name=Side
	fov=80
	model=0
	wheels=0
	view=0
	offset
	{
		x=-1
		y=0
		z=0.4
	}
	angle
	{
		x=0
		y=175
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera8
{
	name=Action
	fov=50
	model=0
	wheels=0
	view=0
	offset
	{
		x=-1.2
		y=-1.5
		z=-10
	}
	angle
	{
		x=0
		y=-40
		z=0
	}
	follow
	{
		pitch=0
		yaw=0
		roll=0
	}
}

camera9
{
	name=Rearview
	fov=60
	model=0
	wheels=2
	view=0
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset
	{
		x=0.0
		y=-0.7
		z=0
	}
	angle
	{
		x=4
		y=0
		z=0
	}
}