[INCLUDE: common/navigators.ini]
[INCLUDE: navigators_mixins.ini]
[INCLUDE: common/selflighting.ini]
[INCLUDE: common/no_popup_lights.ini]
[INCLUDE: common/materials_glass.ini]
[INCLUDE: common/materials_interior.ini]
[INCLUDE: common/materials_carpaint.ini]
[INCLUDE:pbr_int.ini]
[INCLUDE:pbr_ext.ini]

[DATA] 
DISABLE_LIGHTSINI = 0

[SHADER_REPLACEMENT_...]
MATERIALS=
DOUBLE_FACE_SHADOW_BIASED=1

[INCLUDE: common/navigators.ini]
[NAVIGATOR_0 : Navigator_StyleSygic]
ACTIVE = $" read('csp/version', 0) >= 950"
Meshes = Navi
@ = Navigator_Size, Resolution = "514 , 270", Size = "514 , 270",     
RESOLUTION_LIMIT = 1024 , 540

[NAVIGATOR_0]
; Slightly alter template to remove dark bar on the left
@ = Navigator_Size, Resolution = "514 , 270", Size = "200, 70",
@ = Navigator_Component, ComponentID = CURRENT_TRACK
@ = Navigator_FadingComponent, Up
@ = Navigator_ComponentLayout, Left = 1110, Right = 0, Top = 0, Height = 0,\
	Padding = "0, 0, 0", Align = "0, 0", IconCenter = "0, 0%", IconSize = -100
TIME_SIZE = 0, 0
BTN_PHONE_ENABLED = 0
MAP_POS = 0, 0
MAP_SIZE = 514 , 270



[CAR_STEREO_...]
ACTIVE = $" read('csp/version', 0) >= 1279 "

MESHES = Music
RESOLUTION = 514 , 270
DISPLAY_POS = 0, 0
DISPLAY_SIZE = 514 , 270
COLOR = 1, 1, 1
FADE_WHEN_INACTIVE = 0.95
DITHERING = 2

; track position
TEXT_CSP_1 = "{Position:%02d:%02d//--:--}"
TEXT_CSP_1_ALIGN_LAYOUT = 0
TEXT_CSP_1_START = 20, 178
TEXT_CSP_1_SIZE = 460, 48
TEXT_CSP_1_FONT_TYPE = MONOSPACE
TEXT_CSP_1_Z_INDEX = 10
TEXT_CSP_1_SCALE = 0.8
TEXT_CSP_1_BOLD = 0

; track duration
TEXT_CSP_2 = "{Duration:%02d:%02d//--:--}"
TEXT_CSP_2_ALIGN_LAYOUT = 1, 0
TEXT_CSP_2_START = 35, 178
TEXT_CSP_2_SIZE = 460, 48
TEXT_CSP_2_FONT_TYPE = MONOSPACE
TEXT_CSP_2_Z_INDEX = 10
TEXT_CSP_2_SCALE = 0.8
TEXT_CSP_2_BOLD = 0

; progress bar background
RECT_5 = 1
RECT_5_START = 100, 230
RECT_5_SIZE = 330, 8
RECT_5_Z_INDEX = 11
RECT_5_COLOR = 0.2, 0.2, 0.2, 0.5

; progress bar background
RECT_6 = 1
RECT_6_START = 100, 185
RECT_6_SIZE = 312, 5
RECT_6_Z_INDEX = 12
RECT_6_COLOR = 0.8, 0.8, 0.8, 1
RECT_6_SCALE_WITH_PROGRESS = 1, 0

; album cover in the middle
ALBUM_COVER_0 = 1
ALBUM_COVER_0_START = 179, 55
ALBUM_COVER_0_SIZE = 75, 105
ALBUM_COVER_0_Z_INDEX = -1
ALBUM_COVER_0_FALLBACK = MUSIC
ALBUM_COVER_0_FALLBACK_COLOR = 0, 0, 0
ALBUM_COVER_0_FALLBACK_BACKGROUND = 0.05, 0.05, 0.05, 1
ALBUM_COVER_0_FALLBACK_SIZE = 28



;;;;;;;;; Exterior Lighting ;;;;;;;;; 
[EMISSIVE_LIGHT_...] ;  Low Beam
NAME = headlight_l_SUB0 , headlight_r_SUB0 , bumper_f_SUB4
COLOR=100,120,150,5
LAG=0.8
SIMULATE_HEATING=0
CAST_LIGHT=1

[EMISSIVE_LIGHT_...] ;  Taillights
NAME=taillight_r_SUB1,taillight_l_SUB1
COLOR=50, 2, -10,10
LAG=0.8
SIMULATE_HEATING=1
CAST_LIGHT=1

[EMISSIVE_HIGHBEAM_...] ; High Beam
NAME=headlight_l_SUB1 , headlight_r_SUB1
COLOR=200,220,250,10
LAG=0.5
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5

[SHADERREPLACEMENT...]
MESHES = bodyshell_SUB12 , ExtWindowLF , IntWindowLF
IS_TRANSPARENT = 1

