Jump to content
klamacz

AI Driving - Feedback topic

Recommended Posts

When toying around with

setDriveOnPath

 and custom convoy behaviour I discovered `setDriveOnPath` not working with vehicles having one or more turrets (APC/tanks).

 

Then found out somehow the driver was interrupted by his superiors. Fixed by letting gunner and commander join drivers group 👌

Share this post


Link to post
Share on other sites

Could you elaborate a bit on your findings on this variable? Does it help against breaking up of convoys? I have stopped using clnvoys since sooner or later they always break up because at least one vehicle simply stops following, making all succeding vehicles stop also. Setdriveonpath help with this?

Share this post


Link to post
Share on other sites
On 3/1/2019 at 8:04 AM, xon2 said:

Could you elaborate a bit on your findings on this variable? Does it help against breaking up of convoys? I have stopped using clnvoys since sooner or later they always break up because at least one vehicle simply stops following, making all succeding vehicles stop also. Setdriveonpath help with this?

 

Its no magic bullet in any way.

 

setDriveOnPath lets the vehicle follow a path pretty accurately but disables every path planning. You would need to either script that for the leading vehicle or e.g. drive the first vehicle yourself as Zeus. Also it only works for one vehicle out of the box, not for a group.

 

What I am currently working on is a Convoy Script in which every vehicle drops its own path as "breadcrumbs" which are consumed by the following vehicles with setDriveOnPath and some additional distance checks to speed up/slow down the individual vehicles. @mcdiod did most of the work actually, I merely added more data points and tweaks.

 

Works quite okay so far, still some inaccuracies with many vehicles and/or many road windings. Having an index of the currently consumed index of setDriveOnPath would help tremendously as I could just use the original path for *every* vehicle, eliminating inaccuracies. But alas there is no such command.

 

But for your initial question: Yes, as no path planning is involved, no vehicle will stop for whatever reason. Quite the contrary, they will drive to whereever the path leads them to, even rumbling over rocks if necessary.

 

Edit: Still having problems with tracked vehicles. They seem to have significantly more problems with limitSpeed, breaking off the path and sometimes driving completely off into the wilderness. No clue.

Share this post


Link to post
Share on other sites

Sounds interesting. Be sure to keep us in the loop on your findings...maybe a video once you are happy with a certain procedure or setup. Cheers

Share this post


Link to post
Share on other sites
On 3/1/2019 at 4:34 PM, nomisum said:

 

Its no magic bullet in any way.

 

setDriveOnPath lets the vehicle follow a path pretty accurately but disables every path planning. You would need to either script that for the leading vehicle or e.g. drive the first vehicle yourself as Zeus. Also it only works for one vehicle out of the box, not for a group.

 

What I am currently working on is a Convoy Script in which every vehicle drops its own path as "breadcrumbs" which are consumed by the following vehicles with setDriveOnPath and some additional distance checks to speed up/slow down the individual vehicles. @mcdiod did most of the work actually, I merely added more data points and tweaks.

 

Works quite okay so far, still some inaccuracies with many vehicles and/or many road windings. Having an index of the currently consumed index of setDriveOnPath would help tremendously as I could just use the original path for *every* vehicle, eliminating inaccuracies. But alas there is no such command.

 

But for your initial question: Yes, as no path planning is involved, no vehicle will stop for whatever reason. Quite the contrary, they will drive to whereever the path leads them to, even rumbling over rocks if necessary.

 

Edit: Still having problems with tracked vehicles. They seem to have significantly more problems with limitSpeed, breaking off the path and sometimes driving completely off into the wilderness. No clue.

I'm watching your progress with interest having done and wasted a lot of effort on this.

You've already found that some vehicles are commanded by their gunner, not the driver. This, and other stuff covered in my thread linked below.

 

Share this post


Link to post
Share on other sites

wait...since BIS is not able to roll out a proper AI driving (and hence no proper convoy handling) nomisum is scripting his own convoy handling as workaround?

How would that cure that the leading vehicle is still under control of an incapable AI?

 

Watching to an Ifrit in an CTI with vanilla units last week told me that the progress by BIS in terms of AI driving skills is zero.

 

I ordered an Ifrit to my position over aprox. 4km.

It managed to reach my pos, but when crossing a field it made some crazy left-right swings like the driver tries to get with full speed through a bunch of cows.

Then, the driver managed the one and only rock within 200m to do the usual wheel damage.

 

Still the same issues:

 

- crazy, unpredictable erratic AI driver moves that cannot explained by any obstacle

- "blindness" of AI for real obstacles, or they simply ignore them

 

So IMHO it is not so much the general "strategic" path planning between A and B, it is rather the AI habbit at close range.

 

It is by all means broken. Still.

Share this post


