[INCLUDE: common/no_popup_lights.ini]
[INCLUDE: common/materials_interior.ini]
[INCLUDE: common/materials_glass.ini]
[INCLUDE: common/materials_carpaint.ini]
[INCLUDE: common/selflighting.ini]

[BASIC]
OPEN_WHEELER = 0 
RALLY_CAR = 0                 
DIESEL_ENGINE = 0              ; if engine is diesel or not (used for exhaust smoke color)
BRAKES_THRESHOLD = 0.01        ; threshold for brake lights to turn on, of brake pedal
LIGHT_DAMAGE_SPEED_MIN = 80    ; speed for lights to start breaking
LIGHT_DAMAGE_SPEED_MAX = 120   ; speed for lights to fully break
IS_LOW_BEAM_AVAILABLE=1
IS_HIGH_BEAM_AVAILABLE=1

[ANALOG_INDICATOR_0]
NAME=Box003
INPUT=OIL_PRESSURE
;ZERO=0
STEP=0.8111111
MIN_VALUE=-90
INPUT_LUT= (-5=-20|2=20|4=60|8=120|10=140)
-----LIGHTS-----

[EMISSIVE_TURNSIGNAL_LEFT_...]
NAME=povorot_RL
COLOR=400, 100, 0, 0.85
OFF_COLOR=0,0,0
LAG=0.3
SIMULATE_HEATING=0.0
LOCATION=REAR

[EMISSIVE_TURNSIGNAL_RIGHT_...]
NAME=povorot_RR
COLOR=400, 100, 0, 0.85
OFF_COLOR=0,0,0
LAG=0.3
SIMULATE_HEATING=0.0
LOCATION=REAR

[EMISSIVE_TURNSIGNAL_LEFT_...]
NAME=povorot_FL
COLOR=400, 100, 0, 0.85
OFF_COLOR=0,0,0
LAG=0.3
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_...]
NAME=povorot_FR
COLOR=400, 100, 0, 0.85
OFF_COLOR=0,0,0
LAG=0.3
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_EXTRA_A_...]
BIND_TO_EXTRA_A=1
NAME= tuman,
COLOR=1250, 1250, 540, 10
LAG=0.6
SIMULATE_HEATING=0.6
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=0.5

[EMISSIVE_REVERSE_0]
NAME=rear
CHANNEL = 0
COLOR=25,25,25,50
LAG=0.9
SIMULATE_HEATING=0
CAST_LIGHT=1

[EMISSIVE_HAZARD_...]
NAME=povorot_FL,povorot_FR,povorot_RR,povorot_RL 
COLOR=400, 100, 0, 0.85  
LAG=0.0 
SIMULATE_HEATING=1
LOCATION=MIDDLE
CAST_LIGHT=1

[EMISSIVE_HIGHBEAM_...] ; high beam
NAME=dalniy
COLOR=401,401,627,10
LAG=0.5
FALLBACK_HEADLIGHTS_COLOR=0.1,7,0.2,0.3
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1
LOCATION=FRONT
CHANNEL=0

[EMISSIVE_LIGHT_...] ; low beam
NAME=gabarit
COLOR=80,85,85,10
OFF_COLOR=0,0,0
LAG=0.5
SIMULATE_HEATING=0.1
CAST_LIGHT=10 
LOCATION=FRONT
CHANNEL=0


---------------------------------------------------------------------- brake lights --------------------------------------------------------------------

[LIGHT_BRAKE_0]
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=100
BOUND_EXP=1
COLOR=3,0,0,2
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0,0,-1
EXTERIOR_ONLY=0
FADE_AT=120
FADE_SMOOTH=30
INTERIOR_ONLY=0
MIRROR=0.5
OFF_COLOR=1,0,0,1
OFF_FADE_MULT=0.619378
OFF_MIRROR=0.5
OFF_MULT=0.1
OFF_POSITION=0,0.675839,-1.7
OFF_RANGE_MULT=0.728127
POSITION=0,0.675839,-1.7
RANGE=3
RANGE_GRADIENT_OFFSET=0.4
SPECULAR_MULT=1
SPOT=155
SPOT_EDGE=0.12,0.12,0.12
SPOT_EDGE_SHARPNESS=10
SPOT_SHARPNESS=0.4