[EMISSIVE_REVERSE_...]
NAME=reversinglight_l , reversinglight_r
COLOR=250, 250, 250,50
LAG=0.0
SIMULATE_HEATING=0.0

[EMISSIVE_HAZARD_0]
NAME=
COLOR=3, 2, 1
LAG=0.0
SIMULATE_HEATING=0.0

[LIGHT_LICENSEPLATE]
; no need to specify meshes names if material is using
; Plate_D.dds and Plate_NM.dds textures
MESHES=plate
OFFSET=0.0, 0.01, -0.15
RANGE=0.3
RANGE_GRADIENT_OFFSET=0.4
SPOT=200
SPOT_SHARPNESS=0.4
COLOR=.5,.8,1,10
; other supported values: TWO_ON_TOP, ONE_ON_TOP
LAYOUT=TWO_ON_TOP

[EMISSIVE_TURNSIGNAL_LEFT_0]
NAME=Object004
COLOR=500,200, 0, 10
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_TURNSIGNAL_LEFT_1]
NAME=door_dside_f_SUB18 , Object002
COLOR=500,200, 0, 10
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_TURNSIGNAL_RIGHT_0]
NAME=bodyshell_SUB12
COLOR=500,200, 0, 10
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_TURNSIGNAL_RIGHT_1]
NAME=Object003 ,door_pside_f_SUB18
COLOR=500,200, 0, 10
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

;;;;;;;;; Interior Lighting ;;;;;;;;;

;;;;;;;;; Interior Lighting ;;;;;;;;;
[EMISSIVE_LIGHT_...] ; Instrument Cluster
NAME=chassis_SUB14 , chassis_SUB23 , HUD_SUB0
COLOR=1,1,1,1.5
OFF_COLOR=1,1,1,1
LAG=0.2
SIMULATE_HEATING=1
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1
TOGGLE_VISIBILITY = 0

[EMISSIVE_LIGHT_...] ; Instrument Cluster
NAME=
COLOR=5,0,0,2
OFF_COLOR=5,0,0,2
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[EMISSIVE_LIGHT_...] ; Instrument Cluster
NAME=steeringwheel_SUB2 , chassis_SUB9 , door_dside_f_SUB8 , door_pside_f_SUB8 , door_pside_r_SUB7 , , chassis_SUB19
COLOR=4,5,10,1
OFF_COLOR=1,1,1,1
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[EMISSIVE_LIGHT_...] ; Interior Buttons
NAME= Object007 , Object007 , Object008 , ARROW_RPM11 , chassis_SUB23 , Music , Navi
COLOR=2,2,2
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[EMISSIVE_LIGHT_...] ; Interior Buttons
NAME=door_pside_f_SUB0 , door_dside_f_SUB0 , door_pside_r_SUB0 
COLOR=40,0,0,0.3
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=0

[EMISSIVE_LIGHT_...] ; Interior Buttons
NAME=chassis_SUB7 , door_dside_r_SUB13 , door_pside_r_SUB13 , door_dside_f_SUB15 , door_pside_f_SUB15 , door_dside_r_SUB0 
COLOR=40,0,0,2
OFF_COLOR=1,1,1,1
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[LIGHT_EXTRA_...]
BIND_TO_EXTRA_A=0
BIND_TO_HEADLIGHTS=1
COLOR=10,10,10,5
DIFFUSE_CONCENTRATION=0.9
EXTERIOR_ONLY=0
INTERIOR_ONLY=1
FADE_AT=1.5
FADE_SMOOTH=5
MIRROR=0.0
POSITION=-0.03, 0.789, 0.803
DIRECTION=0,0,-1
RANGE=.45
RANGE_GRADIENT_OFFSET=0.0
SPECULAR_MULT=1
SPOT=120
SPOT_SHARPNESS=0

[LIGHT_EXTRA_...]
BIND_TO_EXTRA_A=0
BIND_TO_HEADLIGHTS=1
COLOR=10,10,10,5
DIFFUSE_CONCENTRATION=0.9
EXTERIOR_ONLY=0
INTERIOR_ONLY=1
FADE_AT=1.5
FADE_SMOOTH=5
MIRROR=0.0
POSITION=0.401, 0.789, 0.803
DIRECTION=0,0,-1
RANGE=.55
RANGE_GRADIENT_OFFSET=0.0
SPECULAR_MULT=1
SPOT=80
SPOT_SHARPNESS=0

;;;;;;;;; LightsFX ;;;;;;;;;
[LIGHT_HEADLIGHT_0]
BIND_TO_HEADLIGHTS=1
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=600
BOUND_EXP=1
COLOR=100,120,150,.3
DIFFUSE_CONCENTRATION=0.0
DIRECTION=0.0, 0.2, 1.0
EXTERIOR_ONLY=0
FADE_AT=10
FADE_SMOOTH=60
INTERIOR_ONLY=0
LOWBEAM_RANGE_MAX=80
LOWBEAM_RANGE_MULT=1
LOWBEAM_RANGE_ONCOMING_MULT=1
MIRROR=0.661
MIRROR_DIRECTION=0
POPUP_ENABLED=0
POSITION=0, 0.364, 2.36
RANGE=200
RANGE_GRADIENT_OFFSET=0
SINGLE_FREQUENCY=1
SPECULAR_MULT=1

