Jump to content
Sign in to follow this  
jmdecc

AI Workarounds

Recommended Posts

I'm curious if anyone has any tips on working around the AI combat modes, specifically AI in your squad going into (and staying in) Combat mode.

Here is an example:

1. Player moves his squad into open field

2. Player and squad come into contact with equally sized enemy force hiding behind cover on the opposite side of the field

3. AI drop into combat mode despite Squad/Team Leader setting them to Aware, pretty much refuse to make any kind of great movements and just engage

4. AI often die or get left behind depending on player choice because of their refusal to move more than a few feet at a time

This is just a basic rundown of many scenarios I find myself in with the AI. Replace open field with woods, hills, etc. and the problem persists. Sometimes something as simple as an enemy jet flying overhead triggers the AI into combat mode and your pretty much stuck moving as fast as a snail until they snap out of it. The AI more or less refuse to move until the threat has been eliminated, and sometimes they have difficulty even when they threat is gone. It makes it nearly impossible to either tactically direct your squad to better fighting positions or get them to bypass the enemies by moving past them. In your normal shoot-em-up style scenarios this isn't a huge deal, but if you are participating in an objective based mission and your objective is more important than how many people you kill, it makes progressing/completing the mission difficult. Ideally, if AI would remain in the Aware state unless directly ordered into Combat mode, things would go much more smoothly. But even if you order your troops to relax or aware they refuse to listen as long as they believe there to be enemies nearby.

So my question is: Does anyone have any tips or tricks on how to deal with this problem? Are there any tips or tricks with orders, maybe some kind of coding, or perhaps even a mod available to work around this? Or are we stuck?

Share this post


Link to post
Share on other sites

Currently, there's no mods that improve AI pathfinding and their alert behavior, plus improve commanding responsiveness... Unless I've missed something. :D

Share this post


Link to post
Share on other sites

The general tip is: never try to command AI directly. ;) Issue an order to the fireteam/squad and let them handle it on their own, don't interfere.

The infantry AI itself is fine (for a game): it behaves realistically and in the same time can, in most cases, do what it has been told to do, given that the order was reasonable. The problems begin when human replaces AI commander — mostly because there's is no way for both sides to reliably communicate with eachother. You have no means to tell AI what exactly you want it to do and, on the other hand, AI can't tell you what's the problem. But an AI can 'communicate' and command itself almost perfectly. So when you need to command an AI, treat it as a separate unit under your command — set a task for it but don't bother with execution details, let AI prove that he is indeed an AI (even though somewhat dumb :) ), not just a 3D model that should be moved by player.

Also keep in mind that AI is just a simple algorithm that can't understand concepts like 'cover', 'maneuver' or 'tactical objective', and, unless mission maker said otherwise, AI will always use a basic foolproof routine that allows it to react to the changing environment but never is the best choice in any situation. Sometimes they will fail miserably but I'm afraid that's the best we can have in a highly dynamic sandbox until the advent of some groundbreaking AI technology. On the bright side, BI promised some improvements concerning AI cover-taking and spotting abilities at least on upcoming Tanoa terrain so things will improve in the future.

Ideally, if AI would remain in the Aware state unless directly ordered into Combat mode
I don't think that AI behaviour works that way. Basically, Aware state allows AI to get ready to fight but when the actual fighting begins there is no point in remaining aware anymore. Edited by Semiconductor

Share this post


Link to post
Share on other sites

See if there is anything on my AI Compilation list that could help you with your missions:

http://forums.bistudio.com/showthread.php?175400-AI-Compilation-List-of-Addons-Mods-Scripts-amp-Misc&p=2656299#post2656299

One suggestion would be in the Mission Editing & Scripting part of the list, also dont for get page too (link at top of page).

Share this post


Link to post
Share on other sites

Devs have recently mentioned there is still a nasty bug with AI movement when in Danger/Auto Danger.

The problem you speak of above OP is a serious one and literally holds back the series from being merely very good to fucking awesome. An AI that could be dictated to 'just run' by both player SL and AI would finally open up the series to a myriad of tactical possibilities.

Share this post


Link to post
Share on other sites
1. Player moves his squad into open field

Maybe don't put them in such situation :P I wouldn't want to move either.

Share this post


Link to post
Share on other sites

there are several things that people tried that may or may not still work. just reciting from my clouded memory here and only script stuff but maybe it helps.

first of all there is a command to get the unit you have currently selected in your squad command menu. i can't remember it right now though. maybe someone can help out. i'll update this post if i remember/find it.

