[WIND]
DYNAMIC_FLAGS = AUTO

[BASIC]
IGNORE_OTHER_CONFIGS = 1
SUPPORTS_WIND=1

[DISTANT_GLOW]
THRESHOLD = 25
SHARED_THRESHOLD = 25

[LIGHTING]
LIT_MULT = 1.0
CAR_LIGHTS_LIT_MULT = 1.0
SPECULAR_MULT = 1.0

[INCLUDE]
INCLUDE = common\conditions.ini, common\materials_base.ini, common\materials_track.ini, common\custom_emissive.ini

[LIGHT_POLLUTION]
RELATIVE_POSITION=-0.780, -0.074, 1.886
DENSITY=0.50
RADIUS_KM=15
COLOR=0.95,0.7,0.6
CONDITION=NIGHT_SMOOTH

[PURE]
HUMIDITY_OFFSET=0.8
FOG_SHAPE=3

;;;;;;;;;;;;;

[GRASS_FX]
GRASS_MATERIALS = GRASS_NEW, "Material #515", Fuji_100m, fuji_srtm?,
OCCLUDING_MATERIALS = DRENOS,
OCCLUDING_MATERIALS_ALPHA = TILE_GR, EDGES_1, REF_T1, lines_decals,
 ; leave it empty! and in!
ORIGINAL_GRASS_MATERIALS =
MASK_MAIN_THRESHOLD = -0.3
MASK_RED_THRESHOLD = -0.3
MASK_MIN_LUMINANCE = -1
;TEXTURE = grass_fx/highlands.dds
TEXTURE = highlands_darker.dds
TEXTURE_GRID = 8, 3  ; columns and rows

[GRASS_FX_TEXTURE_GROUP_0]
PIECE_0 = 1, 1       ; first piece stars with cell at (1; 1), coordinates skip first row, so it would be that piece with a single yellow flower
PIECE_0_SIZE_MULT = 1
PIECE_0_CHANCE = 0.1
PIECE_1 = 2, 1       ; second piece, takes a single cell as well
PIECE_1_SIZE_MULT = 1
PIECE_1_CHANCE = 0.1
PIECE_2 = 1, 2, 2, 1 ; third piece, with yellow and white flower, taking 21 slots
PIECE_2_CHANCE = 0
PIECE_3 = 6, 1       ; two more only green pieces
PIECE_3_SIZE_MULT = 1
PIECE_4 = 7, 1
PIECE_4_SIZE_MULT = 1
PIECE_5 = 4, 1, 2, 2 ; piece taking 22 slots, the one with long gras
PIECE_5_CHANCE = 0.5
PIECE_5_SIZE_MULT = 1.35 ; default size multiplier is based on size in cells, overriding

 ; define some bigger pieces in group1
[GRASS_FX_TEXTURE_GROUP_1]
PIECE_6 = 3, 1, 1, 2 ; piece taking 12 slots, the one with purple flowers
PIECE_6_CHANCE = 0.0
PIECE_6_SIZE_MULT = 1.5 ; default size multiplier is based on size in cells, overriding
PIECE_7 = 6, 2, 1, 1 ; yellow flowers
PIECE_7_CHANCE = 0.02
PIECE_7_SIZE_MULT = 1 ; default size multiplier is based on size in cells, overriding
PIECE_8 = 7, 2, 1, 1 ; blue flowers
PIECE_8_CHANCE = 0.0
PIECE_8_SIZE_MULT = 1.5 ; default size multiplier is based on size in cells, overriding
PIECE_9 = 8, 2, 1, 1 ; red flowers
PIECE_9_CHANCE = 0.0
PIECE_9_SIZE_MULT = 1.2 ; default size multiplier is based on size in cells, overriding

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MAP A
[GRASS_FX_CONFIGURATION_A]

MASK_MAIN_THRESHOLD = 0.95
MASK_RED_THRESHOLD= 0.075
MASK_MIN_LUMINANCE = 0.015
MASK_MAX_LUMINANCE = 0.175

MASK_BLUR=0.9

TRIM_PERIOD=THURSDAY
SHAPE_SIZE = 0.75, 1.5
SHAPE_CUT = 1.0, 0.125    ; very cut at Thursday, then less so
SHAPE_TIDY = 0.75, 0.05   ; very tidy at Thursday
SHAPE_WIDTH = 1.0

TEXTURE_BASE_CHANCE = 0.0025       ; chance of regular grass to spawn
TEXTURE_GROUP_0_CHANCE = 0.025  ; chance of first group to spawn

MASK_BLUR=0.9

[GRASS_FX_ADJUSTMENT_...]
MATERIALS = GRASS_NEW,
MAP = A

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MAP B
[GRASS_FX_CONFIGURATION_B]