[LIGHT_BRAKE_0]
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=500
BOUND_EXP=1
COLOR=10,-1,-1,2
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, -1, -1
EXTERIOR_ONLY=1
FADE_AT=20
FADE_SMOOTH=40
INTERIOR_ONLY=0
MIRROR=0.529
MIRROR_DIRECTION=0
POSITION=0, 1.1, -2.4
RANGE=10
RANGE_GRADIENT_OFFSET=0.0
SINGLE_FREQUENCY=0
SPECULAR_MULT=1
SPOT=60
SPOT_EDGE=0.0, 0.0, 0.0
SPOT_EDGE_SHARPNESS=1
SPOT_SHARPNESS=0.0

[LIGHT_REVERSE_0]
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=500
BOUND_EXP=1
COLOR=1, 1, 1,5
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, -1, -8
EXTERIOR_ONLY=1
FADE_AT=220
FADE_SMOOTH=30
INTERIOR_ONLY=0
MIRROR=0
MIRROR_DIRECTION=0
POSITION=0, 0.385, -1.9
RANGE=5
RANGE_GRADIENT_OFFSET=0.25
SINGLE_FREQUENCY=0
SPECULAR_MULT=1
SPOT=100
SPOT_EDGE=0.12, 0.12, 0.12
SPOT_EDGE_SHARPNESS=10
SPOT_SHARPNESS=0.4

[LIGHTING]
EMISSIVE_BRAKELIGHTS_MULT=1
EMISSIVE_HEADLIGHTS_MULT=1
EMISSIVE_MULT=1
EMISSIVE_PARKINGLIGHTS_MULT=1
INTERIOR_FAKE_SHADOW_FADE=0.9
INTERIOR_FAKE_SHADOW_HEIGHT=0.4
INTERIOR_FAKE_SHADOW_OPACITY=0.9
INTERIOR_FAKE_UPPER_SHADOW_FADE=0.1
INTERIOR_FAKE_UPPER_SHADOW_HEIGHT=-0.1

[SelfLight_Headlights]
MIRROR = 0.750
DIRECTION = 0, 0,1
POSITION = 0.0, 0.368, 2.06
AFFECTS_TRACK = 0
DIFFUSE_CONCENTRATION = 0.9
BOUND_TO = headlight_l_SUB0
SPOT_SHARPNESS =0.0
SPOT = 150
COLOR=100,120,150,.2
SPECULAR_MULT = 1
RANGE = 0.45

[SelfLight_Headlights]
MIRROR = 0.664
DIRECTION = 0, -1,1
POSITION = 0.0, 0.368, 2.06
AFFECTS_TRACK = 0
DIFFUSE_CONCENTRATION = 0.9
BOUND_TO = headlight_r_SUB1
SPOT_SHARPNESS =0.0
SPOT = 90
COLOR=100,120,150,.5
SPECULAR_MULT = 1
RANGE = 0.35

[INSTRUMENTS]
FUEL_SPLASH_MULT=0
HAZARDS_G_THRESHOLD=0
SPEED_FIX=0
SPEED_LAG=0.0
SPEED_LIMIT=0

 ;;;;;;;;;; ANIMATIONS ;;;;;;;;;

[ANIMATION_0]
FILE=hood.ksanim
TIME= 2.5
BIND_TO_EXTRA_B=1

[ANIMATION_1]
FILE=Cluster1.ksanim
TIME= 0.08
BIND_TO_EXTRA_C=1


;;;;;;;;; Sound / Exhaust ;;;;;;;;; 
AUDIO_PROPERTIES]
TURBO_THROTTLE = 1

[AUDIO_VOLUME]
BACKFIRE_INT=500
BACKFIRE_EXT=500
BODYWORK=1
DIRT=1
DOWN_SHIFT=1
ENGINE_EXT=2
ENGINE_INT=1
GEAR_EXT=1
GEAR_GRIND=1
GEAR_INT=1
HORN=1
LIMITER=1
TRACTION_CONTROL_EXT=1
TRACTION_CONTROL_INT=1
TRANSMISSION=1
TURBO=0ppo
WIND=1
SKID_EXT = 1
SKID_INT = 1

[AUDIO_PITCH]
ENGINE_EXT = .9
ENGINE_INT = .9
GEAR_EXT = 1.0
GEAR_INT = 1.0
BODYWORK = 1.0
WIND = 1.0
DIRT = 1.0
DOWN_SHIFT = 1.0
HORN = 1
GEAR_GRIND = 1.0
BACKFIRE_EXT = 1
BACKFIRE_INT = 1
TRACTION_CONTROL_EXT = 1
TRACTION_CONTROL_INT = 1
TRANSMISSION = 1
LIMITER = 1
TURBO = 0.8
HIT = 1
SCRAPE = 1
WHEEL = 1
SKID_EXT = 1
SKID_INT = 1

