# SHIP COMPONENTS

# Options common to all types of components:
#
# example_component = {
#	key = "COMPONENT_1"							# Loc string to use as the name of this component
# 	size = small								# The size of the component. Options: point_defence/small/medium/large/extra_large/titanic/torpedo/planet_killer/aux
# 	icon = "GFX_icon_1"							# The icon for the component
# 	icon_frame = X								# The icon frame to display
# 	power = X									# The amount of power consumed by this component. -X costs power, X gives power.
#
# 	modifier = {								# Modifiers for values shown in the ship designer.
#		ship_armor_add = 10
#	}
# 	ship_modifier = {							# Most modifiers for ship components go here. Not shown in the ship designer.
#		ship_accuracy_add = 5
#	}
# 	triggered_ship_modifier = { 				# Use like triggered modifiers elsewhere. Not shown in the ship designer. Ship scope.
# 		potential = {
#
# 		}
# 		modifier = X
#	}
# 	triggered_ship_design_modifier = { 			# Use like triggered modifiers elsewhere. Shown in the ship designer. Design scope, from = country.
# 		potential = {
#
# 		}
# 		modifier = X
#	}
#	custom_tooltip = {							# custom_tooltip replaces the ship_modifier and aura display.
												# Use custom_tooltip_with_modifiers if you want the additive behaviour.
#		fail_text = loc_string
#		NOT = {
#
#		}
#	}
#
# 	component_set = "COMPONENT_SET"				# The component set for this component, see common/component_sets for options.
# 	upgrades_to = "UPGRADE_1"					# What other component that this component upgrades to.
#	upgrade_path = growth						# For core components, components that have the same upgrade path are shown on the same row.
# 	resources = {								# The cost of the ship component. Works like other resources script.
#		category = ship_components
#		cost = {
#			alloys = X
#		}
#		upkeep = {
#			alloys = X
#		}
#	}
#
# 	prerequisites = {							# Technologies required to be able to get and use this component, see common/technology for options.
#		TECH_1
#		TECH_2
#	}
#   potential = {                               # Trigger that defines whether the component appears in the list of available ones to be placed in a slot. This = ship design, From = country.
#       from = {
#           is_country_type = default
#       }
#       OR = {
#           is_ship_class = shipclass_military
#           is_ship_class = shipclass_constructor
#       }
#       OR = {
#           is_ship_size = corvette
#           is_ship_size = titan
#       }
#   }
#   possible = {}                               # A trigger that allows a component to forbid the addition of other components to the design. The trigger can be used to check for the compatibility of components with each other. This = ship design, From = country.
# 	class_restriction = {						# (DEPRECATED: use "potential" trigger instead) The ship class(es) that the component is restricted to.
#		shipclass_military						# Options: shipclass_[military/constructor/colonizer/science_ship/transport/mining_station/research_station/military_station/
#		shipclass_constructor					# /observation_station/starbase/military_special/none]
#	}
# 	size_restriction = { corvette titan }		# (DEPRECATED: use "potential" trigger instead) The sizes that the component is restricted to, see common/ship_sizes for options.
# 	slot_restriction = { slot_example }			# The slots that the component is restricted to, see common/component_slot_templates for options.
# 	ship_limit = X								# (DEPRECATED: use "possible" trigger instead) Limits how many of this component that can be put in a ship design.
# 	blocked_by = {								# (DEPRECATED: use "possible" trigger instead) Components that can't be in a ship design with this component.
#		COMPONENT_2
#		COMPONENT_3
#	}
#
# 	target_weights = { titan = 2 }				# This increases the weight to target a specific ship size, see common/ship_sizes for options.
# 	tags = {}									# Tags are used to group components together for the use of common modifiers. They are also used in component_slot_templates for selecting GFX
# 	build_time = X								# Increases the build time of the ship design when this component has been added.
# 	entity = "example_entity"					# The entity to use for the component.
# 	hidden = yes/no								#
#
# 	friendly_aura = {
#		name = "AURA_NAME"
#		stack_info = {							# A ship can only be affected by one aura of a certain ID. If multiple auras have the same ID the one with the highest priority will be applied.
#			id = aura_id
#			priority = X
#		}
#		system_wide = yes/no					# Default is no. If this is yes, the aura is applied to the whole system.
#		limit = {								# The requirements for this aura
#			exists = owner
#			owner = { has_origin = origin_example }
#		}
#		modifier = {							# The modifiers applied by this aura.
#
#		}
#		graphics = {							# Graphics for the aura. Can use both effects or only one of them.
#			area_effect = {
#				entity = "example_entity"
#				dynamic_scale = yes/no
#			}
#			ship_effect = {
#				entity = "example_entity"
#				dynamic_scale = yes/no
#			}
#		}
#		damage_per_day = {						# Deals damage per day to any ships affected by this aura.
#			accuracy = X
#			damage = X
#			hull_damage = X
#			armor_damage = X
#			shield_damage = X
#			armor_penetration = X
#			shield_penetration = X
#			size_damage_factor = X
#		}
#	}
# 	hostile_aura = { ... }					# Same options as for friendly_aura, but this is always system wide.
#
# 	should_ai_use = yes/no			# Determines if the AI will build ships using this component.
#	ai_weight = { 					# Prioritises which components to pick for AI.
#		weight = X
#		modifier = {
#
#		}
#	}
# 	ai_tags = { example_tag }		# Tags for the AI to determine when to use the component.
# 	ai_tag_weight					#
#
#	scripted_action = { scripted_action_1 scripted_action_2 ... } # list of scripted actions enabled by this component