Link to post
Share on other sites
2 hours ago, The Man Without Qualities said:

 

How would that cure that the leading vehicle is still under control of an incapable AI?

 

Its not. But in some cases a predefined path is sufficient for the mission builder and all that is necessary for the vehicles is to drive and not hit a tree, get stuck or swerve off the road. I'm not aiming for ultra dynamic behaviour.

Share this post


Link to post
Share on other sites
On 3/1/2019 at 5:34 PM, nomisum said:

setDriveOnPath lets the vehicle follow a path pretty accurately but disables every path planning. 

 

 

Is it possible to use this approach with a system that detects road objects within a certain radius or box trigger(s). The road object positions (with a certain offset?) could be fed into setDriveOnPath creating a reliable convoy route?

Share this post


Link to post
Share on other sites

Of course it is. It's called 'Driving AI'. That's what Arma is supposed to be doing internally. xD

Share this post


Link to post
Share on other sites
On 3/14/2019 at 10:56 AM, joostsidy said:

 

Is it possible to use this approach with a system that detects road objects within a certain radius or box trigger(s). The road object positions (with a certain offset?) could be fed into setDriveOnPath creating a reliable convoy route?

 

Its certainly possible. You probably would need to implement some sort of pathfinding algorithm together with a loop to also detect stuff moving dynamically on the road.

 

I'm not sure if I will ever tackle this. My use case is limited to a mission with very specific constraints and I lack the time to make it more dynamic properly.

  • Like 1

Share this post


Link to post
Share on other sites
36 minutes ago, nomisum said:

 

Its certainly possible.

Maybe I'll give it a go. I have a personal rule that I only write one or two page scripts for this game. Going further often leads to a time-sinking rabbit hole with disappointment in the end. Learned the hard way 😆

 

So definitely not a dynamic convoy system for me with obstacle scanning etc. But I'm interested in let's say marking an (empty) route with a couple of triggers, feeding that into a script that makes a convoy drive *guaranteed* to its destination without any stops, swerving, turning back, bridge evasion etc.

 

I often use partial dynamics in my mission. I would probably map out two or three of these routes, one of which will be chosen randomly or based on mission events for each time you play the mission.

  • Haha 1

Share this post


Link to post
Share on other sites

Like @The Man Without Qualities said zero progress is zero. Replayed my old missions last weekend, convoy of 4 Striders with column and safe behaviour and me as convoy leader the 3th vehicle stopped randomly,had to order it multiple times to rejoin on the whole trip. After this the 4th one also decided to stop.

Reached the airfield where I wanted to speed through for a fast raid the 3th and 4th Striders went Nope and turned opposite direction after I ordered them into aware and line formation(was quite funny actually).

Surprisingly after trying a few times the raid was quite successful after keeping them on column, we killed the infantry and the Striders followed me with high speed on the airstrip.

 

On mod maps like Sahrani from CUP the situation is even worse, a convoy synced to a trigger where Ind is detected in area and will start moving didn't started at all on a few replays.

 

Another scenario where a mixed group of tanks and ifvs was about to head to my position after I eliminated an outpost didn't arrived at all. I used Zeus to see wtf is going on and noticed the ifvs didn't moved at all because the two tanks were stuck at some trees way behind(they decided to go straight into a forest to get to me).

Replay again and this time I went to see exactly what they were doing after I immediately cleared the outpost only to see the ifvs heading towards me while the tanks going opposite direction like with my previous Striders scenario. I had to ungroup/regroup the two tanks to the ifvs to follow them.

I see random crap like this all the time now since I stopped playing mp a while ago and only screw around with the editor. Anyway nothing will change because we're talking about a dead game regarding AI(not that I have hopes for A4).

  • Like 2

Share this post


Link to post
Share on other sites

It is disgusting. I've posted my frustration in the Tank Driving section. 

  • Like 2

Share this post


Link to post
Share on other sites

This is top of my frustrations with this game and it makes me seriously consider further purchases in the series. The fact that this thread was started by a developer and is now apparently utterly ignored just makes it worse.

  • Like 1

Share this post


Link to post
Share on other sites

Same for me. This is the major gripe that keeps me holding off from buying the dlc bundle 2 if not steeply discounted. Essentially, we have bought a lot of assets which we cannot properly use outside PVP and or the mosst basic PvE scenarios. Arma 3 has so much potential, all being wasted because those driving and flying mechanics are broken. And when i think about the jets dlc, which i was so excited about to pre-purchase, and still being baffeld that helo-ai can not properly land on the carrier, nor that you can make ai fixed wings takeoff, not even in Eden...i just feel seriously short-changed. I think most of us understand that there are limits as to what the legacy engine can be made to do...but selling dlc and asset pack after asset pack without basic ai vehicle handling mechanics, thats beyknd my good will. I fear the worst for the potentially cmoning 3rd party dlcs.

  • Like 2