;;;;;;;;; BrakeFX ;;;;;;;;; 
[BRAKEDISC_FX]
ACTIVE = 1             ; set to 0 to disable the whole thing if car uses ksBrakeDisc shader for something else
CERAMIC = 1           ; use ceramic look
CARVED = 1          ; add a bit of carving, radial lines (fast for shader to compute)
CARVED_FREQUENCY = 0  ; increase to make more lines
GLOW_OFFSET = 0.2      ; increase to offset heated and worn center more to the center, decrease to offset it more to the outside area; with 0.5, it would be in the middle

; Patch guesses holes from alpha-channel of txDiffuse. Holes don’t glow or reflect stuff and look dark:
ALPHA_MASK = 0.1, 0.2  ; hole is everything with alpha below 0.1, everything with alpha above 0.2 is not a hole, in-between is a transition

; Patch can also estimate deepenings based on luminance and normal texture. Deepenings glow with a delay (but fully heated, glow more) and are a bit occluded:
LUMINOCITY_MASK = 0.01, 0.02  ; everything darker than 0.01 is a deepening
NORMAL_MASK = 0.5, 0.3        ; everything looking away more than 50% is a deepening

[EXTRA_FX]
MASK_GBUFFER = headlight_r_SUB2 , headlight_l_SUB2 , taillight_l_SUB2 , taillight_r_SUB2 , bodyshell_SUB16

;;;;;;;;; Exterior [PBR] Interior ;;;;;;;;; 
[SHADER_REPLACEMENT_...]
MATERIALS = EXT_tyres
PROP_... = ksAmbient, 0.2
PROP_... = ksDiffuse, 0.4
PROP_... = fresnelEXP, 50
PROP_... = fresnelMaxLevel, 0.00
PROP_... = fresnelC, 0.00
PROP_... = ksSpecularEXP, 100
PROP_... = ksSpecular, 0.03
DOUBLE_FACE_SHADOW_BIASED = 1

[Material_Aluminium_v2]
Materials = 
Metalness= 0.2
Smoothness = .5
Reflectance = 0.8
CubemapReflectionBlur = 0
BrightnessAdjustment = 0.45
DetailNormalBlend = 0
DetailScale = 1000
OcclusionMap=0.25
DetailNormalPBRSmoothnessGamma = 1

[Material_Aluminium_v2]
Materials = 
Metalness= 0.2
Smoothness = 0.5
Reflectance = 0.8
CubemapReflectionBlur = 0
BrightnessAdjustment = 0.45
DetailNormalBlend = 1
DetailScale = 10
OcclusionMap=0.25
DetailNormalPBRSmoothnessGamma = 1

[Material_InteriorPBRDetail]
Materials = bronze2 , WH1 , WH1
DetailNormalPBRSmoothnessGamma =2
DetailNormalBlend = 1
BrightnessAdjustment = .8
DetailScale = 10
Reflectance = 0.25
Smoothness = 1
OcclusionMap=0.5

[Material_Glass]
Materials = ExtRedGlass
FilmIOR = 1.8
ExtraLightsAdjustment = 0.1
BrightnessAdjustment = 0.1
Refraction = 1
Desaturate = 0
ThicknessMult = 2

[Material_Glass]
Materials = bw_window1__2_ , bw_window1__3_
FilmIOR = 2.3
ExtraLightsAdjustment = .2
BrightnessAdjustment = .3
Refraction = 1
Desaturate = 00
ThicknessMult = 1
EXTRA_MASK_PASS = 1
EXTRA_MASK_PASS_OPACITY = 1
MaskPassColor=20,20,20

[Material_PhotoelasticGlass]
Materials = ExtGlass
FilmIOR = 2.32
PhotoelasticityMult = 0.35  ; doesn’t look good if too high
ThicknessMult = 1.0
BrightnessAdjustment = 0.3
ExtraLightsAdjustment = 0.15
; Ideally, there would be a texture for that, but we’re not going to draw
; all those textures for Kunos cars, so here are some parameters for perlin noise
; instead
PhotoelasticityBaseScale = 3.5     ; this parameter alters scale in general
PhotoelasticityNoiseScale = 0.328  ; deeply affects randomization process, careful with it
PhotoelasticitySpotsScale = 0.325   ; spots for limiting effect to some areas
PhotoelasticitySpotsOffset = 0.0  ; offset for spots, to try and fit effect nice on existing meshes
PhotoelasticityStripesScale = 3.5   ; how many stripes are there
ProfileFix = 0.0

;;;;;;;;; Exterior [FX] Exhaust ;;;;;;;;; 
----------------------------------------------------
--               EXHAUST               --
----------------------------------------------------

