lazy_automation_shortcut = {
	potential = {

	}
	allow = {
		hidden_trigger = {
			is_scope_type = country
			is_ai = no
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.1
				}
			}
		}	
	}
}

lazy_automation_dynamic_background = {
	potential = {
		OR = {
			AND = {
				is_scope_type = fleet
				from = {
					exists = owner
					OR = {
						AND = {
							AND = {
								NAND = {
									has_country_flag = auto_construct_outposts_flag
									has_country_flag = auto_construct_mega_flag
								}
								OR = {
									has_country_flag = auto_construct_outposts_flag
									has_country_flag = auto_construct_mega_flag
								}
							}
							prev = {
								is_ship_class = shipclass_constructor
							}
						}
						AND = {
							has_country_flag = auto_fleet_attack_enable_flag
							prev = {
								is_ship_class = shipclass_military
							}
						}
						AND = {
							has_country_flag = auto_army_invade_enable_flag
							prev = {
								is_ship_class = shipclass_transport
							}
						}
					}
				}
			}
			AND = {
				is_scope_type = planet
				is_colony = yes
				from = {
					exists = owner
					prev = {
						is_owned_by = from
					}
					has_country_flag = auto_colony_manager_flag
				}
			}
			AND = {
				is_scope_type = fleet
				is_ship_class = shipclass_starbase
				from = {
					exists = owner
					prev = {
						is_owned_by = from
					}
					has_country_flag = auto_outfit_starbases_flag
				}
			}
		}
	}
	allow = {

	}
	
	effect = {

	}
}

lazy_automation_dynamic_background_timer = {
	potential = {
		OR = {
			AND = {
				is_scope_type = fleet
				from = {
					exists = owner
					AND = {
						OR = {
							has_country_flag = auto_construct_outposts_flag
							has_country_flag = auto_construct_mega_flag
						}
						prev = {
							is_ship_class = shipclass_constructor
						}
					}
				}
			}
			# AND = {
			# 	is_scope_type = planet
			# 	is_colony = yes
			# 	from = {
			# 		exists = owner
			# 		prev = {
			# 			is_owned_by = from
			# 		}
			# 		has_country_flag = auto_colony_manager_flag
			# 	}
			# }
			AND = {
				is_scope_type = fleet
				is_ship_class = shipclass_starbase
				from = {
					exists = owner
					prev = {
						is_owned_by = from
					}
					has_country_flag = auto_outfit_starbases_flag
				}
			}
		}
	}
	allow = {

	}
	
	effect = {

	}
}

lazy_automation_dynamic_background_2 = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			has_country_flag = auto_construct_outposts_flag
			has_country_flag = auto_construct_mega_flag
			prev = {
				is_ship_class = shipclass_constructor
			}
		}
	}
	allow = {

	}
	
	effect = {

	}
}

lazy_automation_auto_construct_outpost = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			has_country_flag = auto_construct_outposts_flag
		}
		NOT = {
			has_fleet_flag = auto_outpost_ship_flag
		}
		is_ship_class = shipclass_constructor
	}
	allow = {
		hidden_trigger = {
			NOT = {
				has_fleet_flag = auto_mega_ship_flag
			}
			from = {
				exists = owner
				is_ai = no
			}
		}
	}
	
	effect = {
		hidden_effect = {
			set_fleet_flag = auto_outpost_ship_flag
			fleet_event = {
				id = lazy_con_events.1
			}
		}
	}
}

lazy_automation_auto_construct_outpost_active = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			has_country_flag = auto_construct_outposts_flag
		}
		has_fleet_flag = auto_outpost_ship_flag
		is_ship_class = shipclass_constructor
	}
	allow = {
		hidden_trigger = {
			NOT = {
				has_fleet_flag = auto_mega_ship_flag
			}
			from = {
				exists = owner
				is_ai = no
			}
		}
	}
	
	effect = {
		hidden_effect = {
			remove_fleet_flag = auto_outpost_ship_flag
			clear_fleet_actions = this
			clear_orders = yes
			set_event_locked = no
			remove_fleet_flag = auto_construct_blocked_fleet_flag
			set_variable = {
				which = lazy_automation_month_timer
				value = 0
			}
		}
	}
}

