Code: Select all
Laser=Photon Pulse Cannon, Range=8000, Speed=500, Delay=3000, Flags=0
Shield.Shot=27000, Hull.Shot=4000, Shots.Min=20, Shield.Dps=9000, Hull.Dps=1333
Laser=Plasma Beam Cannon, Range=6885, Speed=2550, Delay=6667, Flags=1026
Shield.Shot=44667, Hull.Shot=9900, Shots.Min=8, Shield.Dps=5955, Hull.Dps=1320
Code: Select all
$Laser.Range = get range of laser $Laser
$Laser.Speed = get bullet speed of laser $Laser
$Laser.Delay = get default launch time difference for missile type: $Laser
$Laser.Shield.Shot = get shield damage of laser $Laser
$Laser.Hull.Shot = get hull damage of laser $Laser
$Laser.Flags = get bullet flags of laser $Laser
$Laser.ShotsPerMinute = 60000 / $Laser.Delay
$Laser.ShieldDps = ($Laser.Shield.Shot * $Laser.ShotsPerMinute) / 60
$Laser.HullDps = ($Laser.Hull.Shot * $Laser.ShotsPerMinute) / 60
write to log file 1234 append=1 printf: fmt='Laser=%s, Range=%s, Speed=%s, Delay=%s, Flags=%s', $Laser, $Laser.Range, $Laser.Speed, $Laser.Delay, $Laser.Flags
write to log file 1234 append=1 printf: fmt='Shield.Shot=%s, Hull.Shot=%s, Shots.Min=%s, Shield.Dps=%s, Hull.Dps=%s', $Laser.Shield.Shot, $Laser.Hull.Shot, $Laser.ShotsPerMinute, $Laser.ShieldDps, $Laser.HullDps
PPC hull DPS = 1333.333
PBC hull DPS = 1484.926
In the integer based script I worked in shots per minute to get a higher precision, but unfortunately PBC shots per minute (60000 / 6667) comes out as 8.9995 - incurring pretty much the worst case amount of precision loss.
I'll adjust the DPS calculation to avoid significant precision loss.