The damage
per shot of a weapon is calculated as follows (and is then divided by the weapon cooldown, and/or multiplied by the number of ticks for beams):
[number of blocks]*[master damage]*(1+[slave modifier]*[slave ratio])*(1+[tertiary effect modifier]*[tertiary effect ratio])
Most of the time, [master damage], [slave modifier] and [tertiary effect modifier] can be directly looked up in data/config/BlockBehaviourConfig.xml witht the notable exception of cannon slaved weapons which reduce damage per hit per block instead of increasing it; their 'style' property is set to 'nerf' rather than 'buff' and the real modifier actually is 1/[modifier]-1 (as a rule of thumb, if the modifier is supposed to decrease the value but is positive, use this formula as the real modifier, otherwise, just take it as is)
For instance, here are the values for the cannon/X weapons:
Code:
<Cannon>
<BasicValues>
<Damage>10</Damage>
<Distance>1</Distance> <!-- 1 is equal to 100% sector radius -->
<Speed>10</Speed> <!-- In relation % to server max speed 1 = 100% -->
<ReloadMs>1000</ReloadMs>
<PowerConsumption>100</PowerConsumption>
<AdditionalPowerConsumptionPerUnitMult>0.1</AdditionalPowerConsumptionPerUnitMult> <!-- Nerf based on amount of groups connected to the same controller: powerConsumption * (1+countGroups*thisValue); 0 tu turn off nerf-->
<DefaultWeaponPenetrationWeight>1.5</DefaultWeaponPenetrationWeight> <!-- This weight will distribute the damage on the penetration depth path. The higher, the more damage is used in the first blocks -->
<DefaultWeaponPenetrationDeepnessMultiplier>1.5</DefaultWeaponPenetrationDeepnessMultiplier> <!-- how deep is the penetration potentially (depending on log10 of damage). A value of 0 defaults to the old system (full damage hits one block) -->
</BasicValues>
<Combination>
<Cannon>
<Damage style="nerf" linear="true" value="10" />
<Reload style="buff" inverse="true" value="10" />
<Distance style="skip" />
<Speed style="skip" />
<Split style="skip" />
<PowerConsumption style="nerf" linear="true" value="10" />
</Cannon>
<Missile>
<Damage style="buff" linear="true" value="1" />
<Reload style="nerf" inverse="true" value="1" />
<Distance style="skip" />
<Speed style="skip" />
<Split style="buff" value="9" />
<PowerConsumption style="nerf" inverse="true" linear="true" value="1"/>
</Missile>
<Beam>
<Damage style="buff" linear="true" value="3" /><!-- 1+3 = 4x damage -->
<Reload style="nerf" inverse="true" value="3" /><!-- 1+3 = 4000ms -->
<Distance style="buff" value="2" />
<Speed style="buff" value="1" />
<Split style="skip" />
<PowerConsumption linear="true" style="nerf" inverse="true" value="3"/> <!-- 1+3 = 4x power consumption -->
</Beam>
<Pulse>
<Damage style="buff" value="15" linear="true" />
<Reload style="nerf" inverse="true" value="15" />
<Distance style="skip" />
<Speed style="skip" />
<Split style="skip" />
<PowerConsumption style="buff" linear="true" value="15" />
</Pulse>
</Combination>
</Cannon>
[master damage] is Cannon/BasicValues/Damage (i.e. 10), [slave modifier] is (usually) Cannon/Combination/X/Damage where X is the slave weapon (i.e. respectively (1/
10 - 1),
1,
3, and
15 for the cannon, missile, beam, and pulse slaves; in red are the values read in the file). The tertiary effect modifier is further in that file.
For instance, a beam/pulse/ion weapon with 50/40/30 blocks would currently deal:
(50+40+30)*10*(1+10*40/50)*(1+1*30/50) = 17,280 per hit (against shields)
(50+40+30)*10*(1+10*40/50)*(1+(-1)*30/50) = 4320 per hit (against blocks, usually divided between multiple blocks)
A cannon/cannon/overdrive weapon with 9/5/3 blocks would currently deal:
(9+5+3)*10*(1+(1/10 - 1)*5/9)*(1+2*3/9) = 141.67 per hit (rounded down, usually divided between multiple blocks)
The same formula can be applied to power consumption. If you don't multiply by the number of blocks, it also works for cooldown, burst time and other properties.
Edit:
keep in mind that this is the damage per hit, you need to multiply by the number of hits per activation (usually 5 for beams for instance) and divide by the cooldown to have the real DpS (damage per second)
also keep in mind that all weapons now spread damage between several blocks, these formulas don't describe how this damage is spread (and some damage might be lost in space and/or by applying too much damage on a single block)