Jump to content

Autonomous Ground Force Tasking


gromit190

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

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

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

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 2

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

Link to comment
Share on other sites

  • 8 months later...

I got some messages about the list of unit types that was generated in this project.

I couldn't quite remember how I compiled the list but I created a python script that reads all data from the "C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Scripts\Database\db_countries.lua" file. I don't know how useful it may be but anyways I thought I'd share it 🙂

https://github.com/birgersp/dcs-gws/blob/master/unit-types/unit-types-all.txt

  • Thanks 1
Link to comment
Share on other sites

11 hours ago, gromit190 said:

Hey,

Currently not. But coding that feature would be pretty easy, and I seem to remember others have asked for it aswell. Unfortunately I'm struggling to find the time to spend on this project these days. I'll try to see what I can do.

Thank you for the time put into this project. It’s one of the most underrated DCS scripts out there, truly a game changer. 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
On 6/15/2022 at 10:12 PM, Hairdo1-1 said:

Just started using the script, just a few questions

1.) Do I need to use control zones? Can you please explain the purpose of them

Yes, that's the destination assigned to the TF.

On 6/15/2022 at 10:12 PM, Hairdo1-1 said:

2.) What is an intermediate zone?

This  is a funnel or gateway zone that the assets will move through before going to the assigned control zone.

3.What do the following do?

setMaxRouteDistance

Max distance that a group will travel in a single interval.

setAdvancementTimer

Time between advancement or repositions. 

 

You should really read the manual. All this stuff is described in detail inside it.

 

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

  • Recently Browsing   0 members

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