------------------------------------------------------------------ ambient interior light --------------------------------------------------------------

[LIGHT_HEADLIGHT_0]
AFFECTS_TRACK=1
COLOR=156, 120, 92, 0.31
DIFFUSE_CONCENTRATION=0.58
DIRECTION=0, -0.2, 1
EXTERIOR_ONLY=0
FADE_AT=150
FADE_SMOOTH=50
INTERIOR_ONLY=0
MIRROR=0.58
OFF_FADE_MULT=0.3
OFF_MIRROR=0.519496
OFF_MULT=0
OFF_POSITION=0, 0.403337, 1.80081
OFF_RANGE_MULT=0.0657895
POPUP_EDGE_EXP=0.3
POPUP_EDGE_OFFSET=0.5
POPUP_ENABLED=1
POPUP_END=0.7
POPUP_SECOND_SPOT_EXP=0.6
POPUP_SECOND_SPOT_INITIAL_VALUE=0.4
POPUP_START=0.05
POSITION=0, 0.47, 2.1
RANGE=456
RANGE_GRADIENT_OFFSET=0
SECOND_SPOT=137.16
SECOND_SPOT_INTENSITY=0.27
SECOND_SPOT_RANGE=20
SECOND_SPOT_SHARPNESS=0.643
SECOND_SPOT_SKIP=0.3
SPECULAR_MULT=1
SPOT=52.2
SPOT_EDGE=0.0806677, 0.0802867, 0.0795249
SPOT_EDGE_SHARPNESS=25.8726
SPOT_SHARPNESS=0
SPOT_UP=0.0237433, 0.999718, 0

[LIGHT_EXTRA_A]
BIND_TO_HEADLIGHTS=1
COLOR=2,1.8,0.9,2
DIFFUSE_CONCENTRATION=0.88
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=5
FADE_SMOOTH=5
MIRROR=0
POSITION=-0.3,0.8,0.4 
DIRECTION=0,0.5,-1
RANGE=1.3 
RANGE_GRADIENT_OFFSET=0.01
SPECULAR_MULT=3
SPOT=120
SPOT_SHARPNESS=0.0
LAG=0.9

[SelfLight_Headlights]
MIRROR = 0.628
DIRECTION = 0, 0, 1
POSITION = 0, 0.311, 1.79
DIFFUSE_CONCENTRATION = 1
BOUND_TO = tuman
SPOT_SHARPNESS = 0.2
SPOT = 120
COLOR = 10,10,8
SPECULAR_MULT = 0.8
RANGE = 5.8
FADE_AT=250
LAG=0.65
INTERIOR_ONLY=0
EXTERIOR_ONLY=0
AFFECTS_TRACK=1

[SelfLight_Headlights]
MIRROR = 0
DIRECTION = 0, 0.3, -1
POSITION = 0.35, 0.81, 0.61
DIFFUSE_CONCENTRATION = 1
BOUND_TO = GEO_Details_SUB12
SPOT_SHARPNESS = 0.2
SPOT = 100
COLOR = 10,10,8
SPECULAR_MULT = 0.8
RANGE = 0.8
FADE_AT=250
LAG=0.65
INTERIOR_ONLY=0
EXTERIOR_ONLY=0
AFFECTS_TRACK=1

-------------------------------------------------------------------- warning lights --------------------------------------------------------------------

[EMISSIVE_...]
NAME=led_c
BIND_TO=STALLED 
COLOR=20,0,0
LAG=0.5

[EMISSIVE_...]
NAME=led_d		; lights on
BIND_TO=HEADLIGHTS
COLOR=0,50,0
LAG=0.5

[EMISSIVE_...]
NAME=Box021,Box003,Box002		; lights on
BIND_TO=HEADLIGHTS
COLOR=10,2,0
LAG=0.5

-------------------------------------------------------------------- other --------------------------------------------------------------------

[SHADOWED_WHEELS]
DISTANCE=3
WIDTH=0.1
OPACITY=0.45
EXTRA_AMBIENT_BRIGHTNESS=0.1

[SHADOWED_WHEELS_FRONT]
ANGLE=10
OFFSET=0.05

[SHADOWED_WHEELS_REAR]
ANGLE=10
OFFSET=0.05

[WIPERS_TRACE_...]
SURFACE = window
WIPERS = wiper_r, wiper_l