[INCLUDE: common/gt3_exhaust_glow.ini]
[EMISSIVE_WATER_TEMP_0_EXHAUST_GLOW]
MESHES = 
COLOR = 25, 3, 0, 3
USE_SMOOTH_TRANSITION = 1
INPUT_MIN = 50
INPUT_MAX = 60
INPUT_LUT = (| 84 = 0 | 95 = 1 |)
AFFECTS_TRACK = 1
SPECULAR_MULT = 3

[BASIC]
DIESEL_ENGINE = 		; or 1

[PARTICLES_FX_EXHAUST_1]
POSITION=0.9620773,-0.2275153,-0.7589034
DIRECTION=1,0,-.85
COLOR = 0.75,0.8,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, .7 				; 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.1, 0.2			; smoke intensity
TEMPERATURE_LAG = 1 			; engine heating up (1 to disable)
SPEED_THRESHOLD = 15, 100 		; speed at which the smoke disappears

[PARTICLES_FX_EXHAUST_2]
POSITION=0.9620773,-0.2275153,-0.6379503
DIRECTION=1,0,-.85
COLOR = 0.75,0.8,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, .7 				; 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.1, 0.2			; smoke intensity
TEMPERATURE_LAG = 1 			; engine heating up (1 to disable)
SPEED_THRESHOLD = 15, 100 		; speed at which the smoke disappears

[PARTICLES_FX_EXHAUST_3]
POSITION=-0.9620773,-0.2275153,-0.7195927
DIRECTION=-1,0,-.85
COLOR = 0.75,0.8,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, .7 				; how fast smoke particles fly from the exhaustt
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.1, 0.2			; smoke intensity
TEMPERATURE_LAG = 1 			; engine heating up (1 to disable)
SPEED_THRESHOLD = 15, 100 		; speed at which the smoke disappears

[PARTICLES_FX_EXHAUST_4]
POSITION=-0.9620773,-0.2275153,-0.6022003
DIRECTION=-1,0,-.85
COLOR = 0.75,0.8,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, .7 				; 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.1, 0.2			; smoke intensity
TEMPERATURE_LAG = 1 			; engine heating up (1 to disable)
SPEED_THRESHOLD = 15, 100 		; speed at which the smoke disappears

[LIGHT_FLAME_0]
BRIGHTNESS_MULT=1
CAR_BRIGHTNESS_MULT=1
CAR_RANGE_MULT=1
COLOR=5,1,1,1
DEBUG=0
DIRECTION_MULT=1, 1, 1
FADE_AT=150
FADE_SMOOTH=30
OFFSET=0.2
RANGE=7
RANGE_GRADIENT_OFFSET=0.2
SPOT=238.322
SPOT_SHARPNESS=0.0

[EXHAUST_FLAMES]
ANTILAG=1 ; turbo antilag, i havent tested this yet
ANTILAG_DELAY=0.0 ; how long after antilag trigger do flames start, in seconds
ANTILAG_INTENSITY=40 ; flame size
ANTILAG_INTERVAL_MAX=9000
ANTILAG_INTERVAL_MIN=2000
ANTILAG_TURBO_THRESHOLD=0.5
DAMAGE=0 ; engine damage? idk
DAMAGE_DURATION=0.00
DAMAGE_INTENSITY=0
DAMAGE_PROBABILITY=0
DISCHARGE=1 ; lifting off the throttle
DI3CHARGE_CHARGE_TIME=0.001 ; how long you have to press the throttle to "charge" the flames
DISCHARGE_DELAY=0.1 ; delay after throttle lift
DISCHARGE_DURATION=3.1 ; length of flame shooting, in seconds
DISCHARGE_PROBABILITY=1; chance of flame shoot on lift, 1 is guaranteed, 0 is never
DISCHARGE_INTENSITY=5; flame size
DISCHARGE_RPM_THRESHOLD_MAX=9000 ; self explanatory
DISCHARGE_RPM_THRESHOLD_MIN=2000 ; self explanatory
DISCHARGE_WATER_TEMPERATURE_THRESHOLD=70
FLAT_SHIFT=1 ; on upshift
FLAT_SHIFT_COOLDOWN=0 ; after upshift
FLAT_SHIFT_DURATION=5 ; length of flame shooting, in seconds
FLAT_SHIFT_GAS_THRESHOLD=80 ; how much gas needs to be pressed on upshift for flame, 100 is wide open
FLAT_SHIFT_INTENSITY=5 ; flame size
FLAT_SHIFT_PROBABILITY=1 ; chance of flame shoot on upshift
FLAT_SHIFT_RPM_THRESHOLD=8500
LIMITER=1 ; on hitting the limiter
LIMITER_DELAY=0 ; delay, in seconds
LIMITER_INTENSITY=5 ; flame size
LIMITER_RPM_THRESHOLD=2000 ; limiter flames will not shoot below this rpm

[WIPERS]
FRONT_0= Object010 , Object011
FRONT_1= front_wiper_rubber , front_wiper
REAR_0= rear_wiper , rear_wiper_rubber
WIND_THRESHOLDS_KMH = 150, 350 ; 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 ; base animation 

[WIPERS_TRACE_...]
SURFACE = ExtWindshield , IntWindshield
WIPERS = Object010 , Object011 , front_wiper_rubber , front_wiper , rear_wiper , rear_wiper_rubber

