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.

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

×