Jump to content
Tankbuster

AI convoy. Best practices?

Recommended Posts

Sorry I didn't realise I linked to a playlist. They're almost all worth a watch though.
I never knew about using layers and the show/hide module either. When I saw that I was like why did I not know this!! It makes ambushes etc so easy. 

I highly recommend his videos, most of them aren't long form like this one (although I wish he'd do more like that) and they often aren't filled with long complicated scripts either.

Really good for teaching new players (and older one too) how to do some pretty cool stuff fairly easily. A++ would pimp out his channel again 

  • Like 1

Share this post


Link to post
Share on other sites

BIS added physx for marketing but forgot that AI also drives vehicles

 

rest is history

  • Like 3

Share this post


Link to post
Share on other sites

I have some convoy success in Arma3, after many attempt.

With same vehicles (1 tank, 2 trucks plenty of units), you can spend hours, ordering vehicles, switching places, depending on what vehicle you placed first to last in editor.., grouped or not...

As rules of thumb:

 

- keep it simple: don't stack plenty of commands by vehicles.

- group them and staggered column. At the end, you'll have to verify the good order in preview. Sometimes it's surprising: some vehicles give way to another one then "shuffle" order...

- For the group, set safe mode, don't mess with other parameters, but driver (each vehicles) disableAI "autocombat"; (gunners can fire)

- limit the speed of the leader: if (isServer) then {leaderVehicle limitSpeed 50}; // and leader only!

- adjust the distance between vehicle: if (isServer) then {secondVehicle setConvoySeparation 20};  // same distance for each following vehicle.

- waypoints "move" as usual.

 

  • Like 2

Share this post


Link to post
Share on other sites

About the order, it's usually descending in ranks, with team leader in front, then sorted by unit rank in descending order.

The thing about limitSpeed is that you'll have to run a control loop to reset the speed limit if the vehicle is too far away from the group, also when mixing different vehicle types they can come to a crawl for whatever reason, most likely depends on the slowest vehicle in the group, same as infantry movement slows down if not every unit is in formation. Can probably override that with setSpeedMode "FULL", didn't invest too much time with this, wanna keep that little sanity I got left.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, Grumpy Old Man said:

About the order, it's usually descending in ranks, with team leader in front, then sorted by unit rank in descending order

I'm not sure if rank affects it.  In Dayz Medic's video he placed the 9 vehicles without grouping.  He then manually grouped each vehicle (as a separate indvidual step) to lead vehicle in the proper order.  And that worked for him (all nine vehicles moved in the proper sequence using Column formation).

 

  • Like 1

Share this post


Link to post
Share on other sites
37 minutes ago, johnnyboy said:

I'm not sure if rank affects it.  In Dayz Medic's video he placed the 9 vehicles without grouping.  He then manually grouped each one to lead vehicle in the proper order.  And that worked for him (all nine vehicles moved in the proper sequence using Column formation).

Just wanted to test this by placing 3 quads on tanoa.

Let's just say the door didn't hit me on my way out.

 

 

Cheers

Share this post


Link to post
Share on other sites
47 minutes ago, Grumpy Old Man said:

Just wanted to test this by placing 3 quads on tanoa.

Let's just say the door didn't hit me on my way out.

Hey Grump, no doubt the AI can be seriously retarded.  I decided to try this too, and show rank not affecting the order of the convoy in a similar test.  And it all worked fine for me.  Note that I didn't use any commands to limitSpeed or anything.  I wonder why AI in your test went full retard...maybe because there were nearby bushes or something...who knows.

 

 

 

Share this post


Link to post
Share on other sites

After watching the video I posted I really think people are trying to make it too complicated.
Just make sure the drivers of the vehicles have autocombat etc disabled and are set to safe (it also helps if you turn off fleeing as well if you wish them to roll through ambushes).
Then as @johnnyboy showed group them in the order that you wish them to travel in. Give the lead vehicle it's waypoints and you should be good to go.

Since I watched the DayZ Medic video I've used this a bunch of times and had no issues, they will drive coast to coast with a single waypoint if you're lucky.
I really believe it's just about turning off as much of the reactive AI for the driver as you can AUTOCOMBAT, COVER, MINEDETECTION etc.

You may only really need to turn off AUTOCOMBAT but it doesn't hurt to be redundant

Share this post


