[BASIC]
IS_LOW_BEAM_AVAILABLE=0
IS_HIGH_BEAM_AVAILABLE=1
OPEN_WHEELER = 0               ; patch uses info on if car is open wheeler or not a lot (for example, for how sparks or tyres would look, or even how car is rendered in rendering queue). it gets that info from “ui_car.json , but it could be generally more reliable to set it explicitly
RALLY_CAR = 0                  ; similar thing, although rally check is only used for switching headlights to rally mode if it’s a single car race
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


[EXHAUST_FLAMES]
ANTILAG=0 ; turbo antilag, i havent tested this yet
ANTILAG_DELAY=0.2 ; how long after antilag trigger do flames start, in seconds
ANTILAG_INTENSITY=15 ; flame size
ANTILAG_INTERVAL_MAX=7000
ANTILAG_INTERVAL_MIN=4000
ANTILAG_TURBO_THRESHOLD=0.2
DAMAGE=0 ; engine damage? idk
DAMAGE_DURATION=0.00
DAMAGE_INTENSITY=0
DAMAGE_PROBABILITY=0
DISCHARGE=1 ; lifting off the throttle
DISCHARGE_CHARGE_TIME=0 ; how long you have to press the throttle to "charge" the flames
DISCHARGE_DELAY=0.065 ; delay after throttle lift
DISCHARGE_DURATION=0.05 ; length of flame shooting, in seconds
DISCHARGE_PROBABILITY=0.65; chance of flame shoot on lift, 1 is guaranteed, 0 is never
DISCHARGE_INTENSITY=0.3; flame size
DISCHARGE_RPM_THRESHOLD_MAX=7500 ; self explanatory
DISCHARGE_RPM_THRESHOLD_MIN=5000 ; self explanatory
DISCHARGE_WATER_TEMPERATURE_THRESHOLD=84
FLAT_SHIFT=1 ; on upshift
FLAT_SHIFT_COOLDOWN=0 ; after upshift
FLAT_SHIFT_DURATION=0.05 ; length of flame shooting, in seconds
FLAT_SHIFT_GAS_THRESHOLD=85 ; how much gas needs to be pressed on upshift for flame, 100 is wide open
FLAT_SHIFT_INTENSITY=0.005 ; flame size
FLAT_SHIFT_PROBABILITY=0.05 ; chance of flame shoot on upshift
FLAT_SHIFT_RPM_THRESHOLD=7400
LIMITER=0 ; on hitting the limiter
LIMITER_DELAY=0.3 ; delay, in seconds
LIMITER_INTENSITY=100 ; flame size
LIMITER_RPM_THRESHOLD=7000 ; limiter flames will not shoot below this rpm

[MODEL_REPLACEMENT_...]
FILE=audi_r8_gt4.kn5
HIDE=
INSERT=lumi-cup2.kn5
INSERT_AFTER=COCKPIT_HR

[MODEL_REPLACEMENT_...]
FILE=audi_r8_gt4_LOD_B.kn5
HIDE=
INSERT=lumi-cup2.kn5
INSERT_AFTER=COCKPIT_LR

[MODEL_REPLACEMENT_...]
FILE=audi_r8_gt4_LOD_C.kn5
HIDE=
INSERT=lumi-cup2.kn5
INSERT_AFTER=COCKPIT_LR

[MODEL_REPLACEMENT_...]
FILE=audi_r8_gt4_LOD_D.kn5
HIDE=
INSERT=lumi-cup2.kn5
INSERT_AFTER=COCKPIT_LR

[EMISSIVE_LIGHT_...]
NAME =main_light_body1, main_light_body2
COLOR=2,2,3,2
OFF_COLOR=2,2,3,0.7


[EMISSIVE_LIGHT_...]
NAME=L1
COLOR=19.2,19.4,25.4,10
OFF_COLOR=19.2,19.4,25.4,10

[EMISSIVE_BRAKE_...]
NAME=B0
COLOR=250,0,0,5
FALLBACK_HEADLIGHTS_COLOR=80,0,0,2
LAG=0.1
SIMULATE_HEATING=0 

