Jump to content

Autonomous CAP and GCI AI fighter script


SNAFU

Recommended Posts

well for what its worth SNAFU the script you have created thus far is absolutely terrific, brings things closer to a truly dynamic battlefield something that I always strive to create when I make missions.

 

even set piece missions benefit from a more dynamic approach, although admittedly it does get tiresome to test scripts all the time though.

 

I think for this very reason I went back to basic trigger logic for my latest mission.

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

How the hell did that rumor originate?

 

(Not true btw)

 

Right, was just a worst case szenario displaying the often experienced minor change here / unexpected big cause there problems of working in WIP system. :music_whistling:

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

This thread has gone huge.... Can we have a recap of all the features this script has? Does it operate in multiplayer for multi clients? What are the configuration options?

 

We would like to use it with some missions but it's gotten a bit too long to get all the changes that it has gone through.

Link to comment
Share on other sites

The version you find in my first post, is an WIP version, which had to abandon a half year ago. My first post should still be valid for the version attached to the post. I remember there are problems with spawning settings, were fixed later on, but not by me.

 

I am planning to get back and pick up the idea, but I cannot tell when I find the chance. This version of mine, has some issues I know of and which I still want to fix.

 

Stonehouse, Rivvern, ChameleonSilk anD HiJack I think continued to work and improve the script to an extend, which I cannot comment. So you better wait for their response and I am curious too.

 

A summary of the features and changes would be great.

 

Anyhow, I do think such a script is of limited use for a public online operation of PVP servers with a lot of coming and going. The spawing of AI aircraft cause micro-freezes afaik and imagine that for every lone player straying around the map an interceptor AI flight gets scambled, the player crosses the border again to RTB and the interceptor also RTBs. The player changes his idea, flies back of the border trying to find some action a new interceptor flight takes off, cause the old one is order to RTB. Meanwhile the player is engaged or or shot down or left the server there is still the AI flying about causing server traffic, or violates the other colors border and triggers another intercept...

 

You would have to limit the CAP and intercept flights to a low setting (as you can do it in the script setting) for example max. 1 CAP flight and 1 intercept, that should keep the AI traffic in bay.

 

Still most PVP online players hate to be shot down by AI and will often leave the server in anger or don´t understand the concept of AI intercept and get confused. My general idea was more to create a dynamic template for cooperative missions as we play in our little, closed group (vJaBoG32).

 

But ENO, HiJack and Rivvern have experience with online hosting of missions using a version of the script, so they can tell you more.


Edited by SNAFU

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

just wanted to say that as far as I know most of the new work was done by Stonehouse so once he gets his PC back to full health he will give you a better idea of whats been added changed.

 

from what I remember: I had added parameters to make first flight start from ground and fix the take off from runway part, added some stuff to control CAP altitudes minimum and maximum that I think Stonehouse had added checking of terrain to as well, Stonehouse also added a 4th airfield spawn, the rest I'm not really sure... I was having some issues running the latest versions but was probably something I was doing wrong.

 

not sure if Stonehouse got around to making it so you can have varied payloads... in my opinion that was the worst part of the script having to change multiple sections to change the plane and payloads which was tedious and error prone.

 

but I think there is a lot of potential for the script...like a ton.

Link to comment
Share on other sites

Sorry still waiting on the new DDR3 sticks so haven't been paying that much attention over the last couple of days as things don't run so well on the smaller amount of ram I have at present.

 

