# 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
	
	naval_detection = -0.1
	naval_hit_chance = -0.1
	naval_speed_factor = -0.1
	naval_strike = -0.1
	
	air_detection = -0.1
	air_accidents = 0.1
	air_mission_efficiency = -0.1

	local_org_regain = -0.1
	org_loss_when_moving = 0.1
}
weather_rain_heavy = { # on Region
    #naval
	naval_detection = -0.2
	naval_hit_chance = -0.2
	naval_speed_factor = -0.2
	naval_retreat_speed = 0.1
	naval_strike = -0.1
	carrier_traffic = -0.5
	positioning = -0.1
	#air
	air_detection = -0.2
	air_accidents = 0.2
	air_mission_efficiency = -0.2
	air_bombing_targetting = -0.2
    #land
	local_org_regain = -0.15
	org_loss_when_moving = 0.15
	supply_consumption_factor = 0.1
	supply_factor = -0.1

}
weather_snow = { # on Region
    #naval
	naval_detection = -0.2
	naval_hit_chance = -0.2
	naval_speed_factor = -0.2
	naval_retreat_speed = 0.1
	naval_strike = -0.2
	carrier_traffic = -0.3
	positioning = -0.2
	#air
	air_detection = -0.2
	air_accidents = 0.2
	air_mission_efficiency = -0.2
	air_bombing_targetting = -0.2
    #land
	local_org_regain = -0.15
	org_loss_when_moving = 0.15
	supply_factor = -0.15
	truck_attrition_factor = 0.1
}
weather_blizzard = { # on Region
    #naval
	naval_detection = -0.2
	naval_hit_chance = -0.2
	naval_speed_factor = -0.2
	naval_retreat_speed = 0.1
	naval_strike = -0.2
	carrier_traffic = -0.8
	positioning = -0.2
	#air
	air_detection = -0.3
	air_accidents = 0.3
	air_mission_efficiency = -0.3
	air_bombing_targetting = -0.3
    #land
	supply_consumption_factor = 0.15
	local_org_regain = -0.15
	org_loss_when_moving = 0.15
	supply_factor = -0.15
	truck_attrition_factor = 0.5
}
weather_sandstorm = { # on Region
    #naval
	naval_detection = -0.3
	naval_hit_chance = -0.3
	naval_speed_factor = -0.2
	naval_retreat_speed = 0.1
	naval_strike = -0.3
	carrier_traffic = -0.4
	positioning = -0.2
	#air
	air_detection = -0.4
	air_accidents = 0.4
	air_mission_efficiency = -0.4
	air_bombing_targetting = -0.4
    #land
	supply_consumption_factor = 0.15
	local_org_regain = -0.15
	org_loss_when_moving = 0.15
	supply_factor = -0.15
	truck_attrition_factor = 0.5
}

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

weather_mud = { # on Province
	attrition = 0.15
	army_speed_factor = -0.2
	army_attack_factor = -0.15
	breakthrough_factor = -0.15
	dig_in_speed_factor = -0.5
	
	#land
	supply_consumption_factor = 0.15
	local_org_regain = -0.15
	org_loss_when_moving = 0.15
	supply_factor = -0.15
	truck_attrition_factor = 1.25
}
weather_extreme_cold = { # on Province
	winter_attrition = 0.2
	dig_in_speed_factor = -0.5
	
	army_speed_factor = -0.2
	army_attack_factor = -0.15
	breakthrough_factor = -0.15
	
	#land
	supply_consumption_factor = 0.15
	local_org_regain = -0.15
	org_loss_when_moving = 0.15
	supply_factor = -0.15
	truck_attrition_factor = 0.5
}
weather_very_cold = { # on Province
	winter_attrition = 0.1
	dig_in_speed_factor = -0.5
	
	army_speed_factor = -0.1
	army_attack_factor = -0.1
	breakthrough_factor = -0.1
	
	#land
	supply_consumption_factor = 0.1
	local_org_regain = -0.1
	org_loss_when_moving = 0.1
	supply_factor = -0.1
	truck_attrition_factor = 0.25
}
weather_very_hot = { # on Province
	heat_attrition = 0.1

	
	#land
	supply_consumption_factor = 0.1
	local_org_regain = -0.1
	org_loss_when_moving = 0.1
	supply_factor = -0.1
	truck_attrition_factor = 0.2
}
weather_extreme_hot = { # on Province
	heat_attrition = 0.15
	army_speed_factor = -0.2
	army_attack_factor = -0.15
	breakthrough_factor = -0.15
	dig_in_speed_factor = -0.5
	
	#land
	supply_consumption_factor = 0.15
	local_org_regain = -0.15
	org_loss_when_moving = 0.15
	supply_factor = -0.15
	truck_attrition_factor = 0.5
}
weather_ground_snow_medium = { # on Province
	army_attack_factor = -0.1
	army_speed_factor = -0.1
	breakthrough_factor = -0.1
	army_attack_speed_factor = -0.1
	
	#land
	supply_consumption_factor = 0.1
	local_org_regain = -0.1
	org_loss_when_moving = 0.1
	supply_factor = -0.1
	truck_attrition_factor = 0.25
	
}
weather_ground_snow_high = { # on Province
	army_attack_factor = -0.15
	army_speed_factor = -0.15
	army_attack_speed_factor = -0.15
	breakthrough_factor = -0.15
	
	#land
	supply_consumption_factor = 0.15
	local_org_regain = -0.15
	org_loss_when_moving = 0.15
	supply_factor = -0.15
	truck_attrition_factor = 0.5
}

