#############
# Building Documentation
#############

# might be outdated/contain untested features

# building_colony_shelter = {
	# capital = yes
	# can_build = no
	# can_demolish = no
	# can_be_ruined = no
	# can_be_disabled = no
	# position_priority = 0		# used to determine where to place the building in the building list. The lower the value, the closest to the beginning it'll be.
								# default value is 200, value for capital buildings is 0
								# if two building types have the same value, they'll be added in a first come first serve order, the newest ones being added at the end of that priority
								# upgrades of buildings don't use their own priority, but use that of their base building

	# category = government

	# building_sets = {			# All buildings, but not Overlord Holdings or Branch Office Building, must belong to at least one Building Set.
	#							# Building sets are used to determine which Zones a Building may be constructed in.
	# }

	# optional: override base description with triggered ones
	# desc = {
	# 	trigger = {
	# 		<stuff: planet scope>
	# 	}
	# 	text = building_necrophage_elevation_chamber_desc
	# }

	# empire_limit = { 	#optional: default is no limit
	# 	base = 5		#don't set base to less than 0, it will ignore it (for performance optimisation reasons)
	# 	modifier = { 	#triggers are country scope
	# 		add/factor = 2
	# 		has_country_flag = test_flag
	# 	}
	#	# Mult by -1 to remove limit
	# }

	# planet_limit = { 	# optional: default is no limit
	# 	base = 5
	# 	modifier = { 	# triggers are planet scope
	# 		add/factor = 2
	# 		has_carrier_flag = test_flag
	# 	}
	#	# Mult by -1 to remove limit (still affected by is_capped_by_modifier = yes)
	# }

	# potential = {
		# planet scope
		# trigger for displaying building in construction list
	# }

	# building_sets = {
		# planet scope
		# used to match with a planet class' building set, can be assigned to multiple sets. Used to remove from construction lists
	# }

	# allow = {
		# trigger for allowing/graying out building construction
	# }

	# abort_trigger = {
		# ongoing construction will be canceled if this trigger returns true
	# }

	# abort_construction_trigger = {
		# ongoing construction will be canceled if this trigger returns true
	# }

	# ruined_trigger = {
		# set building to ruined if this trigger returns true
	# }

	# destroy_trigger = {
		# planet scope
		# building will be destroyed (more likely converted, see below) if this trigger returns true
	# }

	# convert_to = {
		# lists candidates this can be converted to
		# if destroy_trigger returns true (e.g. post-conquest)
	# }

	# planet_modifier = {
		# planet_housing_add = 300
		# planet_amenities_add = 300
	# }

	# triggered_planet_modifier = {
		# potential = {
		#	exists = owner
		#	owner = { is_mechanical_empire = no }
		# }
		# job_colonist_add = 200
	# }

	# triggered_planet_pop_group_modifier_for_all = {
		# planet scope for the trigger
		# applied to pop groups on planet
		# modifier values divided in proportion to size between pop groups on that planet
		# use the trigger only to enable or disable the modifier entirely
	# }

	# triggered_planet_pop_group_modifier_for_species = {
		# pop_group scope
		# applied to pop groups on planet of that species
		# modifier values divided in proportion to size between pop groups of that species
		# trigger can be used for different species, but is performance heavy
	# }

	# triggered_planet_modifier = {
		# as many as you like
	# }

	# country_modifier = {
		# country_resource_max_add = 2000
	# }

	# triggered_country_modifier = {
	# }

	# army_modifier = {
		# army_damage_mult = 0.1
		# This modifier is permanently applied to armies built on this planet.
		# To only apply a modifier while the army is on the planet, use planet_modifier.
	# }

	# system_modifier = {
		# psionic_aura_resistance_mult = 0.5
	# }

	# waystation_network_system_modifier = {
		# modifier applies to planets and starbases in the systems connected to this network
	# }
	# triggered_waystation_network_system_modifier = {
		# potential = {
			# trigger for triggered modifier
			# root = planet
		# }
		# modifier applies to planets and starbases in the systems connected to this network
	# }

	# waystation_network_country_modifier = {
		# modifier applies to every country that is connected to this network
	# }
	# triggered_waystation_network_country_modifier = {
		# potential = {
			# trigger for triggered modifier
			# root = planet
		# }
		# modifier applies to every country that is connected to this network
	# }

	# prerequisites = {
		# "tech_basic_industry"
	# }

	# resources = {
		# category = planet_buildings
		# upkeep = {
		#	energy = 1
		# }
		# cost = {
		#	minerals = 300
		# }
		# can also produce flat resources,
		# but we usually use planet_modifier for that
	# }

	# upgrades = {
		# building(s) this can be upgraded to
	# }

	#triggered_desc = { # text to display if trigger returns true
	#	trigger = {
	#		exists = owner
	#		owner = { is_mechanical_empire = yes }
	#	}
	#	text = job_roboticist_effect_desc
	#}

	# auto_generate_description = {
		# default is yes
		# set to no to disable automatic generation of production description from jobs
	# }

	#ai_weight: not used anymore unless you overwrite economic_plans to not be used.

	#on_queued = {
	#	owner = { remove_country_flag = artist_building_patron } #an action when queued
	#	this has access to the variables "local_spent_<resource>"
	#}
	#
	#on_unqueued = {
	#	owner = { set_country_flag = artist_building_patron } #an action when unqueued
	#	this has access to the variables "local_spent_<resource>"
	#}
	#
	#on_built = {
	#	owner = { set_country_flag = built_one_ministry } #an action when built
	#}
	#
	#on_destroy = {
	#	owner = { remove_country_flag = built_one_ministry } #an action when destroyed
	#}
	#
	#on_repaired = {
	#	owner = { remove_country_flag = built_one_ministry } #an action when repaired
	#}
#}
