Skynet: An IADS for Mission Builders - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 02-22-2020, 05:40 PM   #1
tigair
Member
 
tigair's Avatar
 
Join Date: Jan 2017
Location: Switzerland
Posts: 152
Default Skynet: An IADS for Mission Builders

Hi Guys,

After almost 10 years of absence from software development, I put on my old coding gloves an wrote an IADS script!

Have a look at the extensive documentation over on the GitHub repo:
https://github.com/walder/Skynet-IADS

Highlights:
  • EW radars scan for targets, pass them on to SAM Sites. SAM sites in general stay off.
  • You can add command centers, connection nodes and power sources. Damage to these elements will degenerate the IADS.
  • Optional jamming (within the limits of the scripting engine), will be more effective for older radars.
  • HARM Defence: SAM sites that cannot shoot down HARMs will go dark if they detect a HARM.
  • SAM sites can act as EW radars and SAM sites at the same time
  • SAM sites will shut down if out of ammo
  • Nice debug information on what the IADS can see and how it reacts.
  • Understandable object oriented architecture, unit tests.

Questions regarding mission building and scripting? Join the Skynet discord Group: https://discord.gg/pz8wcQs

Update 26.04.2020
  • Improved performance of Skynet when may units are involved (aircraft and radar sites)
  • Added iads:setUpdateInterval(5) -> so mission builders can set whatever update they like
  • Added earlyWarningRadarStatusEnvOutput and samSiteStatusEnvOutput will output detailed early warning radar info to the dcs.log file. Intended for multiplayer test debug. Setting these var to true may result in the game lagging.
  • Added a stress test mission with 50+ AI planes and lots of SAM sites.
  • Added new method to access a sub group of SAM sites by prefix (redIADS:getSAMSitesByPrefix('SAM-SECTOR-A')), makes configuration of the IADS easier.
  • Fixed a bug in the harm detection code when one radar in the SAM site is destroyed
  • Fixed Bug in setting maximum jammer distance

Update 10.04.2020
  • Fixed a bug where units acting as EW radars would not detect incoming harms

Update 08.04.2020
  • All types of SAM search radars can now be used as single unit EW radars, previously this resulted in errors
  • SAM sites with no working radar are no longer updated with target information by the IADS

Update 03.04.2020
  • Fixed an annoying go live / do dark output introduced with the go autonomous code in last release
  • Added blue IADS in demo mission

Update: 01.04.2020
  • SAM sites will go autonomous if they are outside of EW radar coverage and revert back to their default behaviour if they are within EW radar coverage again
  • SAM sites will rejoin the IADS if the loose a connection node and a new one is added
  • Fixed radio menu bug when removing either IADS or jammer

Update 23.03.2020
  • Finished work on the first release of the jammer, added a unit in the test mission, select 'Hornet SA-11-2 jammer support' fly against an SA-11 protected by an F4 jamming
  • Updated docs on the jammer
Let me know what you think of the jammer feature and how you think it can be improved

Update 22.03.2020
  • Tested on 2.5.6.45317
  • Radar unit with point defence set to ingore harms will eventually go dark if a saturation point is reached.
  • Updated documentation, wrote more unit tests
  • Added code to clean up state of IADS internally over longer period of time
  • Worked on jammer to make it compatible with all the changes in the last few weeks, still WIP

Update 21.03.2020
  • tested all blue SAM and EW sites with Skynet. Also added HQ-7 (chinese SAM)
  • fixed bug where EW radar would not wake up after HARM shutdown
  • Ships can now be added to the IADS as EW radars
  • EW radar will go dark by default if connection to IADS is lost
  • updated unit tests.

Update 19.03.2020
  • Added option so a radar unit with point defence support will not go dark when HARM is inbound and point defence has ammo left
  • Blue side: Hawk and Patriot tested, added default HARM Defence chance for these systems
  • Updated documentation on GitHub, added potential mission editor bug note in the FAQ section including workaround
  • Updated IADS output based on side its on

Update 18.03.2020
Update 17.03.2020
  • Fixed prefix adding error in unit name or group name when the prefix contains a special char
  • SAMs now are able to rearm ammo (controller setOnOff may not be false for this, but setOnOff false ist better for HARM evasion, script handles both correctly)
  • Any kind of aircraft with air to air radar can now act as AWACS when added to the IADS.

