<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=IADScript_Documentation</id>
		<title>IADScript Documentation - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=IADScript_Documentation"/>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=IADScript_Documentation&amp;action=history"/>
		<updated>2026-04-27T18:16:40Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.hoggitworld.com/index.php?title=IADScript_Documentation&amp;diff=89&amp;oldid=prev</id>
		<title>Grimes: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=IADScript_Documentation&amp;diff=89&amp;oldid=prev"/>
				<updated>2018-04-12T00:12:12Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Integrated Air Defense Script (IADScript) or (IADS) is a script using the [[Simulator_Scripting_Engine_Documentation| DCS Simulator Scripting Engine]] and [[Mission_Scripting_Tools_Documentation | MIST ]] to manipulate ground air defense groups to behave like an Integrated Air Defense System. This manipulation helps make air defenses less predictable and more intelligent than default behavior. &lt;br /&gt;
&lt;br /&gt;
Current release versions: v1 rev35&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
MIST 2.0 or greater needs to be initialized&lt;br /&gt;
&lt;br /&gt;
Do Script(Copy/paste of iads file) or Do Script File(iads_v1_r35)&lt;br /&gt;
&lt;br /&gt;
Do Script(iads.add() and iads.addByPrefix())&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Settings ===&lt;br /&gt;
&lt;br /&gt;
This script relies on numerous settings to define default values for how the air defense network is organized and for enabling debugging messages. The table is defined at the top of the iadScript lua file.&lt;br /&gt;
&lt;br /&gt;
===== level =====&lt;br /&gt;
Integer (Non decimal): 1, 2, 3, 4, 5&lt;br /&gt;
&lt;br /&gt;
1: (oo) -- Sams are all forced to search. Will lock and engage if target is within range. &lt;br /&gt;
&lt;br /&gt;
2: (o|0) -- Pure randomization. All sams will be given random orders to turn off, search, or actively lock and engage targets. Radars are approx 50% off, 50% on/locking&lt;br /&gt;
&lt;br /&gt;
3: (O_^) -- More intelligent randomization. Larger sams will generally search while smaller sams will generally be shut down. Sams can use more advanced tactics. &lt;br /&gt;
&lt;br /&gt;
4: [*]_[*] -- Sams will more likely be on or off depending on the radar search area of nearby sams. Sams will use more advanced tactics and exert some control over nearby sams. &lt;br /&gt;
&lt;br /&gt;
5:  (╯°□°）╯︵ ┻━┻) -- Not implemented and to be determined. Even more advanced tactics and logic can be employed.&lt;br /&gt;
&lt;br /&gt;
===== linked =====&lt;br /&gt;
String 'coalition' or 'country' &lt;br /&gt;
&lt;br /&gt;
Selects the default relationship for a sam if the relationship information is not present when the sam is added. &lt;br /&gt;
&lt;br /&gt;
===== radarSim =====&lt;br /&gt;
Boolean true or false&lt;br /&gt;
&lt;br /&gt;
If true each sam will be checked based on the sams radar dish scan speed&lt;br /&gt;
&lt;br /&gt;
===== refreshRate =====&lt;br /&gt;
Any positive number&lt;br /&gt;
If radarSim is false all sams will be checked at this constant refresh rate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== addDuplicate =====&lt;br /&gt;
String 'replace' (only option currently)&lt;br /&gt;
&lt;br /&gt;
===== debug =====&lt;br /&gt;
boolean true or false&lt;br /&gt;
&lt;br /&gt;
If true status messages will be displayed on screen and allows for debug files to be written&lt;br /&gt;
&lt;br /&gt;
===== debugMsgFor =====&lt;br /&gt;
Follows [[MessageAdd|mist.message.add]] rules for message for. Limited to coalition {'all'}, {'blue'}, or {'red'}&lt;br /&gt;
&lt;br /&gt;
===== debugWriteFiles =====&lt;br /&gt;
Boolean true/false&lt;br /&gt;
&lt;br /&gt;
Utilizes [[WriteData|mist.debug.writeData]] and desantiized io and lfs to write lua files to your savedgames/DCS/logs folder.&lt;br /&gt;
&lt;br /&gt;
===== timeDelay =====&lt;br /&gt;
Specifies the start time of the script after mission start. (Allows for script to populate a few tables before giving orders)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== addDuplicate =====&lt;br /&gt;
String 'replace' or 'ignore'&lt;br /&gt;
&lt;br /&gt;
Dictates what will happen if a sam is added twice to the script.&lt;br /&gt;
&lt;br /&gt;
==== samTypesDB ====&lt;br /&gt;
&lt;br /&gt;
This is a DB of all land based sams currently in the sim. DB contains custom data for specific use by the IADS script and generic radar data which is used by the mission editor to display range data. Modification of the values will impact performance and sorting of sams by type. Future iterations may grab data from the sim if applicable. &lt;br /&gt;
&lt;br /&gt;
=== Tips and Tricks ===&lt;br /&gt;
&lt;br /&gt;
==== One sam type per group. ====&lt;br /&gt;
  The script is not setup to handle multiple sam types per group yet. An S-300 mixed with a SA-15 may result in the S-300 acting like it had the range of a SA-15.&lt;br /&gt;