lazy_automation_auto_construct_megastructures = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			has_country_flag = auto_construct_mega_flag
			has_country_flag = auto_construct_outposts_flag
		}
		NOT = {
			has_fleet_flag = auto_mega_ship_flag
		}
		is_ship_class = shipclass_constructor
	}
	allow = {
		hidden_trigger = {
			NOT = {
				has_fleet_flag = auto_outpost_ship_flag
			}
			from = {
				exists = owner
				is_ai = no
			}
		}
	}
	
	effect = {
		hidden_effect = {
			fleet_event = {
				id = lazy_con_meg_events.1
			}
		}
	}
}

lazy_automation_auto_construct_megastructures_active = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			has_country_flag = auto_construct_mega_flag
			has_country_flag = auto_construct_outposts_flag
		}
		has_fleet_flag = auto_mega_ship_flag
		is_ship_class = shipclass_constructor
	}
	allow = {
		hidden_trigger = {
			NOT = {
				has_fleet_flag = auto_outpost_ship_flag
			}
			from = {
				exists = owner
				is_ai = no
			}
		}
	}
	
	effect = {
		hidden_effect = {
			auto_construct_mega_fleet_deactivate = yes
		}
	}
}

lazy_automation_auto_construct_megastructures_alt = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			has_country_flag = auto_construct_mega_flag
			NOT = {
				has_country_flag = auto_construct_outposts_flag
			}
		}
		NOT = {
			has_fleet_flag = auto_mega_ship_flag
		}
		is_ship_class = shipclass_constructor
	}
	allow = {
		from = {
			exists = owner
			is_ai = no
		}
	}
	
	effect = {
		hidden_effect = {
			fleet_event = {
				id = lazy_con_meg_events.1
			}
		}
	}
}

lazy_automation_auto_construct_megastructures_active_alt = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			has_country_flag = auto_construct_mega_flag
			NOT = {
				has_country_flag = auto_construct_outposts_flag
			}
		}
		has_fleet_flag = auto_mega_ship_flag
		is_ship_class = shipclass_constructor
	}
	allow = {
		from = {
			exists = owner
			is_ai = no
		}
	}
	
	effect = {
		hidden_effect = {
			auto_construct_mega_fleet_deactivate = yes
		}
	}
}

lazy_automation_auto_fleet_attack = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			OR = {
				AND = {
					has_country_flag = auto_fleet_attack_enable_flag
					prev = {
						is_ship_class = shipclass_military
					}
				}
				AND = {
					has_country_flag = auto_army_invade_enable_flag
					prev = {
						is_ship_class = shipclass_transport
					}
				}
			}
		}
		NOR = {
			has_fleet_flag = auto_fleet_attack_flag
			has_fleet_flag = auto_army_invade_flag
		}
	}
	allow = {
		from = {
			exists = owner
			is_ai = no
		}
	}
	
	effect = {
		hidden_effect = {
			if = {
				limit = {
					is_ship_class = shipclass_transport
				}
				set_fleet_flag = auto_army_invade_flag
				set_fleet_stance = aggressive
				fleet_event = {
					id = lazy_arm_inv_events.1
				}
			}
			else = {
				set_fleet_flag = auto_fleet_attack_flag
				set_fleet_stance = aggressive
				fleet_event = {
					id = lazy_fle_att_events.1
				}
			}
		}
	}
}