Update 16.03.2020
  • Added deactivate() method to clean up an IADS instance, so no dereferenced background tasks keep running
  • all IADS methods with the word SAM -> SAM is now always in upper case e.g.:addSAMSitesByPrefix, this will have to be updated in existing scripts
  • loading units by prefix in to the IADS is now case sensitive to reflect how mission editor behaves
  • Updated documentation, added unit tests

Update 15.03.2020
  • Rewrote (for the 3rd time) internal structure of SAM sites, range data is now all taken from in game, this way the script should be future proof
  • SAM and AAA sites shut down if they are out of ammo, but only after their last missile is no longer in the air
  • AWACS support for EW radars: currently only the A-50 Mainstay and the J-2000 Mainring are supported, more will follow
  • Updated documentation with detailed setup example and updated Demo Mission
  • Updated unit tests, currently there are 60 tests, with 324 assertions to make sure everything works as intended

Update 13.03.2020
  • Added radio menu option to toggle IADS status output
  • updated method to add power source for command center, see documentation on GitHub
  • Updated documentation on GitHub
  • Updated unit tests

Update 12.03.2020
  • Added HARM Defence, see the HARM Defence section in the documentation for details
  • Updated documentation on GitHub
  • Updated compiled script
  • Added Units Tests, fixed bugs

Update: 10.03.2020
  • Updated the interface to set SAM site and EW radar options
  • Updated the documentation
  • Added go live ranges for SAM sites (kill zone or max radar range)
  • Added the option to set a SAM site as EW radar
  • Harm defence is still broken
  • Updated IADS debug output
  • Added even more unit tests
  • squashed lots of bugs

Update: 06.03.2020
  • Fixed bug when connection node / power source is a unit or static ground vehicle
  • Added lots of unit tests, and fixed other small bugs
  • HARM Defence is currently broken, will fix it with the next update

Update: 04.03.2020
  • Fixed bugs, wrote Unittests, thanks for reporting!

Update: 03.03.2020
  • Added build time stamp to the compiled script, if you run in to an issue check that with the current one on GitHub
  • added more unit tests, found a bug thanks to them

Update: 02.03.2020
  • Added unit tests, because a good developer writes the test before he writes the code, right?
  • Updated the list of SAM Sites that will react to HARMs
  • Updated the compiled script

Update: 01.03.2020:
  • Added HARM Defence. Currently only for the SA-6 and 1L13 EWR, more will come soon
  • SAM Sites can now act as EW radar and SAM site a the same time (see updated documentation on GitHub)
  • IADS has a track file of all contacts, keeps them up to 30 sec even with no new radar information
  • Refactored large parts of the code, now more readable, will allow for faster development

In the near future following enhancement are planned:
  • SAM sites may go live if they visually detect an incoming enemy aircraft (~10 nm) and the command center has not informed them previously
  • SAM sites will have decoy emitters to lure HARMs in to the wrong target. There's a nice article on that here.
Full backlog of features to be added:
https://github.com/walder/Skynet-IADS/projects/1

It's generic and all written in lua so you can easily add it to your missions. Just 3 lines of code needed. No silly triggers and hardcoded garbage, I swear!

I tried to make the integration as easy as possible, I understand not all mission builders want to code.

Download this simple demo mission to see the IADS in action:
https://github.com/walder/Skynet-IAD...rsian-gulf.miz
Just place your plane near the iranian coast and see how the SAMs react.

Let me know what you think of it. Depending on your feedback I will add more features.

A special thanks to Spearzone and Coranthia for researching public available information on IADS networks and getting me up to speed on how such a system works. Also I shamelessly incorporated Grimes SAM DB from his IADS script, he is ok with it.

Here's a quick overview of what's supported:

Last edited by tigair; 04-26-2020 at 05:19 PM.
tigair is offline   Reply With Quote
Old 02-22-2020, 11:03 PM   #2
Wood
Member
 
Wood's Avatar
 
Join Date: Aug 2012
Posts: 153
Default

This is Great thanks so much for this.
__________________
Wood is offline   Reply With Quote
Old 02-22-2020, 11:30 PM   #3
wopski
Junior Member
 
Join Date: Jan 2015
Posts: 44
Default

Thanks for your efforts I will defo try it out!
wopski is offline   Reply With Quote
Old 02-23-2020, 12:32 AM   #4
Pikey
Veteran
 
Pikey's Avatar
 
Join Date: Sep 2009
Location: Reading, UK (GMT)
Posts: 4,352
Default

