User:Fankserver/sandbox-A
From Vanguard Galaxy Wiki
More actions
Layout variant A — definition lists. Compare against B and C.
Damage calculation
Outgoing damage is computed in three stages. Formulas below match the shipped Assembly-CSharp.dll.
1. Attack power per turret
attackPower = ( totalPowerStat / max(0.45, equivalentTurrets) )
× stackingPenalty
× turretEquivalentRating
× powerMultiplier
totalPowerStat- Ship's total
CombatPower/MiningPower/SalvagePower(whichever applies to this turret), plus drone-bay contributions. equivalentTurrets- Same-class hardpoints, weighted by size. Floored at 0.45.
stackingPenalty- Diminishing returns when stacking same-class turrets.
turretEquivalentRating,powerMultiplier- Per-turret tuning constants set on each weapon prefab.
| 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 |
2. Per-shot damage
shotDamage = (attackPower / 5) × random(0.8, 1.25) / defaultAttacksPerSecond critAdjusted = shotDamage × (2 + CriticalDamage) ^ critCount outgoing = critAdjusted × (1 + typeBoost + Damage)
- Power-to-damage
- Flat 5:1 ratio (
DamageData.PowerPerDamage = 5). - Random variance
- Uniform 0.8×–1.25× per shot.
defaultAttacksPerSecond- Base rate from
_fireDelay,burstAmount,burstDelay,_maxMagSize,_reloadDelay. Does not includeAttackSpeed— soAttackSpeedraises firing rate without lowering per-shot damage, effectively a flat damage multiplier. critCount- Crits cascade.
CriticalChancerolls; on success the chance halves and rerolls. Capped by thecombatMegaCritskill-tree points. Each crit multiplies by2 + CriticalDamage. typeBoost,Damage- Damage-type bonus stat (e.g.
EnergyDamage) and the universal damage bonus.
3. Damage taken by the target
finalTaken = outgoing × max(0.2, 1 − DamageReduction − typeResist)
DamageReduction,typeResist- Universal reduction stat and damage-type-specific resist stat for the incoming type.
- Floor
- Combined reduction is hard-capped at 80% — at least 20% of incoming damage always lands.
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.