lazy_automation_auto_fleet_attack_active = {
	potential = {
		is_scope_type = fleet
		from = {
			exists = owner
			OR = {
				AND = {
					has_country_flag = auto_fleet_attack_enable_flag
					prev = {
						is_ship_class = shipclass_military
					}
				}
				AND = {
					has_country_flag = auto_army_invade_enable_flag
					prev = {
						is_ship_class = shipclass_transport
					}
				}
			}
		}
		OR = {
			has_fleet_flag = auto_fleet_attack_flag
			has_fleet_flag = auto_army_invade_flag
		}
	}
	allow = {
		from = {
			exists = owner
			is_ai = no
		}
	}
	
	effect = {
		hidden_effect = {
			remove_fleet_flag = auto_fleet_attack_flag
			remove_fleet_flag = auto_army_invade_flag
			clear_fleet_actions = this
			clear_orders = yes
			set_event_locked = no
		}
	}
}

lazy_automation_auto_colony = {
	potential = {
		is_scope_type = planet
		is_colony = yes
		from = {
			exists = owner
			prev = {
				is_owned_by = from
			}
			has_country_flag = auto_colony_manager_flag
		}
		NOR = {
			has_carrier_flag = auto_buildings_carrier_flag
			has_carrier_flag = auto_decisions_carrier_flag
		}
	}
	allow = {
		from = {
			exists = owner
			is_ai = no
		}
	}
	
	effect = {
		hidden_effect = {
			set_carrier_flag = testing_flag
			carrier_event = {
				id = lazy_shared_events.2
			}
		}
	}
}

lazy_automation_auto_colony_active = {
	potential = {
		is_scope_type = planet
		is_colony = yes
		from = {
			exists = owner
			prev = {
				is_owned_by = from
			}
			has_country_flag = auto_colony_manager_flag
		}
		OR = {
			has_carrier_flag = auto_buildings_carrier_flag
			has_carrier_flag = auto_decisions_carrier_flag
		}
	}
	allow = {
		from = {
			exists = owner
			is_ai = no
		}
	}
	
	effect = {
		hidden_effect = {
			carrier_event = {
				id = lazy_shared_events.2
			}
		}
	}
}

lazy_automation_auto_outfit_starbase = {
	potential = {
		is_scope_type = fleet
		is_ship_class = shipclass_starbase
		from = {
			exists = owner
			prev = {
				is_owned_by = from
			}
			has_country_flag = auto_outfit_starbases_flag
		}
		NOT = {
			has_fleet_flag = auto_starbase_flag
		}
	}
	allow = {
		hidden_trigger = {
			from = {
				exists = owner
				is_ai = no
			}
			NOR = {
				is_ship_size = starbase_deep_space_citadel_1
				is_ship_size = starbase_deep_space_citadel_2
				is_ship_size = starbase_deep_space_citadel_3
			}
		}
	}
	
	effect = {
		hidden_effect = {
			set_fleet_flag = auto_starbase_flag
			random_owned_ship = {
				limit = {
					is_ship_class = shipclass_starbase
				}
				starbase = {
					set_starbase_flag = auto_outfit_starbases_marker_flag
					starbase_event = {
						id = lazy_out_sta_events.2
					}
				}
			}
		}
	}
}

lazy_automation_auto_outfit_starbase_active = {
	potential = {
		is_scope_type = fleet
		is_ship_class = shipclass_starbase
		from = {
			exists = owner
			prev = {
				is_owned_by = from
			}
			has_country_flag = auto_outfit_starbases_flag
		}
		has_fleet_flag = auto_starbase_flag
	}
	allow = {
		hidden_trigger = {
			from = {
				exists = owner
				is_ai = no
			}
			NOR = {
				is_ship_size = starbase_deep_space_citadel_1
				is_ship_size = starbase_deep_space_citadel_2
				is_ship_size = starbase_deep_space_citadel_3
			}
		}
	}
	
	effect = {
		hidden_effect = {
			remove_fleet_flag = auto_starbase_flag
			random_owned_ship = {
				limit = {
					is_ship_class = shipclass_starbase
				}
				starbase = {
					remove_starbase_flag = auto_shipyard_starbase_flag
					remove_starbase_flag = auto_anchorage_starbase_flag
					remove_starbase_flag = auto_energy_starbase_flag
					remove_starbase_flag = auto_mineral_starbase_flag
					remove_starbase_flag = auto_alloy_starbase_flag
					remove_starbase_flag = auto_trade_starbase_flag
					remove_starbase_flag = auto_mixed_starbase_flag
					set_variable = {
						which = lazy_automation_month_timer
						value = 0
					}
				}
			}
		}
	}
}

