# These buildings are only for showing background graphics, e.g. the walls around holdings

# No Walls
walls_00 = {
	is_graphical_background = yes

	asset = {
		type = pdxmesh
		name = "western_walls_00_mesh"
	}

	is_enabled = {
		OR = {
			AND = {
				is_county_capital = no
				fort_level < 1
			}
			# Using the no_wall holding graphics for cities with special walls so that they don't have double walls
			has_building_or_higher = "city_wall_of_toledo_01"
			has_building_or_higher = "roman_wall_of_lugo_01"
		}
	}
}

# Any city that must be sieged gets the basic walls
walls_01_tribal = {
	is_graphical_background = yes

	asset = {
		type = pdxmesh
		names = {
			"tribal_walls_01_a_mesh"
		}
	}

	is_enabled = {
		OR = {
			is_county_capital = yes
			fort_level > 0
		}
		NOR = {
			# disabling this level of walled graphics for holdings with special walls and other fortifications so that they always look appropriately fortified. Note: If any of these buildings are given unique 3D assets, this should be looked at again.
			has_building_or_higher = "palisades_01"
			has_building_or_higher = "curtain_walls_01"
			has_building_or_higher = "hill_forts_01"
			has_building_or_higher = "ramparts_01"
			has_building_or_higher = "watchtowers_01"
			has_building_or_higher = "theodosian_walls_01"
			has_building_or_higher = "walls_of_benin_01"
			has_building_or_higher = "walls_of_genoa_01"
			has_building_or_higher = "aurelian_walls_01"
			has_building_or_higher = "city_wall_of_toledo_01"
			has_building_or_higher = "roman_wall_of_lugo_01"
		}
	}
}