&lt;br /&gt;
==== IR and AAA do NOT need to be added ====&lt;br /&gt;
  IR and AAA units are supported by the script but generally do not need to be added to the IADS. Doing so can bog down the IADScript or delay expected engagement behavior from the air defenses. &lt;br /&gt;
&lt;br /&gt;
==== Do not use with &amp;quot;normal&amp;quot; ground forces ====&lt;br /&gt;
  The script functions through altering AI ROE and Alarm State to engage air threats. This modification will likely screw up expected AI ground force behavior. Additionally the script has the capability to move a group to a random location.&lt;br /&gt;
&lt;br /&gt;
==== Ships not supported ====&lt;br /&gt;
  I did not want to remove ships capability to fire at point or monitor ROE for self defense against missiles and engaging other ships.&lt;br /&gt;
&lt;br /&gt;
== Modification Guide ==&lt;br /&gt;
&lt;br /&gt;
This script was built with end user modification of files in mind. As a result '''''most''''' of the &amp;quot;AI&amp;quot; behavior functions are defined outside of the iads member functions. This allows for users to write their own logic to define sam behavior. &lt;br /&gt;
&lt;br /&gt;
Global table iads_AI contains 3 functions: iads_AI.main, iads_AI.monitorV1, iads_AI.monitorNet&lt;br /&gt;
&lt;br /&gt;
iads_AI.main. Main function, iterated at a high rate. Periodically runs iads_AI.monitorNet. If debug messages are allowed, this function will periodically update the messages and files.&lt;br /&gt;
  Runs two co-routines:&lt;br /&gt;
    checkSams -- &lt;br /&gt;
       monitors when each sam needs to perform a radar check, populates parent and child tables&lt;br /&gt;
       runs iads_AI.monitorV1 for each sam as needed&lt;br /&gt;
    update_targets_units -- populates iad_targets table with all airborne planes and helicopters currently in mission&lt;br /&gt;
&lt;br /&gt;
iads_AI.monitorV1. Reason why it is called &amp;quot;AI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Gets sam status and populates table of tracked enemy aircraft. &lt;br /&gt;
  If a potential target exists it analyzes the situation and personal settings to randomly choose a course of action. &lt;br /&gt;
  If no targets are within range to warrant a new action the script, depending on settings, will randomly select an idle action. &lt;br /&gt;
  Runs [[iadsTaskMonitor| taskMonitor]] which is capable of selecting random actions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
iads_AI.monitorNet. &lt;br /&gt;
 &lt;br /&gt;
  Iterates through each sam network&lt;br /&gt;
  Removes tracks if the target isn't detected for 15 seconds&lt;br /&gt;
  More advanced logic planned for future improvements&lt;br /&gt;
&lt;br /&gt;
== IADS Class ==&lt;br /&gt;
&lt;br /&gt;
This script creates an object class called ''iads'' with numerous member functions. These functions can be used to create your own air defense script logic using the data structure of the IADScript as a basis.&lt;br /&gt;
&lt;br /&gt;
== Table Format == &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Member Functions ==&lt;br /&gt;
&lt;br /&gt;
Below is a list of iads member functions. Many of these require an Iads object as an input variable and will return data or do a specific action on that sam. &lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;910&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;LightBlue&amp;quot;| &amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt;Creation/Removal&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|{{iadsCreationRemoval}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;LightBlue&amp;quot;| &amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt;Tasks&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|{{iadsTasks}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;LightBlue&amp;quot;| &amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt;Relationships&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|{{iadsRelationships}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;LightBlue&amp;quot;| &amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt;General Data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|{{iadsGeneralData}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;LightBlue&amp;quot;| &amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt;Actions&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|{{iadsActions}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category: MIST]]&lt;br /&gt;
[[Category: IADScript]]&lt;br /&gt;
[[Category: Scripting]]&lt;/div&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	</feed>