lazy_automation_speed = {
	potential = {
		is_scope_type = country
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.2
				}
			}
		}	
	}
}

lazy_automation_auto_button_centre_left_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					AND = {
						has_country_flag = auto_colony_manager_flag
						has_country_flag = auto_colony_support_flag
						has_country_flag = auto_pop_migration_flag
						has_country_flag = auto_bulding_upgrader_flag
						has_country_flag = auto_construct_outposts_flag
						has_country_flag = auto_construct_mega_flag
						has_country_flag = auto_fleet_attack_enable_flag
						has_country_flag = auto_fleet_merger_enable_flag
						has_country_flag = auto_army_invade_enable_flag
						has_country_flag = auto_army_recruit_enable_flag
						has_country_flag = auto_planet_destroyer_enable_flag
						has_country_flag = auto_colonizer_enable_flag
						has_country_flag = auto_upgrade_megastructure_flag
						has_country_flag = auto_terraforming_flag
						has_country_flag = auto_upgrade_starbases_flag
						has_country_flag = auto_recruit_leaders_enable_flag
						has_country_flag = auto_outfit_starbases_flag
						has_country_flag = auto_upgrade_deep_space_citadels_flag
					}
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_colony_manager_flag
				set_country_flag = auto_colony_support_flag
				set_country_flag = auto_pop_migration_flag
				set_country_flag = auto_construct_outposts_flag
				set_country_flag = auto_construct_mega_flag
				set_country_flag = auto_bulding_upgrader_flag
				set_country_flag = auto_fleet_attack_enable_flag
				set_country_flag = auto_fleet_merger_enable_flag
				set_country_flag = auto_army_invade_enable_flag
				set_country_flag = auto_army_recruit_enable_flag
				set_country_flag = auto_planet_destroyer_enable_flag
				set_country_flag = auto_colonizer_enable_flag
				set_country_flag = auto_upgrade_megastructure_flag
				set_country_flag = auto_terraforming_flag
				set_country_flag = auto_upgrade_starbases_flag
				set_country_flag = auto_recruit_leaders_enable_flag
				set_country_flag = auto_outfit_starbases_flag
				set_country_flag = auto_upgrade_deep_space_citadels_flag
				every_owned_fleet = {
					limit = {
						is_ship_class = shipclass_transport
					}
					set_fleet_flag = auto_army_invade_flag
					set_fleet_stance = aggressive
				}
				every_owned_fleet = {
					limit = {
						is_ship_class = shipclass_colonizer
					}
					set_fleet_flag = auto_colonizer_flag
					fleet_event = {
						id = lazy_col_events.1
					}
				}
				every_owned_fleet = {
					limit = {
						is_ship_size = colossus
					}
					set_fleet_flag = auto_planet_destroyer_flag
					fleet_event = {
						id = lazy_pla_des_events.1
					}
				}
				every_owned_fleet = {
					limit = {
						is_ship_class = shipclass_constructor
						is_ship_class = shipclass_starbase
					}
					set_variable = {
						which = lazy_automation_month_timer
						value = 0
					}
				}
			}
		}	
	}
}

