# All global modifiers are here. They are applied from certain game-features.
# Effects are fully scriptable here.
# These names can NOT be removed or changes, as the code uses them....

weather_rain_light = { # on Region 
	air_detection = -0.1
	naval_detection = -0.1
	naval_hit_chance = -0.05
	naval_speed_factor = -0.05
	naval_strike = -0.2
	air_accidents = 0.1
	air_mission_efficiency = -0.1
	naval_retreat_speed = 0.05

	local_org_regain = -0.05
}
weather_rain_heavy = { # on Region 
	air_detection = -0.2
	naval_detection = -0.2
	naval_hit_chance = -0.1
	naval_speed_factor = -0.1
	carrier_traffic = -1.0
	naval_strike = -0.4
	air_accidents = 0.3
	air_bombing_targetting = -0.5
	local_org_regain = -0.2
	air_mission_efficiency = -0.3
	naval_retreat_speed = 0.1
	positioning = -0.1
}
weather_snow = { # on Region 
	air_detection = -0.15
	naval_detection = -0.15
	naval_hit_chance = -0.05
	naval_speed_factor = -0.05
	naval_strike = -0.3
	air_accidents = 0.1
	local_org_regain = -0.05
	air_mission_efficiency = -0.1
	naval_retreat_speed = 0.05
	positioning = -0.1
}
weather_blizzard = { # on Region 
	air_detection = -0.3
	naval_detection = -0.3
	naval_hit_chance = -0.1
	naval_speed_factor = -0.1
	carrier_traffic = -1.0
	naval_strike = -0.4
	air_accidents = 0.3
	air_bombing_targetting = -0.7
	local_org_regain = -0.3
	air_mission_efficiency = -0.3
	naval_retreat_speed = 0.15
	positioning = -0.2
}
weather_sandstorm = { # on Region 
	air_detection = -0.9
	air_accidents = 0.6
	naval_strike = -0.9
	air_bombing_targetting = -1
	local_org_regain = -0.5
	air_mission_efficiency = -0.5
}

weather_arctic_water = { # on Region 
	navy_casualty_on_sink = 0.2
	naval_attrition = 0.1
	naval_retreat_speed = -0.05
	positioning = -0.2
}

weather_mud = { # on Province
	attrition = 0.7
	army_speed_factor = -0.5
	army_attack_factor = -0.4
}
weather_extreme_cold = { # on Province
	winter_attrition = 0.2
	dig_in_speed_factor = -0.6
	local_org_regain = -0.05
	army_attack_factor = -0.2
}
weather_very_cold = { # on Province
	winter_attrition = 0.1
	dig_in_speed_factor = -0.3
	army_attack_factor = -0.1
}
weather_very_hot = { # on Province
	heat_attrition = 0.1
	local_org_regain = -0.05
}
weather_extreme_hot = { # on Province
	heat_attrition = 0.2
	local_org_regain = -0.1
	supply_consumption_factor = 0.5
	army_attack_factor = -0.1
}
weather_ground_snow_medium = { # on Province
	army_speed_factor = -0.1
	army_attack_factor = -0.1
}
weather_ground_snow_high = { # on Province
	army_speed_factor = -0.25
	local_org_regain = -0.05
	army_attack_factor = -0.3
	naval_retreat_speed = 0.1
}

flooded = { # on Province
	army_speed_factor = -0.5
	army_defence_factor = 0.5
	dig_in_speed_factor = 0.2
}
RAJ_princely_state = {
	local_building_slots_factor = -0.1
	recruitable_population_factor = -0.2
	army_speed_factor = -0.2
	army_defence_factor = -0.1
	army_attack_factor = -0.1
}
unplanned_offensive = { # on Province
	air_cas_present_factor = -0.75
	army_attack_factor = -0.9
	army_speed_factor = -0.75
	ground_attack_factor = -0.75
	local_org_regain = -0.5
}
night = { # On province. Multiplied by amount of darkness.
	naval_hit_chance = -0.25
	carrier_traffic = -1.0
	air_bombing_targetting = -0.5
	naval_retreat_speed = 0.1
}


# The following is multiplied by local resistance strength.
resistance_effect_base = {
	# todo - spy defense
}

resistance_effect = {
	#local_supplies = -0.5
	#local_intel_to_enemies = 10
	#local_factory_sabotage = 0.75
	#attrition = 0.25
}

# For compliance base + effect * compliance_level will be applied as a modifier.
compliance_effect_base = {
	#local_factories = -0.75
	#local_manpower = -0.75
	#local_resources = -0.75
}

