Bug Hunt
|
|
Any feedback is greatly appreciated. I need help testing bigger multi unit type hits. Also Ion units reports and shield damage is highly untested. Really anything helps. I wrote this on just a base understanding of how the damage system works, and analyzing an existing battle calc. |
|
|
Ok so I had Attack Force
Defensive Force
My script predicted 1041.~~ (so 1042). The ACE Battle Calc predicted 1044. Perhaps damage should be spread evenly across the Fighters, Destroyers, and Frigates. Anyone have any thoughts? |
|
|
Oh and I'm over accounting for CCs. I already grab all necessary power info from the attack table. |
|
|
updated the script to properly distribute damage (ACE predicts correctly, I had 19 CCs set and didn't realize).
|
|
|
I figured I'd test your script out and this is a result: Unit Start Quant. End Quant. Power Armour Shield
Defensive Force
-- I think that should be more like this: Unit Start Quant. End Quant. Power Armour Shield
Defensive Force
|
|
|
Yeah, I had a case where I attacked a series of units and a "fleet carrier" and the quantity went from 1 to 1.02... something. I wish all my units had shields like that. Sadly, the actuals didn't match. :P I found a pretty big bug with how I was handling unit counts between iterations. I cleaned this up and added plenty of debug which you can enable by setting "bc_debug_level = DEBUG_VERBOSE;" in the script file. It still needs plenty of loving abuse, but I'm keeping my fingers crossed that that's the last major opps. |
|
|
on further attacks it seems your fighter drops are near enough spot on, although nothing else is :p Attack Force
Defensive Force
turns into: Attack Force
Defensive Force
|
|
|
Attack Force
Defensive Force
turns into: Attack Force
Defensive Force
|
|
|
Must be something seriously borked when shields come into play. |
|
|
bug squashed!
|
|
|
okay, I officially hate Excel's ... language? Syntax? Insanity?
Anyway, I've learned that fleet attack is actually spread differently for fleet vs turrets. The script now accounts for this as well. If you turn on VERBOSE, watching the output in the console will take several minutes to scroll, but the actual script runs in less than 0.2 seconds. Run the script as is with just timing enabled and you'll see it run closer to 0.05 seconds. That makes me happy |
|
|
seems to be near to acurate now =D Attack Force
Defensive Force
became:
Defensive Force
be nice if they were rounded off to the nearest point, so 36484.825861271376 would become 36484.8 or even 36485 for unshielded units (FT/BO/CV/DE) etc |
|
|
I wasn't going to do this, but after staring at the ridiculously long decimals for so long, I agreed and it is done.
|
|
|
Don't forget to write a happy review. :) |
|
|
it's still not 100% acurrate but I think it gives a general idea of what you'll lose if you hit the attack button :D |
|
|
yeah, as I mentioned in the description, I'm not sure 100% is possible in javascript. Everything is treated as a float in java. I'd guess that AE's implementation probably uses integer math and offsets the decimal or something. I think it's close enough as other offline calcs are not quite 100% either. |
|
|
Accurate enough for me - so far it's only been off by .1 or less on all of my attacks. Good job, I love it and reviewed it as such =) |
|
|
Thanks for the review. The losses would be easy enough, but calculating debris is a little more tricky because it requires you to know armor tech. It's possible from the information available, but it's a pain. This script is currently blissfully oblivious to tech and just works with the numbers on the page. To do it the right way, I'd start going down the road of turning it into a full blown battle calc with modifiable fields and such. I could hack it of course, but well... I like it simple and elegant. Maybe I'll get inspired again though. A debris estimate really would be nice.... |
|
|
Just a small point I've noted though it will have an effect. aOverShileds = 0.50; should be aOverShields = 0.50; This is line 95. |
|
|
updated, good catch. I haven't tested any of the ion units yet, so that line hasn't been exercised. |