[EMISSIVE_BRAKE_...]
NAME=LRAIN
COLOR=250,0,0,10
FALLBACK_HEADLIGHTS_COLOR=0,0,0,0
LAG=0.1
SIMULATE_HEATING=0 

[LIGHT_BRAKE_0]
AFFECTS_TRACK=1
COLOR=2,0.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.468203
OFF_COLOR=1,0.0911936,0.0265662,1.05
OFF_FADE_MULT=1.674586
OFF_MIRROR=0.549986
OFF_MULT=0.1
OFF_POSITION=0,0.54357,-2.01
OFF_RANGE_MULT=0.767561
POSITION=0,0.547034,-2.01
RANGE=10
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=1
SPOT=135.5
SPOT_EDGE=0.582,0.582,0.582
SPOT_EDGE_SHARPNESS=10
SPOT_SHARPNESS=0.3475

[LIGHT_HEADLIGHT_0]
BOUND_TO=L0
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=500
BOUND_EXP=1
COLOR=300.0,300.0,325.0,0.055
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, -0.22, 0.75
EXTERIOR_ONLY=0
FADE_AT=450
FADE_SMOOTH=50
INTERIOR_ONLY=0
LOWBEAM_RANGE_MAX=70
LOWBEAM_RANGE_MULT=0.8
LOWBEAM_RANGE_ONCOMING_MULT=0.4
MIRROR=0.66
MIRROR_DIRECTION=0
NO_SELF_SPECULAR=1
OFF_COLOR=200.0,200.0,300.0,0.00
OFF_FADE_MULT=0.702734
OFF_MIRROR=0.696176
OFF_MULT=0
OFF_POSITION=0, 0.553122, 1.5931
OFF_RANGE_MULT=0.196917
POSITION=0, 0.60, 1.6
PREFER_FRONT=-1
RANGE=260
RANGE_GRADIENT_OFFSET=0
SECOND_SPOT=120
SECOND_SPOT_INTENSITY=0.21
SECOND_SPOT_RANGE=16
SECOND_SPOT_SHARPNESS=0.5
SECOND_SPOT_SKIP=0.3
SINGLE_FREQUENCY=0
SPECULAR_MULT=1
SPOT=48
SPOT_EDGE=0.12, 0.12, 0.12
SPOT_EDGE_SHARPNESS=10
SPOT_SHARPNESS=0
SPOT_UP=0, 1, 0

[LIGHT_HEADLIGHT_1]
BOUND_TO=
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=500
BOUND_EXP=1
COLOR=300.0,300.0,350.0,0.035
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, -0.28, 0.75
EXTERIOR_ONLY=0
FADE_AT=450
FADE_SMOOTH=50
INTERIOR_ONLY=0
LOWBEAM_RANGE_MAX=70
LOWBEAM_RANGE_MULT=0.8
LOWBEAM_RANGE_ONCOMING_MULT=0.4
MIRROR=0.66
MIRROR_DIRECTION=0
NO_SELF_SPECULAR=1
OFF_COLOR=200.0,200.0,300.0,0.00
OFF_FADE_MULT=0.702734
OFF_MIRROR=0.696176
OFF_MULT=0
OFF_POSITION=0, 0.553122, 1.5931
OFF_RANGE_MULT=0.196917
POSITION=0, 0.51, 2.1
PREFER_FRONT=-1
RANGE=260
RANGE_GRADIENT_OFFSET=0
SECOND_SPOT=120
SECOND_SPOT_INTENSITY=0.21
SECOND_SPOT_RANGE=16
SECOND_SPOT_SHARPNESS=0.5
SECOND_SPOT_SKIP=0.3
SINGLE_FREQUENCY=0
SPECULAR_MULT=1
SPOT=30
SPOT_EDGE=0.12, 0.12, 0.12
SPOT_EDGE_SHARPNESS=10
SPOT_SHARPNESS=0
SPOT_UP=0, 1, 0


[EMISSIVE_TURNSIGNAL_LEFT_0]
NAME=ST_FRONT_LF
COLOR=250, 120, 0
LAG=0.5
SIMULATE_HEATING=0.0


