; config was prepared automatically. source:
; https://github.com/ac-custom-shaders-patch/acc-extension-config/blob/master/config/cars/kunos/ks_toyota_gt86.ini
[INCLUDE]
INCLUDE = common/no_popup_lights.ini


[INCLUDE: common/selflighting.ini]

[SelfLight_Headlights]
POSITION = 0, 0.66, 1.59
MIRROR = 0.677
DIRECTION = 0, 0, 1
AFFECTS_TRACK = 0
DIFFUSE_CONCENTRATION = 1
BOUND_TO = FrontLight_0
BOUND_EMISSIVE_MAX = 250
SPOT_SHARPNESS = 0.5
SPOT = 160
COLOR = 10
SPECULAR_MULT = 0
RANGE = 0.5

; Glass with mask pass for tint
[INCLUDE: common/materials_glass.ini]

[Material_Glass]
Materials = Glass
FilmIOR = 3.5
ExtraLightsAdjustment = 0.5
BrightnessAdjustment = 1
Refraction = 1
Desaturate = 0.8
; ThicknessMult = 2

; Lights
[INCLUDE: common/custom_emissive.ini]

[CustomEmissive]
Meshes = GEO_Extra_light_FRONT, Frontlights_1_SUB1, GEO_Extra_light_REAR, rear_winker_mirror
@ = CustomEmissive_CoverAll, Channel = 3, Mirror
@ = CustomEmissive_SkipDiffuseMap
@ = AlphaFromTxDiffuse
@ = TurningLightsFront, Channel = 3

; navigators
[INCLUDE: common/navigators.ini]

[Navigator_StyleNavitel]
Meshes = GEO_Cockpit_HR_SUB8
@ = Navigator_Size, Resolution = "256, 128", Size = "256, 128", Offset = "0, 0", Scale = 3
Brightness = 0.6

[INCLUDE: common/materials_license_plate.ini]
[Material_LicensePlate_Europe]

[LIGHT_LICENSEPLATE]
BIND_TO_EXTRA_A=1
BIND_TO_HEADLIGHTS=1
MESHES=number_plate_R
OFFSET=-0.000, 0.04, -0.00
RANGE=0.27
RANGE_GRADIENT_OFFSET=0.5
SPOT=200
SPOT_SHARPNESS=0.2
COLOR=5,4.2,3.1,1.4
FALLBACK_EMISSIVE=5,4.2,3.3,0.1
LAYOUT=TWO_ON_TOP
FADE_AT=0

[EMISSIVE_TURNSIGNAL_LEFT_0]
NAME=front_winker_L
COLOR=25, 12, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_0]
NAME=front_winker_R
COLOR=25, 12, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_LEFT_1]
NAME=GEO_Extra_light_FRONT
COLOR=25, 12, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_1]
NAME=GEO_Extra_light_FRONT
COLOR=25, 12, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_LEFT_2]
NAME=rear_winker_L
COLOR=25, 12, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_2]
NAME=rear_winker_R
COLOR=25, 12, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_LEFT_3]
NAME=GEO_Extra_light_REAR
COLOR=25, 12, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_3]
NAME=GEO_Extra_light_REAR
COLOR=25, 12, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_LEFT_4]
NAME=interior_winker_L
COLOR=0, 40, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=NONE

[EMISSIVE_TURNSIGNAL_RIGHT_5]
NAME=interior_winker_R
COLOR=0, 40, 0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=NONE

[EMISSIVE_TURNSIGNAL_LEFT_6]
NAME=GEO_FrontBumper_SUB4_L
COLOR=25, 12, 0, 0.5
LAG=0.5
SIMULATE_HEATING=0.0
LOCATION=SIDE

[EMISSIVE_TURNSIGNAL_RIGHT_7]
NAME=GEO_FrontBumper_SUB4_R
COLOR=25, 12, 0, 0.5
LAG=0.5
SIMULATE_HEATING=0.0
LOCATION=SIDE

[EMISSIVE_LIGHT_0]
NAME=INT_display_A_rpm_gauge
COLOR=5,5,4,2
SIMULATE_HEATING=1.0
LOCATION=NONE

[EMISSIVE_LIGHT_1]
NAME=INT_display_A_rpm_center
COLOR=10,0,0,10

[EMISSIVE_LIGHT_2]
NAME=ARROW_RPM_ObjOff
COLOR=5,0.2,0,3

[EMISSIVE_LIGHT_3]
NAME=INT_display_A_rpm_ring
COLOR=10,0,0,5

