Translations of this page:

Combat Links

Ship vs. Ship Combat

The following is an overview of how ship vs ship combat works in Cosmic Supremacy.

The calculation

If two ships meet in space and one of them has the “Attack” order given to attack the other ship, a battle will occur. First, the offensive and defensive strength for both light and heavy ship-hitpoints is determined. The offensive strength being the effective firepower (increased by the ship-rank), and the defensive strength being the effective hitpoints during a battle (increased by the ship-shields, and decreased by the ship-condition)

During battle calculation the effective firepower of the “attacker” is subtracted from the effective ship-hitpoints of the “defender”. At the same time the “defender” is shooting back at the “attacker”. In that respect there is no “attacker” or “defender”, both sides are equal.

If one of the two sides has got more firepower than the other has got ship-hitpoints, then the ship is destroyed in the battle. If both sides do not have enough firepower to completely destroy the opposing ship, then the ship-condition will be decreased according to the inflicted damage, that is the ship-hitpoints destroyed during the battle. This can go on for an infinite number of turns, or until one of the two sides decides to flee.

A simple example

Two light-class ships meet in space, both don’t have any shields and both ships are spick and span at a 100% condition:

Player A Player B
Light Units 300 400
Heavy Units 0 0
Shields 0% 0% The shields increase the effective hitpoints during battle calculation (by adding)
Condition 100% 100% The condition decreases the effective hitpoints during battle calculation (by multiplying)
Effective Light Hitpoints 300 400 These are all light ship-units, as there are no heavy ships involved in the battle
Light Firepower 200 400
Heavy Firepower 300 200 As there are no heavy ship-units present, half of the heavy-firepower will shoot at the light ship-hitpoints
Ships’ Rank 0 0 The ships’ rank increases the effective firepower by 10% per rank-level
Effective Light Firepower 350 500 This results from the full light-firepower added with half of the heavy-firepower
Effective Heavy Firepower 0 0 There are no heavy ship-units present

On Player A’s side there are 300 effective ship-hitpoints that need to be destroyed, Player B has got an effective firepower of 500 available. Player B has got 400 ship-hitpoints that need to be destroyed, however Player A’s ship has only got an effective firepower of 350 available, which will not be enough to destroy Player B’s ship. However, Player B has got plenty of firepower. In fact Player B has got enough firepower to destroy Player A’s ship, before Player A’s ship has fired all his weapons! Player A will only be able to inflict around 200 points worth of damage, this results in a overall 50% damage condition on Player B’s ship after the battle.

Another example

Two light-class ships meet in space, just like in the previous example. But this time they are both equipped with shields, and they already have some combat behind them, they are both slightly damaged. In addition Player A’s ship-crew is quite experienced already.

Player A Player B
Light Units 300 400
Heavy Units 0 0
Shields 50% 10% The shields increase the effective hitpoints during battle calculation (by adding)
Condition 90% 80% The condition decreases the effective hitpoints during battle calculation (by multiplying)
Effective Light Hitpoints 405 352 These are all light ship-units, as there are no heavy ships involved in the battle
Light Firepower 200 400
Heavy Firepower 300 200 As there are no heavy ship-units present, half of the heavy-firepower will shoot at the light ship-units
Ships’ Rank 7 0 The ships’ rank increases the effective firepower by 10% per rank-level
Effective Light Firepower 595 500 This results from the full light-firepower added with half of the heavy-firepower, and adding the ship-rank bonus
Effective Heavy Firepower 0 0 There are no heavy ship-units present

On Player A’s side there are 405 effective ship-hitpoints that need to be destroyed, Player B has still got an effective firepower of 500 available. Player B has got 352 ship-hitpoints that need to be destroyed, however Player A’s ship has got an effective firepower of 595 available. The extra shield and the experience of the ship-crew will this time turn the odds in favor of Player A! Player A’s ship-firepower will destroy Player B’s ship quicker, than Player B’s ship-firepower is able to destroy the ship-hitpoints of Player A.

Multiple ships battle

This time two players with a number of heavy and light ships are attacking each other. It doesn’t matter if the ships are part of a fleet or “stand-alone”, the combined effective fire-power over all ships is calculated, as well as the combined number of light and heavy ship-hitpoints.

What happens next is that the total firepower is randomly distributed over all of the enemies ships. Light firepower is distributed among light ship hitpoints first. If all light ships are destroyed before all the firepower is distributed the remaining firepower is applied to the enemies heavy ships at the standard 50% deduction. Heavy firepower is treated the same way but in reverse. The consequence of this random distribution is that some ships may be completely destroyed while others may not receive any damage at all.

Unarmed ships

Ships that are not equipped with any weapons (unarmed ships) are treated differently during (ship vs ship or ship vs planet) combat: They are not being shot at, as long as there are any armed ships around. Unarmed ships are usually troop transporters that you do not want destroyed before the actual battle is decided. So they sort of stay “in a safe distance” so that they do not get hit. Only when all armed ships are destroyed, do the enemies direct their firepower towards unarmed ships - they are always destroyed last during a battle.

This allows you to make troop ships part of battle fleets, without having to worry that they get destroyed prematurely during the battle. Otherwise you would have to manually order them to stay one turn away, in order to not get accidentally shot down. Because of this rule this is not necessary.

Ships with weapons but without a sufficient ship-crew (or no crew at all) are considered unarmed too. They will not fire their weapons (naturally, since there is no crew), but they also get shot at last during combat.

Battle mechanics

Following is a behind-the-scenes look on how ship-to-ship combat is actually processed.

For each player the firepower for all of their ships present at the current location is combined. This means for the actual calculation it does not matter if ships are part of a fleet, or individual ships. Each turn a battle is split into 100 sub-iterations, during each iteration 1/100 of the combined firepower is shot. If after any of the sub-iterations a ship is completely destroyed, this ship is taken out of the equation, and as a result the combined firepower of all ships left is reduced. That means that it is very possible that a ship will not able to deliver all of its firepower, due to being destroyed during the early battle iterations.

Now, how is the firepower distributed? The code checks how many ships are present on the other side, and computes a ratio of how much of the total combined firepower is directed towards each target ship. This happens in such a way that the combined ratio of the firepower totals 100% (of course). This ensures that some ships have a high ratio of the combined firepower targeted at them, and other ships only receive very little or no damage.

In addition to that, depending on the ratio between combined firepower on the one side, to combined hitpoints on the other side, the firepower is either concentrated on a smaller number of ships, or spread more evenly on all ships. In other words, if a small fleet with a relatively small amount of combined firepower faces a large fleet with a high number of (combined) hitpoints, the code will make sure that the small fleet will concentrate only on a small fraction of the large fleet - making sure that even a small fleet has a chance to destroy the one or other ship.

If during any of the 100 sub-iterations a targeted ship is destroyed, an altogether new damage distribution is calculated, and different ships are targeted.

Initially unarmed ships are not targeted but if during any of the sub-iterations all of the armed ships are destroyed then a new damage distribution will again be calculated. This time including the unarmed ships. That means that unarmed ships are completely safe during a battle (and so to speak park in safe distance), until all armed ships are destroyed. At that point the unarmed ships will be targeted as well.

When more than two players are involved in a particular battle all opposition players are treated as a single entity when determining targets.

 
manual\ship-vs.-ship-combat.txt · Last modified: 2012/02/26 22:17 by nongolf
 
0.218 planets were colonized to make this page.
Powered by DocuWiki, Theme by SHRIKEE