How a fight begins
The server checks the source ship, the target, the module, the sector, the health of the attacker, and the available action points before it lets the attack through. If one piece is missing, the action stops quietly and no AP is spent.
Range is measured from footprint to footprint, so ship size matters. The game does not compare only the centers of two ships.
Range gate
Useful distance = max(horizontal gap, vertical gap) Attack allowed if useful distance <= weapon range and action points available >= 1 Ship size matters because the game measures edge to edge, not center to center
Hit chance
Hit chance = base chance + weapon skill bonus + sharpshooting bonus + aiming bonus - visibility penalty - hide signature penalty + invisibility bonus + weapon accuracy bonus The result stays between the minimum and the maximum allowed by combat rules