Jump to content

Autonomous CAP and GCI AI fighter script


Recommended Posts

  • 3 weeks later...
  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

How to make CAP flights and GCI flights use set pool of callsigns so they do not steal it from other flights?

 

F.e.

Blue, Enfield 91 to 99

Red, 991 to 999

51PVO Founding member (DEC2007-)

100KIAP Founding member (DEC2018-)

 

:: Shaman aka [100☭] Shamansky

tail# 44 or 444

[sIGPIC][/sIGPIC] 100KIAP Regiment Early Warning & Control officer

Link to comment
Share on other sites

How to make CAP flights and GCI flights use set pool of callsigns so they do not steal it from other flights?

 

F.e.

Blue, Enfield 91 to 99

Red, 991 to 999

 

http://wiki.hoggit.us/view/DCS_command_setCallsign

 

You can't change the 2nd digit for the US callsigns via script as that is associated with the flight member. Alternatively when each unit is spawned there is a callsign variable just like in the mission file that you can change as desired so the group spawns with callsigns already defined.

The right man in the wrong place makes all the difference in the world.

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

That would actually make it really easy for lukrop to add as he could just have a few more user set variables in the script which are used later for CAPs and GCIs. Kind of like reserved callsigns. The script already is setting the bort number of each unit.


Edited by Stonehouse
spelling
Link to comment
Share on other sites

Is it possible to use the script in one of my missions only for one side (red), as long as blue side players are all clients.

 

How can I deactivate blue side GCI and CAP in script.

My Hardware: Z390 AORUS Master - Intel 8700K 3.7 GHz @ 4.9 ghz (Delid Copper IHS) - G.SKILL 32GB DDR4 3200 (14-14-14-34 CL) - GigaByte 2080ti OC 11gb - 2 EVO Nvme 500GB - Virpil Warbird Base T-50CM2 and TM Throttle + Trackhat + G25 + AOC AG271QG 27"

 

My Modules: JF-17, F-16C, AV-8N/A, F-18C, ASJ37, MiG-15Bis, MiG-21Bis, Fw-190D, Bf-109K, P-51D, F-86F, Ka-50, UH-1H, Mi-8MTV2, NS430, FC3, A-10C, Mirage 2000C, L-39, F-5E-3, SA342, Spitfire.

 

My Maps: Nevada, Normandy, Persian Gulf, Syria.

Link to comment
Share on other sites

Set the appropriate variables to false in the script

 

--- Enable/disable red CAP flights.

gcicap.red.cap.enabled = true

--- Enable/disable blue CAP flights.

gcicap.blue.cap.enabled = true

--- Enable/disable red GCI flights.

gcicap.red.gci.enabled = true

--- Enable/disable blue GCI flights.

gcicap.blue.gci.enabled = true

 

Is it possible to use the script in one of my missions only for one side (red), as long as blue side players are all clients.

 

How can I deactivate blue side GCI and CAP in script.

Link to comment
Share on other sites

Many Thanks

My Hardware: Z390 AORUS Master - Intel 8700K 3.7 GHz @ 4.9 ghz (Delid Copper IHS) - G.SKILL 32GB DDR4 3200 (14-14-14-34 CL) - GigaByte 2080ti OC 11gb - 2 EVO Nvme 500GB - Virpil Warbird Base T-50CM2 and TM Throttle + Trackhat + G25 + AOC AG271QG 27"

 

My Modules: JF-17, F-16C, AV-8N/A, F-18C, ASJ37, MiG-15Bis, MiG-21Bis, Fw-190D, Bf-109K, P-51D, F-86F, Ka-50, UH-1H, Mi-8MTV2, NS430, FC3, A-10C, Mirage 2000C, L-39, F-5E-3, SA342, Spitfire.

 

My Maps: Nevada, Normandy, Persian Gulf, Syria.

Link to comment
Share on other sites

Hi all, thanks for the work on this script - it'll make creating some background activity much easier! :) I'm running into a couple strange problems though - DCS 1.5, latest GCICAP from github and MIST 4.2.66. Everything seems to be working mostly correctly, except for these two things:

 

1. When one unit from a GCI or CAP mission lands or is otherwise cleaned up, the whole group is deleted even if its still in the air. I think I fixed this, by deleting the unit if the group count > 1, otherwise deleting the group (in clearApron and airfieldwreckagecleanup). I also modified arrivaltableINT so that it always adds the landing aircraft to landedaircraftsING.

 

This seems to be working as expected, but I suspect there's something more I need to account for there so I'm including it in case someone knows that I'm going to run into a problem this way. :)

 

2. I set up a simple mission, with borders. My CAP flights launch for red & blue and patrol the CAP zones (though it does not distribute them evenly all of the time).

 

If I then send a C130 across the border to orbit a EWR at Sochi, Red will start to send one of the CAP flights. It will get part-way there, then turn around and RTB.

 

Then it will launch a GCI flight, which will also start heading for the C130 and then RTB. Then it seems to spam a bunch of GCI flights, well over the limit and even though taskinginterval is 1800.

 

#2 happens even with a completely stock GCICAP lua file from github.

 

[Edit] I just noticed it's using timer.scheduleFunction and not mist.scheduleFunction so my original thought is definitely not true.

 

