SIA_decision_category_foriegn_influence = {
	
	#trade concessions to get interest
	eoanb_decision_SIA_concessions = {

		icon = generic_prepare_civil_war

		available = {
			if = {
				limit = { 
					has_country_flag = afr_rrp_company_port
					has_variable = has_afr_empire_mechanic_system
				}
				custom_trigger_tooltip = {
					tooltip = afr_prosperity_mechanic_greater_than_10_has_company
					has_country_flag = afr_rrp_company_port
				}
			}
			if = {
				limit = { 
					NOT = { has_country_flag = afr_rrp_company_port } 
					has_variable = has_afr_empire_mechanic_system
				}
				custom_trigger_tooltip = {
					tooltip = afr_prosperity_mechanic_greater_than_10_no_company
					check_variable = {
						afr_prosperity_mechanic_value > 9
					}
				}
			}
		}
		
		target_trigger = {
			FROM = {
				OR = {
					AND={
						tag = FRA
						check_variable = { SIA.SIA_french_interest > 0}
					}
					AND={
						tag = ENG
						check_variable = { SIA.SIA_british_interest > 0}
					}
				}
			}
		}

		visible = {
			TAG = SIA
		}
		allowed = { TAG = SIA }

		fire_only_once = yes

		cost = 0

		days_remove = 90
		
		modifier={
			production_speed_buildings_factor = 0.05
		}
		
		complete_effect = {
			if = {
				limit = { 
					has_variable = has_afr_empire_mechanic_system 
					OR = {
						check_variable = { afr_prosperity_mechanic_value > 10 }
						NOT = { has_country_flag = afr_rrp_company_port }
					}
				}
				custom_effect_tooltip = afr_prosperity_mechanic_minus_10_investment_tooltip
				add_to_variable = {
					var = afr_prosperity_mechanic_value
					value = -10
				}
			}
			if = {
				limit = { 
					has_variable = has_afr_empire_mechanic_system 
					check_variable = { afr_prosperity_mechanic_value < 11 }
					has_country_flag = afr_rrp_company_port
				}
				custom_effect_tooltip = afr_prosperity_mechanic_minus_10_investment_debt_tooltip
				add_to_variable = {
					var = afr_prosperity_mechanic_value
					value = -10
				}
			}
		}
		
		remove_effect ={
			custom_effect_tooltip = SIA_increase_interest_purpose
			if={
				limit={
					FROM={tag=ENG}
				}
				#custom_effect_tooltip = SIA_trade_resources_to_market_to_ENG_for_int
				add_to_variable = { SIA_british_interest = 1}
			}
			else={
				#custom_effect_tooltip = SIA_trade_resources_to_market_to_FRA_for_int
				add_to_variable = { SIA_french_interest = 1}
			}
		}

		ai_will_do = {
			base = 0
			modifier = {
				factor = 0.01
				is_historical_focus_on = no
			}
		}
	}
	
	SIA_ask_for_industrial_investment = {
		target_trigger = {
			FROM = {
				OR = {
					AND={
						tag = FRA
						check_variable = { SIA.SIA_french_interest > 0}
					}
					AND={
						tag = ENG
						check_variable = { SIA.SIA_british_interest > 0}
					}
				}
			}
		}
		visible = {
			TAG = SIA
		}
		allowed = { TAG = SIA }
		available={
			FROM={
				custom_trigger_tooltip = { 
					tooltip = SIA_interest_higher_than_noticing
					if={
						limit={tag=FRA}
						check_variable = { SIA.SIA_french_interest > 1}
					}
					else={
						check_variable = { SIA.SIA_british_interest > 1}
					}
				}
			}
			if = {
				limit = { 
					has_country_flag = afr_rrp_company_port
					has_variable = has_afr_empire_mechanic_system
				}
				custom_trigger_tooltip = {
					tooltip = afr_prosperity_mechanic_greater_than_20_has_company
					has_country_flag = afr_rrp_company_port
				}
			}
			if = {
				limit = { 
					NOT = { has_country_flag = afr_rrp_company_port } 
					has_variable = has_afr_empire_mechanic_system
				}
				custom_trigger_tooltip = {
					tooltip = afr_prosperity_mechanic_greater_than_20_no_company
					check_variable = {
						afr_prosperity_mechanic_value > 19
					}
				}
			}
		}
		cost = 100
		days_remove = 365

		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.5 }
		}
		custom_cost_text = eoanb_money_cost_text

		remove_effect ={
			custom_effect_tooltip = SIA_FROM_inf_3
			if={
				limit={
					FROM = {
						tag = FRA
					}
				}
				add_to_variable = { SIA_french_influence = 3}
			}
			else={
				add_to_variable = { SIA_british_influence = 3}
			}
			random_owned_controlled_state = {
				limit = {
					check_variable = { var = afr_empire_state_industrisation_progress value = 100 compare = not_equals }
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
					OR = {
						is_in_home_area = yes
						NOT = {
							owner = {
								any_owned_state = {
									free_building_slots = {
										building = industrial_complex
										size > 0
										include_locked = yes
									}
									is_in_home_area = yes
								}
							}
						}
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				if = {
					limit = { OWNER = { has_variable = has_afr_empire_mechanic_system } }
					hidden_effect = { 
						state_event = { id = RCE_afr_regional_power.57 days = 120 trigger_for = controller }
						set_state_flag = afr_empire_politics_has_regional_development_boom_flag
						
						
					}
					custom_effect_tooltip = afr_empire_politics_state_economy_status_boom_effect
					custom_effect_tooltip = afr_empire_state_industrialized_tooltip
				}
				hidden_effect = { set_variable = { var = afr_empire_state_industrisation_progress value = 100 } }
			}
		}
		complete_effect = {
			  if = {
				limit = { NOT = { has_variable = has_afr_empire_mechanic_system } }
				set_temp_variable = { money_to_gain = -0.5 }
				add_money_with_tooltip_effect = yes 
			}
			if = {
				limit = { 
					has_variable = has_afr_empire_mechanic_system 
					OR = {
						check_variable = { afr_prosperity_mechanic_value > 20 }
						NOT = { has_country_flag = afr_rrp_company_port }
					}
				}
				custom_effect_tooltip = afr_prosperity_mechanic_minus_20_investment_tooltip
				add_to_variable = {
					var = afr_prosperity_mechanic_value
					value = -20
				}
			}
			if = {
				limit = { 
					has_variable = has_afr_empire_mechanic_system 
					check_variable = { afr_prosperity_mechanic_value < 21 }
					has_country_flag = afr_rrp_company_port
				}
				custom_effect_tooltip = afr_prosperity_mechanic_minus_20_investment_debt_tooltip
				add_to_variable = {
					var = afr_prosperity_mechanic_value
					value = -20
				}
			}
		}
	}
	
}