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

_test_power_balance_mod = {
	power_balance_daily = 0.02
}

weather_rain_light = { # on Region
	air_accidents = 0.1
	air_detection = -0.1
	air_mission_efficiency = -0.1
	local_org_regain = -0.05
	naval_detection = -0.1
	naval_hit_chance = -0.05
	naval_retreat_speed = 0.05
	naval_speed_factor = -0.05
	naval_strike = -0.2
	org_loss_when_moving = 0.05
}
weather_rain_heavy = { # on Region
	air_accidents = 0.3
	air_bombing_targetting = -0.5
	air_detection = -0.2
	air_mission_efficiency = -0.3
	carrier_traffic = -0.8
	local_org_regain = -0.15
	naval_detection = -0.2
	naval_hit_chance = -0.2
	naval_retreat_speed = 0.1
	naval_speed_factor = -0.1
	naval_strike = -0.4
	org_loss_when_moving = 0.1
	positioning = -0.1
	supply_consumption_factor = 0.1
	supply_factor = -0.05
}
weather_snow = { # on Region
	air_accidents = 0.1
	air_detection = -0.15
	air_mission_efficiency = -0.1
	naval_detection = -0.15
	naval_hit_chance = -0.05
	naval_retreat_speed = 0.05
	naval_speed_factor = -0.05
	naval_strike = -0.3
	org_loss_when_moving = 0.1
	positioning = -0.1
	supply_factor = -0.10
	truck_attrition_factor = 0.3
}
weather_blizzard = { # on Region
	air_accidents = 0.3
	air_bombing_targetting = -0.7
	air_detection = -0.3
	air_mission_efficiency = -0.3
	carrier_traffic = -1.0
	local_org_regain = -0.1
	naval_detection = -0.3
	naval_hit_chance = -0.1
	naval_retreat_speed = 0.15
	naval_speed_factor = -0.1
	naval_strike = -0.4
	org_loss_when_moving = 0.25
	positioning = -0.2
	supply_consumption_factor = 0.15
	supply_factor = -0.25
	truck_attrition_factor = 1.0
	army_attack_speed_factor = -0.25
}
weather_sandstorm = { # on Region
	air_accidents = 0.6
	air_bombing_targetting = -1
	air_detection = -0.9
	air_mission_efficiency = -0.5
	local_org_regain = -0.2
	naval_strike = -0.9
	org_loss_when_moving = 0.25
	supply_factor = -0.15
	truck_attrition_factor = 3.0
}

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

weather_mud = { # on Province
	army_attack_factor = -0.4
	army_speed_factor = -0.5
	attrition = 0.7
	org_loss_when_moving = 0.25
	supply_factor = -0.15
	truck_attrition_factor = 5.0
}
weather_extreme_cold = { # on Province
	army_attack_factor = -0.2
	breakthrough_factor = -0.3
	dig_in_speed_factor = -0.6
	local_org_regain = -0.05
	supply_factor = -0.15
	truck_attrition_factor = 1.0
	winter_attrition = 0.25
}
weather_very_cold = { # on Province
	army_attack_factor = -0.1
	breakthrough_factor = -0.15
	dig_in_speed_factor = -0.3
	winter_attrition = 0.25
}
weather_very_hot = { # on Province
	heat_attrition = 0.1
	local_org_regain = -0.05
	supply_factor = -0.05
}
weather_extreme_hot = { # on Province
	army_attack_factor = -0.1
	heat_attrition = 0.2
	local_org_regain = -0.1
	supply_consumption_factor = 0.5
	truck_attrition_factor = 0.1
}
weather_ground_snow_medium = { # on Province
	army_attack_factor = -0.2
	army_speed_factor = -0.2
	army_attack_speed_factor = -0.25
	breakthrough_factor = -0.15
	org_loss_when_moving = 0.1
	supply_factor = -0.20
	truck_attrition_factor = 0.5
	dig_in_speed_factor = 0.05
}
weather_ground_snow_high = { # on Province
	army_attack_factor = -0.4
	army_speed_factor = -0.5
	army_attack_speed_factor = -0.5
	breakthrough_factor = -0.3
	local_org_regain = -0.05
	org_loss_when_moving = 0.25
	supply_factor = -0.40
	truck_attrition_factor = 1.0
	dig_in_speed_factor = 0.15
}

flooded = { # on Province
	army_defence_factor = 0.5
	army_speed_factor = -0.5
	dig_in_speed_factor = -0.2
	org_loss_when_moving = 0.25
	supply_factor = -0.40
	truck_attrition_factor = 3.0
}

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.
	air_bombing_targetting = -0.5
	carrier_traffic = -1.0
	naval_hit_chance = -0.25
	naval_retreat_speed = 0.1
	air_attack_factor = -0.50
}

# 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.65 #was 0.6
}

# On States that are owned by a non-core country
non_core = {
}

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

lacking_consumer_goods = {
}

gain_focus = {
	political_power_cost = 1
}

#license production

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
}