Anyway, nothing I do seems to change the behavior so I'm hoping someone has an idea :)


Edited by cameroon
Link to comment
Share on other sites

Well nevermind to the original question, just realized the lukrop's rewrite is basically what I was looking for ;) Wish I'd seen that first, spent some time starting my own rewrite, hah!

 

Though now I've got a different problem. The CAP flight is vectored to my C130, but does crazy acrobatics along the way and doesn't seem to want to engage.

 

I'll keep messing around with it, I'm probably missing something simple.

Link to comment
Share on other sites

Is there a way to attach the CAPzone to a moving trigger (or move a trigger zone physically) because 'unit inside moving zone' moving trigger type does not work, the trigger zone stays where it was initially placed, regardless of the unit zone reference?

 

I'm looking for ways to dynamically alter the CAP zone mid mission.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

@cameroon:

 

The latest release version has a bug, which makes scripted ground AI pretty much useless. Maybe this also affects air AI units. I would not be surprised. Ground AI do not move anymore after spawning, do not attack, nor do they take any new tasks, which worked in DCS release version prior to the latest patch. Did not test this with air groups, but what you describe, it appears so.

 

@Pikey:

 

You could regularly get the position of a certain unit or an waypoint and set the center of the CAPzone to this coordinate.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Hi Snafu, I tried exactly that, but its the "setitng the center of the CAPzone" that I cannot do, i was using the inbuilt unit in moving zone to do that, but the flights head to the zones first location even after a few hours.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

@Custard, you should really be using Lukrop's version and test missions these days as my last version had issues and was back in Nov 2015 and quite a few patches ago. The most common reason for lack of spawning or some aircraft spawning and then stopping is the unit name being incorrect on the template aircraft. You must get this part right (and make sure there are not leading or trailing blanks accidently introduced by hitting the space bar by mistake) for it to work. If you check that and don't find an issue then report back and we can see what we can do.

 

Cheers,

Stonehouse

Link to comment
Share on other sites

I am trying to call GCICAP function from the ME Action DoScript as follows:

gcicap.spawnFighterGroup('red', 'Aggressor1',1, 'Beslan','air', 'CAP',false)

 

I am getting an error to do with the Airbase (Beslan). Beslan is red and I have placed a zone over Beslan named 'Beslan'. Can anyone see any error in my call?

klem

56 RAF 'Firebirds'

ASUS ROG Strix Z390-F mobo, i7 8086A @ 5.0 GHz with Corsair H115i watercooling, Gigabyte 2080Ti GAMING OC 11Gb GPU , 32Gb DDR4 RAM, 500Gb and 256Gb SSD SATA III 6Gb/s + 2TB , Pimax 8k Plus VR, TM Warthog Throttle, TM F18 Grip on Virpil WarBRD base, Windows 10 Home 64bit

Link to comment
Share on other sites

Not sure why you are trying to call a function outside the script as it was not designed for you to do that but possibly it is looking for the airbase id not the name? Posting the error details might help people help you.

 

Thanks Stonehouse. That put me on the trail. I am just being opportunistic btw.:)

 

EDIT: forget all that, I just found out my GCICAP file is not the same as the latest!


Edited by klem
Bad file

klem

56 RAF 'Firebirds'

ASUS ROG Strix Z390-F mobo, i7 8086A @ 5.0 GHz with Corsair H115i watercooling, Gigabyte 2080Ti GAMING OC 11Gb GPU , 32Gb DDR4 RAM, 500Gb and 256Gb SSD SATA III 6Gb/s + 2TB , Pimax 8k Plus VR, TM Warthog Throttle, TM F18 Grip on Virpil WarBRD base, Windows 10 Home 64bit

Link to comment
Share on other sites

Hi started using this with MOOST and MIST..

 

Followed your tutorial, tried.. I got script hung.

Re did everything again then got this:

00322.586 INFO SCRIPTING: Mist version 3.3.22 loaded.

00322.591 ERROR DCS: Mission script error: : [string "C:\Users\Julian\AppData\Local\Temp\DCS\/~mis00003A4A"]:269: attempt to get length of global 'redborderline' (a nil value)

stack traceback:

[C]: ?

[string "C:\Users\Julian\AppData\Local\Temp\DCS\/~mis00003A4A"]:269: in main chunk

 

 

Ideas why?

Link to comment
Share on other sites

It seems that the script is looking for a group with the name "redborderline". By default the name of the group the script is looking for is "redborder". I guess you edited the script somewhere and now he cannot find the group "redborderline" anymore?

 

I also recomment to use the latest MIST version. 3.3.2 is not combining well with DCS 1.5+, as far as I know.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Greetings all, i'm hoping for a little help. I'm pretty new to all this, but think i have the basics down for this script. Bravo for your guys work on this, it really is a little gem.

 

I have a question relating to aircraft type used in the GCI & CAP roles. Is it possible to define different types of aircraft to a certain CAP or GCI area?

 

For example, lets say i have CAP zones within Russian airspace, with Su27's. Would it then be possible to set up addition CAP zones in Abkhazian airspace, but using Mig21's just on those CAP zones.

 

Thankyou in advance for any help on this matter.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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