Current feature list is something like this (in no particular order):

 


  • Can choose between 1 and n CAP zones where CAPs will patrol until detecting an enemy or being tasked to intercept enemy by GCI
  • Currently can assign a individual countries to CAP and GCI aircraft (eg US CAPs and UK GCI)
  • Can define max number of red and blue CAP groups that will spawn and move to a CAP zone
  • Can define a max number of spawned and active interceptions which affects how many GCI missions can be up at any one time
  • Can set min and max patrol alts for CAPs.
  • Can have CAP group size as 2,4 or random (which will be either 2 or 4)
  • Can have GCI groups size as 2,4,random or dynamic. If dynamic the size will match the size of the group being intercepted
  • Can define whether the hidden flag is ticked for CAP and GCI aircraft. If hidden then it's like you selected the groups as hidden in the M-E.
  • Can select between 1 and 4 airbases per side. If you want less than four then you just have duplicate airbases in the setup
  • Can select take off from ramp, runway, airspawn for AI CAP, Interceptors
  • Displays GCI alert messages referential to the receiving sides bullseye. Length of msg display time is configurable
  • Can choose to have the initial CAPs begin at their CAP zones or taking off from a friendly base
  • Can select either cold war with borders that trigger intercepts on intruders crossing over borders or hot war without borders and everything is just about radar picking up intruders and directing interception
  • Can set up template aircraft in the M-E so that you can specify 1-4 different aircraft, skin, skill and loadout combinations for red and blue CAPs and the same again for GCI interceptors. These template aircraft are marked as late activation with no trigger and therefore never spawn but the script will pick them up and randomly select a template to use to spawn a CAP or GCI group.
  • Current list of red radar units are 55G6 EWR, 1L13 EWR, A-50 awacs
  • Current list of blue radar units are E-2C awacs, E-3A awacs, Hawk sr, Patriot str
  • As many radar units as desired can be placed within computing limits and tactical situation being built
  • A feature of DCS that is quite nice is that if you position a tanker aircraft then CAPs which are RTB due to fuel will head for the tanker and refuel and go back on patrol (I've not done this but it has been reported as a nice accidental bonus by users of the script)

You do need to do some experimentation with CAP zone sizes and number and where they are to get things to behave correctly. For example if your CAP zone includes a friendly base then any CAP flight that launches will be "on station" and able to be sent off on an intercept immediately whereas if the CAP zone is at the border and the base at the rear then the CAP will be "en-route" until it gets up to the border and therefore unavailable for tasking until it arrives and goes to "on-station" status. Neither is the wrong way of doing things but each has a different end result to how it plays out.

 

If no CAPs are available for tasking because they are RTB, en-route or already tasked then a GCI intercept will be launched which will prosecute the target and only return to base when there are no intruders detected/in friendly territory/low fuel. Note that the borders/no borders selection impacts this logic quite a bit as without borders the GCI guys will go after targets detected by radar where as with borders they won't launch or will return to base if there are no border violations regardless of radar contacts. Likewise having CAP zones of different sides overlap the border or each other will result in a cold war going hot straight away.

 

The two current issues being investigated are:

 

 


  • AI CAP/GCI groups set to take off from ramp will take off from the runway in SP but correctly taxi out in MP.
  • CAPs and GCIs will intercept an intruder but will continue to attack even if the intruder goes back across the border.

Can't confirm it but I think both are due to DCS default behaviour. I have a feeling that the first is an AI trying to spawn in the same location as a player and SP and MP handling the situation differently. SP puts them on the runway and MP moves them to a different parking bay. Not sure if this can be fixed. Perhaps avoid parking bay 1 through 4 when placing player aircraft as they are nominated in the script for the AI?? Haven't had time to prove this works.

 

The second is that when sent off on the intercept and the AI group detects the target it is pretty much in "fire at will" mode so will pursue the target until it's Winchester, bingo fuel or the target is destroyed. To fix the second we'd probably have change the AI's tasking to RTB after they cross over a border if borders are in use. Even then they may stay in feral mode I guess if they are already engaged.

 

Change in progress and currently waiting for my PC to get back on duty is:

 


  • Picking up airbases from the M-E setup and hopefully the airfield zones too so you now longer need to edit the script for airbases. I'd like to do the same for countries too.

A future idea is to splice in my recon script and get it to generate flights for CAS and shipping strike mission onto ground and maritime targets spotted by recon aircraft. The recon script already works but generates on screen messages about targets spotted. I'd like this to probably still happen so players can see and choose those missions but also feed these targets to the script to use as targets for strike aircraft. The recon script also reports air and helo targets so potentially these could also generate GCI missions. Adding helos as "intruders" to the current script would also be good as currently only aircraft are tracked and launched on by GCI. Adding helos is actually easy I believe so will try to add that to my wip version.

 

It would also be nice to add the ability for player to call for limited amounts of GCI missions to come to their aid (the old EAW IL2 call for AI help from homebase) and to also be able to place a limit on the number of airframes available to both countries so the total available is reduced by each take off and replenished by each safe landing.


Edited by Stonehouse
Link to comment
Share on other sites

Hi Silk,

Supposedly I'm due to get my new memory today or tomorrow as the online store has emailed to say it's been dispatched so I'll try to add some Mig21s to a test mission and see what happens first up. It may be something peculiar to the Mig21 perhaps as I had no trouble with F16s, 18s, Su' s A10s etc when testing the released version but will check and see what happens. Just out of interest and in case that is the difference between us do you own the Mig21 module?

 

 

@Wolf5,

Agree we need to sort out a better way of pointing people to the latest version of the script and an example mission to help them get their head around it. As I'm only a sub contractor on this :smilewink: it would need Snafu to decide or at least give permission for any method that is suggested.

 

Link to latest script is http://forums.eagle.ru/showpost.php?p=2169013&postcount=195

 

You should use the latest version of Mist as a general rule, which last time I checked was 3.5.35 - you must use at least late versions of 3.4 as there were some bugs around Mist message functions in late version 3.3 ones that got fixed.

 

Cheers,

Stonehouse.


Edited by Stonehouse
Link to comment
Share on other sites

Stonehouse, I uploaded the linked version of yours and your post in my first post, hope that helps.

 

My own workstation gave up on me... guess I fried the system with installing the lates GFX 780TI, so I have no access to my data for now, but have little time to help at the moment anyway...

:cry_2:


Edited by SNAFU

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Ouch, I know how you feel. My memory problem experience has made me look into actually putting together a image of my system partition rather than just talk about how it's a good idea.

 

It's a shame it's not possible to share an upload on DCS user files between a group of contributors as then if someone did some tweaks it could go up to a central location.

Link to comment
Share on other sites

MiG-21s spawning with no loadout.

 

Hi Silk,

No memory yet but I fired up one of my test missions anyway and substituted the Mig21Bis for the red CAP FW190s (boy those P51Ds got a surprise :lol:)

Anyway it all seemed to work and the different loadouts and skins were reflected in the aircraft spawned.

 

So it looks like it might be something not quite right in your mission. If you want to post it up happy to try to help you figure it out.

 

Cheers,

Stoney

Link to comment
Share on other sites

Some good news. Got my new memory this morning and had some time to do some scripting through the day. I've got a new version in testing that let's you just choose airfields in the editor - no more script editing. Still have to put a trigger zone with the airfield name over the airfield because I haven't sorted out getting the vec2 position of an airfield in the script yet. Will continue testing and then add helos to the interception targets list and try to come up with something to pick up the country ids from the mission too.

 

<edit> Considering just picking up the country ids for the spawning AI from the template aircraft. Can anyone see issues with that idea? I mean we have red CAP and blue CAP and red GCI and blue GCI templates so as long as the countries in the mission match up with the template aircraft everything should be ok and I think that choice might be forced on you anyway by the countries you choose for the red and blue coalitions. If I go in that direction then it means more flexibility as you potentially can have aircraft from up to 8 different countries per side.


Edited by Stonehouse
Link to comment
Share on other sites

Glad to see your memory increasing Stonehouse :D

 

I have a request, I know it's possible and I think it should be quick for someone with honed scripting lua and dcs skills. I need a short script that deactivates all units with a certain name if they enter a named zone. For instance any aircraft with "RED BANDIT" as part of the group (or unit) name is deactivated if entering zone "air2groundzone", end do. That script will be nice to have for safe A2G areas even when the server is running with the CAP and GCI auto script


Edited by HiJack
Link to comment
Share on other sites

I know it's possible and I think it should be quick for someone with honed scripting lua and dcs skills.

 

Lol I think that description is about someone else other than me but will put a safe zone on the list to think about. It does sound doable and it's just figuring out how.

 

Have you tried doing anything in the m-e with trigger zones and actions? You might get most of what you want right there. A trigger zone with condition that is true when the enemy coalition aircraft enters the zone that has an action that deactivates/destroys the aircraft

Link to comment
Share on other sites

You can take a look at the script and mission I attached below.

 

There I defined an area in which all SAM missiles are destroyed if they are getting to close to an player aircraft. The script checks every launched SAM if it gets close to a player and lets the missile explode. At the same time it marks a hit with a smoke in the air. So basically the function is the same, you just need to create an table with the AirToAir missiles and define the area with waypoints of the group. You also need to take out the text messages. I don´t know if this works with guns also, but at least Air To Air missiles would be just smoke and sound in this area. Just an idea. :book:

SAMtracker.zip

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

I had another look at the mission in multiplayer, it seems that the CAP flights also spawn on the ramp whereas in the editor they spawn on the runway and take off two at a time. Attached is the mission and script.

 

Ok I'm getting stupid in my old age, completely forgot that Chameleon Silk made a change for the initial set of CAP flights so the mission designer could choose to have them start on the runway or airborne at their CAP zones. This is the variable startairborne which defaults to 0 which is take off from the runway. This still doesn't explain why in MP they start on the ramp when they should start on the runway but it does explain the SP side of things. Will try to figure out what is happening for MP, it still may be a DCS thing.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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