[HEADER]
VERSION=extended-2

---FARADA---
[MODEL_REPLACEMENT_0] 
ACTIVE = 0
FILE=subaru_impreza_wrx.kn5
HIDE=
INSERT=farada.kn5
INSERT_AFTER=WHEEL_LF


---COPILOTO---
[MODEL_REPLACEMENT_1] 
ACTIVE = 1
FILE=subaru_impreza_wrx.kn5
HIDE=
INSERT=copiloto.kn5
INSERT_AFTER=WHEEL_LF


---LLANTAS SPEEDLINE TURINI---

[MODEL_REPLACEMENT_2] 
ACTIVE = 0
FILE=subaru_impreza_wrx.kn5
HIDE=WHEEL_LF,WHEEL_LR,WHEEL_RF,WHEEL_RR
INSERT=speedlineturini.kn5
INSERT_AFTER=SUSP_LF

---LLANTAS 6 PALOS SPEEDLINE---

[MODEL_REPLACEMENT_3] 
ACTIVE = 0
FILE=subaru_impreza_wrx.kn5
HIDE=WHEEL_LF,WHEEL_LR,WHEEL_RF,WHEEL_RR
INSERT=6palos.kn5
INSERT_AFTER=SUSP_LF


-------------------------------------------------------
----FRENOS---

[BRAKEDISC_FX]
ACTIVE = 1             ; set to 0 to disable the whole thing if car uses ksBrakeDisc shader for something else
CERAMIC = 0            ; use ceramic look
CARVED = 0             ; add a bit of carving, radial lines (fast for shader to compute)
CARVED_FREQUENCY = 20  ; 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

; Patch would try and guess size of brake disc and its inside area from its mesh, but if it fails:
DISC_RADIUS = 0.25           ; radius of a brake disc
DISC_INTERNAL_RADIUS = 0.15  ; radius of an inside part of a brake disc

; Another feature is that patch would mask reflections with rim, stopping brake disc from reflecting sky if looked at a angle. By default it would use rim radius and 60% of wheel width (for the distance between brake disc and exterior part) from “tyres.ini”, could be changed if needed:
RIM_RADIUS = 0.35  ; inside radius of a rim
RIM_HEIGHT = 0.2   ; distance between surface of brake disc and vertical surface of a wheel rim


WEAR_MULT = 1.0           ; please do not change this one unless you want to set it to 0 or something; general multiplier might change in the future
GLOW_MULT = 1.0           ; adjust glowing intensity




----ESCAPE----

[SHAKING_EXHAUST_0]
MESHES =porsche_gt3_bumpers_lod0_gmt_SUB2_002
POINT_0 = -0.39, -0.12, -2.26
POINT_0_RADIUS = 1
POINT_0_EXP = 1.0

[INCLUDE: common/gt3_exhaust_glow.ini]


[EMISSIVE_WATER_TEMP_0_EXHAUST_GLOW]
MESHES=
COLOR=25,6,0
USE_SMOOTH_TRANSITION=1
INPUT_MIN=82
INPUT_MAX=84
INPUT_LUT=(| 82 = 0 | 89 = 1 |) 
AFFECTS_TRACK=1 
SPECULAR_MULT=3

----LUCES----
[INCLUDE]
INCLUDE=common/no_popup_lights.ini

[BASIC]
IS_LOW_BEAM_AVAILABLE=1
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


[LIGHT_HEADLIGHT_...]
NAME=Shape_IndexedFaceSet_93
ACT_AS_HEADLIGHTS=1
COLOR=1.12, 1.12, 1.1, 10
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=400
BOUND_EXP=1.5
POSITION=-0.0, 0.37, 2
SPOT=150
SPOT_SHARPNESS=0.4
SPOT_UP=0.0499376, 0.0998752, -0.009
SECOND_SPOT=90
SECOND_SPOT_INTENSITY=0.5
SECOND_SPOT_RANGE=190
SECOND_SPOT_SHARPNESS=0.15
SECOND_SPOT_SKIP=0.3
SPECULAR_MULT=0.2

[EMISSIVE_HIGHBEAM_0]
NAME=Shape_IndexedFaceSet_93, posizione_gmt01_001
COLOR=250,250,175
LAG=0.1
SIMULATE_HEATING=1
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=1.5


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



------------------///ANTI-LAG///------------------

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

----LIMPIAS----

[WIPERS_TRACE_...]
SURFACE =69_0,38_0_002
WIPERS=0_0_010,0_0_012

[ANIMATED_WIPER_...]
MESHES =0_0_010,0_0_012
UNDERLYING_SURFACE =69_0,38_0_002
DEBUG = 1 ; remove when everything is ready

[MESH_ADJUSTMENT_...]
MESHES =0_0_010,0_0_012
MOVE_TO = modelRoot:y

[BASIC]
DISABLE_WIPER_KSANIM = 1

