Jump to content
Sign in to follow this  
fabrizio_t

Help with infantry AI

Recommended Posts

Hello,

can anybody help me to fix some extremely annoying AI behaviours ? I'm pretty frustrated with these problems (most still here 4 years after OFP ):

1) squad members ordered to engage by leader rush without any caution just stopping a few steps in front of enemy (normally they're wiped out way before coming so close ...)

2) many times AI is unable to "see" enemies standing less than 100 meters away. They open fire only as consequence of casualties sustained or -instantly- after a "reveal" command is given by the player.

3) especially in towns AI is not able to keep formation at all. Even "Column compact" is screwed.

4) Most of the time an AI formation advancing  through a road does not use its firepower. 1 or 2 men will fire at once when needed: there are serious issues with fire and movement.

5) AI can't make any proper use of cover at all. Also command "findCover" seems pretty useless since it ignores all the objects eventually  put on the map by the mission designers.  "findCover" is actually useless,  good only for "hiding" behind buildings, not for cover.

I've managed to minimize  problem 1) through a simple script, but issues with visibility, cover  and fire/movement are way too hard to fix for me.

Any advice ?

Share this post


Link to post
Share on other sites

1) Do not order "Engage at Will". Just tell them to open fire... they stay in formation better that way.

I've never had a problem with AI behavior since I stopped using "Engage at Will". I avoid that command like the plague.

Share this post


Link to post
Share on other sites

The down side to that is they never take cover. The squad leader may, but the squad will always be neatly in formation, regardless of terrain.

Also, arma seems to be a little lax on checking to make sure no firendlies are directly in the field of fire, so be carefull what formations you use...

Share this post


Link to post
Share on other sites
The down side to that is they never take cover.  The squad leader may, but the squad will always be neatly in formation, regardless of terrain.

Also, arma seems to be a little lax on checking to make sure no firendlies are directly in the field of fire, so be carefull what formations you use...

That may be true, but I'd rather have them where I know they are then running around like chickens. Where's the cover in that? Plus, you should be using formations to your advantage.

smile_o.gif

Share this post


Link to post
Share on other sites

You could of course set a few men in your AI section to Engage at will.

Thus keeping some order and having an aggressive edge.

Share this post


Link to post
Share on other sites

Can you import other formations types I'm used to some who are not included in the standard formations.

Share this post


Link to post
Share on other sites

Isnt this where those new FSM files come into play? It would be great if some kind of tutorial was put up at the biki for these.

Marcus

Share this post


Link to post
Share on other sites

For suppressive fire: We should be able to use an invisible object and have units fire on that as a dofire action from a script. As if the squadleader points at a treeline or ridge or bulding and orders the squad to use suppressive fire. The invisible object is placed and the AI simply fires on the object in a spread.

If we can get the AI to see properly hopefully that will collapse one or two of these other "issues".

If anythings broken I hope it gets fixed in a patch. Otherwise we will need user made workarounds and scripts to bring a solution.

Lets try to sort out what BIS definitely needs to fix versus what enhancements can be provided by the community. Finding cover properly might be one of these things that the scripting community will tackle.

Share this post


Link to post
Share on other sites

I agree that the main problem is getting AI "seeing" correctly.

Then I think that Suppression can be eventually easily coded (maybe with Camcreate Game logic and the "fire" command). The problem is opponent AI probably won't "know" it's being suppressed and keep being aggressive. So we have to code the "suppression behaviour" and the "being suppressed" behaviour. Both.

Cover can be coded, it's a matter of finding workarounds to default behaviour. Implementing peeking around cover for suppression fire will be for sure a pain, depending on type and size of the object providing cover.

Coordinating cover, suppression and advancing can be a nightmare, unless some geek finds out how to work with FSM files ...

Share this post


Link to post
Share on other sites

if you want to script when and where ai know about eachother (outside of the engine fsm ), the "reveal" command along with other parameters is what i use.

Share this post


Link to post
Share on other sites

A general routine for AI finding cover is a real gem of a script that Im assuming will be user made. I dont know FSM I only know basic things and can only make theories about what would work, attemp to implement the idea in the actual game, see how successfull it is and repeat untill the best possible system is reached. Or wait to try other users systems and evaluate how well they work alone or with other scripts running at the same time.

In the comref I would check if the AI has any ability to draw a line from its position and the enemy and determine if the LOS is clear. Maybe the we need an invisible silent and harmless bullet addon that does no damage but it can fire from a bots position and we can see if it hits a wall or it goes on for x meters. Then the bot will step over and fire the bullet again. When the bullet hits a wall close to its position then it knows its concealed. If it steps back the other way it knows its out in the open and can take a shot and step right back. This may not be a good system but it demonstrates the idea that it works in a general sense. So it would come into play no matter where the AI is located. They should be able to know if the woods are where all the cover is and recede back in and fire from behind trees.

If a squad enteres a town and comes under fire. They must determine where they think the fire is coming from. Then they could start to scan for nearby buildings and start to draw logics on the corners and very quickly make up a custom formation that they can domove and dostop to get behind the best cover.  If all this is made well enough it would not be cumbersome to implement but just an addon or a pack of scripts that are mixed into your missions and you would forget was there after a while.

Of course this will get more realistic gameplay as a result. Also there will be more drawn out firefights with more shots flying through the air if suppresive fire and reaction are in play.

Share this post


Link to post
Share on other sites

Hmmm ... i think there is one big problem: there is no easy way to check if any unit has a clear line of fire. The only useful command we can use is "knowsabout", to my experience, and it has an unpredictable behaviour.

A second big problem is: no command to check is any unit is under fire.

Two big limits ...

Share this post


Link to post
Share on other sites

They will probably require two big workarounds then sad_o.gif

Simple code items at the start can save so much work down the line......

Hopefully something reasonable can be worked out.

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  

×