Author Topic: 0.30.1 Woes of turret generation (also applies to stable)  (Read 50 times)

deadok

  • Newbie
  • *
  • Status:
    Online
    Posts:
    3
    • View Profile
Hello. I'm not especially good with lua, so don't bash me too hard if I did mess up somewhere (I managed to fix/workaround all the issues tho)

1. Bug/dead code: (data/scripts/lib/turretgenerator.lua, line 472)
Code: [Select]
    elseif type == WeaponType.TeslaGun then
        table.insert(specialties, rand:getBool() and Specialty.HighDamage or Specialty.HighDamageEnergyCooling)

    elseif type == WeaponType.TeslaGun then
        simultaneousShootingProbability = 0.15
Obviously, second 'if' never executes

2. Bug: (data/scripts/lib/turretgenerator.lua, line 527)
Code: [Select]
    if type == WeaponType.PulseCannon then
        -- replace a random specialty with increased shield damage
        if #specialties > 0 then
            table.sort(specialties)
            table.remove(specialties, 1)
        end
...
It is not really random if Specialty.HighDamage can't ever get past this filter (since it has lowest id and always will be first in sorted array)

3. Bug: (data/scripts/lib/turretgenerator.lua, line 782)
Code: [Select]
        elseif s == Specialty.FasterRechargeTime then
            local maxIncrease = 2.9
            local increase = 0.1 + rarityFactor * maxIncrease

            local rechargeTime = turret.coolingTime
            local shootingTime = turret.shootingTime

            rechargeTime = rechargeTime * (1 + increase)
...
            TurretGenerator.createBatteryChargeCooling(turret, rechargeTime, shootingTime)
...
            turret:addDescription("%s%% Faster Recharge"%_T, string.format("%+i", percentage))
While it states 'faster recharge'  it actually slows it down (higher recharge time == slower recharge). Should be similar to Specialty.LessCoolingTime's case. At the same time Specialty.LessEnergyConsumption should be similar to Specialty.HighShootingTime.

4. Maintainability: turret modification at turret factory (ingredients, stripping of autofire & rebuffing) should probably be moved from turretfactory.lua to turretgenerator.lua (fun fact: I once generated rare plasma turret with both AutomaticFire and AutomaticFireDPSReduced. In my opinion it is better to add not really usefull specialties to the pool, than to generate rare turrets with 0 specialties)

5. UX: simultaneousShooting should be present in tooltip's description and/or damage&dps stats (getting quad gun that states 100 damage, but deals 400 - is kind of WAT? moment). In a contrast - if turret is missing simultaneousShooting, then it's fire rate is properly displayed.
which leads to

6. Bug: 'Continuous shots'/'Shooting time' should display correct values. I have a turret that stated 7 shots, but overloads after first one (since it is triple railgun with simultaneousShooting and smth like 3.5 heat/shot). First thought - WAT?

7. UX: If railgun has blockPenetration > 1, it deals 4 times less damage/dps - show that in tooltip (once again WAT? moment). Most of the time railgun shoots at the shield anyway.

8. UX: Tooltip for energy turrets shows burst DPS, tooltip for standard cooling turrets - sustained. IMHO it should either be same kind for both or type of dps should be stated explicitly

9. Bug?: Burst fire shouldn't give such massively different bonuses for different weapon types. Cannons/Railguns with initially rolled fire rate of 0.4 (minimal posssible) gets damage boost of 1/0.4 * 6 = 15x. A little behind is Launchers with 12x. Other eligible standard cooling weapons receive up to 3x damage. And finally plasma gun, as the only eligible energy based weapon, gets no damage boost (but receives high cooldown penalty), wasting specialty slot.
Note that dps increase can actually be even more. E.g. cannon with maximum base shooting time (30s), lowest base cooling time (12) and fire delay of 2.5s does 13 shots per damage round of 42s, or 0.309 per second.
With BurstFire specialty it receives 15x damage, .1667s fire delay, shooting time of 1s and cooling time of 15s. That equals to  6~7 15x shots over 16s or 5.62-6.5625 base damage shots per second. Thats around 22 times more then before BurstFire.
Imho,
Code: [Select]
                weapon.damage = weapon.damage * coolingTime
at turretgenerator.lua, line 867
should go away completely or be replaced by either constant damage boost (also applied to BurstFireEnergy for plasma turrets), or some dynamic calculation of cooling time/fire rate/damage increase to keep damage/dps boost in check (again applied to BurstEnergyFire).

edit: spellcheck
« Last Edit: January 13, 2020, 10:35:04 PM by deadok »
I know 3 words, 3 obscene words
Armed with that knowledge I went for the walk



deadok

  • Newbie
  • *
  • Status:
    Online
    Posts:
    3
    • View Profile
on: January 14, 2020, 09:47:46 PM
Ok, apparently in case 9 everything is not as bad as I though. Quad cannons/rails can get up to 50x sustained dps over their non-burstfire variants.
I know 3 words, 3 obscene words
Armed with that knowledge I went for the walk