User:Fankserver/sandbox-C
From Vanguard Galaxy Wiki
More actions
Layout variant C — combined formula block + single bottom variable table. Compare against A and B.
Damage calculation
The full chain in three stages — attack power, the per-shot roll, and what actually lands on the target. Formulas match the shipped Assembly-CSharp.dll.
# 1. Per-turret attack power
attackPower = ( totalPowerStat / max(0.45, equivalentTurrets) )
× stackingPenalty × turretEquivalentRating × powerMultiplier
# 2. Per-shot damage
shotDamage = (attackPower / 5) × random(0.8, 1.25) / defaultAttacksPerSecond
critAdjusted = shotDamage × (2 + CriticalDamage) ^ critCount
outgoing = critAdjusted × (1 + typeBoost + Damage)
# 3. Damage taken by the target
finalTaken = outgoing × max(0.2, 1 − DamageReduction − typeResist)
Variables
| Variable | Meaning |
|---|---|
totalPowerStat |
Ship's total CombatPower/MiningPower/SalvagePower for this turret type, plus drone-bay contributions.
|
equivalentTurrets |
Same-class hardpoints, weighted by size. Floored at 0.45. |
stackingPenalty |
Diminishing returns when stacking same-class turrets — see ladder below. |
turretEquivalentRating, powerMultiplier |
Per-turret tuning constants set on each weapon prefab. |
defaultAttacksPerSecond |
Turret's base rate from _fireDelay, burstAmount, burstDelay, _maxMagSize, _reloadDelay. Does not include AttackSpeed — that bonus raises firing rate without lowering per-shot damage, effectively a flat DPS multiplier.
|
random(0.8, 1.25) |
Per-shot uniform variance. |
critCount |
Crits cascade. CriticalChance rolls; on success the chance halves and rerolls. Capped by the combatMegaCrit skill-tree points.
|
CriticalDamage |
Per-crit multiplier base; each successful crit multiplies damage by 2 + CriticalDamage.
|
typeBoost, Damage |
Damage-type-specific bonus stat (e.g. EnergyDamage) and the universal damage bonus.
|
DamageReduction, typeResist |
Defender's universal reduction and damage-type-specific resist stats. |
| Floor | Combined reduction is hard-capped at 80% — at least 20% of incoming damage always lands. |
Stacking penalty ladder
| Equivalent turrets | Penalty |
|---|---|
| 1 (≤ 1.9) | 1.00 |
| 2 (≤ 2.9) | 0.85 |
| 3 (≤ 3.9) | 0.78 |
| 4 (≤ 4.9) | 0.72 |
| 5 (≤ 5.9) | 0.68 |
| 6+ | 0.65 |
Practical implications
- Roughly, every 5 points of
CombatPower/MiningPower/SalvagePowerconverts to 1 average DPS, before stacking penalty, attack-speed bonuses, crits, and resistances. - Stacking the same turret class on one ship suffers sharp diminishing returns — the third identical turret only contributes about 78% of its raw power.
AttackSpeedis stronger than it looks — it shortens the time between shots without lowering per-shot damage, so +20% AttackSpeed ≈ +20% DPS.- Critical hits compound — with high
CriticalChanceand thecombatMegaCritskill, multi-stage crits multiply damage geometrically.