Link to post
Share on other sites
7 minutes ago, JD Wang said:

After watching the video I posted I really think people are trying to make it too complicated.
Just make sure the drivers of the vehicles have autocombat etc disabled and are set to safe (it also helps if you turn off fleeing as well if you wish them to roll through ambushes).
Then as @johnnyboy showed group them in the order that you wish them to travel in. Give the lead vehicle it's waypoints and you should be good to go.

That's what I wrote: https://github.com/Pergor/ADV_MissionTemplate/blob/master/adv_missiontemplate.altis/functions/AI/fn_spawnConvoy.sqf

Works for air vehicles too. All I needed was a convoy of vehicles that transports infantry groups to a specified target and unloads them there. Works pretty well.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
On 18/05/2018 at 4:58 PM, pierremgi said:

I have some convoy success in Arma3, after many attempt.

With same vehicles (1 tank, 2 trucks plenty of units), you can spend hours, ordering vehicles, switching places, depending on what vehicle you placed first to last in editor.., grouped or not...

As rules of thumb:

 

- keep it simple: don't stack plenty of commands by vehicles.

- group them and staggered column. At the end, you'll have to verify the good order in preview. Sometimes it's surprising: some vehicles give way to another one then "shuffle" order...

- For the group, set safe mode, don't mess with other parameters, but driver (each vehicles) disableAI "autocombat"; (gunners can fire)

- limit the speed of the leader: if (isServer) then {leaderVehicle limitSpeed 50}; // and leader only!

- adjust the distance between vehicle: if (isServer) then {secondVehicle setConvoySeparation 20};  // same distance for each following vehicle.

- waypoints "move" as usual.

 

Quick follow up questions, Pierre.
When you say 'group them', can you expand on that. I'm assuming you mean have all the drivers in the same group?

Is the order you add them to the group significant?

Should the driver at the front pf the formation be setleader?

Share this post


Link to post
Share on other sites
9 minutes ago, Tankbuster said:

Quick follow up questions, Pierre.
When you say 'group them', can you expand on that. I'm assuming you mean have all the drivers in the same group?

Is the order you add them to the group significant?

Should the driver at the front pf the formation be setleader?

I posted a video (3 in fact), just here. I group in editor each vehicle on vehicle leader. Nothing difficult. The only remaining group icon is on vehicle leader. If you see the left column in 3den, you can see all units (even pax in HEMTT) are in the same group.

  • Thanks 1

Share this post


Link to post
Share on other sites
2 minutes ago, pierremgi said:

I posted a video (3 in fact), just here. I group in editor each vehicle on vehicle leader. Nothing difficult. The only remaining group icon is on vehicle leader. If you see the left column in 3den, you can see all units (even pax in HEMTT) are in the same group.

I'm doing this in script, not Eden. Does that make any difference?

Share this post


Link to post
Share on other sites

Not tested. Try to join your vehicles in good order, test array or one by one. Then add the waypoints, the speedlimit for leader, the setConvoySeparation for the others.

NB: general remark: If you spawn a group (bis_fnc_spawnGroup), it's preferable to add a little sleep just after, to make sure, all units/vehicles are created and sided.

Share this post


Link to post
Share on other sites

Thanks mate. Good call on the little sleep. I actually have my homecooked fnc_spawngroup that contains the iittle sleep. :)

Share this post


Link to post
Share on other sites
On 20.4.2018 at 9:22 PM, Devastator_cm said:

you can try my convoy script. It was working in the past and I think it still does (as nobody reported issue in its thread)

 

I can confirm that. I use the script and it does a good job.

Share this post


Link to post
Share on other sites
47 minutes ago, Undeceived said:

 

I can confirm that. I use the script and it does a good job.

I use it too.

It worked, but I want to isolate what is causing the strange stuff that I see that may or may not be caused by that script so I want an alternative to gauge it against.

  • Like 1

Share this post


Link to post
Share on other sites

@pierremgi, I've taken your advice and it's working well. Devas's stuff had features I didn't want and it was always going to be quicker to make from scratch rather than edit existing code and risk FUBARing it in the process. One question, Ifrits as lead vehicles don't do anything, they just sit there. Have you observed this too?

 

edit: In fact Ifrits and Marids refuse to convoy, they just don't drive and the rest of the convoy leaves them behind. Qilins work just fine.

