Page 1 of 1

Hit rate of AA-Gun when anti aircraft

Posted: Wed Oct 26, 2011 3:15 am
by poop17
I didn't see that AA Gun fire miss the air target.
Maybe I play BA too less,does somebody seen AA gun miss the target? :roll:

Re: Hit rate of AA-Gun when anti aircraft

Posted: Wed Oct 26, 2011 3:40 am
by Merr
tarroro wrote:I didn't see that AA Gun fire miss the air target.
Maybe I play BA too less,does somebody seen AA gun miss the target? :roll:
Yes ... about half the time for me, maybe a little less.

Re: Hit rate of AA-Gun when anti aircraft

Posted: Wed Oct 26, 2011 4:28 am
by Merr
I looked at the code for AA fire, hope this helps ....

:arrow: Each aircraft has an AA vulnerable value ... So some are easier to shoot down.
:arrow: Some unit's have an AA Power Factor.
:arrow: If that unit is within 5 tiles of the aircraft's target tile, it will shoot at the aircraft.

Here's an example .... P47 vs 88mmFlak ;

:arrow: P47 AA Vulnerable = 50.
:arrow: 88mmFlak AA Power Factor = 35.
:arrow: Multiply 50 * 35 = 1750.
:arrow: Divide 1750 by 100 = 17.5
:arrow: Roll a d100 (100 sided die) ... If result is greater than 17.5 (actually round up to 18 ), aircraft gets shot down!

So yeah ... in this case, there's an 82% chance your aircraft is going to get shot down.

That does seem kind of high ...

EDIT : Keep reading the next posts ... I read the final die roll logic backwards. :oops:

Posted: Wed Oct 26, 2011 4:51 am
by poop17
Thanks Merr,I agree .I think it's too high hit rate. :shock:

Posted: Wed Oct 26, 2011 6:05 am
by Merr
tarroro wrote:Thanks Merr,I agree .I think it's too high hit rate. :shock:
There was something I missed in the logic, and it's regarding mutiple AA units. But still, my example above with one AA versus one aircraft looks correct (Not, see next post!)

Now, the power is the sum of all the units with AA Power within 5 tiles of the target tile. But, this doesn't make sense because if you add more to the Power value the chance to shoot down an aircraft is actually lower :?

So, with two 88 flak guns (35 + 35 = 70) ... 50 * 70 = 3500 ... 3500/100 = 35 ... Now we have a 65% chance of getting shot down?

Hmmm ...

Posted: Wed Oct 26, 2011 6:14 am
by Merr
Ok ... I got the final roll logic backwards .... :oops:

A p47 versus and 88 is actually an 18% chance to get shot down.

A p47 versus two 88's ..... 35% chance to get shot down.

etc, etc.

Now if you're seeing everybody get shot down, then you're having bad rolls.

Sorry for the confusion, it's late where I'm at ... I knew it didn't sound right the first time.

Posted: Wed Oct 26, 2011 1:01 pm
by poop17
:shock: if it's 18% ,i must say:so bad luck :oops:

Posted: Wed Oct 26, 2011 8:32 pm
by Merr
tarroro wrote::shock: if it's 18% ,i must say:so bad luck :oops:
You know ... I had another look at the code ...

It's running a loop (3 times) that checks for a unit with AA Power within 5 tiles...
This means that the one 88Flak is contributing 3 times to the AA Power value ...

Boy, I hope I got this all correct now ... So, lets run the numbers again and tell me if this sounds better :wink:

I'll start over ... :oops: .. Changes underlined ;

:arrow: Each aircraft has an AA vulnerable value ... So some are easier to shoot down.
:arrow: Some unit's have an AA Power Factor.
:arrow: If that unit is within 5 tiles of the aircraft's target tile, it will shoot at the aircraft ... 3 Times

Here's an example .... P47 vs 88mmFlak ;