flooded = { # on Province
	army_defence_factor = 0.2
	army_speed_factor = -0.4
	dig_in_speed_factor = -0.5
	
	#land
	supply_consumption_factor = 0.1
	local_org_regain = -0.1
	org_loss_when_moving = 0.1
	supply_factor = -0.1
	truck_attrition_factor = 0.5
}

unplanned_offensive = { # on Province
	air_cas_present_factor = -0.75
	army_attack_factor = -0.75
	army_speed_factor = -0.5
	ground_attack_factor = -0.75
	local_org_regain = -0.5
	army_attack_speed_factor = -0.75
}

night = { # On province. Multiplied by amount of darkness.
	carrier_traffic = -0.25
	naval_hit_chance = -0.15
	air_bombing_targetting = -0.15
	air_attack_factor = -0.15
	naval_retreat_speed = 0.05
}

# 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 = {

}

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

# On States that are controlled by a non-core country
non_core_controller = {
	local_factories = -0.6
	local_resources = -0.6
}

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 = 15 #more to AI acceptance value.
	license_production_speed = 0.15 #speed  increase for being a license
	license_tech_difference_speed = 0.15 #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 = 15 #more to AI acceptance value.
	license_production_speed = 0.15 #speed  increase for being a license
	license_tech_difference_speed = 0.15 #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 = 25 #more to AI acceptance value.

}

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

}

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

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.15 #base cost reduction
	ai_license_acceptance = 15 #more to AI acceptance value.
	license_production_speed = 0.15 #speed  increase for being a license
	license_tech_difference_speed = 0.15 #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.15 #no base cost
}

ITA_military_agreements = {
	valid_relation_trigger = {
		FROM = {
			is_in_faction_with = ROOT
		}
	}
	license_purchase_cost = 0.15 #base cost reduction
	ai_license_acceptance = 15 #more to AI acceptance value.
	license_production_speed = 0.15 #speed  increase for being a license
	license_tech_difference_speed = 0.15 #less cost increase for each tech level between the license and own tech level
}

# applies when stability > 50%
stability_good_modifier = {
	political_power_factor = 0.15
	compliance_growth = 0.1
	production_speed_buildings_factor = 0.15
    local_resources_factor = 0.15
	mobilization_speed = 0.15
}

# applies when stability < 50%
stability_bad_modifier = {
	consumer_goods_factor = 0.15
	political_power_factor = -0.3
	production_speed_buildings_factor = -0.3
	mobilization_speed = -0.3
	local_resources_factor = -0.3
}

war_support_good_modifier = {
	army_core_attack_factor = 0.1
	army_core_defence_factor = 0.1
	command_power_gain_mult = 0.1
	industrial_capacity_factory = 0.1
	industrial_capacity_dockyard = 0.1
	training_time_factor = -0.1
	resistance_growth_on_our_occupied_states = 0.05
	resistance_damage_to_garrison_on_our_occupied_states = 0.05
}

