 # Triggers are in Province scope. The From Scope contains the settlement holder (character)
 # start trigger is in title scope.

fort = {	
	ft_upgrade_1 = {
		desc = ft_upgrade_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 20
		build_time = 60
		fort_level = 0.5
		light_infantry = 10
		heavy_infantry = 25
		light_cavalry = 5
		levy_reinforce_rate = 0.5
		land_organisation = 0.05
		ai_creation_factor = 100
	}
	ft_upgrade_2 = {
		desc = ft_upgrade_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 2 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_upgrade_1
		gold_cost = 25
		build_time = 80
		fort_level = 0.5
		light_infantry = 10
		heavy_infantry = 25
		levy_reinforce_rate = 0.5
		land_organisation = 0.05
		light_infantry_defensive = 0.1
		light_infantry_morale = 0.1
		heavy_infantry_defensive = 0.1
		heavy_infantry_morale = 0.1
		archers_defensive = 0.1
		archers_morale = 0.1
		ai_creation_factor = 100
	}
	ft_upgrade_3 = {
		desc = ft_upgrade_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 4 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_upgrade_2
		gold_cost = 30
		build_time = 120
		fort_level = 1.0
		light_infantry = 10
		heavy_infantry = 25
		light_cavalry = 5
		levy_reinforce_rate = 1.0
		land_organisation = 0.1
		light_infantry_defensive = 0.2
		light_infantry_morale = 0.2
		heavy_infantry_defensive = 0.2
		heavy_infantry_morale = 0.2
		archers_defensive = 0.2
		archers_morale = 0.2
		land_morale = 0.05
		ai_creation_factor = 100
	}
	ft_upgrade_4 = {
		desc = ft_upgrade_1_desc
		trigger = {
			FROM = {
				TECH_FORTIFICATIONS_CONSTRUCTION = 4
				TECH_CASTLE_CONSTRUCTION = 4
			}
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_upgrade_3
		gold_cost = 50
		build_time = 150
		fort_level = 1.0
		light_infantry = 50
		heavy_infantry = 100
		light_cavalry = 20
		levy_reinforce_rate = 1.0
		land_organisation = 0.1
		light_infantry_defensive = 0.2
		light_infantry_morale = 0.2
		heavy_infantry_defensive = 0.2
		heavy_infantry_morale = 0.2
		archers_defensive = 0.2
		archers_morale = 0.2
		land_morale = 0.05
		ai_creation_factor = 100
	}
	ft_upgrade_5 = {
		desc = ft_upgrade_1_desc
		trigger = {
			FROM = {
				TECH_FORTIFICATIONS_CONSTRUCTION = 6
				TECH_CASTLE_CONSTRUCTION = 6
			}
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_upgrade_4
		gold_cost = 100
		build_time = 250
		fort_level = 2.0
		light_infantry = 100
		heavy_infantry = 50
		light_cavalry = 20
		archers = 100
		levy_reinforce_rate = 1.0
		land_organisation = 0.1
		light_infantry_defensive = 0.2
		light_infantry_morale = 0.2
		heavy_infantry_defensive = 0.2
		heavy_infantry_morale = 0.2
		archers_defensive = 0.2
		archers_morale = 0.2
		land_morale = 0.05
		ai_creation_factor = 100
	}
	ft_command_post = {
		desc = ft_command_post_desc
		trigger = {
			FROM = {
				TECH_FORTIFICATIONS_CONSTRUCTION = 4
				TECH_CASTLE_CONSTRUCTION = 4
			}
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = {
			ft_upgrade_4
			ft_ditch_4
			ft_tower_4
		}
		gold_cost = 120
		build_time = 400
		fort_level = 1.0
		heavy_infantry = 25
		light_cavalry = 5
		land_organisation = 0.1
		land_morale = 0.01
		military_techpoints = 0.01
		commander_limit = 1
		ai_creation_factor = 100
	}
	ft_ditch_1 = {
		desc = ft_ditch_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 30
		build_time = 100
		fort_level = 0.5
		ai_creation_factor = 100
	}
	ft_ditch_2 = {
		desc = ft_ditch_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 2 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_ditch_1
		gold_cost = 40
		build_time = 120
		fort_level = 0.5
		ai_creation_factor = 100
	}
	ft_ditch_3 = {
		desc = ft_ditch_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 4 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_ditch_2
		gold_cost = 50
		build_time = 140
		fort_level = 0.5
		ai_creation_factor = 100
	}
	ft_ditch_4 = {
		desc = ft_ditch_4_desc
		trigger = {
			FROM = {
				TECH_FORTIFICATIONS_CONSTRUCTION = 4
				TECH_CASTLE_CONSTRUCTION = 4
			}
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_ditch_3
		gold_cost = 50
		build_time = 140
		fort_level = 0.5
		ai_creation_factor = 100
	}
	ft_ditch_5 = {
		desc = ft_ditch_5_desc
		trigger = {
			FROM = {
				TECH_FORTIFICATIONS_CONSTRUCTION = 6
				TECH_CASTLE_CONSTRUCTION = 6
			}
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_ditch_4
		gold_cost = 50
		build_time = 140
		fort_level = 1.0
		ai_creation_factor = 100
	}
	ft_tower_1 = {
		desc = ft_tower_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 30
		build_time = 100
		archers_defensive = 0.1
		archers_morale = 0.1
		archers = 30
		ai_creation_factor = 100
	}
	ft_tower_2 = {
		desc = ft_tower_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 2 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_tower_1
		gold_cost = 40
		build_time = 120
		archers_defensive = 0.1
		archers_morale = 0.1
		archers = 30
		ai_creation_factor = 100
	}
	ft_tower_3 = {
		desc = ft_tower_1_desc
		trigger = {
			FROM = { TECH_FORTIFICATIONS_CONSTRUCTION = 4 }
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_tower_2
		gold_cost = 50
		build_time = 140
		archers_defensive = 0.1
		archers_morale = 0.1
		archers = 30
		ai_creation_factor = 100
	}
	ft_tower_4 = {
		desc = ft_tower_1_desc
		trigger = {
			FROM = {
				TECH_FORTIFICATIONS_CONSTRUCTION = 4
				TECH_CASTLE_CONSTRUCTION = 4
			}
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_tower_3
		gold_cost = 50
		build_time = 140
		archers_defensive = 0.1
		archers_morale = 0.1
		archers = 30
		ai_creation_factor = 100
	}
	ft_tower_5 = {
		desc = ft_tower_1_desc
		trigger = {
			FROM = {
				TECH_FORTIFICATIONS_CONSTRUCTION = 6
				TECH_CASTLE_CONSTRUCTION = 6
			}
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ft_tower_4
		gold_cost = 50
		build_time = 140
		archers_defensive = 0.1
		archers_morale = 0.1
		archers = 30
		ai_creation_factor = 100
	}
}
