Jump to content

Autonomous Ground Force Tasking


Recommended Posts

On 4/9/2021 at 9:40 PM, gortex said:

@gromit190Please let us know if anything changes.  At some point whatever change they made will push to the stable branch, no?  2.7 is around the corner.

 

 

For those interested, there is something mentioned regarding a "script API" change here:

 

Quote

As of 2.5.6 a new parameter of airborne has been added to the root tasking for a flight. This is so the game knows that the aircraft group you are assigning a bunch of aircraft specific waypoint information is in fact being assigned to an aircraft group. This parameter is required if the group is assigned the task after spawn they are spawned in. This fixes a long standing bug where AI would ignore waypoint information and default to "Fly Over" waypoint type or airport Id if it was different from where it took off from"

 

I would guess the implementation of this (during development, beta versions you know) was the cause of the error. Anyways it should be working now for both stable and open beta.

  • Like 1
Link to comment
Share on other sites

That's great news if 1.18 should work again.  2.7 broke my randomized ground vehicle waypoints with MOOSE, so fingers crossed.

 

--------------

 

Found an old mission with autgft.  It does work again!  Only issue is that the vehicles get stuck in buildings, but that's more of a DCS bug in general.  Will have to use the drive on road thing when I go revise the mission.


Edited by gortex
Link to comment
Share on other sites

So, about driving on roads...  With this the units move:

autogft_Setup:new()
  :addBaseZone("BlueSpawn1")
  :setSpeed( 10 )
  :setAdvancementTimer( 60 )
  :setReinforceTimer( 1800 )
  :addControlZone("BlueZone5")
  :addControlZone("RedZone5")
  :addControlZone("RedSpawn1")

 

But with this they are permanently stuck:

autogft_Setup:new()
  :addBaseZone("BlueSpawn1")
  :startUsingRoads() 
  :setSpeed( 10 )
  :setAdvancementTimer( 60 )
  :setReinforceTimer( 1800 )
  :addControlZone("BlueZone5")
  :addControlZone("RedZone5")
  :addControlZone("RedSpawn1")

 

I tried have the units spawn on a road and not spawning on a road, it makes no difference.  Thanks for your help!

Link to comment
Share on other sites

4 hours ago, gortex said:

So, about driving on roads...  With this the units move:


autogft_Setup:new()
  :addBaseZone("BlueSpawn1")
  :setSpeed( 10 )
  :setAdvancementTimer( 60 )
  :setReinforceTimer( 1800 )
  :addControlZone("BlueZone5")
  :addControlZone("RedZone5")
  :addControlZone("RedSpawn1")

 

But with this they are permanently stuck:


autogft_Setup:new()
  :addBaseZone("BlueSpawn1")
  :startUsingRoads() 
  :setSpeed( 10 )
  :setAdvancementTimer( 60 )
  :setReinforceTimer( 1800 )
  :addControlZone("BlueZone5")
  :addControlZone("RedZone5")
  :addControlZone("RedSpawn1")

 

I tried have the units spawn on a road and not spawning on a road, it makes no difference.  Thanks for your help!

 

I'll take a look 🙂

Link to comment
Share on other sites

Strange thing.  I was testing that out with only one group.  Other units were being spawned with MOOSE.  Autogft didn't like that!  They drive on roads once I make all the units spawn with autogft.

Link to comment
Share on other sites

Since you didn't specify any units, autogft will scan "BlueSpawn1" on mission start to see what units it should be using. if there are no units on mission start (which I guess there aren't since you spawned them perhaps later) then autogft thinks there are no units. Perhaps this is what happened 🙂

Link to comment
Share on other sites

Those units spawned with MOOSE were not in the same zone that was assigned to autogft.  It is a mystery to me.

 

@gromit190With the new polygonal zones we have in 2.7, I am very confident that autogft does not see them.  Instead, autogft just looks at the radius as if it were still a circle.

 

Your script is amazing btw.  It is so much better than anything else out there.

Link to comment
Share on other sites

Posted (edited)

I'm trying to expand the functionality of this script over greater distances.  The longer the distance the more likely that something goes wrong (units get lost in buildings, etc.), so I made a test mission to work out the logic of multiple spawns that turn on and off as units capture or lose zones.

 

I get the "could not determine task force coalition error."  It seems the logic of working this out is more complicated than I expected.  When I figure out a working system I will post it here.

 


Edited by gortex
Link to comment
Share on other sites

Neat, I figured it out.  Definitely have to specify country id to make this work.  This test was made with the persian gulf map.  Just watch from F10 view and speed up the time with ctrl-z.  You'll see the spawn points change as the battle moves back and forth.  It is rigged so that no one wins in the long run.

 

autogft_test.miz

Link to comment
Share on other sites

Great :)

  

On 5/4/2021 at 1:46 AM, gortex said:

@gromit190With the new polygonal zones we have in 2.7, I am very confident that autogft does not see them.  Instead, autogft just looks at the radius as if it were still a circle.

 

This is true. I seem to remember that autogft just uses the origin point of the zone (idk what that would be in a polygon but for circles its the center) and looks at units within the zones radius. Added fixing this to the issue list: https://github.com/birgersp/dcs-autogft/issues/123

 

Also keep in mind its the same when a unit goes to "capture" a zone. It will use the radius.

 

So currently I guess autogft really only has support for circle zones.

Link to comment
Share on other sites

  • 1 month later...

can you expand a little bit more on the Link option?

---
-- Linked bases example
-- Base zone "BASE1" will be linked to the group "BASE1_BUILDINGS"
-- When (if) the units (buildings) in BASE1_BUILDINGS group are destroyed, the base zone "BASE1" will be disabled and units won't spawn there anymore
-- Note that this only applies for the task force/setup where this is enabled. Other task forces/setup will still use the base zone