lazy_automation_auto_button_centre_right_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				OR = {
					has_country_flag = auto_colony_manager_flag
					has_country_flag = auto_pop_migration_flag
					has_country_flag = auto_construct_outposts_flag
					has_country_flag = auto_construct_mega_flag
					has_country_flag = auto_fleet_attack_enable_flag
					has_country_flag = auto_fleet_merger_enable_flag
					has_country_flag = auto_army_invade_enable_flag
					has_country_flag = auto_army_recruit_enable_flag
					has_country_flag = auto_planet_destroyer_enable_flag
					has_country_flag = auto_colonizer_enable_flag
					has_country_flag = auto_upgrade_megastructure_flag
					has_country_flag = auto_terraforming_flag
					has_country_flag = auto_upgrade_starbases_flag
					has_country_flag = auto_recruit_leaders_enable_flag
					has_country_flag = auto_outfit_starbases_flag
					has_country_flag = auto_upgrade_deep_space_citadels_flag
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				remove_country_flag = auto_colony_manager_flag
				remove_country_flag = auto_pop_migration_flag
				remove_country_flag = auto_construct_outposts_flag
				remove_country_flag = auto_construct_mega_flag
				remove_country_flag = auto_fleet_attack_enable_flag
				remove_country_flag = auto_fleet_merger_enable_flag
				remove_country_flag = auto_army_invade_enable_flag
				remove_country_flag = auto_army_recruit_enable_flag
				remove_country_flag = auto_planet_destroyer_enable_flag
				remove_country_flag = auto_colonizer_enable_flag
				remove_country_flag = auto_upgrade_megastructure_flag
				remove_country_flag = auto_terraforming_flag
				remove_country_flag = auto_upgrade_starbases_flag
				remove_country_flag = auto_recruit_leaders_enable_flag
				remove_country_flag = auto_outfit_starbases_flag
				remove_country_flag = auto_upgrade_deep_space_citadels_flag

				every_owned_fleet = {
					limit = {
						OR = {
							has_fleet_flag = auto_outpost_ship_flag
							has_fleet_flag = auto_fleet_attack_flag
							has_fleet_flag = auto_army_invade_flag
							has_fleet_flag = auto_planet_destroyer_flag
							has_fleet_flag = auto_colonizer_flag
							has_fleet_flag = auto_mega_ship_flag
						}
					}
					clear_fleet_actions = this
					clear_orders = yes
					set_event_locked = no
					remove_fleet_flag = auto_outpost_ship_flag
					remove_fleet_flag = auto_fleet_attack_flag
					remove_fleet_flag = auto_army_invade_flag
					remove_fleet_flag = auto_planet_destroyer_flag
					remove_fleet_flag = auto_colonizer_flag
					remove_fleet_flag = auto_mega_ship_flag
					set_name = random
				}
				every_owned_fleet = {
					limit = {
						is_ship_class = shipclass_constructor
						has_fleet_flag = auto_mega_ship_flag
					}
					hidden_effect = {
						auto_construct_mega_fleet_deactivate = yes
					}
				}
				every_owned_colony = {
					carrier_building_specialisation_reset = yes
					carrier_district_specialisation_reset = yes
				}
				reset_and_set_terraform_country_flag = {
					FLAG = placeholder_no_flag
				}
				reset_and_set_recruit_army_country_flag = {
					FLAG = placeholder_no_flag
				}
				reset_and_set_habitability_threshold_country_flag = {
					FLAG = placeholder_no_flag
				}
				reset_and_set_starbase_upgrading_country_flag = {
					FLAG = placeholder_no_flag
				}
				reset_and_set_bombardment_country_flag = {
					FLAG = placeholder_no_flag
				}
			}
		}
	}
}

lazy_automation_first_row_left_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_colonizer_enable_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_colonizer_enable_flag
				every_owned_fleet = {
					limit = {
						is_ship_class = shipclass_colonizer
					}
					set_timed_fleet_flag = {
						flag = auto_colonizer_flag
						years = 1
					}
					fleet_event = {
						id = lazy_col_events.1
					}
				}
			}
		}	
	}
}

lazy_automation_first_row_right_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_fleet_attack_enable_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_fleet_attack_enable_flag
			}
		}	
	}
}

lazy_automation_second_row_left_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_construct_outposts_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_construct_outposts_flag
			}
		}	
	}
}

lazy_automation_second_row_right_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_recruit_leaders_enable_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_recruit_leaders_enable_flag
			}
		}	
	}
}

lazy_automation_third_row_left_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_army_recruit_enable_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_army_recruit_enable_flag
			}
		}	
	}
}