[EMISSIVE_TURNSIGNAL_LEFT_1]
NAME=ST_REAR_LR
COLOR=250, 120, 0
LAG=0.5
SIMULATE_HEATING=0.0
TOGGLE_VISIBILITY=1

[EMISSIVE_TURNSIGNAL_RIGHT_0]
NAME=ST_FRONT_RF
COLOR=250, 120, 0
LAG=0.5
SIMULATE_HEATING=0.0


[EMISSIVE_TURNSIGNAL_RIGHT_1]
NAME=ST_REAR_RR
COLOR=250, 120, 0
LAG=0.5
SIMULATE_HEATING=0.0

TOGGLE_VISIBILITY=1


[SHADER_REPLACEMENT_...]
MESHES=ST_REAR_LR,ST_REAR_RR
PROP_... = emSkipDiffuseMap, 1

[EXTRA_FX_EMISSIVE_...]
MESHES =ST_REAR_LR,ST_REAR_RR
COLOR=250.120.0
EXTERIOR_ONLY = 1
MIP_BIAS = 0
RANGE = 0.01
DIRECTED = 0
SPLIT_ELEMENTS = 1

[SHADER_REPLACEMENT_...]
MATERIAIS = MI_Tyre_Flex_Dry_L
PROP_...= ksDiffuse,0,45
PROP_...= fresnelC, 0,3
PROP_...= fresnelMaxLevel, 0,55
PROP_...= ksSpecularEXP, 10
PROP_...= ksSpecular, 0,1

; Car paint
[INCLUDE: common/materials_carpaint.ini]
CarPaintMaterial = EXT_Carpaint_Inst, EXT_RIM
CarPaintVersionAware = 4

[Material_CarPaint_Metallic]
FresnelMax = 1
FresnelC = 0.1
BrightnessAdjustment = 0.40 ; compensates for ambient specular
ColoredSpecular = 0.85
AmbientSpecular = 1
AmbientSpecularEXP = 10
ClearCoatThickness = 0.06