[ANIMATED_WIPER_0]
DEBUG = 1
MESHES = 0_0_010, 0_0_012
UNDERLYING_SURFACE = 69_01, 38_0_002
GROUP_0 = '0_0_012@A=*'
GROUP_0_ANGLE_TO = 84.8
GROUP_0_AXIS = 0, 0.70710677, 0.70710677
GROUP_0_AXIS_OFFSET_0 = 0, 0.70710677, 0.70710677
GROUP_0_AXIS_OFFSET_1 = 0, 0.70710677, 0.70710677
GROUP_0_END = -0.7192143, 0.82335496, 0.8366577
GROUP_0_PIVOT = 0.1679686, 0.781202, 1.1351781
GROUP_1 = '0_0_010@A=*'
GROUP_1_ANGLE_TO = 82.8
GROUP_1_AXIS = 0, 0.70710677, 0.70710677
GROUP_1_AXIS_OFFSET_0 = 0, 0.70710677, 0.70710677
GROUP_1_AXIS_OFFSET_1 = 0, 0.70710677, 0.70710677
GROUP_1_END = -0.3060883, 0.832286, 0.96813893
GROUP_1_PIVOT = 0.5498756, 0.77271605, 1.0582741




-----RUEDASFX-----

[INCLUDE: common/tyre_patterns.ini]
[TyresPattern_StyleRainF1]

[TYRES_FX]
ENABLED = 1                  ; Set to 0 to fully disable Tyres FX for a given car (or axis)
NOFX_DISTANCE_SWITCH = 16    ; Distance to disable Tyres FX at (48 for open wheelers, 16 for regular cars)
VISIBLE_IN_INTERIOR_CAM = 0  ; If effects are active with interior cameras (1 by default for open wheelers)

; Visual damage:
WEAR_MAX_VIRTUAL_VM = 25     ; Virtual kilometers for a tyre to show up as fully worn (defaults: 10 for
                             ; open wheelers, 15 for racing cars, 25 for regular cars)
DAMAGE_FLAT_SPOT_GAIN = 5    ; Intensity of flat spot damage
DAMAGE_FLAT_SPOT_FADE = 0.1  ; Fading speed for flat spot damage
DAMAGE_GRAIN_GAIN = 5        ; Intensity of grain damage
DAMAGE_GRAIN_MAX = 0.8       ; Maximum amount of grain damage
DAMAGE_WIDTH_K = 1.2         ; Width of visual damage area
DAMAGE_OFFSET_K = 0          ; Horizontal offset of visual damage area
DAMAGE_FLAT_SPOT_DEBUG = 0   ; If set, overrides flat spot damage around the entire wheel for debugging
DAMAGE_GRAIN_DEBUG = 0       ; If set, overrides grain damage around the entire wheel for debugging

; Material parameters for visual damage:
DAMAGE_SPEC_MULT = 0.6       ; Multiplier for ksSpecular of damaged areas
DAMAGE_SPEC_EXP_MULT = 0.2   ; Multiplier for ksSpecularEXP of damaged areas
DAMAGE_REFL_MULT = 0.8       ; Multiplier for fresnelMaxLevel of damaged areas
DAMAGE_OCCLUSION_MULT = 0.2  ; AO multiplier for damaged areas
DAMAGE_NORMALS_MULT = 2      ; Normal map boost value

; Visual dirt:
DIRT_ACCUMULATION = 600      ; How fast dirt or grass adds up to a wheel
DIRT_FADE = 20               ; How fast dirt fades (also, clamped from above by physics dirty level)
DIRT_OFFSET_K = 0.0          ; Offset for dirt map on a wheel along X axis relative to car
DIRT_WIDTH_K = 1.0           ; Dirt width on a wheel (set it in a way that it barely touches sides)
DIRT_GRASS_DEBUG = 0         ; If set, override grass dirt for debugging
DIRT_DIRT_DEBUG = 0          ; If set, override non-grass dirt for debugging

; Shape deformation:
FLEX_MULT = 1.0              ; Multiplier for sideways flexing (based on physics, but sometimes tyres might
                             ; have a strange configuration: this parameter can help)
FLEX_PROFILE_MULT = 0.45     ; Bending part of a tyre profile, from 0.1 to 2
FLEX_SQUASH_SMOOTHING = 0.1  ; Temporal filtering for squashing, from 0 to 1 (decrease for smoother changes)
FLEX_SKEW_RANGE_MULT = 3     ; Skew range
FLEX_SKEW_SMOOTHING = 0.1    ; Temporal filtering for skewing (decrease for smoother changes)
FLEX_MAX_SKEW_MULT = 0.8     ; Multiplier for maximum skewing

; Positioning of custom normals (more on that a bit further down):
CUSTOM_NORMALS_POS = 0, 0  ; Align custom normals from side to side with this parameter
CUSTOM_NORMALS_SCALE = 12         ; How much custom normals repeat along the circumference

; Blown tyres:
BROKEN_TYRES_DYNAMIC = 1       ; Change to 0 to disable procedural look for blown tyres
BROKEN_TYRES_BASE_NUDGE = 0.0  ; Optional nugde in the middle for blown tyres (make sure it doesn’t intersect
                               ; with tyre geometry unless you want to use a custom shape for interior part
                               ; of a blown tyre)
BROKEN_TYRES_BASE_BRIGHTNESS = 1.0 ; Brightness of the interior part of blown tyre
BROKEN_TYRES_NORMAL_LF =       ; If set, meshes in this query are shown when tyres are not broken (replace _LF
                               ;  with _RF, _LR, _RR)
BROKEN_TYRES_BROKEN_LF =       ; If set, meshes in this query are shown when tyres are broken

[TYRES_FX_CUSTOMTEXTURE_WET]  ; Overriding textures for texture set with short name “SM” 
TXDIFFUSE =cinturato.dds     ; Replacement for txDiffuse
TXBLUR =        ; Replacement for txBlur
TXNORMAL = flat_nm.dds     ; Replacement for txNormal
TXNORMALBLUR =  ; Replacement for txNormalBlur