lazy_automation_third_row_right_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_construct_mega_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_construct_mega_flag
				every_owned_fleet = {
					limit = {
						is_ship_class = shipclass_constructor
					}
					set_variable = {
						which = lazy_automation_month_timer
						value = 0
					}
				}
			}
		}
	}
}

lazy_automation_fourth_row_left_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_fleet_merger_enable_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_fleet_merger_enable_flag
				if = {
					limit = {
						NOT = {
							has_country_flag = auto_fleet_merger_fleet_flag
						}
					}
					every_owned_fleet = {
						limit = {
							is_ship_class = shipclass_military
						}
						set_fleet_flag = auto_fleet_merger_flag
						fleet_event = {
							id = lazy_fle_mer_events.1
						}
					}
				}
				if = {
					limit = {
						NOT = {
							has_country_flag = auto_fleet_merger_army_flag
						}
					}
					every_owned_fleet = {
						limit = {
							is_ship_class = shipclass_transport
						}
						set_fleet_flag = auto_fleet_merger_flag
						fleet_event = {
							id = lazy_fle_mer_events.2
						}
					}
				}
			}
		}	
	}
}

lazy_automation_fourth_row_right_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_terraforming_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_terraforming_flag
			}
		}	
	}
}

lazy_automation_fifth_row_left_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_colony_manager_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_colony_manager_flag
			}
		}	
	}
}

lazy_automation_fifth_row_right_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_outfit_starbases_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_outfit_starbases_flag
				every_owned_starbase = {
					set_variable = {
						which = lazy_automation_month_timer
						value = 0
					}
				}
			}
		}	
	}
}

lazy_automation_sixth_row_left_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_pop_migration_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_pop_migration_flag
				set_country_flag = auto_pop_migration_unemployed_to_free_jobs_flag
			}
		}	
	}
}

lazy_automation_sixth_row_right_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_army_invade_enable_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_army_invade_enable_flag
			}
		}	
	}
}

lazy_automation_seventh_row_left_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_planet_destroyer_enable_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_planet_destroyer_enable_flag
				every_owned_fleet = {
					limit = {
						is_ship_size = colossus
					}
					set_fleet_flag = auto_planet_destroyer_flag
					fleet_event = {
						id = lazy_pla_des_events.1
					}
				}
			}
		}	
	}
}

lazy_automation_seventh_row_right_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_upgrade_deep_space_citadels_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_upgrade_deep_space_citadels_flag
			}
		}	
	}
}

lazy_automation_eighth_row_left_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_upgrade_megastructure_flag
				}
			}
		}
		from = {
			has_technology = tech_mega_engineering
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_upgrade_megastructure_flag
			}
		}	
	}
}

lazy_automation_eighth_row_right_enable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				NOT = {
					has_country_flag = auto_upgrade_starbases_flag
				}
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				set_country_flag = auto_upgrade_starbases_flag
				every_owned_starbase = {
					set_variable = {
						which = lazy_automation_month_timer
						value = 0
					}
				}
			}
		}	
	}
}

lazy_automation_first_row_left_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.8
				}
			}
		}	
	}
}

lazy_automation_first_row_right_settings_effect = {
	potential = {
		
	}
	allow = {
		
	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.5
				}
			}
		}
	}
}

lazy_automation_second_row_left_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.14
				}
			}
		}
	}
}

lazy_automation_second_row_right_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.16
				}
			}
		}
	}
}

lazy_automation_third_row_left_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.6
				}
			}
		}
	}
}

lazy_automation_third_row_right_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.4
				}
			}
		}
	}
}

lazy_automation_fourth_row_left_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.7
				}
			}
		}	
	}
}

lazy_automation_fourth_row_right_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.11
				}
			}
		}	
	}
}

lazy_automation_fifth_row_left_settings_effect = {
	potential = {
		
	}
	allow = {
		
	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.15
				}
			}
		}	
	}
}

lazy_automation_fifth_row_right_settings_effect = {
	potential = {
		
	}
	allow = {
		
	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.17
				}
			}
		}	
	}
}

