﻿@holding_illustration_western = "gfx/interface/illustrations/holding_types/castle_western.dds"
@holding_illustration_mena = "gfx/interface/illustrations/holding_types/castle_mena.dds"
@holding_illustration_india = "gfx/interface/illustrations/holding_types/castle_india.dds"
@holding_illustration_mediterranean = "gfx/interface/illustrations/holding_types/castle_mediterranean.dds"

castle_01 = {
	construction_time = slow_construction_time
	
	### WESTERN ###
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_01_mesh"
			"building_western_castle_01_b_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 0 } }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_01_mena_mesh"
			"building_western_castle_01_b_mena_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 0 } }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_01_mediterranean_mesh"
			"building_western_castle_01_b_mediterranean_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 0 } }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_01_mena_mesh"
			"building_western_castle_01_b_mena_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 0 } }
		graphical_regions = { graphical_india }
	}
	
	### INDIAN ###
	asset = {
		type = pdxmesh
		name = "building_indian_castle_01_western_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { indian_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_01_mena_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_01_mediterranean_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_01_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	### MENA ###
	asset = {
		type = pdxmesh
		name = "building_mena_castle_01_western_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mena_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_01_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_01_mediterranean_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_01_indian_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	### MEDITERRANEAN ###
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_01_western_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mediterranean_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_01_mena_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_01_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_01_indian_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	
	
	can_construct_potential = {
		building_requirement_tribal = no
		barony_cannot_construct_holding = no
	}
	
	can_construct = {	
		culture = {
			has_innovation = innovation_motte
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal_holding_in_county = no
	}
	
	cost_gold = main_building_tier_1_cost
	next_building = castle_02
	
	levy = normal_building_levy_tier_2
	garrison = good_building_garrison_tier_1
	province_modifier = {
		monthly_income = poor_building_tax_tier_2
		fort_level = great_building_fort_level_tier_1
	}
		
	flag = castle
	
	ai_value = {
		base = 10 ## Not 100 please, AI won't build anything else then!
		modifier = {
			factor = 0
			scope:holder = {
				has_government = theocracy_government
			}
		}
	}
}

castle_02 = {
	construction_time = slow_construction_time
	
	### WESTERN ###
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_02_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 1 } }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_02_mena_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 1 } }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_western_castle_02_mediterranean_mesh"
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 1 } }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_02_mena_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 1 } }
		graphical_regions = { graphical_india }
	}
	
	### MENA ###
	asset = {
		type = pdxmesh
		name = "building_mena_castle_02_western_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { mena_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_02_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_02_mediterranean_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_02_indian_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	### INDIAN ###
	asset = {
		type = pdxmesh
		name = "building_indian_castle_02_western_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { indian_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_02_mena_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_02_mediterranean_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_02_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	### MEDITERRANEAN ###
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_02_western_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { mediterranean_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_02_mena_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_02_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_02_indian_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 1 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	
	
	can_construct_potential = {
		building_requirement_tribal = no
	}
	can_construct = {
		culture = {
			has_innovation = innovation_battlements
		}
	}
	
	cost_gold = main_building_tier_2_cost
	next_building = castle_03
	
	levy = normal_building_levy_tier_4
	garrison = good_building_garrison_tier_3
	province_modifier = {
		monthly_income = poor_building_tax_tier_4
		fort_level = great_building_fort_level_tier_2
		levy_size = 0.25
		garrison_size = 0.25
	}
	
	flag = castle
	
	ai_value = {
		base = 5 ## Build after other buildings - see later
		modifier = { ## But Kings/Emperors please upgrade your cap asap!
			factor = 5
			scope:holder = {
				OR = {
				primary_title.tier = tier_kingdom
				primary_title.tier = tier_empire
				}
			}
			duchy = {is_capital_barony = yes}
		}
		modifier = {
			add = {
				value = 4
				multiply = combined_building_level ## The more buildings we have, the more worth it this becomes.
			}
		}
		modifier = {
			factor = 2
			scope:holder = { NOT = {exists = liege} } ## Topmost liege shouldn't construct in vassal holdings unless no better option.
		}
		modifier = { 
			factor = 2
			duchy = {is_capital_barony = yes}
		}
	}
}

castle_03 = {
	construction_time = slow_construction_time
	
	### WESTERN ###
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_03_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 2 } }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_03_mena_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 2 } }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_western_castle_03_mediterranean_mesh"
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 2 } }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_03_mena_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 2 } }
		graphical_regions = { graphical_india }
	}
	
	### MENA ###
	asset = {
		type = pdxmesh
		name = "building_mena_castle_03_western_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { mena_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_03_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_03_mediterranean_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_03_indian_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	### INDIAN ###
	asset = {
		type = pdxmesh
		name = "building_indian_castle_03_western_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { indian_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_03_mena_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_03_mediterranean_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_03_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	### MEDITERRANEAN ###
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_03_western_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { mediterranean_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_03_mena_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_03_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_03_indian_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 2 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	
	
	can_construct_potential = {
		building_requirement_tribal = no
	}
	can_construct = {
		culture = {
			has_innovation = innovation_hoardings
		}
	}
	
	cost_gold = main_building_tier_3_cost
	next_building = castle_04
	
	levy = normal_building_levy_tier_6
	garrison = good_building_garrison_tier_5
	province_modifier = {
		monthly_income = poor_building_tax_tier_6
		fort_level = great_building_fort_level_tier_3
		levy_size = 0.5
		garrison_size = 0.5
	}
	
	flag = castle
	
	ai_value = {
		base = 5 ## Build after other buildings - see later
		modifier = { ## But Kings/Emperors please upgrade your cap asap!
			factor = 5
			scope:holder = {
				OR = {
				primary_title.tier = tier_kingdom
				primary_title.tier = tier_empire
				}
			}
			duchy = {is_capital_barony = yes}
		}
		modifier = {
			add = {
				value = 4
				multiply = combined_building_level ## The more buildings we have, the more worth it this becomes.
			}
		}
		modifier = {
			factor = 2
			scope:holder = { NOT = {exists = liege} } ## Topmost liege shouldn't construct in vassal holdings unless no better option.
		}
		modifier = {
			factor = 2
			duchy = {is_capital_barony = yes}	
		}
	}
}

castle_04 = {
	construction_time = slow_construction_time
	
	### WESTERN ###
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_04_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 3 } }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_04_mena_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 3 } }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_western_castle_04_mediterranean_mesh"
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 3 } }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		names = {
			"building_western_castle_04_mena_mesh"
		}
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 3 } }
		graphical_regions = { graphical_india }
	}
	
	### MENA ###
	asset = {
		type = pdxmesh
		name = "building_mena_castle_04_western_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { mena_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_04_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_04_mediterranean_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_mena_castle_04_indian_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { mena_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	### INDIAN ###
	asset = {
		type = pdxmesh
		name = "building_indian_castle_04_western_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { indian_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_04_mena_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_04_mediterranean_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_indian_castle_04_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { indian_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	### MEDITERRANEAN ###
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_04_western_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { mediterranean_building_gfx }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_04_mena_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_mena }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_04_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
	asset = {
		type = pdxmesh
		name = "building_mediterranean_castle_04_indian_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 3 } }
		graphical_cultures = { mediterranean_building_gfx }
		graphical_regions = { graphical_india }
	}
	
	
	
	can_construct_potential = {
		building_requirement_tribal = no
	}
	can_construct = {
		culture = {
			has_innovation = innovation_machicolations
		}
	}
	
	cost_gold = main_building_tier_4_cost
	
	levy = normal_building_levy_tier_8
	garrison = good_building_garrison_tier_7
	province_modifier = {
		monthly_income = poor_building_tax_tier_8
		fort_level = great_building_fort_level_tier_4
		levy_size = 1
		garrison_size = 1
	}
	
	flag = castle

	type_icon = "icon_building_ramparts.dds"
	
	ai_value = {	
		base = 5 ## Build after other buildings - see later
		modifier = { ## But Kings/Emperors please upgrade your cap asap!
			factor = 5
			scope:holder = {
				OR = {
				primary_title.tier = tier_kingdom
				primary_title.tier = tier_empire
				}
			}
			duchy = {is_capital_barony = yes}
		}
		modifier = {
			add = {
				value = 4
				multiply = combined_building_level ## The more buildings we have, the more worth it this becomes.
			}
		}
		modifier = {
			factor = 2
			scope:holder = { NOT = {exists = liege} } ## Topmost liege shouldn't construct in vassal holdings unless no better option.
		}
		modifier = {
			factor = 2
			duchy = {is_capital_barony = yes}	
		}
	}
}