Seems a great design, I need to try her out, thanks for your work!
__________________
___________________________________________________________________________
SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * PLAYLIST
===========
Pikey is offline   Reply With Quote
Old 02-23-2020, 02:02 PM   #5
Knock-Knock
Senior Member
 
Knock-Knock's Avatar
 
Join Date: Jul 2016
Location: Denmark
Posts: 2,186
Default

Fantastic, thank you .
Just spend most of the afternoon tying it into a big dedicated server sandbox mission used in the community I fly in. Looking forward to try this on a large scale.
__________________
- Jack of many DCS modules, master of none.
- Personal wishlist: F-15A, F-4S Phantom II, JAS 39A Gripen, SAAB 35 Draken, F-104 Starfighter, Panavia Tornado IDS.


| MSI Z87-G45 Gaming | i5-4670K @ 4.3Ghz | 16Gb DDR3 1600 | Asus GTX 1070 Strix OC | Samsung 850 Evo 250 & 500Gb | 40" Sony FullHD | Oculus Rift CV1 | Thrustmaster Warthog Stick (19.5cm extension) & Throttle | MFG Crosswind | Windows 7-64 |
Knock-Knock is offline   Reply With Quote
Old 02-23-2020, 02:12 PM   #6
tigair
Member
 
tigair's Avatar
 
Join Date: Jan 2017
Location: Switzerland
Posts: 152
Default

Quote:
Originally Posted by Knock-Knock View Post
Fantastic, thank you .
Just spend most of the afternoon tying it into a big dedicated server sandbox mission used in the community I fly in. Looking forward to try this on a large scale.
Cool!

If you need any help let me know. Also there might still be some bugs in the code. Feel free to drop me a message or Post an issue on Github:
https://github.com/walder/Skynet-IADS/issues

To all the others:
Thanks for looking in to the script. I really appreciate your feedback. My goal is to create the best IADS script for DCS.

Last edited by tigair; 02-24-2020 at 07:34 AM.
tigair is offline   Reply With Quote
Old 02-24-2020, 09:56 PM   #7
pmiceli
Member
 
pmiceli's Avatar
 
Join Date: May 2016
Posts: 298
Default

I set this up last night.

The command center, power and connection mode features will not work as the current DCS version is randomly renaming statics to ammo #<number>

Also, I accidentally had a group with my SAM prefix that was not a database SAM. This caused an error of comparing a nil to a nil.

This needs to be trapped.
__________________
pmiceli is offline   Reply With Quote
Old 02-24-2020, 11:34 PM   #8
A101Wayz
Member
 
Join Date: Feb 2019
Posts: 149
Default

Just tried it out... It's very effective and promising.
One thing I did notice, tho was I kept getting the same error over and over in the logs. It didn't seem to affect the script, tho.
Code:
2020-02-25 00:13:58.136 ERROR   SCRIPTING: MIST|doScheduledFunctions|1019: Error in scheduled function: $1[string "F:/Data/Under Development/IADS/skynet-iads-compiled.lua"]:1665: attempt to get length of field 'iadsContacts' (a nil value)
Hope this helps!
__________________
Wayz Out


Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe
HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals
A101Wayz is offline   Reply With Quote
Old 02-25-2020, 12:39 AM   #9
Lord of War
Junior Member
 
Join Date: Jun 2018
Posts: 35
Default

do sam sites switch their radars on if no ew radars are in range?
Lord of War is offline   Reply With Quote
Old 02-25-2020, 07:10 AM   #10
tigair
Member
 
tigair's Avatar
 
Join Date: Jan 2017
Location: Switzerland
Posts: 152
Default

Quote:
Originally Posted by pmiceli View Post
I set this up last night.

The command center, power and connection mode features will not work as the current DCS version is randomly renaming statics to ammo #<number>
I hope Eagle Dynamics will fix that with the next update. In the meantime try adding a Unit as command center or power source, it should work just the same.

Quote:
Originally Posted by pmiceli View Post
Also, I accidentally had a group with my SAM prefix that was not a database SAM. This caused an error of comparing a nil to a nil.

This needs to be trapped.
I mentioned this limitation here:
https://github.com/walder/Skynet-IAD...ing-a-sam-site

I will refactor the sam site class code and optimise the internal structure. At the least I will able to add debug information if a SAM site has inconsistent elements in it.

Let me know what you think of the script in a mission, feedback is welcome!
tigair is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:42 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.