Shield power draw inconsistencies

Started by Lancefighter, August 03, 2014, 12:39:01 PM

Lancefighter

Quote from: Lancefighter on August 03, 2014, 12:37:40 PM
lets see, engines use 14, rcs 4, lasers 8+8+11, (radar 2, grappler 30), shield 12. I have a nullspace generator of power 50, capacity 600. If I am not mistaken, 14+4+8+8+11+12 (no grappler or radar) = 57. This means unless I am actively shooting guns, my energy will not deplete, correct? This also means that while using everything, my energy will deplete at 7 per tick (35/second, with 5 ticks as I expect). However, while shooting lasers and ramming into an asteroid, my energy depletes in about 5 seconds - a rate four times faster than expected.

Testing reactor with minimal engine use, lasers + grappler (grappler is kinetic, listed 30 power use) Grappler+lasers, 30+27, a 57 drain (note: same as expected with shields) seems to slowly drain my energy. Turning on engines increases the speed, but it is nowhere near the drain of the shield generator. As a matter of fact it was so slow, I found it unable to accurately measure. Ballpark figure says approximately 26 seconds of drain with engines+weapons+grappler (14+4 + 8+8+11 + 30), 75 total. 25 of that was drained. This means that *per second* I lost about 25 energy, compared to the shield example of losing ~120 per second.
Second test seems to indicate that everything is pulled once per second.


Outcome seems to indicate that shields are pulling way higher than their expected rate. My estimate is that shields are pulling 5 times a second, and everything else once. In the shield example, this means that engines and lasers (14+4 + 8+8+11), 45 is pulling once per second (net, -5 due to reactor output), where as 12 is being pulled 5 times (-> 60 drain per second), leaving 55/second drain total. But even that does not match the measured drain in energy. That is HALF of the measured drain in energy.

I tested a couple of other shields to very similar results - the draw seems much higher than what I understand from the numbers. Even the civilian shield would cause my ship to lose energy.

Now, depending on if youve used shields before, you may not notice I am somewhat intentionally omitting something that would be important for number crunching. I have 5 ranks in shield power management, meaning that my shield should be pulling *9* energy in place of 12. There is no way this shield draining number makes sense. None at all.

Lancefighter

Oh. Checking through the files seems to indicate youre doing

      var energy_spent = shield_regenerated * args.shield_regen_cost;

When instead I would probably say

      var energy_spent = shield_regenerated / shield_regen * args.shield_regen_cost;

shield_regenerated seems to become the total value of the shields that need to be repaired (shield_regenerated = args.shield_max - args.shield_current;), which is then multiplied by args.shield_regen_cost.

engine is 18, shield is 12(*.75)*80*(1.3).. No that number is 936, which is not the expected energy cost.

^^^^^^^^Above maybe wrong. I dont know. Scripts are pretty well documented but I am not sure I am following them correctly.

Hammish

I think the math is correct.  If I'm not mistaken the listed value for shield regeneration is not supposed to be a maintenance cost but the cost in energy you pay per point of shield healing.  This is then limited by the max regen on the shield.

For instance, the basic civilian is 250 max shield cap, 25 regen/second, 4 energy cost.  That'd mean that at full draw the shield is going to consume 100 energy/sec while recharging, putting you far into the red.  I had thought that weapons operated the same way, but I'm not entirely certain given what I've experienced with some beam weapon damage numbers where I expected the damage value to be the total damage over the course of the beam duration... but it's actually the damage per second on the beam, for any beams over 1.0s.  (A three second laser with a damage of 60 will actually do 180 damage over the course of the activation)

Lancefighter

I had considered that (and that is what the math in the scripts suggests).

However like I said, that doesnt seem to be what the math suggests either. The math at the below of the second post is what I imagine the energy cost would be in the event that it was per-shield point restored, the shield I was using would be regenerating 80*1.3 (skills) hp a second, at the cost of 9 per charge, would put me WELL over my entire max energy per second, and yet it takes ~5 seconds to deplete my capacitor.

Hammish

Yeah, you're right, with the advanced shields the draw would be out where you put it.  Not even the other engineering stats for shield power efficiency and power plant efficiency would make a dent in that, I don't think.  At best I think you could raise your plant output to around 100, and drop the shield drain with the large-number math down to 700 or so, which would still deplete you in a second.  Huh.

Lurler

Something is not right here. And calculations in the script file are wrong as well...
Thank you for pointing this out!

All of that should be per second as all other values we use in the game are either fixed or per second.
Thus shield should use X energy per second for as long as it continue to regenerate.

Will be fixed in the new version!

ai_enabled