:arrow: P47 AA Vulnerable = 50.
:arrow: 88mmFlak AA Power Factor = 35.
:arrow: The 88mmFlak is firing 3 times ... 35 x 3 = 105 ... 105 is over limit(90) ... reset to 90
:arrow: Multiply 50 * 90 = 4500.
:arrow: Divide 4500 by 100 = 45
:arrow: Roll a d100 (100 sided die) ... If result is less than 45, aircraft gets shot down!

So ... One 88mmFlak has a 45% chance to shoot you down!

oh ... so much better ... and makes sense.

Posted: Wed Oct 26, 2011 8:57 pm
by Merr
tarroro,

One final comment ... There is a limit (or maximum) AA power value ... never exceeds 90.
So, two 88mmFlak guns ... 70 + 70 = 140 ... would be lowered to 90.

If you plug-in 90 ... The p47 has a 45% chance (max) of being shot down.

Now ... for those that like to number crunch (I do) ... Here's a list of values ...

Aircraft AA Vulnerable
:arrow: P47 = 50.
:arrow: Hurricane = 50.
:arrow: Typhoon = 50.
:arrow: Breugot_693 = 50.
:arrow: FW190 = 50.
:arrow: Stuka = 100.
:arrow: ME262 = 30.

Units with AA Power
:arrow: 88mm = 35.
:arrow: M16AA = 50.
:arrow: SP_bofors = 50.
:arrow: Wirbelwind = 50.
:arrow: MKVI_AA = 25.

Now ... it would be nice if the M3-Halftrack (which has an AA mg) contributed a little, eh?
As a matter of fact, some Shermans had a .50cal AA ...

Since the M16AA is a quad mount ( 4 x 50 cal) ... then, a mod would be ;
:arrow: M3-Halftrack = 12. (50/4=12.5, rounded down)
:arrow: Sherman = 12.

Of course, we can fudge that value down to 10 since the flexible 50cal might not have appropriate AA sights (maybe).

For the Germans ??? .... maybe the fixed mg42 unit could join the party with a value of 15 ...

Blah, blah, blah :)

Posted: Thu Oct 27, 2011 12:50 am
by poop17
It looks complicated,but i think i understand what you said.You are kind man,Thanks Merr. :P

Posted: Thu Oct 27, 2011 2:23 am
by Merr
tarroro wrote:It looks complicated,but i think i understand what you said.You are kind man,Thanks Merr. :P
Quite welcome ...

I updated the math again ... :oops: ... I'm horrible.

One 88mmFlak power firing 3 times = 105 ... not 75 from earlier (I updated that post).
Since 105 is high (limit is 90) it will drop back to 90.

So, basically, one 88mmFlak vs p47 hits the maximum, at 45% chance to get shot down.

It's quite a complicated routine to shoot down an aircraft !!!!
It took me at least three corrections to correct my corrections ... correctly :lol:

ugh ... I like to number crunch, but I never said I was any good at it!

Merr

Posted: Thu Oct 27, 2011 5:20 am
by poop17
I like to number crunch, but I never said I was any good at it!
:lol: But you let me know,my aircraft can't be shoot down everytime

Posted: Sat Oct 29, 2011 9:53 pm
by Obsolete
Arrow Divide 4500 by 100 = 45
Arrow Roll a d100 (100 sided die) ... If result is less than 45, aircraft gets shot down!

So ... One 88mmFlak has a 45% chance to shoot you down!

oh ... so much better ... and makes sense.
Actually, not so fast there. For a standard die, the chances would be 44% since the roll has to be LESS than 45, though if the computer die is labeled 0-99 then that's another story.

So... who can confirm it?

Posted: Sun Oct 30, 2011 6:36 am
by Merr
Obsolete wrote:
Actually, not so fast there. For a standard die, the chances would be 44% since the roll has to be LESS than 45, though if the computer die is labeled 0-99 then that's another story.

So... who can confirm it?
The code is .... if( i > Rand(0,100))

So, "i" is the value 45 ...

To kill, the random number needs to be 0-44 ...

Would you be correct then Obsolete? ... (I think) ... 44% chance to kill.