[WIPERS]
WIND_THRESHOLDS_KMH = 60, 150  ; speed for wipers to start vibrating and for maximum vibration
WIND_AMPLITUDE_MULT = 1        ; multiplier for amplitude
WIND_FREQUENCY_MULT = 1        ; multiplier for frequency
WIND_OFFSET = 0.03

[EXTRA_SWITCHES]
SWITCH_B_FLAGS = HOLD_MODE
SWITCH_A = IGNITION/OFF

[ANIMATION_...]
INPUT = HEADLIGHTS           ; bind to reverse gear
FILE = ignition.ksanim    ; file name of new animation in “animations” folder
TIME = 1.5                  ; animation time
INPUT_AS_PROGRESS = 0       ; set to 1 to switch to that second input-as-progress mode
LOOP_WHILE_ACTIVE = 0       ; if set to 0, animation would go to 0% if not triggered, and 
                            ; to 100% otherwise; if set to 1, animation would play in 
                            ; a loop if triggered and stop otherwise
LOOP_KEEP_UNTIL_DONE = 0    ; only for “LOOP_WHILE_ACTIVE”: set to 1 to make animation 
                            ; go to 0% if stopped (like wipers would do, for example)
TICK_TOCK_MODE = 1          ; only for “LOOP_WHILE_ACTIVE”: loop as 0% → 100% → 0% instead 
                            ; of jumping from 100% to 0%
AFFECTS_INTERIOR_SHAPE = 1  ; force to update interior reflections mask if animation is 
HOLD_STATE=1


;//////////////////////////////////////////ANIMATIONS//////////////////////////////////////////

[ANIMATION_...]
FILE=gear_1.ksanim
INPUT=GEAR_1
TIME=0.9
HOLD_STATE=0
INPUT_AS_PROGRESS = 0 
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0    
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1

[ANIMATION_...]
FILE=gear_2.ksanim
INPUT=GEAR_2
TIME=0.9
HOLD_STATE=0
INPUT_AS_PROGRESS = 0 
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0   
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1 

[ANIMATION_...]
FILE=gear_3.ksanim
INPUT=GEAR_3
TIME=0.9
HOLD_STATE=0
INPUT_AS_PROGRESS = 0 
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0    
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1 

[ANIMATION_...]
FILE=gear_4.ksanim
INPUT=GEAR_4
TIME=0.9
HOLD_STATE=0
INPUT_AS_PROGRESS = 0
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0    
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1 

[ANIMATION_...]
FILE=gear_3.ksanim
INPUT=GEAR_5
TIME=0.9
HOLD_STATE=0
INPUT_AS_PROGRESS = 0 
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0    
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1 

[ANIMATION_...]
FILE=gear_5.ksanim
INPUT=GEAR_6
TIME=0.9
HOLD_STATE=0
INPUT_AS_PROGRESS = 0 
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0    
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1 

[ANIMATION_...]
FILE=gear_r.ksanim
INPUT=GEAR_R
TIME=0.9
HOLD_STATE=0
INPUT_AS_PROGRESS = 0 
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0    
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1 

[ANIMATION_...]
FILE=gear_1.ksanim
TIME = 1.0
INPUT=WIPERS_MODE
HOLD_STATE=0
INPUT_AS_PROGRESS = 0 
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0    
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1 

[BRAKEDISC_FX]
ACTIVE = 1				; set to 0 to disable the whole thing if car uses ksBrakeDisc shader for something else
DEBUG = 0
CERAMIC = 0			; use ceramic look
CARVED = 1				; add a bit of carving, radial lines (fast for shader to compute)
CARVED_FREQUENCY = 40			; increase to make more lines
GLOW_OFFSET = 1.3			; increase to offset heated and worn center more to the center, decrease
ALPHA_MASK = 0.3, 0.6			; hole is everything with alpha below 0.1, everything with alpha above 0.2 is not a hole, in-between is a transition
LUMINOCITY_MASK = 0.1, 0.2			; everything darker than 0.01 is a deepening
NORMAL_MASK = 0.3, 0.15			; everything looking away more than 50% is a deepening
AMBIENT_MULT = 0.8
DISC_INTERNAL_RADIUS = 0.0925
REFLECTION_MULT = 2
SIMPLIFY_NORMALS_K = 0