[DI_FUEL_ESTIMATE_DISTANCE_TOTAL_...]
DIGITAL_ITEM = 5
DIGITAL_ITEM_NUMBER_FORMAT = 1.0
OUTPUT_MULTIPLIER = 0.01

[ODOMETER_TRIP]
DIGITAL_ITEM=6
DIGITAL_ITEM_NUMBER_FORMAT=05.1
UPPER_BOUND=9999

[STATUS_OIL]
; similar thing, overly simplified estimation for instruments
PRESSURE_BASE = 1.0         ; base oil pressure for idling engine
PRESSURE_STEP = 0.9         ; oil pressure increase for each 1000 RPM
PRESSURE_LAG_UP = 0.998   ; oil pressure increase lag
PRESSURE_LAG_DOWN = 0.999  ; oil pressure decrease lag

TEMPERATURE_MULT = 0.88     ; relation of oil temperature to water temperature
TEMPERATURE_RPM_FACTOR = 5  ; extra increase of oil temperature for each 1000 RPM
TEMPERATURE_LAG_UP =0.9985 ; oil temperature increase lag
TEMPERATURE_LAG_DOWN = 0.9992  ; oil temperature decrease lag

[EMISSIVE_EXTRA_A_...] ; Interior Buttons
NAME=Tagfarhlicht
COLOR=100,150,200,20
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=0

[EMISSIVE_EXTRA_A_...] ; Interior Buttons
NAME=Object009
COLOR=100,150,200,5
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=0

[LIGHT_EXTRA_...]
BIND_TO_EXTRA_A=1
BIND_TO_HEADLIGHTS=0
COLOR=100,150,200,.2
DIFFUSE_CONCENTRATION=0.0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=80
FADE_SMOOTH=100
MIRROR=0.56
POSITION=0.0, 1.35, 0.487
DIRECTION=0,.3,1
RANGE=100
RANGE_GRADIENT_OFFSET=0.0
SPECULAR_MULT=1
SPOT=80
SPOT_SHARPNESS=0

[LIGHT_EXTRA_...]
BIND_TO_EXTRA_A=1
BIND_TO_HEADLIGHTS=0
COLOR=100,150,200,.1
DIFFUSE_CONCENTRATION=0.0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=80
FADE_SMOOTH=100
MIRROR=0.0
POSITION=-0.93, -0.0595, 0.926
DIRECTION=.2,-.0,-1
RANGE=2.9
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=1
SPOT=20
SPOT_SHARPNESS=0

[LIGHT_EXTRA_...]
BIND_TO_EXTRA_A=1
BIND_TO_HEADLIGHTS=0
COLOR=100,150,200,.1
DIFFUSE_CONCENTRATION=0.0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=80
FADE_SMOOTH=100
MIRROR=0.0
POSITION=0.90, -0.0595, 0.926
DIRECTION=-.2,-.0,-1
RANGE=2.9
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=1
SPOT=20
SPOT_SHARPNESS=0

[LIGHT_EXTRA_...]
BIND_TO_EXTRA_A=1
BIND_TO_HEADLIGHTS=0
COLOR=100,150,200,.1
DIFFUSE_CONCENTRATION=0.0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=80
FADE_SMOOTH=100
MIRROR=0.0
POSITION=-0.93, -0.0595, -0.955
DIRECTION=.2,-.0,1
RANGE=2.9
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=1
SPOT=20
SPOT_SHARPNESS=0

[LIGHT_EXTRA_...]
BIND_TO_EXTRA_A=1
BIND_TO_HEADLIGHTS=0
COLOR=100,150,200,.1
DIFFUSE_CONCENTRATION=0.0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=80
FADE_SMOOTH=100
MIRROR=0.0
POSITION=0.90, -0.0595, -0.955
DIRECTION=-.2,-.0,1
RANGE=2.9
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=1
SPOT=20
SPOT_SHARPNESS=0