compliance_effect = {
	local_factories = 0.65
	local_non_core_manpower = 0.18
	local_resources = 0.60
}


# On States
non_core = {
	local_building_slots_factor = -0.1
}

# On States that are controlled by a non-core country
non_core_controller = {
	#local_building_slots_factor = -0.5
	
	local_factories = -0.75
	#local_manpower = -0.75
	local_resources = -0.65
}

#Doesn't get triggered for some reason
lacking_consumer_goods = {
	# stability_weekly = -0.005
	# war_support_weekly = -0.005
	# political_power_factor = -0.1
	# army_org_Factor = -0.1
	# army_morale_factor = -0.1
	# attrition = 0.1
	# drift_defence_factor = -0.25
	# production_factory_max_efficiency_factor = -0.1
	# production_speed_buildings_factor = -0.25
	# industry_free_repair_factor = -0.5
	# research_speed_factor = -0.1
	# MONTHLY_POPULATION = -0.5
}

gain_focus = {
	political_power_cost = 1
} 

#license production
#maybe we can delete this. not sure
ROM_license_german_equipment = {
	valid_relation_trigger = {
		FROM = {
			NOT = { has_war_with = ROOT }
		}
	}

	license_purchase_cost = 0 #base cost reduction
	ai_license_acceptance = 20 #more to AI acceptance value.
	license_production_speed = 0.25 #speed  increase for being a license
	license_tech_difference_speed = 0.25 #less cost increase for each tech level between the license and own tech level 
}

ROM_foreign_motor_company = {
	valid_relation_trigger = {
		FROM = {
			NOT = { has_war_with = ROOT }
		}
	}

	license_purchase_cost = 0 #base cost reduction
	ai_license_acceptance = 20 #more to AI acceptance value.
	license_production_speed = 0.1 #speed  increase for being a license
	license_tech_difference_speed = 0.1 #less cost increase for each tech level between the license and own tech level 
}

HUN_dynastic_ties_license = {
	valid_relation_trigger = {
		FROM = {
			NOT = { has_war_with = ROOT }
		}
	}

	license_purchase_cost = 0 #base cost reduction
	ai_license_acceptance = 50 #more to AI acceptance value.

}

YUG_western_license = {
	valid_relation_trigger = {
		FROM = {
			NOT = { has_war_with = ROOT }
		}
	}
	ai_license_acceptance = 20 #more to AI acceptance value.

}

FRA_coordinate_rearmament = {
	valid_relation_trigger = {
		FROM = {
			is_in_faction_with = ROOT
		}
	}
	license_purchase_cost = 0
	ai_license_acceptance = 100 #more to AI acceptance value.
	license_production_speed = 0.25
	license_tech_difference_speed = 0.25
}

HUN_stubborn_fools = {
	valid_relation_trigger = {
		FROM = {
			NOT = { is_in_faction_with = ROOT }
		}
	}
	ai_license_acceptance = -50 #penalty to AI acceptance

}

ROM_military_modernization = {
	valid_relation_trigger = {
		FROM = {
			NOT = { has_war_with = ROOT }
		}
	}

	license_purchase_cost = 0 #base cost reduction
	ai_license_acceptance = 60 #more to AI acceptance value.
	license_production_speed = 0.25 #speed  increase for being a license
	license_tech_difference_speed = 0.25 #less cost increase for each tech level between the license and own tech level 
}

free_license = {
	valid_relation_trigger = {
		FROM = {
			NOT = { has_war_with = ROOT }
		}
	}
	license_purchase_cost = 0 #no base cost
}

# applies when stability > 50%
stability_good_modifier = {
	drift_defence_factor = 0.25
	industrial_capacity_factory = 0.1
	industrial_capacity_dockyard = 0.1
	political_power_factor = 0.1
	surrender_limit = 0.05
	stability_weekly = -0.005
	enemy_justify_war_goal_time = 0.5
	army_org_Factor = 0.05
	industry_repair_factor = 0.1
	industry_free_repair_factor = 0.1
	research_speed_factor = 0.05
	MONTHLY_POPULATION = 0.1
	war_support_factor = 0.05
}

# applies when stability < 50%
stability_bad_modifier = {
	drift_defence_factor = -0.5
	industrial_capacity_factory = -0.25
	political_power_factor = -0.25
	industrial_capacity_dockyard = -0.5
	surrender_limit = -0.3
	stability_weekly = 0.005
	enemy_justify_war_goal_time = -0.5
	army_org_Factor = -0.05
	industry_repair_factor = -0.25
	industry_free_repair_factor = -0.25
	research_speed_factor = -0.05
	MONTHLY_POPULATION = -0.25
	war_support_factor = -0.05
}

