Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

User:Fankserver/sandbox-A: Difference between revisions

Content deleted Content added
vgwiki>Fankserver
Layout variant draft
 
m 2 revisions imported
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{delete|Layout draft, no longer needed}}
''Layout variant A — definition lists. Compare against [[User:Fankserver/sandbox-B|B]] and [[User:Fankserver/sandbox-C|C]].''

== Damage calculation ==

Outgoing damage is computed in three stages. Formulas below match the shipped <code>Assembly-CSharp.dll</code>.

=== 1. Attack power per turret ===

<pre>
attackPower = ( totalPowerStat / max(0.45, equivalentTurrets) )
× stackingPenalty
× turretEquivalentRating
× powerMultiplier
</pre>

; <code>totalPowerStat</code>
: Ship's total <code>CombatPower</code> / <code>MiningPower</code> / <code>SalvagePower</code> (whichever applies to this turret), plus drone-bay contributions.
; <code>equivalentTurrets</code>
: Same-class hardpoints, weighted by size. Floored at 0.45.
; <code>stackingPenalty</code>
: Diminishing returns when stacking same-class turrets.
; <code>turretEquivalentRating</code>, <code>powerMultiplier</code>
: Per-turret tuning constants set on each weapon prefab.

{| class="wikitable"
! 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 ===

<pre>
shotDamage = (attackPower / 5) × random(0.8, 1.25) / defaultAttacksPerSecond
critAdjusted = shotDamage × (2 + CriticalDamage) ^ critCount
outgoing = critAdjusted × (1 + typeBoost + Damage)
</pre>

; Power-to-damage
: Flat 5:1 ratio (<code>DamageData.PowerPerDamage = 5</code>).
; Random variance
: Uniform 0.8×–1.25× per shot.
; <code>defaultAttacksPerSecond</code>
: Base rate from <code>_fireDelay</code>, <code>burstAmount</code>, <code>burstDelay</code>, <code>_maxMagSize</code>, <code>_reloadDelay</code>. Does '''not''' include <code>AttackSpeed</code> — so <code>AttackSpeed</code> raises firing rate without lowering per-shot damage, effectively a flat damage multiplier.
; <code>critCount</code>
: Crits cascade. <code>CriticalChance</code> rolls; on success the chance halves and rerolls. Capped by the <code>combatMegaCrit</code> skill-tree points. Each crit multiplies by <code>2 + CriticalDamage</code>.
; <code>typeBoost</code>, <code>Damage</code>
: Damage-type bonus stat (e.g. <code>EnergyDamage</code>) and the universal damage bonus.

=== 3. Damage taken by the target ===

<pre>
finalTaken = outgoing × max(0.2, 1 − DamageReduction − typeResist)
</pre>

; <code>DamageReduction</code>, <code>typeResist</code>
: 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 <code>CombatPower</code>/<code>MiningPower</code>/<code>SalvagePower</code> converts 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.
* '''<code>AttackSpeed</code> is 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 <code>CriticalChance</code> and the <code>combatMegaCrit</code> skill, multi-stage crits multiply damage geometrically.

[[Category:Game Concepts]]

Latest revision as of 12:37, 20 May 2026

Lua error in package.lua at line 80: module 'Dev:Mbox' not found.