[SCRIPTABLE_DISPLAY_...]
MESHES = Navi 
RESOLUTION = 514 , 270 ; matches values in navigator Start = "514 , 270, Size = "514 , 270"
DISPLAY_POS = 0, 0
DISPLAY_SIZE = 514 , 270
FORCE_UPDATE_AFTER = RENDERING_CAMERA_0  ; this display is going to be updated each time navigator is drawn
KEEP_BACKGROUND = 1               ; and without clearing step, so we would draw on top of navigator
SCRIPT = '
function update()
  if car.gear ~= -1 then  
    -- If gear is not reverse, activate navigator:
    ac.setDynamicTextureShift("NAVIGATOR_0", 1)  -- this function sets its opacity, it can do more
    ac.setRenderingCameraActive("RENDERING_CAMERA_0", false)  -- pause rendering camera
    return  -- and we’re done here, so let’s stop
  end

  -- Gear is reverse!
  ac.setDynamicTextureShift("NAVIGATOR_0", 0)  -- let’s stop navigator
  ac.setRenderingCameraActive("RENDERING_CAMERA_0", true)  -- activate rendering camera
  display.image{pos = vec2(0, 0), size = vec2(476, 316), image = "dynamic::camera_rear_distorted"}  -- and draw fisheye camera

  -- And we’re done! But for a bit of extra authenticity let’s add lines with trajectory:
  local startL = vec2(60, 250)  -- one thing to note: I haven’t really properly calibrated those lines yet
  local startR = vec2(476 - 60, 250)
  local direction = vec2(35, -25):normalize()
  local lineLen = 160
  local steps = 9
  local steerOffset = -car.steer * 0.12
  local currentPosL = startL
  local currentPosR = startR
  local color = rgbm(1, 0, 0, 1)
  for i = 1, steps do
    local newPosL = startL + direction * (i * (lineLen / steps)) + vec2(steerOffset * (i / steps) ^ 2, 0)
    local newPosR = startR + vec2(-direction.x, direction.y) * (i * (lineLen / steps)) + vec2(steerOffset * (i / steps) ^ 2, 0)
    local drawAcrossColor = color
    if i == 4 then
      color = rgbm(1, 1, 0, 1)
    elseif i == 7 then
      color = rgbm(0, 1, 0, 1)
    else
      drawAcrossColor = i == 9 and color or nil
    end
    ui.drawLine(currentPosL, newPosL, color, 4)
    ui.drawLine(currentPosR, newPosR, color, 4)
    if drawAcrossColor ~= nil then
      ui.drawLine(currentPosL, currentPosR, drawAcrossColor, 4)
    end
    currentPosL = newPosL
    currentPosR = newPosR
    direction:add(vec2(0, 0.02)):normalize()
  end

  -- And a warning:
  display.rect{pos = vec2(40, 276), size = vec2(396, 32), color = rgbm(0, 0, 0, 0.8 )}
  display.text{pos = vec2(40, 286), letter = vec2(12, 20), text = "Check surroundings for safety", font = "aria", width = 396, alignment = 0.5 }
end'


[RENDERING_CAMERA_0]
DYNAMIC_TEXTURE_ID = camera_rear ; here, we will create “dynamic::camera_rear” texture
POSITION = -0.0859, 0.91, -2.4
DIRECTION = 0, -.2, -1
INCLUDE_CAR = 1
REFRESH_RATE = 60  ; doesn’t need to update too often, those in-car cameras are usually pretty nasty
INTERIOR_ONLY = 1  ; stop rendering if camera is not interior one
CLIP_NEAR = 0.005  ; the way it’s positioned, it needs to render things that are very close (bits of car)
FOV = 140         ; huge FOV to get that authentic look
RESOLUTION = 1920 , 1080 ; and massive resolution too
ACTIVE_BY_DEFAULT = 0 ; inactive by default, activated by a script
WITH_LIGHTING = 1
; RELATIVE_TO = DOOR_L

[TEXTURE_PREPROCESSING_...]
DYNAMIC_TEXTURE_ID = camera_rear_distorted ; new “dynamic::camera_rear_distorted” texture
TEXTURE_SOURCE = dynamic::camera_rear ; use previously specificed camera texture
RESOLUTION = 476, 316 ; target resolution matches screen one, RESOLUTION for camera is just that multiplied by four
EFFECT = FISHEYE  ; use BASIC if you only need color correction (SATURATION, BRIGHTNESS, etc.)
INTENSITY = 1.5   ; intensity of fisheye effect, adjusted for 170° FOV
EXPOSURE = 0.56      ; this value activates tonemapping to get image from HDR to LDR space
BRIGHTNESS = 0.7  ; a bit dimmer

; CLUSTER LIGHTS
[EMISSIVE_LIGHT_...] ;  Low Beam
NAME = warning_pos
COLOR=0,10,0
OFF_COLOR=0,10,0
LAG=0.0
SIMULATE_HEATING=0
CAST_LIGHT=1
TOGGLE_VISIBILITY = 1

[EMISSIVE_LIGHT_...] ;  Low Beam
NAME = warning_light
COLOR=0,10,0
LAG=0.0
SIMULATE_HEATING=0
CAST_LIGHT=1
TOGGLE_VISIBILITY = 1

[EMISSIVE_HIGHBEAM_...] ; High Beam
NAME=warning_hbeam
COLOR=-100,-100,100
LAG=0.0
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5
TOGGLE_VISIBILITY = 1

[EMISSIVE_TURNSIGNAL_RIGHT_2]
NAME=warning_right
COLOR=0,10,0
LAG=0.0
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_TURNSIGNAL_LEFT_2]
NAME=warning_left
COLOR=0,10,0
LAG=0.0
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_LIGHT_...] ; Instrument Cluster
NAME=Cluster , interior_1_SUB7 , interior_1_SUB7
COLOR=1,1,1,2
OFF_COLOR=1,1,1,1.5
LAG=0.2
SIMULATE_HEATING=1
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1
TOGGLE_VISIBILITY = 0