[BRAKEDISC_FX_FRONT]
ACTIVE=1
DISC_INTERNAL_RADIUS = 0.09
GLOW_MULT=0.5
GLOW_OFFSET = 0.9			; increase to offset heated and worn center more to the center, decrease
REFLECTION_F0=0.16, 0.44
REFLECTION_SHARPNESS=10, 200
ROUGHNESS=0.35, 0.5
SPECULAR=0.8, 1
WEAR_MULT=1.5

[BRAKEDISC_FX_REAR]
ACTIVE=1
CARVED_FREQUENCY=20
DISC_INTERNAL_RADIUS = 0.09
GLOW_MULT=0.5
GLOW_OFFSET=0.9		; increase to offset heated and worn center more to the center, decrease
REFLECTION_F0=0.16, 0.44
REFLECTION_SHARPNESS=10, 200
ROUGHNESS=0.35, 0.5
SPECULAR=0.8, 1
WEAR_MULT=1.5

[ANIMATION_...]
INPUT = HEADLIGHTS            ; bind to reverse gear
FILE = ignition.ksanim    ; file name of new animation in “animations” folder
TIME = 1.5                  ; animation time
INPUT_AS_PROGRESS = 0       ; set to 1 to switch to that second input-as-progress mode
LOOP_WHILE_ACTIVE = 0       ; if set to 0, animation would go to 0% if not triggered, and 
                            ; to 100% otherwise; if set to 1, animation would play in 
                            ; a loop if triggered and stop otherwise
LOOP_KEEP_UNTIL_DONE = 0    ; only for “LOOP_WHILE_ACTIVE”: set to 1 to make animation 
                            ; go to 0% if stopped (like wipers would do, for example)
TICK_TOCK_MODE = 1          ; only for “LOOP_WHILE_ACTIVE”: loop as 0% → 100% → 0% instead 
                            ; of jumping from 100% to 0%
AFFECTS_INTERIOR_SHAPE = 1  ; force to update interior reflections mask if animation is 
HOLD_STATE=1

[ANIMATION_...]
INPUT = EXTRA_A            ; bind to reverse gear
FILE = starter.ksanim    ; file name of new animation in “animations” folder
TIME = 1.0                  ; animation time
INPUT_AS_PROGRESS = 0       ; set to 1 to switch to that second input-as-progress mode
LOOP_WHILE_ACTIVE = 0       ; if set to 0, animation would go to 0% if not triggered, and 
                            ; to 100% otherwise; if set to 1, animation would play in 
                            ; a loop if triggered and stop otherwise
LOOP_KEEP_UNTIL_DONE = 0    ; only for “LOOP_WHILE_ACTIVE”: set to 1 to make animation 
                            ; go to 0% if stopped (like wipers would do, for example)
TICK_TOCK_MODE = 0          ; only for “LOOP_WHILE_ACTIVE”: loop as 0% → 100% → 0% instead 
                            ; of jumping from 100% to 0%
AFFECTS_INTERIOR_SHAPE = 1  ; force to update interior reflections mask if animation is 
HOLD_STATE=0


[ANIMATION_...]
FILE=special.ksanim
TIME=3.0
INPUT=EXTRA_F
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 0    
TICK_TOCK_MODE = 0          
AFFECTS_INTERIOR_SHAPE = 1

[ANIMATION_...]
FILE=car_door_fuck.ksanim
TIME=3.0
INPUT=EXTRA_F
LOOP_WHILE_ACTIVE = 0       
LOOP_KEEP_UNTIL_DONE = 1    
TICK_TOCK_MODE = 1          
AFFECTS_INTERIOR_SHAPE = 1

[PARTICLES_FX_EXHAUST_...]
POSITION = 0.45,0.33,-1.70 		; self explanatory
DIRECTION = 0, 0.1, -1 			; self explanatory
COLOR = 0.65,0.7,1 			; RGB blend - 0,0,0 is black, 1,1,1 is white
LIFE = 1, 2 				; how long particles last in the air before disappearing
SPEED = 0.5, 1 				; how fast smoke particles fly from the exhaust
SPREAD = 0.25				; initial spread of particles
STARTING_SIZE = 0.04			; initial size of particles
SPAWN_OFFSET = 0.02			; initial spawn point offset (length-wise)
INTENSITY = 0.03, 0.1			; smoke intensity
TEMPERATURE_LAG = 1 			; engine heating up (1 to disable)
SPEED_THRESHOLD = 15, 100 		; speed at which the smoke disappears

