# How the terrain affects the probability of elements.
# In all elements "value" is treated as chance increase.
# Only in Temperature, the "value" is treated as degrees Celsius increase.
terrain_modifiers = {
	no_phenomenon = {
  	}
  	mud = {
    	terrain = { type = "mountain" value = -0.3 }
    	terrain = { type = "plains" value = 0.5 }
    	terrain = { type = "marsh" value = 0.9 }
    	terrain = { type = "desert" value = 0.1 }
    	terrain = { type = "jungle" value = 0.2 }
  	}
  	rain_light = {
    	terrain = { type = "jungle" value = 0.2 }
  	}
  	rain_heavy = {
    	terrain = { type = "jungle" value = 0.2 }
  	}
  	snow = {
  		terrain = { type = "mountain" value = 0.8 }
  		terrain = { type = "desert" value = -1.0 }
    	terrain = { type = "urban" value = -0.4 }
  	}
  	blizzard = {
  		terrain = { type = "mountain" value = 0.8 }
  		terrain = { type = "desert" value = -1.0 }
    	terrain = { type = "urban" value = -0.4 }
  	}
  	sandstorm = { #dudududu
  		terrain = { type = "desert" value = 0.8 }
  		terrain = { type = "mountain" value = -1.0 }
  	}

  	temperature = {
  		#terrain = { type = "desert" value = 10.0 } ##Not unless we make separate day/night temp bonus
    	terrain = { type = "mountain" value = -7.0 }
    	terrain = { type = "hills" value = -3.0 }
    	terrain = { type = "forest" value = -1.0 }
    	terrain = { type = "urban" value = 3.0 }
    	terrain = { type = "jungle" value = 5.0 }
  	}
}

settings = {
  	temperature = {
    	temperature_variation = 2.0  # how much temperature change can vary each update
    	max_temperature_change = 6.0  # maximum temperature change
    	temperature_neighbor_smoothing = 0.3  # [0-1] make temperature be like province neighbors
    	temperature_change_neighbor_smoothing = 0.5  # [0-1] make temperature change be like province neighbors

    	# Temperature range when should apply static modifiers
    	weather_extreme_cold = { -100.0 -12.0 }
    	weather_very_cold = { -12.0 -4.0 }
    	weather_very_hot = { 20.0 28.0 }
    	weather_extreme_hot = { 28.0 100.0 }
	
		###
		# Old thresholds - if adjusting extremes, these should probably go back
		###
		#weather_extreme_cold = { -100.0 -25.0 } 
    	#weather_very_cold = { -25.0 -15.0 }
    	#weather_very_hot = { 27.0 32.0 }
    	#weather_extreme_hot = { 32.0 100.0 }

  	}
  	mud = {
    	# Amount of water collected by rain increases probability of mud
    	water_gain_on_rain_light = 0.5
    	water_gain_on_rain_heavy = 1.8
    	water_gain_max = 200.0
    	water_gain_min = 5.0 # cutoff

    	# (for text descriptions) - When rain gain reach max level, it'll be X cm of water. (fe. max 60.0*0.2 = 12cm of rainfall)
    	water_gain_to_cm = 0.2

    	# When not raining, high temperature increases water drying speed. Starts low because the soil should natuarally drain some water even in northern climates.
    	water_dryout_temperature = { 2.0 38.0 }
    	water_dryout_multiplier = { 0.0005 0.4 }

    	# When temperature goes below, the mud disappears (it gets frozen).
    	min_temperature = -1.0
  	}

  	#Provinces with a static modifiers with this ID gets the mud effect applied on the map
  	visual_mud_effects = {
    	flooded
  	}

  	snowing = {
    	# Amount of snow collected affects the visual snow on the map
    	snow_gain_on_snowing = 1.0
    	snow_gain_on_blizzard = 5.0
    	snow_gain_max = 80.0

    	# Visual fix, so even tiny amount of snow can be visible. (0-255)
    	snow_visual_min = 128

    	# (for text descriptions) - When snow gain reach max level, it'll be X cm of snow. (fe. max 80.0*2.1 = 168cm of snow)
    	snow_gain_to_cm = 2.1

    	# When not snowing, high temperature increases snow melting speed.
    	snow_melt_temperature = { 0.0 12.0 }
    	snow_melt_multiplier = { 0.001 0.9 }

    	# Max temperature allowed for snowing / min temperature for highest chance of snowing.
    	temperature = { 1.0 -4.0 }

    	weather_ground_snow_medium = { 20.0 40.0 }
   	 	weather_ground_snow_high = { 40.0 1000.0 }
  	}

  	arctic_water = {
    	arctic_water_temperature = { -5.0 0.0 }
    	arctic_water_end_temperature = { 1.0 5.0 }
  	}
  
  	# Increase chance of X if was already X before. Decrease otherwise.
  	chance_increase = {
   		mud = { 15.0 0.10 }
  	}

  	# How many days this weather will go on once started. Random interval [min, max], weighted towards lower numbers (by picking smallest of two random numbers).
  	duration = {
    	no_phenomenon = { 5 12 }
    	rain_light = { 5 20 }
    	rain_heavy = { 2 15 }
    	snow = { 5 20 }
    	blizzard = { 2 15 }
    	sandstorm = { 2 10 }
  	}

  	# Performance tweaking
  	performance = {
    	provinces_per_update = 584
    	regions_per_update = 7
    	init_run_passes = 14
    	texture_refresh_freq = 2.0
  	}
}

weather_effects = {
  	rain_light = {
  		weather_effect = { entity = rain_entity fading_entity = rain_clouds_entity }
  		weather_effect = { entity = rain_small_entity fading_entity = rain_small_clouds_entity small = yes }
 	}
  	rain_heavy = {
  		weather_effect = { entity = lightning_storm_entity fading_entity = lightning_storm_clouds_entity }
  		weather_effect = { entity = lightning_storm_small_entity fading_entity = lightning_storm_small_clouds_entity small = yes }
  	}
  	snow = {
  		weather_effect = { entity = snow_entity fading_entity = snow_clouds_entity }
  		weather_effect = { entity = snow_small_entity fading_entity = snow_small_clouds_entity small = yes }
  	}
  	blizzard = {
  		weather_effect = { entity = snow_storm_entity fading_entity = snow_storm_clouds_entity }
  		weather_effect = { entity = snow_storm_small_entity fading_entity = snow_storm_small_clouds_entity small = yes }
  	}
  	sandstorm = {
  		weather_effect = { entity = sandstorm_entity }
  	}
}