[EMISSIVE_LIGHT_...] ; Instrument Cluster
NAME=ARROW_SPEED , ARROW_RPM
COLOR=1,1,1,1.5
OFF_COLOR=1,1,1,1
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[EMISSIVE_LIGHT_...] ; Instrument Cluster
NAME=speedook_SUB2 , tahook_SUB2 , strelki2 , rpetrolok_SUB2
COLOR=2,2,2,5
OFF_COLOR=2,2,2
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[EMISSIVE_LIGHT_...] ; Interior Buttons
NAME=misc_f_SUB13 , misc_f_SUB14 , steeringwheel_SUB9 , door_dside_f_SUB12 , door_pside_f_SUB12
COLOR=2,2,2,5
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[EMISSIVE_LIGHT_...] ; Interior Buttons
NAME=door_pside_f_SUB16 , misc_f_SUB19 , door_dside_f_SUB16 , door_dside_r_SUB14 , door_pside_r_SUB14
COLOR=2,2,2,10
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[EMISSIVE_LIGHT_...] ; Interior Buttons
NAME=BOOST_0,BOOST_1,BOOST_2,BOOST_3,BOOST_4,BOOST_5,BOOST_6,BOOST_7,POWER_0,POWER_1,POWER_2,POWER_3,POWER_4,POWER_5,POWER_6,,POWER_7,NM_0,NM_1,NM_2,NM_3,NM_4,NM_5,NM_6,NM_7
COLOR=5,.7,-10,3
OFF_COLOR=5,2,0,1
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=1

[EMISSIVE_...]
NAME=warning_suspension
TOGGLE_VISIBILITY = 1
COLOR=20,5,-10,2
BIND_TO=SUSP_DAMAGE
THRESHOLD=10
LAG=0.2

[EMISSIVE_...]
NAME=warning_engine , warning_fluid
TOGGLE_VISIBILITY = 1
COLOR=20,5,-10,2
INPUT=ENGINE_LIFE
INPUT_THRESHOLD = 700
INPUT_THRESHOLD_INVERSE = 1
LAG=0.2

[EMISSIVE_...]
NAME=warning_tirepres
TOGGLE_VISIBILITY = 1
COLOR=20,5,-10,2
INPUT=TYRE_PRESSURE
INPUT_THRESHOLD = 35
INPUT_SELECTOR=MAX
INPUT_SELECTOR_PIVOT=5
LAG=0.2

[EMISSIVE_...]
NAME=warning_park
TOGGLE_VISIBILITY = 1
COLOR=60,20,0.1,1
INPUT=FUEL
INPUT_THRESHOLD = 12
INPUT_THRESHOLD_INVERSE = 1
LAG=0.4

[EMISSIVE_HAZARD_0]
COLOR=40,4,4,1
NAME=
FALLBACK_HEADLIGHTS_COLOR=40,4,4,0.2
LAG=0.2

[EMISSIVE_ABS_INACTION_0]
NAME=warning_abs
TOGGLE_VISIBILITY = 1
COLOR=20,5,-10,2
LAG=0.2

[EMISSIVE_TRACTIONCONTROL_0]
NAME=warning_tcoff
TOGGLE_VISIBILITY = 1
COLOR=0
OFF_COLOR=20,5,-10,2
LAG=0.2

[EMISSIVE_TRACTIONCONTROL_INACTION_0]
COLOR=20,5,-10,2
NAME=warning_tcactive
TOGGLE_VISIBILITY = 1
LAG=0.2

[EMISSIVE_HANDBRAKE_0]
NAME=warning_handbrake
TOGGLE_VISIBILITY = 1
COLOR=60,-10,-10
LAG=0.2

[EMISSIVE_...]
NAME=warning_seatbelt, warning_airbag , warning_car , warning_stuff,warning_seatbelt,warning_stalled,warning_pbrake1
TOGGLE_VISIBILITY = 1
COLOR=60,0,0,1
INPUT=STALLED
LAG=0.2

[EMISSIVE_ABS_0]
NAME=
TOGGLE_VISIBILITY = 1
COLOR=0
OFF_COLOR=20,5,-10,2
LAG=0.2

[EMISSIVE_...]
NAME= warning_oil , 
TOGGLE_VISIBILITY = 1
COLOR=60,12,0,1
INPUT=STALLED
LAG=0.2

[EMISSIVE_...]
NAME=
TOGGLE_VISIBILITY = 0
COLOR=60,12,0.2,1
INPUT=ENGINE_LIFE
INPUT_THRESHOLD = 800
INPUT_THRESHOLD_INVERSE = 1
LAG=0.2

[EMISSIVE_...]
NAME=
TOGGLE_VISIBILITY = 0
COLOR=60,0,0,1
INPUT=ENGINE_LIFE
INPUT_THRESHOLD = 910
INPUT_THRESHOLD_INVERSE = 1
LAG=0.2

[EMISSIVE_...]
NAME=warning_car
TOGGLE_VISIBILITY = 0
COLOR=20,5,-10,2
INPUT=STALLED
LAG=0.2