Need to add the following:
- Discussion on Shot Limiting
Contents |
Attack and Defense
Technologies
Ship equipment can have two forms of ATT and DEF bonuses: a direct bonus and a percent bonus. A direct bonus is added to the raw attack/defense of the ship, whereas a percent bonus is added at the time the weapon is fired.
There are three types of bonuses:
- ATT refers to the chance-to-hit of a weapon.
- DEF refers to the ability of a ship to dodge a weapon.
- Missile DEF refers to the electronic countermeasures employed to make a weapon miss the ship. This type of defense only effects missiles, torpedoes, and beam weapons.
In each case, the best ATT, %ATT, DEF, %DEF, MissileDEF, and %MissileDEF are taken from ship equipment. The non-percent values are then summed with Drive, Cockpit, and Hull bonuses. The result is stored with the ship.
System Bonuses
Some structures, such as the Fleet Command, create a system-wide bonus toward ATT and DEF. These values are added to every ship in the owner's fleet prior to the start of combat.
Calculating Chance-to-hit
At the time the ship fires:
- Attack = (Total Ship ATT + Weapon's ATT) * ATT% Bonus * Experience Bonus
- Defense = (DEF or MissleDEF) * DEF% Bonus * Experience Bonus
Chance-to-hit is calculated as:
- CTH = Attack / (Attack + Defense)
CTH is then compared against a random number, and if the number is less than the CTH, then the weapon hits.
Military Power
Military Power is the ability of a ship to fight effectively during combat.
Weapons
Sum of each weapon:
- Total Attack = SUM(Average Chance-to-hit * Damage / (class modifier))
Class modifier is defined as:
- 1 for all weapons other than bombs
- 2 for bombs
Average Chance-to-hit is calculated:
- Attack = (Total Ship ATT + Weapon's ATT) * ATT% Bonus
- Reference Defense = 10.0
- Average Chance-to-hit = Attack / (Attack + Reference Defense)
Calculating total MP
Now we find the total combat power:
- MP = Total Attack * (Ship HPs + Ship Shield HPs) / (Reference Damage * Reference Attack / (Reference Attack * Reference Defense)) * (speed modifier) + Extra MP
Speed modifier is defined as follows:
- Range: 0.5 to 1.33 (if outside this range, set it to the nearest value)
- Speed Modifier = Ship Speed / Reference Speed
Reference Values:
- Reference Defense = 10.0
- Reference Attack = 10.0
- Reference Damage = 10.0
- Reference Speed = 5.0
Extra MP is defined as:
- Any ship module that carries the "AddMP" tag will be added as part of Extra MP.
Shot Limiting
Shot limiting is one of the most misunderstood and misrepresented components of Outer Space.
Here are the facts.
Counter Increase
Counter increases when a weapon fires:
- If the Rate of Fire (ROF) <= 1.0, the counter increase by 1
- If the ROF > 1.0, the counter increases by 1/ROF
This data is stored as "hitCounter[combatClass]"
If the weapon fires, but does not hit it still counts. If a weapon does not fire (due to ROF being less than 1.0), it does not count.
To Hit Modifications
Whenever the hit counter goes above count of the target combat class times two, then it the penalty is applied and the hit counter is reset.
For each fleet, the game iterates over every ship in enemy fleets. The equation is:
- maxHits[combatClass] += 2
Whenever a weapon doesn't hit it's intended class, the count for the existing class is transfered to the new class:
- maxHits[combatClass] += 3.0 * (maxHits[combatClass+1] - hitCounter[combatClass+1]
- Example: maxHits[Medium] += 3.0 * (maxHits[Small] - hitCounter[Small])
- Essentially, hitting a size other than the intended target is beneficial, but only when you actually destroyed the intended target class that turn of combat.
The initial modification to hit is:
- hitMods = {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}
- This is an associative array for small, medium, large, and planet.
Whenever the hitCounter[class] > maxHits[class] the following is done:
- hitMods[class] *= 75%
- hitCounter[class] = 0
Penalties
Therefore, for every iteration of the shot limiter:
- 75.00% ATT value
- 56.26% ATT value
- 42.19% ATT value
- 31.64% ATT value
- 23.73% ATT value
- 17.80% ATT value
Shot Limit Summary
Here are some important things to keep in mind for shot limiters:
- Weapons that fire faster than once per turn only count as one shot for the shot limiter.
- Weapons that fire slower than once per turn only count toward the shot limiter on turns they fire.
- If you run out of targets in the intended target class, the transfer of shot limits is beneficial. That means a mortar-based hull will be able to fire 6 mortar rounds before shot limiters kick in, while a missile based hull will only be able to fire two missiles before shot limiters kick in. Note that this is appended to the shot limit for the new target class, and only adds values after you destroy ships of an intended size class. If there were no ships left of that size class at the start of combat, then the the shot limiter for the original size class is 0, and thus 0 is added when the weapon hits the wrong size class.
- Shot limiters are set each turn for all fleets in a particular system. If more than one fleet is engaged in combat, the shot limiters for a particular enemy fleet will be shared by all fleets attacking it.

