tr_est_militarism_adopt = {
	custom_tooltip = tr_est_militarism_adopt_desc
	unlocks_agenda = agenda_est_militarism
	
	triggered_modifier = {
		potential = { used_naval_capacity_percent > 0.99 }
		planet_jobs_produces_mult  = 0.05
	}
	
	#on_enabled = {
	#	if = {
	#		limit = {
	#			Not = {
	#				used_naval_capacity_percent < 1.0
	#			}
	#		}
	#		add_modifier = {
	#			modifier = "mod_est_militarism_adopt"
	#		}
	#	}
	#}	
}

tr_est_militarism_finish = {

	modifier = {	
		country_war_exhaustion_mult = -0.1
		ascension_perks_add = 1
	}
}


tr_est_militarism_1 = {
	modifier = {
		armies_cost_mult = -0.20
		job_soldier_per_pop = 0.04 # (Metallichydra): Interferes with lathe. To prevent this we need some way to reduce jobs from lathe. I suggest a situation that detracts the same amount of jobs, although setting up one is too much work when there's so many other things that needs to be fixed.
	}

	ai_weight = { factor = 5000 }
}

tr_est_militarism_2 = {
	custom_tooltip = tr_est_militarism_2_desc
	possible = {
		has_tradition = tr_est_militarism_1
	}

	modifier = {
		army_experience_gain_mult = 0.50
	}

	on_enabled = {
		every_owned_leader = {
			if = {
				limit = {
					has_trait = subclass_commander_general
				}
				owner = {
					country_event = { 
						id = est_militarism.4
						scopes = {
							from = prev
						}
					}
				}
			}
		}
	}

	ai_weight = { factor = 5000 }
}

tr_est_militarism_3 = {
	#custom_tooltip = tr_est_militarism_3_desc # (Metallichydra): Tooltip is not needed

	modifier = {
		country_naval_cap_mult = 0.10
		command_limit_add = 20
	}

	ai_weight = { factor = 5000 }
}

tr_est_militarism_4 = {
	custom_tooltip = tr_est_militarism_4_desc

	possible = {
		has_tradition = tr_est_militarism_2
		has_tradition = tr_est_militarism_3
	}

	modifier = {
#		ship_compnenents_rare_crystals_cost_mult = -0.25 #(Ben_D): Depircated by Paradox
#		ship_compnenents_exotic_gases_cost_mult = -0.25
#		ship_compnenents_volatile_motes_cost_mult = -0.25
#		ship_compnenents_sr_dark_matter_cost_mult = -0.25
#		ship_compnenents_sr_zro_cost_mult = -0.25
#		ship_compnenents_sr_living_metal_cost_mult = -0.25
#		ship_compnenents_nanites_cost_mult = -0.25
		ship_military_rare_crystals_cost_mult = -0.25 #(Ben_D): Added
		ship_military_exotic_gases_cost_mult = -0.25
		ship_military_volatile_motes_cost_mult = -0.25
		ship_military_sr_dark_matter_cost_mult = -0.25
		ship_military_sr_zro_cost_mult = -0.25
		ship_military_sr_living_metal_cost_mult = -0.25
		ship_military_nanites_cost_mult = -0.25
	}

	ai_weight = { factor = 5000 }
}

tr_est_militarism_5 = {
	custom_tooltip = tr_est_militarism_5_desc

	on_enabled = {
		hidden_effect = {
			every_pool_leader = {
				owner = {
					country_event = { 
						id = est_militarism.2
						scopes = {
							from = prev
						}
					}
				}
			}
			every_owned_leader = {
				owner = {
					country_event = { 
						id = est_militarism.2
						scopes = {
							from = prev
						}
					}
				}
			}
			every_owned_leader = {
				if = {
					limit = {
						has_trait = subclass_commander_admiral
					}
					owner = {
						country_event = { 
							id = est_militarism.3
							scopes = {
								from = prev
							}
						}
					}
				}
			}
		}
	}
	
	ai_weight = { factor = 5000 }
}