war_support_good_modifier = {
	mobilization_speed = 0.030
	army_core_attack_factor = 0.1
	army_core_defence_factor = 0.1
	command_power_gain_mult = 0.5
	surrender_limit = 0.05
	generate_wargoal_tension = -0.25
	defensive_war_stability_factor = 0.05
	offensive_war_stability_factor = 0.05
	lend_lease_tension = -0.1
	send_volunteers_tension = -0.2
	justify_war_goal_time = -0.5
}

war_support_bad_modifier = {
	mobilization_speed = -0.500
	command_power_gain_mult = -0.95 
	surrender_limit = -0.3
	generate_wargoal_tension = 0.5
	defensive_war_stability_factor = -0.05
	offensive_war_stability_factor = -0.1
	lend_lease_tension = 0.3
	send_volunteers_tension = 0.2
	justify_war_goal_time = 1
}

war_support_during_war = { #Applied during war, scaled from 0-100% with war support, not split.
	stability_factor = -0.3
}

attache_sent = {
	war_support_factor = 0.1
}

# Difficulty modifiers

diff_very_easy_player = {
	production_factory_max_efficiency_factor = 0.3
	research_speed_factor = 0.15
	political_power_factor = 0.5
	production_lack_of_resource_penalty_factor = -0.8
	army_fuel_consumption_factor = -0.5
	air_fuel_consumption_factor = -0.5
 	navy_fuel_consumption_factor = -0.5
}

diff_easy_player = {
	production_factory_max_efficiency_factor = 0.2
	research_speed_factor = 0.07
	political_power_factor = 0.25
	production_lack_of_resource_penalty_factor = -0.3
	army_fuel_consumption_factor = -0.25
	air_fuel_consumption_factor = -0.25
 	navy_fuel_consumption_factor = -0.25
}

diff_normal_player = {
}

diff_hard_player = {
	production_factory_max_efficiency_factor = -0.2
	research_speed_factor = -0.15
	political_power_factor = -0.1
}

diff_very_hard_player = {
	production_factory_max_efficiency_factor = -0.3
	research_speed_factor = -0.30
	political_power_factor = -0.15
}


diff_very_easy_ai = {
}

diff_easy_ai = {
	
}

diff_normal_ai = {
}

diff_hard_ai = {
	army_fuel_consumption_factor = -0.25
	air_fuel_consumption_factor = -0.25
 	navy_fuel_consumption_factor = -0.25
}

diff_very_hard_ai = {
	army_fuel_consumption_factor = -0.5
	air_fuel_consumption_factor = -0.5
 	navy_fuel_consumption_factor = -0.5
}

diff_strong_ai_generic = {
	# fightyness
	dig_in_speed_factor = 0.125
	planning_speed = 0.125
	supply_consumption_factor = -0.125
	army_morale_factor = 0.075
	land_reinforce_rate = 0.025

	# defensivness
	army_core_attack_factor = 0.125
	army_core_defence_factor = 0.125

	command_power_gain_mult = 0.25
	attrition = -0.075
	MONTHLY_POPULATION = 0.625

	# production/research
	production_factory_max_efficiency_factor = 0.025
	production_factory_efficiency_gain_factor = 0.125
	industrial_capacity_factory = 0.125
	production_speed_buildings_factor = 0.25
	industrial_capacity_dockyard = 0.625
	production_lack_of_resource_penalty_factor = -0.2
	political_power_factor = 0.125
	research_speed_factor = 0.1
	
	# fuel
	army_fuel_consumption_factor = -0.125
	air_fuel_consumption_factor = -0.125
 	navy_fuel_consumption_factor = -0.125
	fuel_gain_factor = 0.125
	fuel_gain_factor_from_states = 0.25

	# xp gain
	experience_gain_air_factor = 0.25
	experience_gain_army_factor = 0.25
	experience_gain_navy_factor = 0.25
	experience_gain_army_unit_factor = 0.125
	experience_gain_navy_unit_factor = 0.125
}

