ideas = {

	economy = {
		law = yes
		use_list_view = yes

		isolation = {

			allowed = {
				always = no
			}
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.4
				production_speed_industrial_complex_factor = -0.4
				production_speed_arms_factory_factor = -0.4
				production_speed_dockyard_factor = -0.4
				conversion_cost_civ_to_mil_factor= 0.4
				conversion_cost_mil_to_civ_factor = 0.4
				generate_wargoal_tension = 1.00
				join_faction_tension = 0.20
				lend_lease_tension = 0.10
				send_volunteers_tension = 0.20
				guarantee_tension = 0.5
				max_fuel_factor = -0.35
				fuel_gain_factor = -0.5
				agency_upgrade_time = 0.8
				factory_energy_consumption = -0.3
			}

			allowed_to_remove = {
				has_war_support > 0.75
				has_war = yes
			}

			cancel_if_invalid = no
		}

		civilian_economy = {


			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.35
				production_speed_industrial_complex_factor = -0.3
				production_speed_arms_factory_factor = -0.3
				conversion_cost_civ_to_mil_factor= 0.3
				conversion_cost_mil_to_civ_factor = 0.3
				max_fuel_factor = -0.25
				fuel_gain_factor = -0.4
				factory_energy_consumption = -0.3
			}

			default = yes

			cancel_if_invalid = no
		}

		low_economic_mobilisation = {

			available = {
				has_war_support > 0.15
			}

			on_add = {
				
			}

			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.3
				production_speed_industrial_complex_factor = -0.1
				production_speed_arms_factory_factor = -0.1
				fuel_gain_factor = -0.25
				factory_energy_consumption = -0.15
				unit_medal_effectiveness = -0.60
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 2

   				modifier = {
					factor = 20

					is_major = yes
				}
				modifier = {
					has_war_support > 0.25
					factor = 0 #don't even look at it if you could be taking partial mob
				}
				modifier = {
					has_war = no
					date < 1937.6.1
					factor = 0
				}
   			}
		}

		partial_economic_mobilisation = {

			available = {
				has_war_support > 0.25
			}

			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.25
				production_speed_arms_factory_factor = 0.1
				conversion_cost_civ_to_mil_factor= -0.1
				conversion_cost_mil_to_civ_factor = -0.1
				fuel_gain_factor = -0.1
			}

			cancel_if_invalid = no

			on_add = {
				
			}

			ai_will_do = {
   				factor = 2

   				modifier = {
					factor = 20

					is_major = yes
				}
				
				modifier = {
					add = 80
					date < 1937.1.1
					NOT = { 
						OR = {
							has_idea = war_economy 
							has_idea = tot_economic_mobilisation
						}
					}
				}
				
				modifier = {
					NOT = { 
						OR = {
							has_idea = war_economy 
							has_idea = tot_economic_mobilisation
						}
					}
					add = 1200 #Prep for invasion
				}

				modifier = {
					factor = 100
					NOT = {
						has_idea = war_economy
					}
				}
   			}
		}

		war_economy = {


			available = {
				has_war_support > 0.5
				OR = {
					custom_trigger_tooltip = { tooltip = or_clarification_tooltip always = no }
					AND = {
						has_war = yes
						any_enemy_country = {
							ic_ratio = {
								tag = ROOT
								ratio > 0.4
							}
						}
					}
				}

			}

			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.2
				production_speed_arms_factory_factor = 0.2
				conversion_cost_civ_to_mil_factor= -0.2
				conversion_cost_mil_to_civ_factor = -0.2
				factory_energy_consumption = 0.25
			}

			cancel_if_invalid = no

			on_add = {

			}

			ai_will_do = {
   				base = 3

				modifier = {
					#High prio on production
					factor = 20
					manpower_per_military_factory >  1000
				}

				modifier = {
					# If we CAN go for total mobilization and have enough manpower for it, skip war economy, it's only a waste of PP
					factor = 0

					manpower_per_military_factory > 15000
					has_war = yes
					has_war_support > 0.8
					any_enemy_country = {
						ic_ratio = {
							tag = ROOT
							ratio > 0.5
						}
					}
				}

				modifier = {
					add = 1800

					# revert from closed_economy if we have large allies
					has_idea = closed_economy
				}

				modifier = {
					# We will lose the war support after the war anyway
					factor = 0
					has_civil_war = yes
				}
   			}
		}

		tot_economic_mobilisation = {

			visible = {
			}

			available = {
				has_war = yes
				has_war_support > 0.8
				any_enemy_country = {
					ic_ratio = {
						tag = ROOT
						ratio > 0.5
					}
				}
			}

			on_add = {
			}

			ai_will_do = {
   				factor = 1

				modifier = {
					factor = 25
					#Prio this if nation has a lot of manpower compared to MIC
					manpower_per_military_factory > 15000
				}

				modifier = {
					#Block  unless nation has a lot of manpower
					factor = 0
					manpower_per_military_factory <  10000
				}


				modifier = {
					# never take this if we are on low conscription laws for safety
					factor = 0
					OR = {
						has_idea = volunteer_only
						has_idea = limited_conscription
					}
				}
   			}

			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.15
				conscription = -0.03
				production_speed_arms_factory_factor = 0.3
				conversion_cost_civ_to_mil_factor= -0.3
				conversion_cost_mil_to_civ_factor = -0.3
				factory_energy_consumption = 0.5
			}

			cancel_if_invalid = no
		}
	}

	trade_laws = {
		law = yes
		use_list_view = yes

		uncontrolled_exports = {


			allowed = {
				always = no
			}
			removal_cost = -1
			picture = isolation

			rule = {
				can_access_market = no
			}

			modifier = {
				min_export = 0.25
				consumer_goods_expected_value = 0.05
				civilian_intel_to_others = 40.0
				navy_intel_to_others = 40.0
				agency_upgrade_time = 0.15
				cic_construction_boost = 0.15
			}

			allowed_to_remove = {
				OR = {
					has_war = yes
					NOT = {
						owns_state = 85
						owns_state = 807
					}
					any_owned_state = {
						NOT = {
							state = 85
							state = 807
						}
						is_coastal = yes
					}
				}
			}

			on_remove = {
				effect_tooltip =  {
					remove_dynamic_modifier = { modifier = international_city }
				}
				hidden_effect = {
					if = {
						limit = {
							85 = { is_demilitarized_zone = no }
							has_civil_war = no 
						}
						85 = {
							if = {
								limit = {
									has_dynamic_modifier = { modifier = international_city }
								}
								remove_dynamic_modifier = { modifier = international_city }
							}
						}
					}
				}
			}
			
			cancel_if_invalid = no
		}

		free_trade = {

			available = {
			}

			cost = 150
			removal_cost = -1

			modifier = {
				min_export = 0.8
				industrial_capacity_factory = 0.15
				industrial_capacity_dockyard = 0.15
				production_speed_buildings_factor = 0.15
				#research_speed_factor = 0.10
				civilian_intel_to_others = 40.0
				navy_intel_to_others = 20.0
				cic_construction_boost_factor = 0.05
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

   				modifier = {
					factor = 300

					is_in_faction = no
				}

				modifier = {
					factor = 300

					date > 1943.1.1 # at this point we can probably cash in on rubber lack in the world
				}

				modifier = {
					factor = 400
					date > 1941.6.1
				}

				# Oil for hitlers oil throne!
				modifier = {
					factor = 600
				}
   			}
		}

		export_focus = {

			available = {
			}


			cost = 150
			removal_cost = -1

			modifier = {
				min_export = 0.5
				industrial_capacity_factory = 0.1
				industrial_capacity_dockyard = 0.1
				production_speed_buildings_factor = 0.1
				#research_speed_factor = 0.05
				civilian_intel_to_others = 20.0
				navy_intel_to_others = 10.0
				cic_construction_boost_factor = 0.1
			}

			default = yes

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

				modifier = {
					factor = 0

					is_major = no
					has_war = no
					is_in_faction = no
				}
				modifier = {
					factor = 1000
					has_idea = uncontrolled_exports #Poland should try and escape this as soon as they can
				}
   			}
		}

		limited_exports = {
			available = {
				OR = {
					AND = {
						has_war = yes
						any_enemy_country = {
							ic_ratio = {
								tag = ROOT
								ratio > 0.2
							}
						}
					}
					AND = {
						OR = {
							has_idea = partial_economic_mobilisation
							has_idea = war_economy
							has_idea = tot_economic_mobilisation
							if = {
								hidden_trigger = { always = no } #NEED TO HAVE AN ALWAYS AS AN END STATEMENT IF URE USING AN IF ELSE IN AN OR STATEMENT OTHERWISE THE EVALUATION BREAKS!!
							}
						}
					}
				}
			}

			cost = 150
			removal_cost = -1

			modifier = {
				min_export = 0.25
				industrial_capacity_factory = 0.05
				industrial_capacity_dockyard = 0.05
				production_speed_buildings_factor = 0.05
				#research_speed_factor = 0.01
				civilian_intel_to_others = 10.0
				navy_intel_to_others = 5
				lend_lease_tension = 0.20
				cic_construction_boost = -0.05
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

   				modifier = {
					add = -1

					is_major = no
					is_in_faction = yes
					has_war = yes
				}

				# minors not at war should want to get the bonuses from free trade
				modifier = {
					add = -1

					is_major = no
					has_war = no
				}
				modifier = {
					factor = 200
					NOT = { has_idea = closed_economy }
					has_war = yes
					is_major = yes
				}
				modifier = {
					add = 1500

					# revert from closed_economy if we have large allies
					has_idea = closed_economy
				}
				modifier = { #Germany should keep its Autarkic Economy
					factor = 0.5
				}
   			}
		}

		closed_economy = {


			available = {
				has_war = yes
				OR = {
					has_idea = war_economy
					has_idea = tot_economic_mobilisation
					if = {
						hidden_trigger = { always = no } #NEED TO HAVE AN ALWAYS AS AN END STATEMENT IF URE USING AN IF ELSE IN AN OR STATEMENT OTHERWISE THE EVALUATION BREAKS!!
					}
				}
			}

			rule = {
				can_access_market = no
				desc = can_not_access_market_closed_economy
			}

			cost = 150
			removal_cost = -1

			modifier = {
				min_export = 0
				#civilian_intel_to_others = 0.0
				lend_lease_tension = 0.40
				cic_construction_boost = -0.1
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

   				modifier = {
					factor = 0

					is_major = no
					is_in_faction = yes
					has_war = yes
				}

				# minors not at war should want to get the bonuses from free trade
				modifier = {
					factor = 0

					is_major = no
					has_war = no
				}
   			}
		}
	}
}