war_support_bad_modifier = {
	command_power_gain_mult = -0.5
	surrender_limit = -0.1
	army_defence_factor = -0.15
	army_attack_factor = -0.15
	army_org_factor = -0.15
	industrial_capacity_factory = -0.15
	industrial_capacity_dockyard = -0.15
	training_time_factor = 0.15
}

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


attache_sent = {
	war_support_factor = 0.01
}

# Difficulty modifiers

diff_very_easy_player = {
	production_factory_max_efficiency_factor = 0.1
	political_power_factor = 0.1
	production_lack_of_resource_penalty_factor = -0.1
	army_fuel_consumption_factor = -0.2
	air_fuel_consumption_factor = -0.2
 	navy_fuel_consumption_factor = -0.2
	no_supply_grace = 24
}

diff_easy_player = {
	production_factory_max_efficiency_factor = 0.05
	political_power_factor = 0.05
	production_lack_of_resource_penalty_factor = -0.05
	army_fuel_consumption_factor = -0.15
	air_fuel_consumption_factor = -0.15
 	navy_fuel_consumption_factor = -0.15
	no_supply_grace = 12
}

diff_normal_player = {
	no_supply_grace = 12
}

diff_hard_player = {
    production_factory_max_efficiency_factor = -0.05
}

diff_very_hard_player = {
	production_factory_max_efficiency_factor = -0.1
	political_power_factor = -0.05
	supply_consumption_factor = 0.1
}


diff_very_easy_ai = {
	repair_speed_factor = 0.25
	peace_score_ratio_transferred_to_players = 0.25
	training_time_army_factor = 0.15
}

diff_easy_ai = {
	political_power_factor = 0.05
	army_fuel_consumption_factor = -0.1
	air_fuel_consumption_factor = -0.1
 	navy_fuel_consumption_factor = -0.1
	repair_speed_factor = 0.25
	refit_speed = 0.25
	refit_ic_cost = -0.15
	required_garrison_factor = -0.1
	
	naval_speed_factor = 0.05
    naval_defense_factor = 0.05
	peace_score_ratio_transferred_to_players = 0.2
	
	training_time_army_factor = 0.1
}

diff_normal_ai = {
	dig_in_speed_factor = 0.1
    planning_speed = 0.1
	army_speed_factor = 0.05
	supply_node_range = 0.2
	
    positioning = 0.1
    naval_defense_factor = 0.1
    convoy_retreat_speed = 0.1
    naval_retreat_speed = 0.1
	screening_without_screens = 0.05
	navy_weather_penalty = -0.05
	
	political_power_factor = 0.05
	army_fuel_consumption_factor = -0.15
	air_fuel_consumption_factor = -0.15
 	navy_fuel_consumption_factor = -0.15
	repair_speed_factor = 0.35
	refit_speed = 0.35
	refit_ic_cost = -0.15
	required_garrison_factor = -0.1
	no_supply_grace = 24
	
	
	peace_score_ratio_transferred_to_players = 0.15
}

diff_hard_ai = {
	dig_in_speed_factor = 0.1
    planning_speed = 0.1
	army_speed_factor = 0.05
	supply_node_range = 0.2
	
    positioning = 0.1
    naval_defense_factor = 0.1
    convoy_retreat_speed = 0.1
    naval_retreat_speed = 0.1
	screening_without_screens = 0.05
	navy_weather_penalty = -0.05
	
	political_power_factor = 0.05
	army_fuel_consumption_factor = -0.2
	air_fuel_consumption_factor = -0.2
 	navy_fuel_consumption_factor = -0.2
	repair_speed_factor = 0.35
	refit_speed = 0.35
	refit_ic_cost = -0.15
	required_garrison_factor = -0.1
	no_supply_grace = 24
	
	
	peace_score_ratio_transferred_to_players = 0.1
}

diff_very_hard_ai = {
	dig_in_speed_factor = 0.1
    planning_speed = 0.1
	army_speed_factor = 0.05
	supply_node_range = 0.2
	
    positioning = 0.1
    naval_defense_factor = 0.1
    convoy_retreat_speed = 0.1
    naval_retreat_speed = 0.1
	screening_without_screens = 0.05
	navy_weather_penalty = -0.05
	
	political_power_factor = 0.05
	army_fuel_consumption_factor = -0.25
	air_fuel_consumption_factor = -0.25
 	navy_fuel_consumption_factor = -0.25
	repair_speed_factor = 0.35
	refit_speed = 0.35
	refit_ic_cost = -0.15
	required_garrison_factor = -0.1
	no_supply_grace = 24
	
	
	peace_score_ratio_transferred_to_players = 0.05
}