EDIT: https://community.bistudio.com/wiki/groupSelectedUnits there it is. shout out to DasAttorney for being a walking encyclopedia ;)

https://community.bistudio.com/wiki/disableAI

https://community.bistudio.com/wiki/enableAI

in addition...

https://community.bistudio.com/wiki/joinSilent

https://community.bistudio.com/wiki/createGroup

the general idea would be logging a unit out of your group and then issueing the move command using...

https://community.bistudio.com/wiki/doMove

or similar (always scroll down to the "see also" section on those wiki pages to get additional similar commands).

and then logging the unit back into your group. grouplink had such a feature. it was called "force move". i think the last grouplink was ported to arma 3. no idea if that specific feature survived the port though. but certainly worth a try if you are looking for a plug and play option.

a concept i personally had on my mind for a long time but never got to actually testing was, just for your own squad and just when you command it, to have each squad member in its own group and basically create your own virtual group system (an array with info that you work with) so you could use the above script stuff to take care of movement and cover stuff yourself with your own functions.

that would be a bigger effort though since you'd probably need to do some UI stuff too. at least the way i imagine it ;)

anyways..blablabla..hopefully something useful for you. good luck.

Edited by Bad Benson

Share this post


Link to post
Share on other sites

As you can see from the above posts: no easy solution. And I feel that some people misunderstood the OP a little bit. He's not expecting advanced tactical behaviour from the unit, It's just that you have a destination to reach, maybe under light fire and your task is to move at speed. That AI should follow you (squadleader) at speed if the need arises. Currently, even one enemy soldier can delay several squads by taking pot-shots from hundreds of meters, because the squads turn to combat mode and slow down. Not only leads this to very boring long mission progression, but in RL you could be fucked up by incoming mortars or reinforcements on your location because the squads are not moving. This is basic infantry movement 101. Please, please please fix this BIS.

Share this post


Link to post
Share on other sites

^ jootSidy completely understood what I guess I failed to convey.

I was just looking for a way to simply get AI to actually move when they come under contact instead of dropping down and going snail speed. During large firefights this works great, but again like jootSidy said, it is incredibly frustrating when one guy from forever away is just popping shots off at you. You can't even properly react to contact in most cases when a situation like that is happening. The AI will drop down exactly where they're standing and this doesn't do much good because you can't assign them orders to quickly move behind cover, or move behind a building etc.

I think ideally what might work best is if the AI worked they way they do now when they are under AI control. But when they are under human control you should be able to automatically force them out of Combat mode and back into Aware mode. If you don't understand what I mean, go into the editor and get into a firefight where your AI squad goes into Combat mode. You can use your SL position to order them to relax, be aware, whatever and they absolutely will not respond to that. They continue to remain in combat mode no matter what you do, and it makes large movements nearly impossible. Want to flank a position? Lol, good luck...

Sometimes during a shootout it would be beneficial to manually order your soldiers back into aware mode so they run to whatever position you order them to, or to whatever position you want them to follow you to, instead of them slowly bounding (if you even can call it that in some cases).

Share this post


Link to post
Share on other sites

An idea: if you want units only to run from A to B as fast as possible without stopping etc., if they're in an open field, you can simply loop a running anim on them. Though, this

requires lots of experimenting to achieve a satisfying result.

Share this post


Link to post
Share on other sites

I think the OP is looking for an in-game solution, not a scripted/modded one.

One "quirk" of the AI is that they make impromptu "teams" when you issue one order to multiple units at once. They cover each other when moving, everyone slows down for the slowest unit to catch up, etc. But, if you issue a move order to #2, then issue another move order to #3, then another to #4, you're effectively telling each unit to move there on its own. This little change makes them behave differently (a bit more rash/suicidal?) from if you selected #2, #3, and #4 together and then gave them a single order. It might take an extra moment on your end, but it might force the AI to move like you want them to.

Additionally, I stand with Semiconductor on how to order the AI. Normally, I split my 8-unit squad into 2 teams: left and right. Left stays with me, and I tell Right to Flank Right once, getting them away from my team so we don't get stuck in the same cover. From there I let them go, usually setting line formation. If I need them to kill something right now, I'll order the entire team to attack a target, otherwise I let them return fire on their own. Unfortunately, I think many people are of the mindset that your entire squad will/must survive every engagement with the enemy. Although the majority of combat casualties today come from IEDs, the very few from enemy fire are against minimally-trained guerrillas who don't aim when shooting. Against a skilled opposing force of near-equal numbers, I expect to lose at least two or three AI per firefight unless I'm set up to wipe them out in the open.

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  

×