Jump to content

Autonomous CAP and GCI AI fighter script


SNAFU

Recommended Posts

Hi,

Thank you for amazing mod. Great job ! :thumbup:

 

I'm using this script on my server exactly according your guide but I noticed something strange:

 

When somebody spaw to UH1 then after while another AI UH1 spawn on the farp.

Somebody spawn to P51 and after while AI P51 spawn.

Same for Su25 etc...

 

???

 

Thank you

 

That sounds really weird. Never experienced this. I have no idea what might be the cause of this, did you check the log.file?

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

I have made AWACS out of your script SNAFU. Will release my modifications in a couple of days. I have also split up the Random Airtraffic scripts to one for RED side and one for BLUE side, I'll explain why when I release. Thank you for all the help.

Link to comment
Share on other sites

Rivvern, I hope I have time on the weekend to take look at the mission.

 

What HiJack said is correct, the CAP waypoints are randomly created inside the triggerzone and turning points in which the fighter use their Radar to search for targets. If the fighter detects a target he actually should not engage, due to the ROE still in RETURN FIRE only as long as no hostile A/C is in their territory. But that is theoretically the case and I have to check the ROE settings. From the picture there is nothing you did wrong. I would only use a smaller size of trigger zones for the airfield markers, since they might be confusing, but that`s all I notice at the first look. And you might want to switch off the debugging messages by setting

 

debuggingmessages = false

 

I actually also wanted to check the ROE of the CAPs so, if they remain in Return Fire mode as long as their own airspace is not violated. I also observed some really aggressive behavior by the CAPs in some cases, but could not really reproduce it.

 

There is still a lot of work left on the script, like some points I always wanted to do is:

-include AWACS

-include seaborne radar

-smart intercept profiles

-only shadowing of intruders if they are of civil type

-disengaging of interceptors if SAM is engaged on target

-...

 

Currently I have not enough time at hands to continue, but I try to check the ROE settings of the CAPs.

 

 

Copy that SNAFU.

 

What i would like is to have CAP flights patroling inside the zone and as soon radar detects enemies over the border or inside capzone they will engage targets.

Otherwise they should ignore enemy flights.

 

That would open up possibility to create exciting covert strikes inside enemy territory.

[sIGPIC][/sIGPIC]

 

We are looking for Swedish members!

http://www.masterarms.se

Link to comment
Share on other sites

Just had an half an hour yesterday and modified the ROE of the CAP and the intercepttask. I tested the version briefly, seemed to work, but had no time for extensive testing.

 

For the b4 version check 1st post.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Yesterday I let the script run in a mission for about 2 hours with 6x time acceleration.

 

I notices some random behavior of the CAP flights I could not really reproduce. Sometimes an intruder was intercepted by a new spawned interceptor flight, even though a CAP flight seemed to be on station. Another time the CAP flight on station correctly intercepted the intruder and no new flight was spawned and tasked for intercept.

 

Do you notice some similar behavior of the CAPs on station at any chance?

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

I may have some Tacview recordings of my tests as I have run quite a lot of them over several hours running in normal speed. I will check my server recordings but if you run these scripts and speeding up the mission you are bound to get some errors as things get missed when running the sim to fast. You do use Tacview SNAFU?

Link to comment
Share on other sites

No, I don´t use TacView. You are right that things get messy with too much time acceleration, but I found 6x is still ok, as long as not too many AI units are on the move.

 

Did you also try the b4 version? What are your experiences, also in regard to the problems with dynamically added units and the memory bug of DCS?

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

I'll be getting and testing your latest version soon-ish. I actually want to expand it more, but I haven't got the time.

 

There are some trivial things, like changing the CAP speeds, spawning the interceptors on runways (or in the air) because of the silly amount of taxiing time, launching interceptors from the nearest base if appropriate ...

 

Also an option to have the initial CAP already in the air and on station instead of starting it on the ramp (or at minimum start the initial CAP in the air over the airport).

 

Change the size of the CAP, perhaps randomly, perhaps not - either a 2-ship like now OR a 4-ship.

 

Other things of note:

Make the script respect the number and type of airframes available at an airport. If you run out of airframes (and weapons for them), well ... oops :) I haven't tested if the game respects this automatically or not.

 

Do interceptors get replenished? I recall 2 interceptor flights were launched, and no more.

[sIGPIC][/sIGPIC]

Reminder: SAM = Speed Bump :D

I used to play flight sims like you, but then I took a slammer to the knee - Yoda

Link to comment
Share on other sites

The number of elements of one spawned flight can be changed and randomized or made dependent on the number of elements of the intruder group. Second would need some variable to be integrated into the table, but its possible.

 

Actually you can set the number of CAP flights active at one time, but I didn´t implement a maximum number of planes or flights available.

 

For every intrudergroup one interceptor flight will spawn, as long as no other interceptor or CAP flight is tasked to intercept the intruder. There is no limit of planes or interceptors yet.

 

I do not think the ressource system is considering dynamically added units and weapons. Could be tested, by taking all weapons from the airfields and check if the flights still spawn with weapons. In my experience the ressource system only limits clients, not AI units, but I didn´t take a look deeper into this

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

.. like changing the CAP speeds

Yes it would be nice to set the CAP speed for each aircraft type. Should be fairly easy to add but it takes some testing time to get it right ;)

 

Change the size of the CAP, perhaps randomly, perhaps not - either a 2-ship like now OR a 4-ship.

Already possible by randomizing the number on the top :thumbup:

Link to comment
Share on other sites

I do not think the ressource system is considering dynamically added units and weapons. Could be tested, by taking all weapons from the airfields and check if the flights still spawn with weapons. In my experience the ressource system only limits clients, not AI units, but I didn´t take a look deeper into this

 

It should limit AI. That said I haven't tested it with dynamically spawned AI, but it is reasonable to expect that dynamically spawned AI use resources. If a base lacks a certain type of aircraft then it won't spawn. If fuel is missing the AI spawn but wont start, nor will will they start if fuel arrives. If weapons aren't available the weapon is simply missing from the pylon. Some weapons may be partially loaded onto the aircraft depending on the supply. See attached screenshot, base is out of Vihkers so only 4 are loaded onto the aircraft.

 

 

Screen_120508_042818.jpg

 

 

 

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

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

I have a question: Does this script work with the Carriers to spawn carrier-based units? F-18, f-14, su-33 or any others?

Owned: Ryzen 3900x, MSI AMD 470x mobo, 32gb 3200MHz ram, Gtx 1660 Ti, 970 Evo Plus 500GB, MsFFB2, TIR5, TMWH+18c Stick, MFG Crosswinds, Buttkicker/SSA, WinWing F-18C . Next is VR for simpit

Art Of The Kill:

Link to comment
Share on other sites

For instance I have changed mine to only deploy F-15C on blue side but with two different skins and that works fine. Was also fairly trivial to remove the Su-30 on red side :)

 

Right on. Part of the reason I ask is that I'm unsure how the game treats the carriers. IE, are they considered runways. I suppose they are though. I'll just play around with the script

Owned: Ryzen 3900x, MSI AMD 470x mobo, 32gb 3200MHz ram, Gtx 1660 Ti, 970 Evo Plus 500GB, MsFFB2, TIR5, TMWH+18c Stick, MFG Crosswinds, Buttkicker/SSA, WinWing F-18C . Next is VR for simpit

Art Of The Kill:

Link to comment
Share on other sites

 

Is it really possible to get this to work without cas flights engaging eachother?

Whats wrong with my mission?

 

I will check you mission, when I get the chance.

Did you try the b4 version?

 

Right on. Part of the reason I ask is that I'm unsure how the game treats the carriers. IE, are they considered runways. I suppose they are though. I'll just play around with the script

 

Since I always considered carrier operations in the Black Sea as a pretty SciFi-theme, since no bigger carrier group would dare to get into combat operations in such a confined water, I didn´t really think about that point.

 

Basically you need to find out the "airfield ID" and the "airfield name", since the takeoff waypoint in the script need the ID of the airfield the fighter is supposed to take off and land. If you give a fighter a takeoff point from a carrier and safe the miz.file you can get the airfield ID of the carrier - supposed the CV has something as an airfield ID. Then you have to modify the function getAFtable, which returns the data of the airfield closest to a specific point.

 

If you only need one US and one RU carrier this will be simple.

 

It should limit AI. That said I haven't tested it with dynamically spawned AI, but it is reasonable to expect that dynamically spawned AI use resources. If a base lacks a certain type of aircraft then it won't spawn. If fuel is missing the AI spawn but wont start, nor will will they start if fuel arrives. If weapons aren't available the weapon is simply missing from the pylon. Some weapons may be partially loaded onto the aircraft depending on the supply. See attached screenshot, base is out of Vihkers so only 4 are loaded onto the aircraft.

 

Ok, this should be fairly easy to test, just clean up the ressources of the airfields and run script.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Yea b4 version works much better.

 

Bugreport:

Ive got spawnable Awacs/tankers with the Automan script.

When they start to taxi they activates F-16 escort flights.

The escort flights are now taking off and continue off in the runway direction... forever it seems.

 

They are not taking off from one of the three airports specified in the script file.


Edited by Rivvern

[sIGPIC][/sIGPIC]

 

We are looking for Swedish members!

http://www.masterarms.se

Link to comment
Share on other sites

I have modded the script, allowing the CAPs to start from the runway. The reason is that quite often teh AI screws up while taxying, so this prevents that, at least on takeoff (they return home far from more seldom :P)

 

I don't know if this is interesting, but here's the run-down.

I added this early in the script:

--RNW BLOCK

local RNW_fromRunway = false -- set to true if you want the CAPs to spawn on the runway

 

--do not edit below

local RNW_type = "TakeOffParking"

local RNW_action = "From Parking Area"

 

if RNW_fromRunway == true

then

local RNW_type = "TakeOff"

local RNW_action = "From Runway"

end

--END RNW

 

Then I modified the lines adding the aircraft (twice) in the script:

["type"] = RNW_type,

["action"] = RNW_action,

Link to comment
Share on other sites

  • Recently Browsing   0 members

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