Ship combat

Ship combat takes place when a fleet attempts to enter a tile occupied by a fleet owned by a hostile power.

Basics
Combat is played out as a series of attacks as starships attempt to target one another with their various weapons systems.

At the start of combat, each ship will target an enemy ship of a type determined by the attacking ship's ship role. If there are multiple enemy ships of the preferred type, the ship will choose one of them at random.

Interceptor, assault, and capital ships will begin moving forward on the battlefield towards their primary target. Support ships will not move unless all of the interceptor, assault, and capital ships in its fleet have been destroyed, at which point the support ships will also start moving towards their primary target. Escorts and guardians will not move unless the ship they are defending has started moving forward as well.

The ship will only stop moving forward once it is even with the target ship, and will move further only if the target ship moves out of range.

Whenever a weapon is ready to fire, the ship will fire on its primary target, or another nearby ship if its primary target is still out of range for that weapon. All weapons of that weapon type on the attacking ship fire as one single attack.

Each attack either hits or misses.

Hits on a target that has the appropriate defense (point defense for missiles, shields for beams, or armor for mass drivers) will do damage to that defense. The amount of damage done to the target's defense is equal to a random amount from 1 to the attack points of that weapon type, times the efficiency of the defense takedown (usually 50% but certain technologies will increase this to 100%) of the firing ship. Damage done to a ships defense is displayed in orange on the battle log. Any damage done to a ship's defense in excess of that required to bring it to zero is wasted.

Hits on a target with no remaining defense of the appropriate type will instead do full attack damage to the hit points of the target ship. Spacecraft (ships, starbases, and shipyards) reduced to zero hit points are permanently destroyed.

Combat continues until all of the ships from one side are destroyed. There is no retreating.

Retreat
There is no retreating from combat for either the attacker or defender. Combat proceeds until one side or the other is annihilated.

Combat Viewer
Players can choose to autoresolve battle directly from the main map, or watch it play out in the combat viewer. This has no effect on the outcome of battle; the combat viewer does not allow players to control their fleets -- though it may give better insight into why a fleet is performing poorly or doing well in battle.

Starbase Support
Certain military starbases modules give powerful fleet-wide bonuses to any combat that takes place within their area of influence. Plan accordingly.

Ship Repair
Damaged starships repair at a base rate of 1 hit point per turn, whether they move during the turn or not. Starships that end their turn in orbit around a planet repair at a base rate of 5 hit points per turn. Starships that end their turn in a shipyard repair at a base rate of 4 hit points per turn. Starships that end their turn in a starbase repair at a base rate of 6 hit points per turn.

Strategy
The mix of ships in your fleet is incredibly important to its success in battle. Equipping support ships with appropriate modules, ensuring ship roles are handled well so you don't have vulnerable carriers engaging point-blank with enemy destroyers, and similar tactics can multiply any force's capabilities.