[EMISSIVE_LIGHT_4]
NAME=INT_display_A_rpm,INT_display_A_rpm_gauge, INT_display_A_speed
COLOR=1,1,1,1

[EMISSIVE_LIGHT_5]
NAME=INT_display_A_speed_center
COLOR=10,0,0,20

[EMISSIVE_LIGHT_6]
NAME=ARROW_SPEED_ObjOff
COLOR=5,0.2,0,3

[EMISSIVE_LIGHT_7]
NAME=INT_display_A_speed_ring
COLOR=10,0,0,2

[EMISSIVE_LIGHT_8]
NAME=INT_display_A_gauge, INT_display_A_speed_gauge
COLOR=2,2,1.5,2

[EMISSIVE_LIGHT_9]
NAME=INT_display_A_center
COLOR=10,0,0,5

[EMISSIVE_LIGHT_10]
NAME=ARROW_OIL_ObjOff
COLOR=5,0.2,0,3

[EMISSIVE_LIGHT_11]
NAME=INT_display_A_ring
COLOR=10,0,0,5

[EMISSIVE_LIGHT_12]
NAME=INT_display_A_gauge_red
COLOR=10,0,0,1

[EMISSIVE_LIGHT_13]
NAME=INT_display_A_gauge001
COLOR=10,0,0,1

[EMISSIVE_LIGHT_14]
NAME=GEO_Cockpit_HR_SUB8
COLOR=1,1,1,1

[EMISSIVE_REVERSE_0]
NAME=Bumper_Rear_ObjOff_SUB2
COLOR=20, 15, 15, 0.3
LAG=0.5
SIMULATE_HEATING=1
LOCATION=REAR


;;; drone
[MODEL_REPLACEMENT_0]
FILE =toyota_gt86.kn5
INSERT = MFG_DRONE.kn5
INSERT_AFTER = DRONE_COORD

[WOBBLY_BIT_0]
NAME=mfgd_jjj ; name of the node to move
CONNECTED_TO=0,-30,12 ; point to which node is attached to, and around which it will rotate
MAX_RANGE=35 ; max range node can move from its original position
DAMPENING_LAG=0.997  ; think of it as usual AC lag value, trying to zero node's speed
G_GAIN= 3.6 ; how much G-forces affect node's speed
GRAVITY_GAIN=1.6; how much gravity affects node's speed
OFFSET_GAIN= 5.1 ; how strong is returning force
STIFF_AXIS=0,0.3,0.4 ; optional higher stiffness axis to reduce movement along it
STIFF_AXIS_STIFFNESS=0.7 ; now stiff is optional stiffness axis
G_FILTER=0.29 ; temporal filter for G-forces
DEFAULT_GRAVITY_INCLUDED_ALREADY=1 ; either 0 or 1; set it to 1 if you don't want gravity to skew your stuff when car is in neutral position

[ANIMATION_...]
FILE=spin.ksanim
TIME=0.04
LOOP_WHILE_ACTIVE=1

[ANIMATION_...]
FILE=forward.ksanim
TIME=2.0
INPUT=EXTRA_B
LOOP_WHILE_ACTIVE=0

[EMISSIVE_EXTRA_A_0]
NAME = indicator, indicator2
COLOR = 0,0,90,20
LAG = 0
SIMULATE_HEATING = 1.0
;BLINKING_PATTERN = (|0 = 0|0.5=1|1.5=0|2=0)
;BLINKING_DURATION =0.85
LOCATION = REAR

[EMISSIVE_EXTRA_C_0]
NAME = indicator, indicator2
COLOR = 120,0,0,20
LAG = 0
SIMULATE_HEATING = 1.0
BLINKING_PATTERN = (|0 = 0|0.5=1|1.5=0|2=0)
BLINKING_DURATION =0.85
LOCATION = REAR


[SCRIPT_...]
SCRIPT="
local drone = ui.MediaPlayer()
drone:setSource('./drone.wav')
drone:setLooping(true)
drone:setVolume(0)
drone:play()
local multiplier = 1
local distance = 0

function update(dt)
  if ac.getCar().isCameraOnBoard then
    multiplier = 0.1
  else
    multiplier = 1
  end

  distance = ac.getCar().distanceToCamera

  if distance < 10 then
    drone:setVolume(multiplier)
  elseif distance < 20 then
    drone:setVolume((1 - (distance - 10) / 10) * multiplier)
  else
    drone:setVolume(0)
  end

end"