diff_weak_ai_generic = {
	# fightyness
	dig_in_speed_factor = -0.075
	planning_speed = -0.075
	supply_consumption_factor = 0.125
	army_morale_factor = -0.075
	land_reinforce_rate = -0.025

	# defensivness
	army_core_attack_factor = -0.05
	army_core_defence_factor = -0.05

	command_power_gain_mult = -0.125
	attrition = 0.05
	MONTHLY_POPULATION = -0.125

	# production/research
	production_factory_max_efficiency_factor = -0.025
	production_factory_efficiency_gain_factor = -0.125
	industrial_capacity_factory = -0.05
	production_speed_buildings_factor = -0.075
	industrial_capacity_dockyard = -0.075
	political_power_factor = -0.05
	
	# fuel
	army_fuel_consumption_factor = 0.125
	air_fuel_consumption_factor = 0.125
 	navy_fuel_consumption_factor = 0.125

	# xp gain
	experience_gain_air_factor = -0.125
	experience_gain_army_factor = -0.125
	experience_gain_navy_factor = -0.125
	experience_gain_army_unit_factor = -0.125
	experience_gain_navy_unit_factor = -0.125
}

naval_mines_effect = {
	naval_accidents_chance = 0.15
	naval_speed_factor = -0.8
	naval_invasion_penalty = 0.5
}

air_wing_experience_bonus_max = {
	air_attack_factor = 0.2
	#air_defence_factor = 0.2
	air_agility_factor = 0.3
	air_night_penalty = -0.2
	#air_weather_penalty = -0.3
}

air_wing_experience_malus_min = {
	air_attack_factor = -0.15
	#air_defence_factor = -0.15
	air_agility_factor = -0.15
	air_night_penalty = 0.15
	#air_weather_penalty = 0.15
}

ship_experience_bonus_max = {
    naval_damage_factor = 0.3
    naval_defense_factor = 0.2
}

ship_experience_malus_min = {
    naval_damage_factor = -0.1
    naval_defense_factor = -0.1
}

carrier_experience_bonus_max = {
	fighter_sortie_efficiency = 0.2
}

carrier_experience_malus_min = {
	fighter_sortie_efficiency = -0.1
}

pride_of_the_fleet = {
	experience_gain_navy_unit_factor = 0.25
	critical_receive_chance = -0.5
}


pride_of_the_fleet_country = {
	war_support_factor = 0.05
}

pride_of_the_fleet_sunk_temporary = {
	# country
	war_support_factor = -0.10
}

water_modifier_shark_infested = {
	navy_casualty_on_sink = 0.6
}

screening_bonus = { 
  naval_retreat_speed = 0.2 
  naval_hit_chance = 0.4
}

capital_screening_bonus = { 
  naval_retreat_speed = 0.2
  sortie_efficiency = 0.1
}

country_is_at_peace = {
	decryption_power_factor = -0.5
}

country_is_at_war = {

}

# targeted modifiers that will apply when you have fully decrypted a country's cipher
passive_decryption_modifier = {
	air_detection = 0.05
	air_intercept_efficiency = 0.25
	civilian_intel_decryption_bonus = 10
	army_intel_decryption_bonus = 10
	navy_intel_decryption_bonus = 10
	airforce_intel_decryption_bonus = 10
}

# targeted modifiers that will apply when you have activated your active decryption bonuses against a country
active_decryption_modifier = {
	# attack_bonus_against = 0.15
	defense_bonus_against = 0.15
	breakthrough_bonus_against = 0.15
	naval_invasion_prep_speed = 0.5
	naval_invasion_penalty = -0.15
	planning_speed = 0.5
	civilian_intel_decryption_bonus = 50
	army_intel_decryption_bonus = 50
	navy_intel_decryption_bonus = 50
	airforce_intel_decryption_bonus = 50
}

# modifiers applied to allied divisions entering the intel network
intel_network_state_level_bonus = {
	amphibious_invasion_defence = 1
	planning_speed = 0.5
}

# modifiers applied to enemy divisions in an intel network
intel_network_state_level_penalty = {
	max_planning = -1
	max_dig_in = -5
}

# modifiers enabled by the creation of the intelligence agency
created_intelligence_agency = {
	operative_slot = 1
	new_operative_slot_bonus = 3
}

# Modifiers enabled at state level when an operative is assigned to the root out resistance mission
root_out_resistance_mission_modifier = {
	resistance_target = -0.1
}

# modifiers active when an operative has the nationality of the nation it is performing a mission in.
operative_nationality_mission = {
	intel_network_gain_factor = 0.3
	own_operative_detection_chance_factor = -0.1
}

# modifiers active when an operative has the nationalty of the operation's target
operative_nationality_operation = {
	# NOTE: all modifiers used here need to be pre-defined in modifier_definitions if dynamic
	operation_outcome = 0.1
	operation_cost = -0.1
}