Share this post


Link to post
Share on other sites
15 hours ago, kremator said:

It is disgusting. I've posted my frustration in the Tank Driving section. 

 

ditto

  • Like 1

Share this post


Link to post
Share on other sites

Convoy rules:

- group each vehicle by each, in the same order of convoy;

- set staggered column;

- set all drivers in safe mode and no possibility to switch in combat one:

   {driver _x setBehaviour "Safe"; driver _x disableAi "autoCombat"} forEach <arrayOfVehiclesInConvoy>

   or, alternate solution:

    this forceFollowRoad true; on each vehicle, if this copes with your goal.

- add on each init field (or for each vehicle):  this setConvoySeparation 20;

- add on leader vehicle (so at head of convoy): this limitSpeed 40;

 

Figures can be modified a bit.

Forget useless intermediate waypoints! If you can define the destination as unique waypoint it's fine. For patrol cycle, just place the less waypoints as possible. On the other hand, you'll see the convoy starts lately, after calculation for best paths.

For trees, rocks or else, there is no solution but defining a clear path, hiding them in editor, or scripting for hiding, on the fly, the nearest object(s) while speed fall to zero.

 

PS: I succeeded in melted convoys  helo + vehicles. The convoy separation mut be a little bit wider for helo.

 

That's not an argue to say AI drive is fine! It's definitely not. But that can help for those who are still trying to do something with that.

  • Like 3
  • Thanks 2

Share this post


Link to post
Share on other sites

And with all those script commands in place, do you experience zero convoy breakups? Thats the most fruatrating thing overall...and playing with some, but not all of your mentioned script commands, did not fix the breakup problem for me.

Share this post


Link to post
Share on other sites
1 hour ago, xon2 said:

And with all those script commands in place, do you experience zero convoy breakups? Thats the most fruatrating thing overall...and playing with some, but not all of your mentioned script commands, did not fix the breakup problem for me.

If these script commands are effective in reducing or even eliminating convoy congestion and/or accidents, how feasible would it be to convert this script into an auto-executing mod that is triggered whenever the AI tries to drive somewhere?

Share this post


Link to post
Share on other sites

PierreMGI's script suggestions are a good start. Given a sensibly chosen start and end point, you can expect a small convoy, <5 vehicles, make the journey successfully

My convoys rarely break up, even the larger ones with dynamic start and end points. With good luck and a following wind, I can get a ten vehicle convoy across the island with better than 80% reliability. Sometimes, you just have to be patient. I've seen vehicles get themselves into a terrible mess on a route, but given time they will usually sort themselves out and get going again.

There are 4 main problems;

On Tanoa, vehicles route themselves up forest tracks.

At crossroads and junctions, especially where the best route is to ignore the side roads and continue on, the vehicles seem to leave the road and go onto the side roads for just a few metres before going back onto the road they should have been on. 

The vehicles seem to use roadsConnectedTo, or an engine embedded version of that command and some of these are broken. Almost all the broken ones are on bridges, which is why some are impassable to AI.

Vehicles crash into each other and objects they really ought to be able to sense and avoid.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

this forceFollowRoad true;  for me this causes AI to get stuck on most tight corners they just rock back and fourth.

 

Also Doesn't setting the driver to "safe" change the other units to "safe" as well?

 

If you take them out of the group then the driver just stops.

 

 

 

Share this post


Link to post
Share on other sites

Sadly even with fewer waypoints if I have a convoy with a cycle wp I have to brace myself for a shitstorm once/if they reach their last wp and return. Usually the first vehicle tries the usual behavior of trying to avoid "but screw it", and smashes into the second one once they turn around for the return trip.

If it manages to avoid it then there are high chances it will crash into the next one or secondary crashing into the third that also tries to turn around, and so on.

I even gave them enough empty space to manoeuvre where the last wp is before returning. I think they gave us Zeus just to use the vehicles as statics with AI gunners for the amount of babysitting I do.

Share this post


Link to post
Share on other sites

The point is that we should NOT have to piss about with babysitting convoys! 

 

The issue is 'splendid' AI DRIVING!

 

 

  • Like 2

Share this post


Link to post
Share on other sites

AI driving is vastly improved with the latest VCOM AI release. It has a totally separate driving module, so you can just turn that on if desired. and it has a great debug mode where you can see how it's navigating around obstructions.

 

Good video of the developer working on mod

Share this post


Link to post
Share on other sites

Question is: is VCOM AI only for SP/MP with just a few units moved by VCOM or would it work on a CTI with 200-300 units too without further performance issues?

I am also not so familiar with the unit/vehicle related preferences when it comes to terrain utilization.

 

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

×