MASK_MAIN_THRESHOLD = 0.75
MASK_RED_THRESHOLD= 0.05
MASK_MIN_LUMINANCE = 0.02
MASK_MAX_LUMINANCE = 0.095

MASK_BLUR=0.9

TRIM_PERIOD=30
SHAPE_SIZE = 1.5, 3.
SHAPE_CUT = 1.0, 0.125    ; very cut at Thursday, then less so
SHAPE_TIDY = 0.75, 0.05   ; very tidy at Thursday
SHAPE_WIDTH = 1.0

TEXTURE_BASE_CHANCE = 0.0       ; chance of regular grass to spawn
TEXTURE_GROUP_0_CHANCE = 0.05  ; chance of first group to spawn
TEXTURE_GROUP_1_CHANCE = 0.001

[GRASS_FX_ADJUSTMENT_...]
MATERIALS = "Material #515", Fuji_100m, fuji_srtm?,
MAP = B

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; heli animations
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Animated objects

[ANIMATED_...]
NODE = helicopter_yellow
ANIMATION = heli_yellowfly_x.ksanim
DURATION = 168

[ANIMATED_...]
NODE = helicopter_red
ANIMATION = heli_redfly_x.ksanim
DURATION = 192

[ANIMATED_...]
NODE = helicopter_hughes_00
ANIMATION = heli_hughesfly_00_x.ksanim
DURATION = 120

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;helicopter blade rotation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[SHADER_REPLACEMENT_...]
MATERIALS = Rotor
SHADER = stPerPixelNM_UVflow
PROP_0 = offsetNMSpeed, 6.3, 0

[SHADER_REPLACEMENT_...]
MATERIALS = Rotor2
SHADER = stPerPixelNM_UVflow
PROP_0 = offsetNMSpeed, 6.3, 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;helicopter lights
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[CONDITION_...]
NAME = BLINK
INPUT = ONE
FLASHING_FREQUENCY = 5
FLASHING_SMOOTHNESS = 0
FLASHING_SKIP_OFF_STATE = 0
FLASHING_NOISE_AMPLITUDE = 0
FLASHING_MIN_VALUE = 0.0
FLASHING_SYNCED = 1

[CONDITION_...]
NAME = BLINK_ALT
INPUT = ONE
FLASHING_FREQUENCY = -5
FLASHING_SMOOTHNESS = 0
FLASHING_SKIP_OFF_STATE = 0
FLASHING_NOISE_AMPLITUDE = 0
FLASHING_MIN_VALUE = 0.0
FLASHING_SYNCED = 1

[MATERIAL_ADJUSTMENT_3]
ACTIVE = 1
DESCRIPTION = heli green
MATERIALS = heligreen, Hughes500_GreenLight
KEY_0 = ksEmissive
VALUE_0 = 0,255,0,1
VALUE_0_OFF = 0
CONDITION = BLINK

[MATERIAL_ADJUSTMENT_4]
ACTIVE = 1
DESCRIPTION = heli red
MATERIALS = helired, Hughes500_RedLight
KEY_0 = ksEmissive
VALUE_0 = 255,0,0,2
VALUE_0_OFF = 0
CONDITION = BLINK_ALT

;;; balloon flames ;;;;;;;;;;;;;;;;
[CONDITION_0]
NAME = BALOON_FLAMES1
INPUT = ONE
FLASHING_FREQUENCY = 0.02
FLASHING_SMOOTHNESS = 0.3
FLASHING_SKIP_OFF_STATE = 0
FLASHING_SKIP_DOWNHILL_STATE = 0
FLASHING_MIN_VALUE = 0
FLASHING_SYNCED = 1
FLASHING_NOISE_AMPLITUDE = 0.3
FLASHING_NOISE_BOUND = 1
FLASHING_NOISE_SPEED = 3
FLASHING_LUT = (|0=0|0.8=0|0.89=0.5|0.9=1|0.91=0|1.0=0|)

[CONDITION_1]
NAME = BALOON_FLAMES2
INPUT = ONE
FLASHING_FREQUENCY = 0.25
FLASHING_SMOOTHNESS = 0.3
FLASHING_SKIP_OFF_STATE = 0
FLASHING_SKIP_DOWNHILL_STATE = 0
FLASHING_MIN_VALUE = 0
FLASHING_SYNCED = 1
FLASHING_NOISE_AMPLITUDE = 0.3
FLASHING_NOISE_BOUND = 1
FLASHING_NOISE_SPEED = 3
FLASHING_LUT = (|0=0|0.6=0|0.69=0.5|0.8=1|0.81=0|1.0=0|)

