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-B: Difference between revisions

Content deleted Content added
vgwiki>Fankserver
Layout variant draft
 
vgwiki>Fankserver
Blank: layout draft no longer needed; please delete
Line 1: Line 1:
{{delete|Layout draft, no longer needed}}
''Layout variant B — wikitables for variables. Compare against [[User:Fankserver/sandbox-A|A]] 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>

{| class="wikitable" style="width:100%;"
! style="width:25%;" | Variable !! Meaning
|-
| <code>totalPowerStat</code> || Ship's total <code>CombatPower</code> / <code>MiningPower</code> / <code>SalvagePower</code> (whichever applies), plus drone-bay contributions.
|-
| <code>equivalentTurrets</code> || Same-class hardpoints, weighted by size. Floored at 0.45.
|-
| <code>stackingPenalty</code> || Diminishing returns from stacking — see ladder below.
|-
| <code>turretEquivalentRating</code>, <code>powerMultiplier</code> || Per-turret tuning constants set on each weapon prefab.
|}

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

=== 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>

{| class="wikitable" style="width:100%;"
! style="width:25%;" | Variable !! Meaning
|-
| Power → 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>

{| class="wikitable" style="width:100%;"
! style="width:25%;" | Variable !! Meaning
|-
| <code>DamageReduction</code> || Universal reduction stat.
|-
| <code>typeResist</code> || 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]]

Revision as of 20:24, 7 May 2026

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