autogft_Setup:new()
  :addBaseZone("BASE_1")
  :linkBase("BASE_1", "BASE1_BUILDINGS")
  :addControlZone("OBJECTIVE_2")

 

What kind of units do you put in base1_buildings to be destroyed?

 

 

Link to comment
Share on other sites

Gromit starting to work with this again. Question. Will the system pick up units after the mission has started. So for instance if I spawn in units during mission play into the base will they be included in the attack

 

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

Posted (edited)

Hey guys,

 

Sorry for being so afk. Been really busy lately with house remodeling and taking care of my kid.

 

On 6/19/2021 at 5:58 AM, xXMustangXx said:

can you expand a little bit more on the Link option?



---
-- Linked bases example
-- Base zone "BASE1" will be linked to the group "BASE1_BUILDINGS"
-- When (if) the units (buildings) in BASE1_BUILDINGS group are destroyed, the base zone "BASE1" will be disabled and units won't spawn there anymore
-- Note that this only applies for the task force/setup where this is enabled. Other task forces/setup will still use the base zone

autogft_Setup:new()
  :addBaseZone("BASE_1")
  :linkBase("BASE_1", "BASE1_BUILDINGS")
  :addControlZone("OBJECTIVE_2")

 

What kind of units do you put in base1_buildings to be destroyed?

 

 

 

I guess in theory it could be anything, but when testing this I used a couple of buildings.

 

 

On 6/24/2021 at 6:20 AM, gunterlund21 said:

Gromit starting to work with this again. Question. Will the system pick up units after the mission has started. So for instance if I spawn in units during mission play into the base will they be included in the attack

 

 

Short answer: no. Long answer: it depends. Usually (unless you scripted otherwise), "scanUnits" is triggerred on mission start. So only the units that are present when that happens will be used. But for staging, you could send units to the staging area and they will be used if they match the type that is used for reinforcements.

 

 

On 6/24/2021 at 7:11 PM, gunterlund21 said:

Hey Gromit... looks like :setspeed() is being ignored. Have you noticed that?

 

No. Keep in mind that you need to use setSpeed before using addControlZone etc. Maybe you could post your script where the error occurs?

 

 

On 6/25/2021 at 5:56 AM, gunterlund21 said:

Hi Gromit... the function ScanUnits is picking up deactivated units as well. Any way to prevent that?

 

That should be an easy fix. I didn't consider that when I coded scanUnits. Will fix this.


Edited by gromit190
Link to comment
Share on other sites

6 hours ago, gromit190 said:

Hey guys,

 

Sorry for being so afk. Been really busy lately with house remodeling and taking care of my kid.

 

 

I guess in theory it could be anything, but when testing this I used a couple of buildings.

 

 

 

Short answer: no. Long answer: it depends. Usually (unless you scripted otherwise), "scanUnits" is triggerred on mission start. So only the units that are present when that happens will be used. But for staging, you could send units to the staging area and they will be used if they match the type that is used for reinforcements.

Ah so spawn them into the BASEZone correct?

Quote

 

 

 

No. Keep in mind that you need to use setSpeed before using addControlZone etc. Maybe you could post your script where the error occurs?

This worked. Is speed in KM or MPH?

Quote

 

 

 

That should be an easy fix. I didn't consider that when I coded scanUnits. Will fix this.

You da man!!

Quote

 

 


Edited by gunterlund21

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

19 hours ago, gunterlund21 said:

Ah so spawn them into the BASEZone correct?

 

Maybe. Depends what it is that you want to do. You can spawn them in to the base zone later in the mission, to use as reinforcements if you invoked useStaging().

 

Are you using useStaging()?

 

 

19 hours ago, gunterlund21 said:

This worked. Is speed in KM or MPH?

 

I think it is km/h, but honestly I am not sure. It is not converted in my code, so it is the same as it is in the mission editor/DCS internal scripting engine.

Link to comment
Share on other sites

Attached is a version where deactivated units will be ignored.

 

But there's a catch 🙂

 

I've been working on renaming the project and it is easier for me to implement this fix in the renamed project. So to use this version you'll have to change the "autogft" prefix in your script to "gws".

 

 

e.g. you'll need to change your lua mission script from this:

 

autogft_Setup:new()
  :addBaseZone("BLUE_BASE1")
  :addControlZone("CONTROL1")

 

 

To this:

 

gws_Setup:new()
  :addBaseZone("BLUE_BASE1")
  :addControlZone("CONTROL1")

 

gws-1_19.zip

Link to comment
Share on other sites

Gromit I wanted to show you how Im using this awesome script. Ive created a library of routes in my battle area that I can call using Moose Functions. One would look something like this;

 NWRoute = gws_Setup:new()
  :setCountry(country.id.USA)
 -- :addBaseZone("Battlefield Base")
  :setSpeed(10)
  :stopUsingRoads()
  :addControlZone("Dywayminah")
  :addControlZone("Bir Muwaylih")
  :addControlZone("Nasriyeh")
  :addControlZone("Shu ayb Dalaq")
  :addControlZone("Al Dubriyah")
  :addControlZone("Abu Susah")
  :addControlZone("Harmalah")
  :setAdvancementTimer(300)

 

When I spawn in units with the right prefix using the moose warehouse system I can send them on the select route using NWRoute:scanUnits("Co3"). So depending on how the battle progresses I can change the flow on the fly.   Awesome work on this. I Hope you continue to develop it. 

 

  • Thanks 1

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...