[CONDITION_2]
NAME = BALOON_FLAMES3
INPUT = ONE
FLASHING_FREQUENCY = 0.15
FLASHING_SMOOTHNESS = 0.3
FLASHING_SKIP_OFF_STATE = 0
FLASHING_SKIP_DOWNHILL_STATE = 0
FLASHING_MIN_VALUE = 0
FLASHING_SYNCED = 1
FLASHING_NOISE_AMPLITUDE = 0.3
FLASHING_NOISE_BOUND = 1
FLASHING_NOISE_SPEED = 3
FLASHING_LUT = (|0=0|0.8=0|0.89=0.5|0.9=1|0.91=0|1.0=0|)

[MATERIAL_ADJUSTMENT_0]
MESHES = Line117
KEY_0 = ksEmissive
VALUE_0 = 255, 220,185,0.005
CONDITION = BALOON_FLAMES1

ACTIVE = 1
[MATERIAL_ADJUSTMENT_1]
MESHES = Line118
KEY_0 = ksEmissive
VALUE_0 = 255, 200,155,0.007
CONDITION = BALOON_FLAMES2

ACTIVE = 1
[MATERIAL_ADJUSTMENT_2]
MESHES = Line119
KEY_0 = ksEmissive
VALUE_0 = 255, 180,125,0.006
CONDITION = BALOON_FLAMES3

