Jump to content
Sign in to follow this  
The_Captain

AI Grenadiers can't aim properly.

Recommended Posts

Anyone ever wonder why grenadiers never hit anything?

Well, it seems to me that AI grenadiers in Arma tend to always overshoot their targets. It seems like their point of aim is too high, and the grenades go way too far.

I've been noticing this in general gameplay for a while but I don't know if it's been fixed.

I made a quick test mission where I tell AI to target enemies (but not shoot), and give them a manual command to fire using a gamelogic: they completely overshoot the targets by about 100m or more when aiming at their selected aiming point.

Looking at an AI soldier and elevating my weapon to reach the target, I noticed when I commanded the AI to target the same target they raised their gun by about double the elevation I did.

I'm not sure if this is a problem with the AI aiming routines or the configuration of the launchers, but whatever the case it seems broken.

...

Okay, a few hours later and some tests.. it turns out AI grenadiers aim exactly 10 degrees too high. I wrote a simple function that grabs a grenade when they shoot it and alters the vector to be 10 degrees lower. (Thanks to general Barron for get/set pitch and bank functions!wink_o.gif. Now the AI consistently hit targets.

I'm not entirely sure my 'fix' works correctly, but it seems that this is a genuine bug in the AI indirect aiming routines. Maybe it could be fixed in the next patch...

If the fix is reliable I might consider releasing it as a small addon. (And maybe posting a video too...).

Here's a bit of my test data when I was trying to see what the AI's aiming offset was, targeting a target at so many meters, the AI's vertical angle, and mine that actually hits the target:

Tgt: 211m AI: 18.6559 Me: 8.01

Tgt: 162m AI: 17.22 Me: 6.33

Tgt: 137 AI: 15.6756 Me: 5.255

Tgt: 106 AI: 14.01 Me: 3.75

Tgt: 76 AI: 12.5085 Me: 2.5

Originally I figured it was a problem like aiming 30% too high, but it seems it's simply 10 degrees too high, always.

Edit2:

Here's a video of the default behavior, and the fix.

You can download the 'fix' here:

http://www.flashpoint1985.com/cgi-bin....1277024

The fix doesn't actually fix the bug, it just fixes the velocity vector of the grenades. Hopefully this will be fixed in the next arma patch...

Share this post


Link to post
Share on other sites

yes

many times i observed when grenadiers only aim and even not fire

you know - ARMA is looking better than OFP, but many people say OFP was better

Share this post


Link to post
Share on other sites

This has been mentioned before.

Make sure to include your fix in the Community Configuration Project when it's launched so it can be used in the next ArmA patch smile_o.gif

Edit: I don't think a scripted fix would be accepted. Maybe if you can figure out how to fix it in the config.

I think the SLX mod fixed this, maybe the fix can be used from that.

Share this post


Link to post
Share on other sites

Also, from the tests I did, it seems ai grenadiers of a lower skill use grenades more often while high skill (>.75) just aim and don't fire like you mentioned, vilas. Maybe it has something to do with their cost routines, or their perceived "chance to hit target", but the "smarter" soldiers never use grenades. Skill of 0.1 and they use them nearly rapid fire. smile_o.gif

You can test this by removing all regular magazines from a group of grenadiers, eg: {_x removemagazines "30Rnd_545x39_AK"} foreach units group this;

I wouldn't really want a scripted fix in the community configuration project... I'd like it to be fixed either in the code or configs.

I'll look into what SLX did... maybe it can be fixed in the config after all. smile_o.gif

(Edit: one small bug already: AI might think it's clear to shoot over your head, but the script pulls the path of the grenade down.. sometimes right into you.)

Share this post


Link to post
Share on other sites

Your tests resulted that the AI is always aiming 10 to 11 degrees to high.

There is one value which is equivalent to the wrong aiming.

The memory points "GL look" and "GL eye" (I've looked on the M4_GL_ACOG) are exactly 11 degrees in relation to the rifles barrel.

Share this post


Link to post
Share on other sites

Good find HeinBloed. Now someone needs to try and see if it

helps to change it to zero degree. wink_o.gif

Share this post


Link to post
Share on other sites

Aha! Nice find heinbloed!

This probably changed when BIS enabled the gl-iron sights in one of the patches... but AI still raise their barrel the 'correct' amount without realizing they're overcorrecting.

Also, I made a quick clientside addon that uses the velocity change if anyone is interested. (Though might be better to fix it in the actual model...)

Share this post


Link to post
Share on other sites

The next patch will probably be the last, so make sure you are in contact with BIS to make its way in. Check with Suma, he's been pretty communicative with people on this board about patch issues.

Here is where BIS talks about the next (final) patch and why they have to move on fully to ArmA 2. They'd release another patch after that if it was absolutely essential... but thats it.

http://www.bistudio.com/develop....en.html

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×