ITA_military_agreements = {
	valid_relation_trigger = {
		FROM = {
			is_in_faction_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
}

# applies when stability > 50%
stability_good_modifier = {
	industrial_capacity_factory = 0.20
	industrial_capacity_dockyard = 0.20
	consumer_goods_factor = -0.20
	political_power_factor = 0.1
}

# applies when stability < 50%
stability_bad_modifier = {
	industrial_capacity_factory = -0.50
	industrial_capacity_dockyard = -0.50
	political_power_factor = -0.2
}

war_support_good_modifier = {
	mobilization_speed = 0.30 #in 1/1000 of 1 %
	army_core_attack_factor = 0.1
	army_core_defence_factor = 0.1
	command_power_gain_mult = 0.5
}

war_support_bad_modifier = {
	mobilization_speed = -0.500 # Reduce mobilization speed by half.
	#army_noncore_attack_factor = -0.50  # Attacking or defending on non-core takes a huge penalty.
	#army_noncore_defence_factor = -0.50
	command_power_gain_mult = -0.95
	surrender_limit = -0.3	
}

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
	supply_consumption_factor = -0.1
	no_supply_grace = 72
}

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
	supply_consumption_factor = -0.05
	no_supply_grace = 48
}

diff_normal_player = {
	no_supply_grace = 36
}

diff_hard_player = {
	production_factory_max_efficiency_factor = -0.2
	research_speed_factor = -0.15
	political_power_factor = -0.1
	supply_consumption_factor = 0.05
	no_supply_grace = 24
}

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


diff_very_easy_ai = {
	peace_score_ratio_transferred_to_players = 0.25
}

diff_easy_ai = {
	no_supply_grace = 24
	peace_score_ratio_transferred_to_players = 0.1
}

diff_normal_ai = {
	no_supply_grace = 36
}

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

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


diff_strong_ai_generic = {
	# fightyness
	dig_in_speed_factor = 0.25
	planning_speed = 0.25
	supply_consumption_factor = -0.25
	army_morale_factor = 0.15
	land_reinforce_rate = 0.02

	# defensivness
	army_core_attack_factor = 0.15
	army_core_defence_factor = 0.15

	attrition = -0.075

	# production/research
	production_factory_max_efficiency_factor = 0.15
	production_factory_efficiency_gain_factor = 0.25
	industrial_capacity_dockyard = 0.2
	political_power_factor = 0.25
	research_speed_factor = 0.1
	production_lack_of_resource_penalty_factor = -0.3

	# fuel
	army_fuel_consumption_factor = -0.40
	air_fuel_consumption_factor = -0.40
 	navy_fuel_consumption_factor = -0.40

	# xp gain
	experience_gain_air_factor = 0.25
	experience_gain_army_factor = 0.25
	experience_gain_navy_factor = 0.25
	air_mission_xp_gain_factor = 0.25
	experience_gain_army_unit_factor = 0.10
	experience_gain_navy_unit_factor = 0.10
}

naval_mines_effect = {
	naval_accidents_chance = 0.05
	naval_speed_factor = 0
	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_accidents_factor = -1.0
	#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_accidents_factor = 0.10
	#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
  convoy_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_factor = -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
}

#LaR Compliance

FRA_host_the_german_exiles = {
	valid_relation_trigger = {
		ROOT = {
			has_government = communism
		}
	}
	compliance_gain = 0.25
}

FRA_reorganized_departments = {
	valid_relation_trigger = {
		ROOT = {
			has_government = neutrality
		}
	}
	compliance_gain = 0.25
}

GER_rescued_mussolini = {
	valid_relation_trigger = {
		ROOT = {
			has_government = fascism
		}
	}
	compliance_gain = 0.5
}

FRA_carry_the_revolution_south = {
	valid_relation_trigger = {
		ROOT = {
			has_government = communism
		}
	}
	compliance_gain = 0.4
}

SOV_soviet_chinese_relations = {
	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
}

SOV_face_western_fascism_static = {
	valid_relation_trigger = {
		FROM = {
			has_war_with = ROOT
		}
	}

	attack_bonus_against = 0.1
	defense_bonus_against = 0.1
}

SOV_for_the_common_good_relation = { #For Right Oppo allies
	valid_relation_trigger = {
		FROM = {
			NOT = { has_war_with = ROOT }
		}
	}

	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
}

### BBA 

ETH_league_of_nations_volunteer_resolution = {
	send_volunteers_tension = -0.5
	send_volunteer_divisions_required = -0.75
	send_volunteer_factor = 0.25
}

ETH_support_spain_static_modifier = {
	send_volunteers_tension = -0.5
	send_volunteer_divisions_required = -0.75
	send_volunteer_factor = 0.5
}

### AAT 

NORDIC_allow_lendlease = {
	lend_lease_tension = -0.5
}

NORDIC_allow_volunteers = {
	send_volunteers_tension = -0.5
	send_volunteer_divisions_required = -0.65
}

NORDIC_allow_more_volunteers = {
	send_volunteer_factor = 0.5 
}

NORDIC_allow_more_planes = {
		air_volunteer_cap = 2
}

FIN_organized_support_for_finland = {
	send_volunteer_size = 3
	air_volunteer_cap = 1
}

### SOUTH AMERICA ###
CHL_from_support_chile_static_modifier = {
	send_volunteers_tension = -0.6
	send_volunteer_divisions_required = -0.9
	send_volunteer_factor = 0.6
}