# Options for weapon components:
#
# Most numeric weapon stats (damage, range, accuracy, penetration, windup, cooldown, and missile stats)
# are defined in weapon_components.csv rather than in the script template. The script template
# provides everything else: tags, prerequisites, on_hit, resources, potential, collateral_damage, chain_damage, etc.
#
# type
# windup
# total_fire_time
# range
# max_range
# min_range
# accuracy
# firing_arc
# tracking
#
# Damage fields (all optional; defaults shown):
# damage = { min = X max = X }				# Damage per shot. Simple form: damage = X (fixed value). Default 1.
# hull_damage = X							# Multiplier applied to damage dealt to hull HP. Default 1.0.
# armor_damage = X							# Multiplier applied to damage dealt to armor HP. Default 1.0.
# shield_damage = X							# Multiplier applied to damage dealt to shield HP. Default 1.0.
# armor_penetration = X						# Fraction of armor bypassed before applying armor_damage (0.0-1.0). Default 0.
# shield_penetration = X					# Fraction of shields bypassed before applying shield_damage (0.0-1.0). Default 0.
# size_damage_factor = X					# Additional damage multiplier scaled by target ship size value. Default 0 (no size scaling).
# military_power_multiplier = X				# Multiplier on this weapon's contribution to military power calculation. Default 1.0.
# collateral_damage = { min = X max = X }	# AoE damage dealt to all nearby hostile ships on hit, centered on the impact point (the primary target).
#											# Simple form: collateral_damage = X (fixed value).
#											# Inherits hull_damage, armor_damage, shield_damage, armor_penetration, and shield_penetration from the weapon.
#											# Scales with weapon type modifiers (e.g. weapon_type_energy_weapon_damage_mult). Not valid on engulf weapons.
# collateral_range = X						# Radius for collateral_damage. The primary target is excluded. Units match weapon range.
# chain_damage = { min = X max = X }		# Damage per bounce for chain/arc weapons. Simple form: chain_damage = X (fixed value).
#											# After hitting the primary target, arcs to nearby ships sequentially. Each hop randomly
#											# selects a hostile ship within chain_range of the previous bounce target.
#											# Inherits hull_damage, armor_damage, shield_damage, armor_penetration, and shield_penetration from the weapon.
#											# Scales with weapon type modifiers. Not valid on engulf or missile weapons.
# chain_range = X							# Max arc distance between each bounce target. Units match weapon range.
# chain_count = X							# Number of bounces after the primary hit. Ships may be re-hit by subsequent bounces.
#
#											# WARNING: Both collateral_damage and chain_damage are performance intensive, use sparingly.
#
# missile_speed
# missile_evasion
# missile_health
# missile_shield
# missile_armor
# missile_retarget_range
# use_ship_main_target: if yes, overrides target_type and target_focus when ship's main target is within range, default no
# target_type (target_enemies (default) / target_allies / target_controlled / target_own)
# target_focus (single (default) / spread)
# can_destroy_stars
# prio_projectile
# point_defence_targets
# projectile_gfx
# planet_destruction_gfx
# on_hit: apply effects to target on hit. Scope = ship (target), from = ship (shooter). Fires before damage is applied.
# hide_damage_values_from_tooltip = yes/no # If yes, it will hide Damage and Average Damage from weapon component tooltip (default = no)

# Options for utility components:
#
# sensor_range
# hyperlane_range
# ship_behavior
# ftl_magnet
# military_power
# ftl
# ftl_inhibitor
# jumpdrive
# armor_value
# target_type: only valid if component_set has affects_target_type = yes
# target_focus: only valid if component_set has affects_target_focus = yes

# Options for strike craft components:
#
# custom_tooltip
# count
# regeneration_per_day
# launch_time
# cooldown
# range
# attack_range
# engagement_range
# accuracy
# acceleration
# rotation_speed
# health
# evasion
# tracking
# speed
# weapon_type
# ship_behavior
# point_defence_targets
# projectile_gfx
# prio_projectile