[PARTICLES_FX_EXHAUST_...]
POSITION = -0.45,0.33,-1.70 		; self explanatory
DIRECTION = 0, 0.1, -1 			; self explanatory
COLOR = 0.65,0.7,1 			; RGB blend - 0,0,0 is black, 1,1,1 is white
LIFE = 1, 2 				; how long particles last in the air before disappearing
SPEED = 0.5, 1 				; how fast smoke particles fly from the exhaust
SPREAD = 0.25				; initial spread of particles
STARTING_SIZE = 0.04			; initial size of particles
SPAWN_OFFSET = 0.02			; initial spawn point offset (length-wise)
INTENSITY = 0.03, 0.1			; smoke intensity
TEMPERATURE_LAG = 1 			; engine heating up (1 to disable)
SPEED_THRESHOLD = 15, 100 		; speed at which the smoke disappears

[DEFORMING_HOOD]
NAME = FRONTBUMPER,HOOD
OFFSET_Y_MIDDLE = 0.1    ; how high would it offset in the center at full damage
OFFSET_Y_END = -0.07       ; how high would it offset at the far end at full damage
OFFSET_Z_END = 0.01      ; how far would it offset at the far end
BULGING_EXTRA = 0.5      ; increase to make shape go less triangly and more trapezoid-like
BULGING_EXPONENT = 2.0    ; affects the curve of slopes around raised center
NOISE_Y_AMPLITUDE = 0.7   ; some simple vertical noise at the center
NOISE_Z_AMPLITUDE = 1.0   ; and horizontal noise at the far end
NOISE_Y_FREQUENCY = 2.0   ; which adds
NOISE_Z_FREQUENCY = 15.0    ; some randomization
Z_FACTOR = 1            ; how center is being found
Z_BIAS = 0              ; with, if needed, manual offset

[DEFORMING_REAR]
NAME = REARBUMPER
OFFSET_Y_MIDDLE = 0.01    ; how high would it offset in the center at full damage
OFFSET_Y_END = 0.03       ; how high would it offset at the far end at full damage
OFFSET_Z_END = 0.02       ; how far would it offset at the far end
BULGING_EXTRA = 0.05       ; increase to make shape go less triangly and more trapezoid-like
BULGING_EXPONENT = 50.1    ; affects the curve of slopes around raised center
NOISE_Y_AMPLITUDE = 7.0 ; some simple vertical noise at the center
NOISE_Z_AMPLITUDE = 1.0   ; and horizontal noise at the far end
NOISE_Y_FREQUENCY = 7.0   ; which adds
NOISE_Z_FREQUENCY = 15.2    ; some randomization
Z_FACTOR = 0.5            ; how center is being found
Z_BIAS = 0.0 

[SHADER_REPLACEMENT_...]
ACTIVE=1
DESCRIPTION= 2x fix
MATERIALS = salon,Parts,black.001
CULL_MODE = OFF
;DOUBLE_FACE_SHADOW = 0 
DOUBLE_FACE_SHADOW_BIASED = 1

[Material_Glass]
Materials =steklo,steklo_far
ThicknessMult=2
Desaturate=0
FilmIOR=2
ProfileFix = 0.04 
Refraction = 0.0
RefractionBias = 0 ; with full blur
ExtraLightsAdjustment = 0.1
BrightnessAdjustment = 0.5

[Material_Glass]
Materials=redglass
IOR = 2           ; index of refraction for glass, usualy, 1.5
FilmIOR = 1       ; redefine IOR for external film layer to increase reflections
ThicknessMult = 1.5  ; thicker glass passes less light through
ProfileFix = 0.08    ; adds thickness to glass for glazing angles
FresnelC = 0.1
FresnelMaxLevel = 0.5
MaskPass = 0.5            ; mask pass opacity


[ANALOG_INDICATOR_...]
INPUT=OIL_TEMPERATURE	
NAME=Box021
ZERO=-81.5
STEP = 1.55
MIN_VALUE = 40
;INPUT_LUT=LUT=(20=-218|40=-89|60=-35|80=20|100=73)