lazy_automation_sixth_row_left_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.3
				}
			}
		}	
	}
}

lazy_automation_sixth_row_right_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.10
				}
			}
		}
	}
}

lazy_automation_seventh_row_left_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.9
				}
			}
		}
	}
}

lazy_automation_seventh_row_right_settings_effect = {
	potential = {
		
	}
	allow = {
		
	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.18
				}
			}
		}
	}
}

lazy_automation_eighth_row_left_settings_effect = {
	potential = {
		
	}
	allow = {

	}
	
	effect = {
		from = {
			hidden_effect = {
				country_event = {
					id = lazy_config_events.13
				}
			}
		}
	}
}

lazy_automation_eighth_row_right_settings_effect = {
	potential = {

	}
	allow = {

	}
	
	effect = {
		hidden_effect = {
			from = {
				country_event = {
					id = lazy_config_events.12
				}
			}
		}
	}
}

lazy_automation_first_row_left_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_colonizer_enable_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_colonizer_enable_flag
				reset_and_set_habitability_threshold_country_flag = {
					FLAG = placeholder_no_flag
				}
				every_owned_colony = {
					limit = {
						has_carrier_flag = auto_colonizer_carrier_flag
					}
					remove_carrier_flag = auto_colonizer_carrier_flag
				}
				every_owned_fleet = {
					limit = {
						has_fleet_flag = auto_colonizer_flag
					}
					clear_fleet_actions = this
					clear_orders = yes
					set_event_locked = no
					remove_fleet_flag = auto_colonizer_flag
					set_name = random
				}
			}
		}	
	}
}

lazy_automation_first_row_right_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_fleet_attack_enable_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_fleet_attack_enable_flag
				reset_and_set_bombardment_country_flag = {
					FLAG = placeholder_no_flag
				}
				every_owned_fleet = {
					limit = {
						has_fleet_flag = auto_fleet_attack_flag
					}
					remove_fleet_flag = auto_fleet_attack_flag
					clear_fleet_actions = this
					clear_orders = yes
					set_event_locked = no
				}
			}
		}	
	}
}

lazy_automation_second_row_left_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_construct_outposts_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_construct_outposts_flag
				every_owned_fleet = {
					limit = {
						has_fleet_flag = auto_outpost_ship_flag
					}
					remove_fleet_flag = auto_outpost_ship_flag
					clear_fleet_actions = this
					clear_orders = yes
					set_event_locked = no
					set_name = random
				}
			}
		}	
	}
}

lazy_automation_second_row_right_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_recruit_leaders_enable_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_recruit_leaders_enable_flag
			}
		}	
	}
}

lazy_automation_third_row_left_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_army_recruit_enable_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_army_recruit_enable_flag
				reset_and_set_recruit_army_country_flag = {
					FLAG = placeholder_no_flag
				}
			}
		}
	}
}

lazy_automation_third_row_right_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_construct_mega_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_construct_mega_flag
				every_owned_fleet = {
					limit = {
						is_ship_class = shipclass_constructor
						has_fleet_flag = auto_mega_ship_flag
					}
					auto_construct_mega_fleet_deactivate = yes
				}
			}
		}
	}
}

lazy_automation_fourth_row_left_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_fleet_merger_enable_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_fleet_merger_enable_flag
				# remove_country_flag = auto_fleet_merger_fleet_flag
				# remove_country_flag = auto_fleet_merger_army_flag
				every_owned_fleet = {
					limit = {
						has_fleet_flag = auto_fleet_merger_flag
					}
					remove_fleet_flag = auto_fleet_merger_flag
					clear_fleet_actions = this
					clear_orders = yes
					set_event_locked = no
					set_name = random
				}
			}
		}	
	}
}

lazy_automation_fourth_row_right_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_terraforming_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_terraforming_flag
				reset_and_set_terraform_country_flag = {
					FLAG = placeholder_no_flag
				}
			}
		}	
	}
}

