boat_enforcer = {
	enable = {
		set_temp_variable = {
			lower_limit = num_of_naval_factories
		}
		if = {
			limit = {
				num_of_naval_factories < 2
			}
			add_to_temp_variable = {
				lower_limit = 5
			}
		}
		if = {
			limit = {
				has_war = yes
			}
			if = {
				limit = {
					is_insignificant_power = yes
				}
				multiply_temp_variable = {
					lower_limit = 5.0
				}
			}
			else_if = {
				limit = {
					is_minor_power = yes
				}
				multiply_temp_variable = {
					lower_limit = 2.75
				}
			}
			else_if = {
				limit = {
					is_secondary_power = yes
				}
				multiply_temp_variable = {
					lower_limit = 2.0
				}
			}
			if = {
				limit = {
					manpower_per_military_factory < 1000
				}
				multiply_temp_variable = {
					lower_limit = 0.5
				}
			}
			else_if = {
				limit = {
					has_manpower < 2500
				}
				multiply_temp_variable = {
					lower_limit = 0.0
				}
			}
			if = {
				limit = {
					alliance_naval_strength_ratio > 5.0
				}
				multiply_temp_variable = {
					lower_limit = 0.1
				}
			}
			else_if = {
				limit = {
					alliance_naval_strength_ratio > 2.0
				}
				multiply_temp_variable = {
					lower_limit = 0.33
				}
			}
			else_if = {
				limit = {
					enemies_naval_strength_ratio > 5.0
				}
				multiply_temp_variable = {
					lower_limit = 7.0
				}
			}
			else_if = {
				limit = {
					enemies_naval_strength_ratio > 2.0
				}
				multiply_temp_variable = {
					lower_limit = 3.0
				}
			}
			# if = {
			# 	limit = {
			# 		ai_wants_divisions > lower_limit
			# 	}
			# 	multiply_temp_variable = {
			# 		lower_limit = 2.0
			# 	}
			# }
		}
		else = {

		}
		set_temp_variable = {
			lineship_var = lower_limit
		}
		set_temp_variable = {
			frigate_var = lower_limit
		}
		set_temp_variable = {
			gunboat_var = lower_limit
		}
		set_temp_variable = {
			corvette_var = lower_limit
		}

		multiply_temp_variable = {
			frigate_var = 2.0
		}
		multiply_temp_variable = {
			gunboat_var = 4.0
		}
		multiply_temp_variable = {
			corvette_var = 8.0
		}
		OR = {
			
			check_variable = {
				num_ships_with_type@lineship < lineship_var
			}
			check_variable = {
				num_ships_with_type@frigate < frigate_var
			}
			check_variable = {
				num_ships_with_type@gunboat < gunboat_var
			}
			check_variable = {
				num_ships_with_type@corvette < corvette_var
			}
		}
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = role_ratio
		id = naval_capital_bb
		value = 6.5
	}

	ai_strategy = {
		type = role_ratio
		id = naval_capital_bc
		value = 13
	}

	ai_strategy = {
		type = role_ratio
		id = naval_gunboat
		value = 26
	}

	ai_strategy = {
		type = role_ratio
		id = naval_screen
		value = 52
	}

	ai_strategy = {
		type = role_ratio
		id = convoy
		value = 2.5
	}

}