ACTIVE = 1
[MATERIAL_ADJUSTMENT_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = balloon flames1
MATERIALS = ?ignition?
KEY_0 = ksEmissive
VALUE_0 = 255, 220,185,0.1
VALUE_0_OFF = 0
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = 0, 0, 0
BLEND_MODE = ALPHA_TEST
CONDITION = FLAME_FLICKERING

[MATERIAL_ADJUSTMENT_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = balloon flames
MATERIALS = balloon_flame, fire
KEY_0 = ksEmissive
VALUE_0 = 255, 220,185,1.5
VALUE_0_OFF = 0
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = 0, 0, 0
CONDITION = BALOON_FLAMES1
;;; balloon flames end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Animated Blimp
[ANIMATED_...]
NODE = Blimp
ANIMATION = blimp.ksanim
DURATION = 1925
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[MATERIAL_ADJUSTMENT_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = flood lits
MATERIALS = SUZUKALIGHTPOLESEMMISIVE1
KEY_0 = ksEmissive
VALUE_0 = 225, 225, 255,0.2
VALUE_0_OFF = ORIGINAL
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = ORIGINAL
KEY_2 = ksDiffuse
VALUE_2 = 0
VALUE_2_OFF = ORIGINAL
CONDITION = NIGHT_SMOOTH_RAIN

[LIGHT_SERIES_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = flood lits
MATERIALS = SUZUKALIGHTPOLESEMMISIVE1
OFFSET = 0,0,0
DIRECTION = NORMAL
SPOT = 170
SPOT_SHARPNESS = 0.1
RANGE = 100
RANGE_GRADIENT_OFFSET = 0.01
FADE_AT = 700
FADE_SMOOTH = 33
DIFFUSE_CONCENTRATION = 0.7
CLUSTER_THRESHOLD = 20
COLOR = 225, 225, 255,0.065
COLOR_OFF = 0
CONDITION = NIGHT_SMOOTH_RAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[MATERIAL_ADJUSTMENT_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = pits ceiling lits (turning off at day)
MATERIALS = CeilLight?
KEY_0 = ksEmissive
VALUE_0 = 255, 255, 255,0.2
VALUE_0_OFF = ORIGINAL
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = ORIGINAL
KEY_2 = ksAmbient
VALUE_2 = 0
VALUE_2_OFF = 0
CONDITION = NIGHT_SMOOTH_RAIN

[LIGHT_SERIES_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = pits
MATERIALS = CeilLight?, WALL_QUAD
OFFSET = 0,0,0
DIRECTION = 0,-1,0
SPOT = 170
SPOT_SHARPNESS = 0.5
RANGE = 30
RANGE_GRADIENT_OFFSET = 0.1
FADE_AT = 500
FADE_SMOOTH = 33
DIFFUSE_CONCENTRATION = 0.7
CLUSTER_THRESHOLD = 10
COLOR = 255, 255, 255,0.045
COLOR_OFF = 0
CONDITION = NIGHT_SMOOTH_RAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[MATERIAL_ADJUSTMENT_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = stands lits
MATERIALS = SUZUKALIGHTSSTANDSEMMISIVE1
KEY_0 = ksEmissive
VALUE_0 = 255, 189, 127,0.2
VALUE_0_OFF = ORIGINAL
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = ORIGINAL
KEY_2 = ksDiffuse
VALUE_2 = 0
VALUE_2_OFF = ORIGINAL
CONDITION = NIGHT_SMOOTH_RAIN

[LIGHT_SERIES_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = stands lits
MATERIALS = SUZUKALIGHTSSTANDSEMMISIVE1
OFFSET = 0,0,0
DIRECTION = NORMAL
SPOT = 180
SPOT_SHARPNESS = 0.5
RANGE = 60
RANGE_GRADIENT_OFFSET = 0.4
FADE_AT = 750
FADE_SMOOTH = 33
DIFFUSE_CONCENTRATION = 0.7
CLUSTER_THRESHOLD = 20
COLOR = 255, 189, 127,0.045
COLOR_OFF = 0
CONDITION = NIGHT_SMOOTH_RAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[MATERIAL_ADJUSTMENT_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = building banners
MATERIALS = STANDBANNER002, TAG_T_SPO
KEY_0 = ksEmissive
VALUE_0 = 255, 255, 255,0.004
VALUE_0_OFF = ORIGINAL
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = ORIGINAL
KEY_2 = ksDiffuse
VALUE_2 = 0
VALUE_2_OFF = ORIGINAL
CONDITION = NIGHT_SMOOTH_RAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[LIGHT_SERIES_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = ads
MATERIALS = BANNERS_?, SECTION_BAN, DUNLOP_CORNER_BAN, BETA_OUTDOOR
OFFSET = 0,-6,0
DIRECTION = 0,1,0
SPOT = 150
SPOT_SHARPNESS = 0.75
RANGE = 12
RANGE_GRADIENT_OFFSET = 0.4
FADE_AT = 700
FADE_SMOOTH = 33
DIFFUSE_CONCENTRATION = 0.8
CLUSTER_THRESHOLD = 10
COLOR = 255, 255, 255,0.065
COLOR_OFF = 0
CONDITION = NIGHT_SMOOTH_RAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[LIGHT_SERIES_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = stands
MATERIALS = GSTANDC_METAL
OFFSET = 0,-5,0
DIRECTION = 0,1,0
SPOT = 170
SPOT_SHARPNESS = 0.75
RANGE = 15
RANGE_GRADIENT_OFFSET = 0.4
FADE_AT = 700
FADE_SMOOTH = 33
DIFFUSE_CONCENTRATION = 0.7
CLUSTER_THRESHOLD = 20
COLOR = 255, 205, 155,0.045
COLOR_OFF = 0
CONDITION = NIGHT_SMOOTH_RAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[LIGHT_SERIES_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = marshal stands
MATERIALS = M_HUT
OFFSET = 0,1.55,0
DIRECTION = 0,-1,0
SPOT = 170
SPOT_SHARPNESS = 0.75
RANGE = 8
RANGE_GRADIENT_OFFSET = 0.4
FADE_AT = 500
FADE_SMOOTH = 33
DIFFUSE_CONCENTRATION = 0.99
CLUSTER_THRESHOLD = 20
COLOR = 255, 255, 255,0.06
COLOR_OFF = 0
CONDITION = NIGHT_SMOOTH_RAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[LIGHT_SERIES_...]
ACTIVE = 1
VISIBILITY_LEVEL = 0
DESCRIPTION = bridgestone arch
MESHES = Cylinder001
OFFSET = 0,-8,0
DIRECTION = 0,1,0
SPOT = 120
SPOT_SHARPNESS = 0.75
RANGE = 15
RANGE_GRADIENT_OFFSET = 0.4
FADE_AT = 500
FADE_SMOOTH = 33
DIFFUSE_CONCENTRATION = 0.5
CLUSTER_THRESHOLD = 8
COLOR = 255, 255, 255,0.06
COLOR_OFF = 0
CONDITION = CHANGINGCOLORS

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[CustomEmissive]
ACTIVE = 1
DESCRIPTION = firetruck lights
MATERIALS = FIRETRUCKB
Resolution = 1024,1024
SHADER = ksPerPixelMultiMap_emissive
RESOURCE_4 = txEmissive
RESOURCE_FILE_4 = truck_support-mask.dds
@ = CustomEmissive_Rect, Channel = 1, Start = "912.7, 544.6", Size = "104.1, 30.5", CornerRadius = "0.5,0.5"

[MATERIAL_ADJUSTMENT_...]
DESCRIPTION = fire truck
MATERIALS = FIRETRUCKB
KEY_...= ksEmissive
VALUE_...= 255,255,255, 0.05
KEY_...= ksAlphaRef
VALUE_...= -193
CONDITION = NIGHT_SMOOTH_RAIN

ACTIVE = 1
[MATERIAL_ADJUSTMENT_...]
DESCRIPTION = fire truck blue
MATERIALS = FIRETRUCKB
KEY_...= ksEmissive1
VALUE_...= 255,255,255, 0.1
KEY_...= ksAlphaRef
VALUE_...= -193
CONDITION = FIRE_BLUE

;;;

ACTIVE = 1
[CustomEmissive]
ACTIVE = 1
DESCRIPTION = ambulance lights
MATERIALS = AMBULANCE
Resolution = 1024,1024
FILL_MISSING_TEXTURES = 1
SHADER = ksPerPixelMultiMap_emissive
RESOURCE_4 = txEmissive
RESOURCE_FILE_4 = ambulance-mask.dds
@ = CustomEmissive_Rect, Channel = 1, Start = "830.6, 496.3", Size = "180.8, 106.3", CornerRadius = "0.5,0.5"

[MATERIAL_ADJUSTMENT_...]
DESCRIPTION = ambulance lights
MATERIALS = AMBULANCE
KEY_...= ksEmissive
VALUE_...= 255,255,255, 0.05
KEY_...= ksAlphaRef
VALUE_...= -193
CONDITION = NIGHT_SMOOTH_RAIN

ACTIVE = 1
[MATERIAL_ADJUSTMENT_...]
DESCRIPTION = ambulance lights red blinking
MATERIALS = AMBULANCE
KEY_...= ksEmissive1
VALUE_...= 255,255,255, 0.05
KEY_...= ksAlphaRef
VALUE_...= -193
CONDITION = AMBULANCE_RED

;;;

ACTIVE = 1
[CustomEmissive]
ACTIVE = 1
DESCRIPTION = crane lights
MATERIALS = CRANE
Resolution = 1024,1024
FILL_MISSING_TEXTURES = 1
SHADER = ksPerPixelMultiMap_emissive
RESOURCE_4 = txEmissive
RESOURCE_FILE_4 = crane_d-mask.dds

[MATERIAL_ADJUSTMENT_...]
DESCRIPTION = crane lights
MATERIALS = CRANE
KEY_...= ksEmissive
VALUE_...= 255,255,255, 0.05
KEY_...= ksAlphaRef
VALUE_...= -193
CONDITION = NIGHT_SMOOTH_RAIN

;;; conditions

ACTIVE = 1
[CONDITION_...]
NAME = AMBULANCE_RED
INPUT = ONE
DELAY = 0
FLASHING_FREQUENCY = 5
FLASHING_SMOOTHNESS = 0.3
FLASHING_SKIP_OFF_STATE = 0
FLASHING_NOISE_AMPLITUDE = 0
FLASHING_MIN_VALUE = 0.0
FLASHING_SYNCED = 1
LUT = (|0=1,0,0|0.5=1,0,0|0.51=0,0,0|0.999=0,0,0|1=1,0,0)

[CONDITION_...]
NAME = FIRE_BLUE
INPUT = ONE
DELAY = 0
FLASHING_FREQUENCY = 5
FLASHING_SMOOTHNESS = 0.3
FLASHING_SKIP_OFF_STATE = 0
FLASHING_NOISE_AMPLITUDE = 0
FLASHING_MIN_VALUE = 0.0
FLASHING_SYNCED = 1
LUT = (|0=0,0,1|0.5=0,0,1|0.51=1,0,0|0.999=1,0,0|1=0,0,1)

[CONDITION_...]
NAME = CHANGINGCOLORS
INPUT = ONE
FLASHING_FREQUENCY = 1.25
FLASHING_SKIP_OFF_STATE = 0
FLASHING_NOISE_AMPLITUDE = 0
FLASHING_MIN_VALUE = 0.0
FLASHING_SYNCED = 0
FLASHING_SKIP_DOWNHILL_STATE = 1
FLASHING_SMOOTHNESS = LINEAR
FLASHING_LUT = (|0=0,0.61,0.22|0.3=0.99,0.87,0.1|0.6=0.01,0.13,0.46|0.9=0.7,0.7,0.7|1.0=0,0.61,0.22|)

;;;;;;;;;;;;;;;;;;;;;
; rain fx preparation
;;;;;;;;;;;;;;;;;;;;;

[DEFAULTS]
Road__track = ROAD?,
Road_Side__track = TRACK_FILL, CURBS, GARAGE_FLOOR, RMB?, EDGES?
PUDDLES__track = FAIXAS, GRUNGE?, $Road_Side__track, $Road__track, GRID_CMARK, GRID_LINE, Material #2641, ROAD_DECAL?, DRENOS, 76, 79, 101, ?line?, REDLINE, carpet,
SOAKING__track = $Road__track, $Road_Side__track, Material #2641, ROAD_DECAL?, DRENOS, SAND?, TYREWALLFRONTS, TYREWALLTOP, ?TENT?, ?BUILDING?, START_P?, f_poles, Trucks, objects1, carpet, CRANE, TILE_GR, bump, BAN_ARM_B, structures-base, OUTD_TOYOTA, BETA_OUTDOOR, DUNLOP_CORNER_BAN, Material #3197.002, SUZUKAGAURDRAIL1, GSTANDC_METAL, M_HUT, VEH_MODERNCARS, TAG_T_?, CONTROL_SHAFT, PIT_A_?, ESCADAS_BT, MAIN_STAND, ROOF, STEPS, BATH_GSTAND, Toilet?, PITWALL_SPONSOR, BOX_WALL, flag?, PIT_B, WALL_QUAD
SMOOTH__track = ARMCO?, TYREWALLFRONTS, ?TENT?, toire?, FIRETRUCK?, AMBULANCE, ?SEATS?, SECTION_BAN, DUNLOP_CORNER_BAN, structures-base, ?BANNER?, OUTD_TOYOTA, BETA_OUTDOOR, ?BUILDING?, ebox_material, ?Flag?, HOSPVEHICLE?, objects1.002, PIT_TERRACE, GAR_DOOR, BAN_ARM_B, STARTLIGHT?, START_P?, f_poles, Trucks, objects1, REF_T1, CRANE, bump, Material #3197.002, SUZUKAGAURDRAIL1, GSTANDC_METAL, M_HUT, VEH_MODERNCARS, TAG_T_?, CONTROL_SHAFT, VIDRO, PIT_A_?, PIT_B, GSTAND_BENCH, ESCADAS_BT, MAIN_STAND, ROOF, STEPS, BATH_GSTAND, Toilet?, PITWALL_SPONSOR, BOX_WALL, WALL_QUAD, metals
ROUGH__track = GRASS?,
LINES__track = FAIXAS, GRID_CMARK, GRID_LINE

[RAIN_FX]
PUDDLES_MATERIALS = $PUDDLES__track
SOAKING_MATERIALS = $SOAKING__track
SMOOTH_MATERIALS = $SMOOTH__track
ROUGH_MATERIALS = $ROUGH__track
LINES_MATERIALS = $LINES__track


; define edges or points from where rain should drip down...
; STREAM_EDGE_... = 254.07, 33.84, -539.71, 222.69, 33.8, -545.73  ; x1,y1,z1 , x2,y2,z2
; STREAM_POINT_... =                ; x,y,z


---------------------------------------------------------------------------------------
; new additions
[PURE]
ACTIVE= 1
;FOG_SHAPE = 0.0
FOG_SHAPE = -1.0
Horizon_Offset = -3.0
HUMIDITY_OFFSET = 0.8
;SMOG_MORNING = 0.2
;SMOG_NOON = 0.1
;SMOG_EVENING = 0.3
;Sun_Dawn = 2.00
;Sun_Dusk = 2.00

; [Material_DistantGeometry]
; Meshes=fuji.001
; Materials=EXTERMAPFUJI,

[Material_Horizon]
; ACTIVE= 1
MESHES=fuji
MATERIALS=$Horizon__track, "Material #328415", EXTERMAPFUJI
; LocalContrast = 1
; LocalContrastBlur = 4
; SaturatedTint = 1, 1, 1
; SaturatedAdd = 0, 0, 0
; Tint = 1, 1, 1
; Add = 0, 0, 0
; Saturation = 1
; Brightness = 1
; Gamma = 1
; FogMultiplier = 1
; AlignNormals = 1
; UseAO = 0

[SHADER_REPLACEMENT_...]
ACTIVE= 1
MATERIALS= $Horizon__track, EXTERMAPFUJI, Material #328415
PROP_... = ksAmbient, 0.15
PROP_... = ksDiffuse, 0.15
PROP_... = ksEmissive, 0
PROP_... = ksAlphaRef, 0.5
CAST_SHADOWS= 1

;fix jagged powerlines
[SHADER_REPLACEMENT_...]
ACTIVE=1
DESCRIPTION= fixing fat powercables
MESHES=
MATERIALS= SUZUKACABLES?
BLEND_MODE = ALPHA_BLEND
IS_TRANSPARENT = 1
CAST_SHADOWS= 1
RESOURCE_0= txDiffuse
RESOURCE_FILE_0 = powercables2.dds
PROP_... = ksAlphaRef, 0.5
PROP_... = extExtraSharpLocalReflections, 0.0

;[WIND]
;DYNAMIC_CABLES= material:SUZUKACABLES? ;suzuka-cables?
;DYNAMIC_CABLES_THRESHOLD=0.5


[SHADER_REPLACEMENT_...]
ACTIVE = 1
DESCRIPTION = tiling fix, grass fix
MESHES =
MATERIALS = GRASS_NEW, "Material #515", Fuji_100m, fuji_srtm?,
PROP_... = ksAmbient, 0.24
PROP_... = ksDiffuse, 0.14
PROP_... = ksAlphaRef, -193
PROP_... = ksSpecular, 0
PROP_... = ksSpecularEXP, 1
CAST_SHADOWS= 0

[SHADER_REPLACEMENT_...]
ACTIVE = 1
DESCRIPTION = tiling fix, grass fix
MESHES =
MATERIALS = Fuji_100m
PROP_... = ksAmbient, 0.35
PROP_... = ksDiffuse, 0.22

; Trees fix
[SHADER_REPLACEMENT_...]
ACTIVE= 1
DESCRIPTION= trees & bushes corrected shader settings
MATERIALS= shader:ksTree,
MATERIAL_FLAG_0 = 1
PROP_... = ksAmbient, 0.24
PROP_... = ksDiffuse, 0.14
PROP_... = ksSpecular, 0
PROP_... = ksSpecularEXP, 1
PROP_... = ksEmissive, 0
PROP_... = ksAlphaRef, 0.5

[SHADER_REPLACEMENT_...]
ACTIVE= 1
DESCRIPTION= trees and bushes
MATERIALS = shader:ksTree,
MATERIAL_FLAG_0 = 1
SHADER = ksTree
BLEND_MODE=ALPHA_TEST
CAST_SHADOWS = 1
CULL_MODE= OFF
IS_TRANSPARENT = 0

; treewalls fix
[SHADER_REPLACEMENT_...]
ACTIVE=1
DESCRIPTION=treeswalls, treelines
MESHES=
MATERIALS= TREELINES
MATERIAL_FLAG_0 = 0
PROP_... = gain, 1.25
PROP_... = ksAmbient, 0.15
PROP_... = ksDiffuse, 0.07
PROP_... = ksSpecular, 0
PROP_... = ksSpecularEXP, 1
PROP_... = ksEmissive, 0
PROP_... = ksAlphaRef, 0.5
CULL_MODE= OFF

[SHADER_REPLACEMENT_...]
ACTIVE= 1
DESCRIPTION= AMBULANCE
MATERIALS = AMBULANCE
CAST_SHADOWS = 1
CULL_MODE= OFF
IS_TRANSPARENT = 0
DOUBLE_FACE_SHADOW_BIASED= 1

[SHADER_REPLACEMENT_...]
ACTIVE= 1
DESCRIPTION= more reflective cars, more reflective vehicles
MATERIALS= ?cars?, ?CARS?, AMBULANCE, ?RESCUE?
PROP_... = ksSpecular, 0.1
PROP_... = ksSpecularEXP, 150


[MATERIAL_ADJUSTMENT_...]
ACTIVE= 1
VISIBILITY_LEVEL = 0
DESCRIPTION= track logo glow
MATERIALS = FUJISPEED_LOGO,
KEY_0 = ksEmissive
VALUE_0 = 235,225,200,0.04
VALUE_0_OFF = 0
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = ORIGINAL
CONDITION = NIGHT_SMOOTH_RAIN


---------------------------------------------------------------------------------------
; screen display
[MATERIAL_ADJUSTMENT_...]
ACTIVE = 1
DESCRIPTION = Emmisive Screen
MATERIALS = DISP_TV
KEY_...= ksEmissive
VALUE_0= 128,128,128,0.06
VALUE_0_OFF=128,128,128,0.007
CONDITION = NIGHT_SMOOTH_RAIN

[DISPLAY_...]
ACTIVE = $" read('csp/version', 0) >= 1751 "
; General settings:
MESHES = material:DISP_TV   ; list of track meshes to act as displays
REGION_START = 33, 731   ; display position on texture, in pixels
REGION_SIZE = 405, 279   ; display size on texture, in pixels
;-------------------------------------------------------------
; Update and rendering options
HIGH_REFRESH_RATE = 1    ; high refresh rate (enabled by default; 30 FPS with this option on, 15 FPS without)
FLIP_X = 0               ; change to 1 to flip output on X axis (mainly for strange UV mapping)
FLIP_Y = 0               ; change to 1 to flip output on Y axis (mainly for strange UV mapping)
;-------------------------------------------------------------
; Color corrections:
; OUTPUT_ALPHA = 1        ; alpha channel value for display area
; OUTPUT_GAMMA = 0.8     ; gamma correction, reduce to make darker areas even darker
; OUTPUT_SATURATION = 1.0  ; saturation correction
; OUTPUT_BRIGHTNESS = 1.2  ; brightness correction
; OUTPUT_FISH_EYE = 0.0    ; increase to add lens distortion effect
; OUTPUT_VIGNETTE = 0.1    ; increase to darken corners
; OUTPUT_CHROMATIC_ABERRATION = 0.0 ; increase to add that nasty chromatic aberration

; Color corrections:
OUTPUT_ALPHA = 1        ; alpha channel value for display area
OUTPUT_GAMMA = 0.2     ; gamma correction, reduce to make darker areas even darker
OUTPUT_SATURATION = 1.0  ; saturation correction
OUTPUT_BRIGHTNESS = 1.0  ; brightness correction
OUTPUT_FISH_EYE = 0.0    ; increase to add lens distortion effect
OUTPUT_VIGNETTE = 0.1    ; increase to darken corners
OUTPUT_CHROMATIC_ABERRATION = 0.0 ; increase to add that nasty chromatic aberration

;-------------------------------------------------------------
; Mode settings:
MODE = CAMERA
;-------------------------------------------------------------
; Camera #0
CAMERA_0 = 93.64814, 15.76198, -189.67708
CAMERA_0_TARGET = FOCUSED_CAR
CAMERA_0_TARGET_INERTIA = 0.1
CAMERA_0_FOV = 20


;---------------------------------------------------------------------------------------
; dynamic display

;;;; Scriptable Displays ;;;;;

[SHADER_REPLACEMENT_...]
ACTIVE=1
MATERIALS = misc
RESOURCE_0 = txDiffuse
RESOURCE_FILE_0 = \textures\misc_updt.dds

[SCRIPTABLE_DISPLAY_...]
ACTIVE = 1
DESCRIPTION = Time of Day
MATERIALS = Display1
RESOLUTION = 2048, 2048
DISPLAY_POS = 0, 0
DISPLAY_SIZE = 2048, 2048

SCRIPT = '
local displayseconds = 0
local displayminutes = 0
local displayhours = 0

function update(dt)
	displayhours = string.format("%02d", math.floor(ac.getSim().timeHours)%12)
	displayminutes = string.format("%02d", math.floor(ac.getSim().timeMinutes)%60)

	display.text{ pos=vec2(40,360) , letter=vec2(425, 1650), text=displayhours, font="digital_big", spacing = 0, alignment=0, color=rgbm(1, 0, 0, 1) }
	display.text{ pos=vec2(785, 360) , letter=vec2(425, 1650), text=":", font="digital_big", spacing = -3, alignment=0, color=rgbm(1, 0, 0, 1) }
	display.text{ pos=vec2(1155, 360) , letter=vec2(425, 1650), text=displayminutes, font="digital_big", spacing = 0, alignment=0, color=rgbm(1, 0, 0, 1) }

end'

[MATERIAL_ADJUSTMENT_...]
ACTIVE=1
DESCRIPTION = digital displays at night
MATERIALS = Display1
KEY_0 = ksEmissive
VALUE_0 = 255,15,10,1
VALUE_0_OFF = 255,255,255,0
CONDITION= NIGHT_SMOOTH

[SCRIPTABLE_DISPLAY_...]
ACTIVE = 1
DESCRIPTION = Laps Remaining
MATERIALS = Display2
RESOLUTION = 2048, 2048
DISPLAY_POS = 0, 0
DISPLAY_SIZE = 2048, 2048

SCRIPT = '
local laps = 0
local leader = 0
local carnbr = 0

function update(dt)

	if ac.getCar(carnbr).racePosition == 1 then
		leader = carnbr
	end


	laps = string.format("%02d", (ac.getSession().laps - ac.getCar(leader).lapCount))

	carnbr=carnbr<ac.getSim().carsCount-1 and carnbr+1 or 0

	display.text{ pos=vec2(175, 20) , letter=vec2(600, 2400), text=laps, font="digital_big", spacing = 500, alignment=0, color=rgbm(1, 0, 0, 1) }

end'

[MATERIAL_ADJUSTMENT_...]
ACTIVE=1
DESCRIPTION = digital displays at night
MATERIALS = Display2
KEY_0 = ksEmissive
VALUE_0 = 255,15,10,1
VALUE_0_OFF = 255,255,255,0
CONDITION= NIGHT_SMOOTH


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; digitaldisplays
[INCLUDE: scoretower/extconfig_scoretower.ini]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[CONDITION_...]
NAME = SUN_SET_SHARP
INPUT = AMBIENT
LUT = (|0=0|0.5=0|0.5=1|1.0=1|20=1|)

[CONDITION_...]
NAME = SUN_SET_SMOOTH
INPUT = AMBIENT
LUT = (|0=0|0.5=0|0.52=1|1.0=1|20=1|)
LAG=0.97

[CONDITION_...]
NAME = NIGHT_SMOOTH_RAIN
INPUT = 'NIGHT_SMOOTH + RAIN'