lazy_automation_fifth_row_left_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_colony_manager_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_colony_manager_flag
			}
		}	
	}
}

lazy_automation_fifth_row_right_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_outfit_starbases_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_outfit_starbases_flag
			}
		}	
	}
}

lazy_automation_sixth_row_left_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_pop_migration_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_pop_migration_flag
				remove_country_flag = auto_pop_migration_flag_no_cost_flag
			}
		}	
	}
}

lazy_automation_sixth_row_right_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_army_invade_enable_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_army_invade_enable_flag
				every_owned_fleet = {
					limit = {
						has_fleet_flag = auto_army_invade_flag
					}
					clear_fleet_actions = this
					clear_orders = yes
					set_event_locked = no
					remove_fleet_flag = auto_army_invade_flag
				}
			}
		}	
	}
}

lazy_automation_seventh_row_left_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_planet_destroyer_enable_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_planet_destroyer_enable_flag
				every_owned_fleet = {
					limit = {
						has_fleet_flag = auto_planet_destroyer_flag
					}
					clear_fleet_actions = this
					clear_orders = yes
					set_event_locked = no
					remove_fleet_flag = auto_planet_destroyer_flag
					set_name = random
				}
			}
		}	
	}
}

lazy_automation_seventh_row_right_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_upgrade_deep_space_citadels_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_upgrade_deep_space_citadels_flag
			}
		}	
	}
}

lazy_automation_eighth_row_left_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_upgrade_megastructure_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_upgrade_megastructure_flag
			}
		}	
	}
}

lazy_automation_eighth_row_right_disable_effect = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				has_country_flag = auto_upgrade_starbases_flag
			}
		}
	}
	
	effect = {
		from = {
			hidden_effect = {
				remove_country_flag = auto_upgrade_starbases_flag
				reset_and_set_starbase_upgrading_country_flag = {
					FLAG = placeholder_no_flag
				}
			}
		}
	}
}

lazy_automation_auto_upgrade_megastructures_speed_up = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				check_variable = {
					which = auto_meg_upg_speed
					value = 1
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				change_variable = {
					which = auto_meg_upg_speed
					value = 9
				}
			}
		}
	}
}

lazy_automation_auto_upgrade_megastructures_speed_down = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				check_variable = {
					which = auto_meg_upg_speed
					value = 10
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				subtract_variable = {
					which = auto_meg_upg_speed
					value = 9
				}
			}
		}
	}
}

lazy_automation_auto_pop_migration_speed_up = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				check_variable = {
					which = auto_mig_une_pop_speed
					value = 1
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				change_variable = {
					which = auto_mig_une_pop_speed
					value = 9
				}
			}
		}
	}
}

lazy_automation_auto_pop_migration_speed_down = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				check_variable = {
					which = auto_mig_une_pop_speed
					value = 10
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				subtract_variable = {
					which = auto_mig_une_pop_speed
					value = 9
				}
			}
		}
	}
}

lazy_automation_auto_terraform_speed_up = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				check_variable = {
					which = auto_ter_speed
					value = 1
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				change_variable = {
					which = auto_ter_speed
					value = 9
				}
			}
		}
	}
}

lazy_automation_auto_terraform_speed_down = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				check_variable = {
					which = auto_ter_speed
					value = 10
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				subtract_variable = {
					which = auto_ter_speed
					value = 9
				}
			}
		}
	}
}

lazy_automation_auto_upgrade_starbases_speed_up = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				check_variable = {
					which = auto_upg_sta_speed
					value = 1
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				change_variable = {
					which = auto_upg_sta_speed
					value = 9
				}
			}
		}
	}
}

lazy_automation_auto_upgrade_starbases_speed_down = {
	potential = {
		
	}
	allow = {
		hidden_trigger = {
			from = {
				check_variable = {
					which = auto_upg_sta_speed
					value = 10
				}
			}
		}
	}
	
	effect = {
		hidden_effect = {
			from = {
				subtract_variable = {
					which = auto_upg_sta_speed
					value = 9
				}
			}
		}
	}
}