[INCLUDE: common/materials_interior.ini]
[INCLUDE: common/materials_glass.ini]
[INCLUDE: common/materials_pbr.ini]
[INCLUDE: common/f1_tyre_damage.ini

[Material_Fabric_v2]
Materials=SEAT
BrightnessAdjustment = 0.05
DetailScale=30
DetailNormalBlend = 3.3
ApplyTilingFix=1

[Material_Glass]
Materials = EXT_GLASS 
ThicknessMult = 2.0
EXTRA_MASK_PASS = 1.0
EXTRA_MASK_PASS_OPACITY = 0.1
FilmIOR=2.5


[Material_Glass]
Materials = EXT_Glass_Emissive_Rear,EXT_Glass_Emissive_Front,EXT_Windows
FilmIOR=2.0
ThicknessMult = 2
MaskPass = 0.5            ; mask pass opacity
MaskPassColor = 0, 0, 0  ; mask pass color adjustment


[Material_Carbon]
Materials = INT_Carbon
Smoothness = 0.3
Reflectance = 0.3
CubemapReflectionBlur = 0.5
BrightnessAdjustment = 0.2
ClearCoatF0 = 0.15
ClearCoatSmoothness = 1
ClearCoatIntensity = 0.9
DetailNormalBlend = 0.6
DetailScale = 600

[Material_Carbon]
Materials = 
Smoothness = 0.3
Reflectance = 0.3
CubemapReflectionBlur = 0.5
BrightnessAdjustment = 0.2
ClearCoatF0 = 0.15
ClearCoatSmoothness = 1
ClearCoatIntensity = 0.9
DetailNormalBlend = 0.6
DetailScale = 100

[Material_Leather_v2]
Materials=
DetailScale=100
BrightnessAdjustment=0.02

[Material_CarPaint_Metal]
CarPaintMaterial = INT_CAB_ROLLCAGE
UseMetallicReflections = 1
FresnelMax = 0.5
FresnelC = 0.5
FlakesK = 0.5
ClearCoatThickness = 0.5
ColoredSpecular = 0.2
AmbientSpecular = 0.1
BrightnessAdjustment = 0.2

[Material_Metal_v2]
Materials=INT_ELE_METAL
DetailScale=0
BrightnessAdjustment = 0.3

[Material_CarPaint_Matte]
Materials = INT_Occlusion_Inst, EXT_Mechanics
FresnelMax = 1
FresnelC = 0.1
BrightnessAdjustment = 0.65 ; compensates for ambient specular
ColoredSpecular = 1.3
AmbientSpecular = 1
AmbientSpecularEXP = 10
ClearCoatThickness = 0.03
SpecularBase = 0, 1
SpecularSun = 0.025, 50


[Material_CarPaint_Metal]
CarPaintMaterial = 
UseMetallicReflections = 1.5
FresnelMax = 5.8
FresnelC = 3.5
FlakesK = 0.8
ClearCoatThickness = 0.2
ColoredSpecular = 0.3
AmbientSpecular = 0.3
BrightnessAdjustment = 0.9




;WIPER

[WIPERS_TRACE_...]
SURFACE = EXT_GLASS
WIPERS = WIPER_RUBBER_L,WIPER_RUBBER_R

;TRANSPARENT WINDOWBANNER

[SHADER_REPLACEMENT_...]
MATERIALS = EXT_Banner
IS_TRANSPARENT=0
BLEND_MODE=ALPHA_BLEND






-----MIRROR-----
[REAL_MIRROR_0]
ROTATION=0.15, 0

[REAL_MIRROR_2]
ROTATION=-0.15, 0

[Material_DigitalScreen]
Materials = SAS_INFO,DISPLAY_SAS,STEER_DISPLAY,RACELOGIC_DISPLAY
MatrixType = IPS           ; valid values: IPS, TN
UseTextureCoordinates = 1  ; with 0, vertex coordinates will be used. sometimes it’s better, sometimes it’s buggier
ScreenScale = 400          ; amount of pixels horizontally
ScreenAspectRatio = 0.25   ; aspect ratio, height/width
Emissive = 2              ; screen brightness
FlipXY = 0                 ; rotate display 90°

[EMISSIVE_...]
TOGGLE_VISIBILITY=1
INPUT = SEATBELT
NAME=SAS_LCD
COLOR=1,1,1
OFF_COLOR=2,2,2
LAG=0.3

[EMISSIVE_...]
TOGGLE_VISIBILITY=1
INPUT = GEAR
INPUT_THRESHOLD = N
INPUT_THRESHOLD_INVERSE = 0
NAME=SAS_INFO
COLOR=5,5,5
OFF_COLOR=0,0,0
SMOOTH_IN=0.5
LAG=0.5

[DATA]
DISABLE_DIGITALPANELSINI = 1

[SHADER_REPLACEMENT_...]
MATERIALS = LUMIRANK
SHADER = ksPerPixelMultiMap_emissive
FILL_MISSING_TEXTURES = 1
PROP_... = emSkipDiffuseMap, 1
PROP_... = ksEmissive, 000, 000, 000

[LED_PANEL_...]
MESHES = lumirank_3     ; target mesh
TEXTURE_SLOT = txEmissive       ; target texture slot
RESOLUTION = 1024, 512          ; resolution of newly generated texture
MASKS_PACK = lumirank_font.zip  ; name of a pack with LED masks
DIGIT_0 = 13, 5, 310, 256      ; X, Y, width and height of a first digit
DIGIT_1 = 358, 5, 310, 256     ; X, Y, width and height of a second digit
DIGIT_2 = 707, 5, 310, 256     ; X, Y, width and height of a third digit
                                ; you can set as many digits as you need

BASE_COLOR = '#ffffff', 0.0    ; base color (when it’s not flashing)
FLASHING_COLOR = '#ffffff', 1  ; color for flashing
FLASHING_APPLY_MASK = 1        ; should mask be applied to flashing

N24_FLASHING_PERIOD = 3.5        ; N24 flashing: period in seconds
N24_FLASHING_TIME = 1.2          ; for how long it would flash in seconds
N24_FLASHING_FREQUENCY = 6       ; flashing frequency in Hz
N24_FLASHING_ACTIVE_SHARE = 0.7  ; how much time during flashing it spends in active stage

BLANCPAIN_FLASHING_PERIOD = 1       ; Blancpain flashing: period in seconds
BLANCPAIN_FLASHING_DURATION = 0.2   ; for how long it shuts off, in seconds
BLANCPAIN_FLASHING_RACE_CLASS = PRO  ; race class (it would flash only for a leader in class)

ROLE_0 = TEXT  ; first role
ROLE_0_TEXT = FER     ; first role text
ROLE_1 = POSITION     ; second role
                      ; you can set as many roles as you need

ROLE_DURATION = 3     ; how much time in seconds each role lasts

[SHADER_REPLACEMENT_...]
MATERIALS = SAS_INFO
SHADER = ksPerPixelMultiMap_emissive
FILL_MISSING_TEXTURES = 1
PROP_... = emSkipDiffuseMap, 1
PROP_... = ksEmissive, 50, 50, 50

[LED_PANEL_...]
MESHES = SAS_INFO
TEXTURE_SLOT = txEmissive
RESOLUTION = 512, 512
MASKS_PACK = sas_info.zip
DIGIT_0 = 60, 120, 111, 200
DIGIT_1 = 195, 120, 111, 200
DIGIT_2 = 340, 120, 111, 200

BASE_COLOR = '#f6f6f6', 0.5
FLASHING_COLOR = '#f6f6f6', 1
FLASHING_APPLY_MASK = 1

BLANCPAIN_FLASHING_PERIOD = 0.5
BLANCPAIN_FLASHING_DURATION = 0.15
BLANCPAIN_FLASHING_RACE_CLASS = AM

N24_FLASHING_PERIOD = 3.5
N24_FLASHING_TIME = 1.2
N24_FLASHING_FREQUENCY = 6
N24_FLASHING_ACTIVE_SHARE = 0.7

ROLE_0 = DRIVER_NAME
ROLE_1 = POSITION
ROLE_2 = FUEL
ROLE_3 = SPEEDLIMITER
ROLE_DURATION = 3


[EMISSIVE_...]
NAME=LRAIN
BIND_TO_EXTRA_A=1
INPUT=EXTRA_A
COLOR=100,0,0
OFF_COLOR=0,0,0
BLINKING_PATTERN= (|0=0|0.5=0|1=0|1.5=0.5|2=1|2.5=1|3=0.5|3.5=0|4=0)
BLINKING_DURATION=1

[WHEEL_LF]
IS_OPEN=1

[WHEEL_LR]
IS_OPEN=1

[WHEEL_RF]
IS_OPEN=1

[WHEEL_RR]
IS_OPEN=1


###############################################################################################################
################################       DIGITAL INSTRUMENTS        #############################################
###############################################################################################################

[SCRIPTABLE_DISPLAY_...]
ACTIVE = 1
MESHES = DISPLAY
RESOLUTION = 1024, 1024
DISPLAY_POS = 0, 0
DISPLAY_SIZE = 1024, 1024
SCRIPT = csp_lua/r8_display.lua

[SCRIPTABLE_DISPLAY_...]
ACTIVE = 1
MESHES = RACELOGIC_DISPLAY
RESOLUTION = 512, 128
DISPLAY_POS = 0, 0
DISPLAY_SIZE = 512, 128
SCRIPT = csp_lua/racelogic_display.lua

; [SCRIPTABLE_DISPLAY_...]
; ACTIVE = 1
; MESHES = SASPIT
; RESOLUTION = 512, 512
; DISPLAY_POS = 0, 0
; DISPLAY_SIZE = 512, 512
; SCRIPT = csp_lua/flag_display.lua

[SCRIPTABLE_DISPLAY_...]
ACTIVE = 1
MESHES = LED_0
RESOLUTION = 64,64
DISPLAY_POS = 0, 0
DISPLAY_SIZE = 64,64
SCRIPT = csp_lua/leds.lua

