# 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.1 }
    terrain = { type = "plains" value = 0.5 }
    terrain = { type = "marsh" value = 0.8 }
    terrain = { type = "desert" value = 0.5 }
  }
  rain_light = {
  }
  rain_heavy = {
  }
  snow = {
  	terrain = { type = "mountain" value = 0.8 }
   	terrain = { type = "forest" value = 0.8 }
   	terrain = { type = "plains" value = 0.8 }
  	terrain = { type = "desert" value = -1.0 }
    terrain = { type = "urban" value = 0.7 }
  }
  blizzard = {
  	terrain = { type = "mountain" value = 0.8 }
	terrain = { type = "forest" value = 0.8 }
   	terrain = { type = "plains" value = 0.8 }
  	terrain = { type = "desert" value = -1.0 }
    terrain = { type = "urban" value = 0.5 }
  }
  sandstorm = {
  	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
  #}
}

settings = {
  temperature = {
    variable = 0.25 # factor how much can vary between updates

    # Temperature range when should apply static modifiers
    weather_extreme_cold = { -100.0 -20.0 }
    weather_very_cold = { -20.0 -7.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 = 1.0
    water_gain_on_rain_heavy = 1.5
    water_gain_max = 300.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 = { 0.0 38.0 }
    water_dryout_multiplier = { 0.0005 0.3 }

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

  snowing = {
    # Amount of snow collected affects the visual snow on the map
    snow_gain_on_snowing = 3.0
    snow_gain_on_blizzard = 8.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 -10.0 }

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

  # Increase chance of X if was already X before. Decrease otherwise.
  chance_increase = {
    mud = { 20.0 0.10 }
    rain = { 1.75 0.25 }
    snow = { 1.75 0.25 }
    sandstorm = { 1.75 0.25 }
  }

  # 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 }
  }
}