Share this post


Link to post
Share on other sites

Oh forgot to mention, since 1.84, bridge driving has been greatly improved. They will drive over the Harcourt bridge now!

 

They'll still drive up forest footpaths though.

 

3335B595998A43EA0BCF239A5EF616D711A7F9AA

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
On 04/08/2018 at 2:31 AM, Tankbuster said:

@pierremgi, I've taken your advice and it's working well. Devas's stuff had features I didn't want and it was always going to be quicker to make from scratch rather than edit existing code and risk FUBARing it in the process. One question, Ifrits as lead vehicles don't do anything, they just sit there. Have you observed this too?

 

edit: In fact Ifrits and Marids refuse to convoy, they just don't drive and the rest of the convoy leaves them behind. Qilins work just fine.

 

There is no reason for IFRITs and MARIDs failure. This works fine for me on vanilla. I made a quilin + ifrit (non armed) + tempest + marid convoy without trouble;

The only thing I can suggest you is to remake your group. I mean disgroup all vehicles then group them again in good order. Then verify each of them has the init code for separation (and the limitSpeed for leader). You'd probably have to check also the behavior, column,speed on group icon.

 

I remarked the BI editor (3den) can generate such issue when you alter something in group composition, behavior,etc. This is not a specific problem for the group. You can have failure also for support modules (artillery not firing anymore) . I remarked this issue since 3den with the class entities + attributes in mission.sqm. The only way to make things go well is to delete, remake the support module and all the links, (with no change at all), just a manipulation question. Don't ask me why. I hope this could help.

  • Thanks 1

Share this post


Link to post
Share on other sites

Right OK. Bearing in mind this is all done in code rather than in the editor, I'll have to have a think about how to do this. At the moment, they are put in the group as they are created, so I think I'll create the vehicle then group them later on.

But this doesn't shed any light on why the Marid and the Ifrits misbehave, while the Qilin works perfectly. There is an array of escort vehicle (Ifrits, Marids and Qilins) and these are chosen at random to be the first and last vehicles in the convoy, so they are create, grouped and set up in exactly the same way. The only difference is that the Qilins drive in the convoy, the Marid's don't.

Further info, if I watch them using spectator, I can hear the Marid driver getting his group waypoint, but he ignores it.

Share this post


Link to post
Share on other sites

Do you have any mission file or process to reproduce that? Map and coord of marker/trigger... Perhaps something to change in the spawn code, especially if you shuffle the group. Not sure I can help but let's try.

Share this post


Link to post
Share on other sites

Thanks for the help, mate, I really appreciate it it. I'm going to rewrite the script and jiggle the order it does the stuff around a bit to see if we can shake the marids lose.

Share this post


Link to post
Share on other sites

Lots of good stuff in DayZ Medic's video regarding the behaviour settings, what I also use for convoys is "forcefollowroad" and "setConvoySeparation". Used to work really well and I got "clean" convoys. Anyone just placing 4 vehicles, grouping them and sending them off is setting them up to fail. They still need lots of fine tuning.

  • Like 1

Share this post


Link to post
Share on other sites
On 04/08/2018 at 1:31 PM, Tankbuster said:

 In fact Ifrits and Marids refuse to convoy, they just don't drive and the rest of the convoy leaves them behind. Qilins work just fine.

3

I think I've got to the bottom of this one.

 

In the absence of a commander, Qilins are commanded by their drivers, but Ifrits and Marids are commanded by their gunners. So adding the gunners of these vehicles to the driver group makes them work. Yey.

Share this post


Link to post
Share on other sites
6 minutes ago, Tankbuster said:

I think I've got to the bottom of this one.

 

In the absence of a commander, Qilins are commanded by their drivers, but Ifrits and Marids are commanded by their gunners. So adding the gunners of these vehicles to the driver group makes them work. Yey.

hmm.... not sure that's a general consideration. for two reasons:

- it's easy to do a working convoy, from the editor, with any of these vehicles, without adding or deleting any crew member. Just group vehicles (not drivers), one by one and use the column, limitspeed and setConvoySeparation stuff (as already described);

- there is always an effective commander in vehicle, so no matter if he is driver or gunner or commander.

 

Difficult to say more without your context (3den or script). If you have a simple way to reproduce the way that failed...

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

×