You can define

== Structure ==

name_of_the_building = {
	
	# How many levies does the building give
	levy = 200
	
	# How much garrison does the building give
	garrison = 100
	
	# How long does it take to construct the building
	construction_time = 720
	
	type = regular/special/duchy_capital	# Specifies whether this is a regular building, a special building, or a duchy capital building. Regular by default
	
	# Which asset does the building use
	asset = {
		# 'pdxmesh' or 'entity', specifies wheter to use a mesh or an entity. Meshes are more performant and should be preferred.
		type = pdxmesh
		# The name of the mesh or the entity
		name = "western_castle_01_level_03_mesh"
		# To randomize between multiple meshes/entities. Note that they must all be entities, or all be meshes:
		names = { "western_castle_01_level_03a_mesh" "western_castle_01_level_03b_mesh" "western_castle_01_level_03c_mesh" }
		# Path to illustration shown in the county view, texture can be accessed in GUI: "[Holding.GetIllustration]"
		illustration = "path/to/image.dds"
		# Associated sound effect and an optional parameter, can also be just soundeffect = "event:..." if no parameter is needed
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Generic/sfx_amb_3d_holdings_generic_castle" soundparameter = { "Tier" = 2.0 } }
		# Graphical cultures that prefer this asset to be shown
		graphical_cultures = { arabicgfx muslimgfx }
		# Graphical faiths that prefer this asset to be shown (priority is faith > religion > family, so Catholic graphical_faith overrides Abrahamic graphical_faith)
		graphical_faiths = { catholic_gfx orthodox_gfx }
		# Graphical regions in which this asset is preferred, this is the most important criterion when selecting the asset, with the exception of government
		graphical_regions = { western mena }
		# Governments that prefer this asset to be shown
		governments = { tribal_government }
	}
	
	# Is the building enabled? Else won't give any effects to holder, and not be constructible (see can_construct* below).
	# If is_graphical_background = yes, this controls whether the building can be shown in the province.
	# scopes: root is the province; scope:holder is the holder of the province; county is the county title the province belongs to
	is_enabled = {}
	
	# Can the building be constructed.
	# Use this instead of is_enabled if you want to allow rulers to "use" the building after getting the holding, but to disallow that they construct it.
	# can_construct_potential controls whether the building appears in the build menu. For upgrades it is identical to can_construct_showing_failures_only.
	# Note that is_enabled (see above) is added to can_construct_potential.
	# Not used if is_graphical_background = yes
	# scopes: root is the province; scope:holder is the holder of the province; county is the county title the province belongs to
	can_construct_potential = {}
	can_construct_showing_failures_only = {}
	can_construct = {}
	show_disabled = yes/no	# if set to yes, the building will show in the build menu even if disabled (will still use can_construct_potential). No by default
	
	# How much cost does the building cost
	cost = { gold = 500 ... }
	
	# The next building in chain unlocked by this building
	next_building = castle_02
	
	# A modifier applied to the owner of the holding
	character_modifier = {
	}
	
	# A modifier applied to the province
	province_modifier = {
	}

	# A modifier applied to the county
	county_modifier = {
	}
	
	# A modifier applied to every de jure county in the duchy (if the county has the same de facto liege as this building's county). Can only be used (and only works) for duchy capital buildings.
	duchy_capital_county_modifier = {
	}

	# A special modifier applied to every holding of specified type in the county
	county_holding_modifier = {
		holding = castle_holding
		income_mult = 1
	}
	
	# Building flags
	flag = castle
	
	# How desirable is the building for the AI
	ai_value = {
		base = 100
	}
	
	# If this is set to yes, the building will be used for figuring out which background asset (walls/no walls etc) should be shown
	is_graphical_background = no
}