diff_strong_ai_generic = {
	dig_in_speed_factor = 0.1
    planning_speed = 0.1
    org_loss_when_moving = -0.1
	
    positioning = 0.05
    naval_defense_factor = 0.1
    convoy_retreat_speed = 0.1
    naval_retreat_speed = 0.1
	
	political_power_factor = 0.1
	non_core_manpower = 0.01
	army_fuel_consumption_factor = -0.1
	air_fuel_consumption_factor = -0.1
 	navy_fuel_consumption_factor = -0.1
	repair_speed_factor = 0.1
	required_garrison_factor = -0.1
	no_supply_grace = 12
}

naval_mines_effect = {
	naval_accidents_chance = 0.15
	naval_speed_factor = -0.25
	naval_invasion_penalty = 0.1
}

air_wing_experience_bonus_max = {
	air_attack_factor = 0.2
	air_defence_factor = 0.2
    air_agility_factor = 0.1
    air_mission_efficiency = 0.1
	air_night_penalty = -0.1
	air_weather_penalty = -0.1
}

air_wing_experience_malus_min = {
	air_attack_factor = -0.2
	air_defence_factor = -0.2
    air_mission_efficiency = -0.2
    air_maximum_speed_factor = -0.2
	air_night_penalty = 0.2
	air_weather_penalty = 0.2
}

ship_experience_bonus_max = {
    naval_damage_factor = 0.15
    naval_defense_factor = 0.1
	naval_speed_factor = 0.05
}

ship_experience_malus_min = {
    naval_damage_factor = -0.2
    naval_defense_factor = -0.05
}

carrier_experience_bonus_max = {
	sortie_efficiency = 0.2
}

carrier_experience_malus_min = {
	sortie_efficiency = -0.2
}

pride_of_the_fleet = {
	experience_gain_navy_unit_factor = 0.25
	critical_receive_chance = -0.1
	naval_defense_factor = 0.15
}


pride_of_the_fleet_country = {
	war_support_factor = 0.05
}

pride_of_the_fleet_sunk_temporary = {
	# country
	war_support_factor = -0.05
	navy_org_factor = -0.2
}

water_modifier_shark_infested = {
	navy_casualty_on_sink = 0.5
}

screening_bonus = {
   convoy_retreat_speed = 0.1
}

capital_screening_bonus = {
   sortie_efficiency = 0.05
}

country_is_at_peace = {
	decryption_power_factor = -0.4
	
	#army_global 
	planning_speed = -0.4
	max_dig_in_factor = -0.2	
    #army nerf_volounteers
	army_defence_factor = -0.2
	army_attack_factor = -0.2
	breakthrough_factor = -0.2
	
	#air
	air_mission_efficiency = -0.2
	mines_planting_by_fleets_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.05
	civilian_intel_decryption_bonus = 5
	army_intel_decryption_bonus = 5
	navy_intel_decryption_bonus = 5
	airforce_intel_decryption_bonus = 5
}

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

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

# modifiers applied to enemy divisions in an intel network
intel_network_state_level_penalty = {
	max_planning_factor = -0.1
	max_dig_in = -1
	planning_speed = -0.25
}

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

# 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.25
	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.02
}

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

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

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

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

	license_purchase_cost = 0.25 #base cost reduction
	ai_license_acceptance = 25 #more to AI acceptance value.
	license_production_speed = 0.15 #speed  increase for being a license
	license_tech_difference_speed = 0.15 #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.05
	defense_bonus_against = 0.05
}

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.5
	send_volunteer_factor = 0.25
}

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

### AAT 

NORDIC_allow_lendlease = {
	lend_lease_tension = -0.2
}

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

NORDIC_allow_more_volunteers = {
	send_volunteer_factor = 0.5 
}

NORDIC_allow_more_planes = {
	air_volunteer_cap = 1
}

FIN_organized_support_for_finland = {
	send_volunteer_size = 2
	air_volunteer_cap = 1
}

### SOUTH AMERICA ###
CHL_from_support_chile_static_modifier = {
	send_volunteers_tension = -0.5
	send_volunteer_divisions_required = -0.5
	send_volunteer_factor = 0.5
}