# Here the Fort Level building chains take control of the visuals
walls_01 = {
	is_graphical_background = yes
	asset = {
		type = pdxmesh
		names = {
			"western_walls_01_a_mesh"
			"western_walls_01_b_mesh"
		}
		graphical_regions = { graphical_western graphical_mediterranean graphical_india }
	}
	asset = {
		type = pdxmesh
		names = {
			"mena_walls_01_a_mesh"
			"mena_walls_01_b_mesh"

		}
		graphical_regions = { graphical_mena graphical_steppe }
	}
	asset = {
		type = pdxmesh
		requires_dlc_flag = the_northern_lords
		graphical_cultures = { norse_building_gfx }
		names = {
			"fp1_norse_walls_01_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = the_northern_lords
		graphical_cultures = { norse_building_gfx }
		graphical_regions = { graphical_mena }
		names = {
			"fp1_norse_walls_01_mena_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = the_fate_of_iberia
		graphical_cultures = { iberian_building_gfx }
		graphical_regions = { graphical_mediterranean }
		names = {
			"fp2_building_iberian_wall_01_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = legacy_of_persia
		graphical_cultures = { iranian_building_gfx }
		graphical_regions = { graphical_mena graphical_india graphical_steppe }
		names = {
			"fp3_building_persian_walls_01_a_01_mesh" 
		}
	}
	
	is_enabled = {
		OR = {
			# These buildings will trigger the visual "upgrade" to this wall asset
			has_building_or_higher = "palisades_01"
			has_building_or_higher = "curtain_walls_01"
			has_building_or_higher = "hill_forts_01"
			has_building_or_higher = "ramparts_01"
			has_building_or_higher = "watchtowers_01"
		}
		NOR = {
			# Disabling this level of walled graphics for holdings with special walls and other fortifications so that they always look appropriately fortified. Note: If any of these buildings are given unique 3D assets, this should be looked at again.
			has_building_or_higher = "palisades_02"
			has_building_or_higher = "curtain_walls_02"
			has_building_or_higher = "hill_forts_02"
			has_building_or_higher = "ramparts_02"
			has_building_or_higher = "watchtowers_02"
			has_building_or_higher = "theodosian_walls_01"
			has_building_or_higher = "walls_of_benin_01"
			has_building_or_higher = "walls_of_genoa_01"
			has_building_or_higher = "aurelian_walls_01"
			has_building_or_higher = "city_wall_of_toledo_01"
			has_building_or_higher = "roman_wall_of_lugo_01"
		}
	}
}

walls_02 = {
	is_graphical_background = yes

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_western graphical_mediterranean graphical_india }
		names = {
			"western_walls_02_a_mesh"
			"western_walls_02_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_mena graphical_steppe }
		names = {
			"mena_walls_02_a_mesh"
			"mena_walls_02_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = the_northern_lords
		graphical_cultures = { norse_building_gfx }
		names = {
			"fp1_norse_walls_02_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = the_northern_lords
		graphical_cultures = { norse_building_gfx }
		graphical_regions = { graphical_mena }
		names = {
			"fp1_norse_walls_02_mena_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = the_fate_of_iberia
		graphical_cultures = { iberian_building_gfx }
		graphical_regions = { graphical_mediterranean }
		names = {
			"fp2_building_iberian_wall_02_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = legacy_of_persia
		graphical_cultures = { iranian_building_gfx }
		graphical_regions = { graphical_mena graphical_india graphical_steppe }
		names = {
			"fp3_building_persian_walls_02_a_01_mesh" 
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = roads_to_power
		graphical_cultures = { byzantine_building_gfx }
		graphical_regions = { graphical_mediterranean }
		names = {
			"ep3_byzantine_walls_02_mesh" 
		}
	}

	is_enabled = {
		OR = {
			# These buildings will trigger the visual "upgrade" to this wall asset
			has_building_or_higher = "palisades_02"
			has_building_or_higher = "curtain_walls_02"
			has_building_or_higher = "hill_forts_02"
			has_building_or_higher = "ramparts_02"
			has_building_or_higher = "watchtowers_02"
		}
		NOR = {
			# Disabling this level of walled graphics for holdings with special walls and other fortifications so that they always look appropriately fortified. Note: If any of these buildings are given unique 3D assets, this should be looked at again.
			has_building_or_higher = "curtain_walls_03"
			has_building_or_higher = "hill_forts_03"
			has_building_or_higher = "ramparts_03"
			has_building_or_higher = "watchtowers_03"
			has_building_or_higher = "theodosian_walls_01"
			has_building_or_higher = "walls_of_benin_01"
			has_building_or_higher = "walls_of_genoa_01"
			has_building_or_higher = "aurelian_walls_01"
			has_building_or_higher = "city_wall_of_toledo_01"
			has_building_or_higher = "roman_wall_of_lugo_01"
		}
	}
}

walls_03 = {
	is_graphical_background = yes

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_western }
		names = {
			"western_walls_03_a_mesh"
			"western_walls_03_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_mediterranean }
		names = {
			"mediterranean_walls_03_a_mesh"
			"mediterranean_walls_03_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_mena graphical_steppe }
		names = {
			"mena_walls_03_a_mesh"
			"mena_walls_03_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_india }
		names = {
			"india_walls_03_a_mesh"
			"india_walls_03_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = the_fate_of_iberia
		graphical_cultures = { iberian_building_gfx }
		graphical_regions = { graphical_mediterranean }
		names = {
			"fp2_building_iberian_wall_03_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = legacy_of_persia
		graphical_cultures = { iranian_building_gfx steppe_building_gfx }
		graphical_regions = { graphical_mena graphical_india graphical_steppe }
		names = {
			"fp3_building_persian_walls_03_a_01_mesh"  
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = roads_to_power
		graphical_cultures = { byzantine_building_gfx }
		graphical_regions = { graphical_mediterranean }
		names = {
			"ep3_byzantine_walls_03_mesh" 
		}
	}
	
	is_enabled = {
		scope:holder = {
			NOT = { government_has_flag = government_is_tribal }
		}
		OR = {
			# These buildings will trigger the visual "upgrade" to this wall asset
			has_building_or_higher = "curtain_walls_03"
			has_building_or_higher = "hill_forts_03"
			has_building_or_higher = "ramparts_03"
			has_building_or_higher = "watchtowers_03"
			has_building_or_higher = "walls_of_benin_01"
			has_building_or_higher = "walls_of_genoa_01"
			has_building_or_higher = "aurelian_walls_01"
		}
		NOR = {
			# Disabling this level of walled graphics for holdings with special walls and other fortifications so that they always look appropriately fortified. Note: If any of these buildings are given unique 3D assets, this should be looked at again.
			has_building_or_higher = "curtain_walls_06"
			has_building_or_higher = "hill_forts_06"
			has_building_or_higher = "ramparts_06"
			has_building_or_higher = "watchtowers_06"
			has_building_or_higher = "theodosian_walls_01"
			has_building_or_higher = "city_wall_of_toledo_01"
			has_building_or_higher = "roman_wall_of_lugo_01"
		}
	}
}

walls_04 = {
	is_graphical_background = yes

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_western }
		names = {
			"western_walls_04_a_mesh"
			"western_walls_04_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_mediterranean }
		names = {
			"mediterranean_walls_04_a_mesh"
			"mediterranean_walls_04_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_mena graphical_steppe }
		names = {
			"mena_walls_04_a_mesh"
			"mena_walls_04_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		graphical_regions = { graphical_india }
		names = {
			"india_walls_04_a_mesh"
			"india_walls_04_a_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = the_fate_of_iberia
		graphical_cultures = { iberian_building_gfx }
		graphical_regions = { graphical_mediterranean }
		names = {
			"fp2_building_iberian_wall_04_mesh"
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = legacy_of_persia
		graphical_cultures = { iranian_building_gfx steppe_building_gfx }
		graphical_regions = { graphical_mena graphical_india  graphical_steppe }
		names = {
			"fp3_building_persian_walls_04_a_01_mesh" 
		}
	}

	asset = {
		type = pdxmesh
		requires_dlc_flag = roads_to_power
		graphical_cultures = { byzantine_building_gfx }
		graphical_regions = { graphical_mediterranean }
		names = {
			"ep3_byzantine_walls_04_mesh" 
		}
	}
	
	is_enabled = {
		scope:holder = {
			NOT = { government_has_flag = government_is_tribal }
		}
		OR = {
			# These buildings will trigger the visual "upgrade" to this wall asset
			has_building_or_higher = "curtain_walls_06"
			has_building_or_higher = "hill_forts_06"
			has_building_or_higher = "ramparts_06"
			has_building_or_higher = "watchtowers_06"
			has_building_or_higher = "theodosian_walls_01"
		}
	}
}
