Module Functional.Mantis
Functional - Modular, Automatic and Network capable Targeting and Interception System for Air Defenses.
Features:
- Moose derived Modular, Automatic and Network capable Targeting and Interception System.
- Controls a network of SAM sites. Uses detection to switch on the AA site closest to the enemy.
- Automatic mode (default since 0.8) can set-up your SAM site network automatically for you.
- Leverage evasiveness from SEAD, leverage attack range setting.
Missions:
MANTIS - Modular, Automatic and Network capable Targeting and Interception System
Author : *applevangelist *
Global(s)
Global MANTIS |
The worst thing that can happen to a good cause is, not to be skillfully attacked, but to be ineptly defended. - Frédéric Bastiat Moose class for a more intelligent Air Defense System MANTIS
|
The worst thing that can happen to a good cause is, not to be skillfully attacked, but to be ineptly defended. - Frédéric Bastiat
Moose class for a more intelligent Air Defense System
MANTIS
- Moose derived Modular, Automatic and Network capable Targeting and Interception System.
- Controls a network of SAM sites. Uses detection to switch on the SAM site closest to the enemy.
- Automatic mode (default since 0.8) can set-up your SAM site network automatically for you
- Classic mode behaves like before
- Leverage evasiveness from SEAD, leverage attack range setting
- Automatic setup of SHORAD based on groups of the class "short-range"
0. Base considerations and naming conventions
Before you start to set up your SAM sites in the mission editor, please think of naming conventions. This is especially critical to make eveything work as intended, also if you have both a blue and a red installation!
You need three non-overlapping "name spaces" for everything to work properly:
- SAM sites, e.g. each group name begins with "Red SAM"
- EWR network and AWACS, e.g. each group name begins with "Red EWR" and not e.g. "Red SAM EWR" (overlap with "Red SAM"), "Red EWR Awacs" will be found by "Red EWR"
- SHORAD, e.g. each group name begins with "Red SHORAD" and *not" e.g. just "SHORAD" because you might also have "Blue SHORAD"
It's important to get this right because of the nature of the filter-system in Core.Set#SET_GROUP. Filters are "greedy", that is they will match any string that contains the search string - hence we need to avoid that SAMs, EWR and SHORAD step on each other's toes.
Second, for auto-mode to work, the SAMs need the SAM Type Name in their group name, as MANTIS will determine their capabilities from this. This is case-sensitive, so "sa-11" is not equal to "SA-11" is not equal to "Sa-11"!
Known SAM types at the time of writing are:
Avenger
Chaparral
Hawk
Linebacker
NASAMS
Patriot
Rapier
Roland
Silkworm (though strictly speaking this is a surface to ship missile)
SA-2, SA-3, SA-5, SA-6, SA-7, SA-8, SA-9, SA-10, SA-11, SA-13, SA-15, SA-19
From IDF mod: STUNNER IDFA, TAMIR IDFA (Note all caps!)
From HDS (see note on HDS below): SA-2, SA-3, SA-10B, SA-10C, SA-12, SA-17, SA-20A, SA-20B, SA-23, HQ-2
From SMA: RBS98M, RBS70, RBS90, RBS90M, RBS103A, RBS103B, RBS103AM, RBS103BM, Lvkv9040M NOTE If you are using the Swedish Military Assets (SMA), please note that the group name for RBS-SAM types also needs to contain the keyword "SMA"
From CH: 2S38, PantsirS1, PantsirS2, PGL-625, HQ-17A, M903PAC2, M903PAC3, TorM2, TorM2K, TorM2M, NASAMS3-AMRAAMER, NASAMS3-AIM9X2, C-RAM, PGZ-09, S350-9M100, S350-9M96D NOTE If you are using the Military Assets by Currenthill (CH), please note that the group name for CH-SAM types also needs to contain the keyword "CHM"
Following the example started above, an SA-6 site group name should start with "Red SAM SA-6" then, or a blue Patriot installation with e.g. "Blue SAM Patriot". NOTE If you are using the High-Digit-Sam Mod, please note that the group name for the following SAM types also needs to contain the keyword "HDS":
- SA-2 (with V759 missile, e.g. "Red SAM SA-2 HDS")
- SA-2 (with HQ-2 launcher, use HQ-2 in the group name, e.g. "Red SAM HQ-2" )
- SA-3 (with V601P missile, e.g. "Red SAM SA-3 HDS")
- SA-10B (overlap with other SA-10 types, e.g. "Red SAM SA-10B HDS")
- SA-10C (overlap with other SA-10 types, e.g. "Red SAM SA-10C HDS")
- SA-12 (launcher dependent range, e.g. "Red SAM SA-12 HDS")
- SA-23 (launcher dependent range, e.g. "Red SAM SA-23 HDS")
The other HDS types work like the rest of the known SAM systems.
0.1 Set-up in the mission editor
Set up your SAM sites in the mission editor. Name the groups using a systematic approach like above. Set up your EWR system in the mission editor. Name the groups using a systematic approach like above. Can be e.g. AWACS or a combination of AWACS and Search Radars like e.g. EWR 1L13 etc. Search Radars usually have "SR" or "STR" in their names. Use the encyclopedia in the mission editor to inform yourself. Set up your SHORAD systems. They need to be close to (i.e. around) the SAM sites to be effective. Use one group per SAM location. SA-15 TOR systems offer a good missile defense.
[optional] Set up your HQ. Can be any group, e.g. a command vehicle.
1. Basic tactical considerations when setting up your SAM sites
1.1 Radar systems and AWACS
Typically, your setup should consist of EWR (early warning) radars to detect and track targets, accompanied by AWACS if your scenario forsees that. Ensure that your EWR radars have a good coverage of the area you want to track. Location is of highest importance here. Whilst AWACS in DCS has almost the "all seeing eye", EWR don't have that. Choose your location wisely, against a mountain backdrop or inside a valley even the best EWR system doesn't work well. Prefer higher-up locations with a good view; use F7 in-game to check where you actually placed your EWR and have a look around. Apart from the obvious choice, do also consider other radar units for this role, most have "SR" (search radar) or "STR" (search and track radar) in their names, use the encyclopedia to see what they actually do.
1.2 SAM sites
Typically your SAM should cover all attack ranges. The closer the enemy gets, the more systems you will need to deploy to defend your location. Use a combination of long-range systems like the SA-5/10/11, midrange like SA-6 and short-range like SA-2 for defense (Patriot, Hawk, Gepard, Blindfire for the blue side). For close-up defense and defense against HARMs or low-flying aircraft, helicopters it is also advisable to deploy SA-15 TOR systems, Shilka, Strela and Tunguska units, as well as manpads (Think Gepard, Avenger, Chaparral, Linebacker, Roland systems for the blue side). If possible, overlap ranges for mutual coverage.
1.3 Typical problems
Often times, people complain because the detection cannot "see" oncoming targets and/or Mantis switches on too late. Three typial problems here are
- bad placement of radar units,
- overestimation how far units can "see" and
- not taking into account that a SAM site will take (e.g for a SA-6) 30-40 seconds between switching on, acquiring the target and firing.
An attacker doing 350knots will cover ca 180meters/second or thus more than 6km until the SA-6 fires. Use triggers zones and the ruler in the mission editor to understand distances and zones. Take into account that the ranges given by the circles in the mission editor are absolute maximum ranges; in-game this is rather 50-75% of that depending on the system. Fiddle with placement and options to see what works best for your scenario, and remember everything in here is in meters.
2. Start up your MANTIS with a basic setting
myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR",nil,"red",false)
myredmantis:Start()
Use
- MANTIS:SetEWRGrouping(radius) [classic mode]
- MANTIS:SetSAMRadius(radius) [classic mode]
- MANTIS:SetDetectInterval(interval) [classic & auto modes]
- MANTIS:SetAutoRelocate(hq, ewr) [classic & auto modes]
before starting #MANTIS to fine-tune your setup.
If you want to use a separate AWACS unit to support your EWR system, use e.g. the following setup:
mybluemantis = MANTIS:New("bluemantis","Blue SAM","Blue EWR",nil,"blue",false,"Blue Awacs")
mybluemantis:Start()
2.1 Auto mode features
2.1.1 You can now add Accept-, Reject- and Conflict-Zones to your setup, e.g. to consider borders or de-militarized zones:
-- Parameters are tables of Core.Zone#ZONE objects!
-- This is effectively a 3-stage filter allowing for zone overlap. A coordinate is accepted first when
-- it is inside any AcceptZone. Then RejectZones are checked, which enforces both borders, but also overlaps of
-- Accept- and RejectZones. Last, if it is inside a conflict zone, it is accepted.
mybluemantis:AddZones(AcceptZones,RejectZones,ConflictZones)
2.1.2 Change the number of long-, mid- and short-range systems going live on a detected target:
-- parameters are numbers. Defaults are 1,2,2,6 respectively
mybluemantis:SetMaxActiveSAMs(Short,Mid,Long,Classic)
2.1.3 SHORAD will automatically be added from SAM sites of type "short-range"
2.1.4 Advanced features
-- switch off auto mode **before** you start MANTIS.
mybluemantis.automode = false
-- switch off auto shorad **before** you start MANTIS.
mybluemantis.autoshorad = false
-- scale of the activation range, i.e. don't activate at the fringes of max range, defaults below.
-- also see engagerange below.
self.radiusscale[MANTIS.SamType.LONG] = 1.1
self.radiusscale[MANTIS.SamType.MEDIUM] = 1.2
self.radiusscale[MANTIS.SamType.SHORT] = 1.3
2.1.5 Friendlies check in firing range
-- For some scenarios, like Cold War, it might be useful not to activate SAMs if friendly aircraft are around to avoid death by friendly fire.
mybluemantis.checkforfriendlies = true
3. Default settings [both modes unless stated otherwise]
By default, the following settings are active:
- SAM_Templates_Prefix = "Red SAM" - SAM site group names in the mission editor begin with "Red SAM"
- EWR_Templates_Prefix = "Red EWR" - EWR group names in the mission editor begin with "Red EWR" - can also be combined with an AWACS unit
- [classic mode] checkradius = 25000 (meters) - SAMs will engage enemy flights, if they are within a 25km around each SAM site -
MANTIS:SetSAMRadius(radius)
- grouping = 5000 (meters) - Detection (EWR) will group enemy flights to areas of 5km for tracking -
MANTIS:SetEWRGrouping(radius)
- detectinterval = 30 (seconds) - MANTIS will decide every 30 seconds which SAM to activate -
MANTIS:SetDetectInterval(interval)
- engagerange = 95 (percent) - SAMs will only fire if flights are inside of a 95% radius of their max firerange -
MANTIS:SetSAMRange(range)
- dynamic = false - Group filtering is set to once, i.e. newly added groups will not be part of the setup by default -
MANTIS:New(name,samprefix,ewrprefix,hq,coalition,dynamic)
- autorelocate = false - HQ and (mobile) EWR system will not relocate in random intervals between 30mins and 1 hour -
MANTIS:SetAutoRelocate(hq, ewr)
- debug = false - Debugging reports on screen are set to off -
MANTIS:Debug(onoff)
4. Advanced Mode
Advanced mode will decrease reactivity of MANTIS, if HQ and/or EWR network dies. Awacs is counted as one EWR unit. It will set SAMs to RED state if both are dead. Requires usage of an HQ object and the dynamic option.
E.g. mymantis:SetAdvancedMode( true, 90 )
Use this option if you want to make use of or allow advanced SEAD tactics.
5. Integrate SHORAD [classic mode, not necessary in automode]
You can also choose to integrate Mantis with Functional.Shorad#SHORAD for protection against HARMs and AGMs. When SHORAD detects a missile fired at one of MANTIS' SAM sites, it will activate SHORAD systems in the given defense checkradius around that SAM site. Create a SHORAD object first, then integrate with MANTIS like so:
local SamSet = SET_GROUP:New():FilterPrefixes("Blue SAM"):FilterCoalitions("blue"):FilterStart()
myshorad = SHORAD:New("BlueShorad", "Blue SHORAD", SamSet, 22000, 600, "blue")
-- now set up MANTIS
mymantis = MANTIS:New("BlueMantis","Blue SAM","Blue EWR",nil,"blue",false,"Blue Awacs")
mymantis:AddShorad(myshorad,720)
mymantis:Start()
If you systematically name your SHORAD groups starting with "Blue SHORAD" you'll need exactly one SHORAD instance to manage all SHORAD groups.
(Optionally) you can remove the link later on with
mymantis:RemoveShorad()
6. Integrated SEAD
MANTIS is using Functional.Sead#SEAD internally to both detect and evade HARM attacks. No extra efforts needed to set this up! Once a HARM attack is detected, MANTIS (via SEAD) will shut down the radars of the attacked SAM site and take evasive action by moving the SAM vehicles around (if they are drivable, that is). There's a component of randomness in detection and evasion, which is based on the skill set of the SAM set (the higher the skill, the more likely). When a missile is fired from far away, the SAM will stay active for a period of time to stay defensive, before it takes evasive actions.
You can link into the SEAD driven events of MANTIS like so:
function mymantis:OnAfterSeadSuppressionPlanned(From, Event, To, Group, Name, SuppressionStartTime, SuppressionEndTime)
-- your code here - SAM site shutdown and evasion planned, but not yet executed
-- Time entries relate to timer.getTime() - see https://wiki.hoggitworld.com/view/DCS_func_getTime
end
function mymantis:OnAfterSeadSuppressionStart(From, Event, To, Group, Name)
-- your code here - SAM site is emissions off and possibly moving
end
function mymantis:OnAfterSeadSuppressionEnd(From, Event, To, Group, Name)
-- your code here - SAM site is back online
end
Type(s)
Fields and Methods inherited from MANTIS | Description |
---|---|
The #DETECTION_AREAS object for AWACS |
|
Add a SET_ZONE of zones for Shoot&Scoot - SHORAD units will move around |
|
Function to link up #MANTIS with a #SHORAD installation |
|
Function to set accept and reject zones. |
|
The EWR #SET_GROUP used for advanced mode |
|
Function to set switch-on/off the debug state |
|
The #DETECTION_AREAS object for EWR |
|
The EWR #SET_GROUP |
|
Prefix to build the #SET_GROUP for EWR group |
|
Table of Core.Zone#ZONE Zones Consider SAM groups in this zone(s) only for this MANTIS instance, must be handed as #table of Zone objects. |
|
Function to get the HQ object for further use |
|
The #GROUP object of the HQ |
|
The ME name of the HQ object |
|
MANTIS:New(name, samprefix, ewrprefix, hq, coalition, dynamic, awacs, EmOnOff, Padding, Zones) |
Function to instantiate a new object of class MANTIS |
MANTIS:OnAfterAdvStateChange(From, Event, To, Oldstate, Newstate, Interval) |
On After "AdvStateChange" event. |
On After "GreenState" event. |
|
On After "RedState" event. |
|
On After "Relocating" event. |
|
MANTIS:OnAfterSeadSuppressionEnd(From, Event, To, Group, Name) |
On After "SeadSuppressionEnd" event. |
On After "SeadSuppressionPlanned" event. |
|
MANTIS:OnAfterSeadSuppressionStart(From, Event, To, Group, Name, Attacker) |
On After "SeadSuppressionStart" event. |
MANTIS:OnAfterShoradActivated(From, Event, To, Name, Radius, Ontime) |
On After "ShoradActivated" event. |
Function to unlink #MANTIS from a #SHORAD installation |
|
The SAM #SET_GROUP |
|
Table of SAM sites |
|
Prefix to build the #SET_GROUP for SAM sites |
|
Function to set Advanded Mode |
|
Function to set autorelocation for HQ and EWR objects. |
|
Function to set separate AWACS detection instance |
|
Function to set AWACS detection range. |
|
Function to set the HQ object for further use |
|
Function to set the detection interval |
|
Function to set the grouping radius of the detection in meters |
|
Function to set the detection radius of the EWR in meters. |
|
Function to set number of SAMs going active on a valid, detected thread |
|
Function to set a new SAM firing engage range, use this method to adjust range while running MANTIS, e.g. |
|
Function to set switch-on/off zone for the SAM sites in meters. |
|
Function to set SAM firing engage range, 0-100 percent, e.g. |
|
[Internal] Function to set the SAM start state |
|
Set using your own #INTEL_DLINK object instead of #DETECTION |
|
Set using Emissions on/off instead of changing alarm state |
|
SHORAD Object, if available |
|
Distance of an attacker in meters from a Mantis SAM site, on which Shorad will be switched on. Useful to not give away Shorad sites too early. Default 15km. Should be smaller than checkradius. |
|
If true, #MANTIS has #SHORAD enabled |
|
Timer in seconds, how long #SHORAD will be active after a detection inside of the defense range |
|
Triggers the FSM event "Start". |
|
[Internal] Function to start the detection via AWACS if defined as separate (classic) |
|
[Internal] Function to start the detection via EWR groups - if INTEL isn't available |
|
[Internal] Function to start the detection with INTEL via EWR groups |
|
Triggers the FSM event "Status". |
|
Decide if we are using Emissions on/off (true) or AlarmState red/green (default) |
|
[Internal] Function to determine state of the advanced mode |
|
[Internal] Check detection function |
|
[Internal] Check advanced state |
|
[Internal] Function to check accept and reject zones |
|
[Internal] Check DLink state |
|
[Internal] Function to check if EWR is (at least partially) alive |
|
[Internal] Function to check if HQ is alive |
|
[Internal] Check detection function |
|
MANTIS:_CheckObjectInZone(dectset, samcoordinate, radius, height, dlink) |
[Internal] Function to check if any object is in the given SAM zone |
[Internal] Function to get SAM firing data from units types. |
|
[Internal] Function to get SAM firing data |
|
[Internal] Function to get the self.SAM_Table |
|
[Internal] Function to prefilter height based |
|
[Internal] Function to update SAM table and SEAD state |
|
[Internal] Relocation relay function |
|
[Internal] Function to execute the relocation |
|
[Internal] Function to set the self.SAM_Table |
|
Triggers the FSM event "Start" after a delay. |
|
Triggers the FSM event "Status" after a delay. |
|
Triggers the FSM event "Stop" after a delay. |
|
Radius of the EWR detection |
|
Boolean switch to use Awacs as a separate detection stream |
|
Percentage to use for advanced mode, defaults to 100% |
|
Advanced mode state tracker |
|
Use advanced mode, will decrease reactivity of MANTIS, if HQ and/or EWR network dies. Set SAMs to RED state if both are dead. Requires usage of an HQ object |
|
Relocate HQ and EWR groups in random intervals. Note: You need to select units for this which are actually mobile |
|
Detection range of an optional Awacs unit |
|
If true, do not activate a SAM installation if a friendly aircraft is in firing range. |
|
Radius of the SAM sites |
|
Switch on extra messages |
|
Interval in seconds for the target detection |
|
Firing engage range of the SAMs, see [https://wiki.hoggitworld.com/view/DCS_option_engagementRange] |
|
Radius to group detected objects |
|
Prefix for logging |
|
Name of this Mantis |
|
MANTIS:onafterAdvStateChange(From, Event, To, Oldstate, Newstate, Interval) |
[Internal] Function triggered by Event AdvStateChange |
[Internal] Function triggered by Event GreenState |
|
[Internal] Function triggered by Event RedState |
|
[Internal] Function triggered by Event Relocating |
|
MANTIS:onafterSeadSuppressionEnd(From, Event, To, Group, Name) |
[Internal] Function triggered by Event SeadSuppressionEnd |
[Internal] Function triggered by Event SeadSuppressionPlanned |
|
MANTIS:onafterSeadSuppressionStart(From, Event, To, Group, Name, Attacker) |
[Internal] Function triggered by Event SeadSuppressionStart |
MANTIS:onafterShoradActivated(From, Event, To, Name, Radius, Ontime) |
[Internal] Function triggered by Event ShoradActivated |
[Internal] Function to set start state |
|
[Internal] Status function for MANTIS |
|
[Internal] Function to stop MANTIS |
|
[Internal] Before status function for MANTIS |
|
Switch on extra logging |
|
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
MANTIS:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
MANTIS:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
MANTIS:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
MANTIS:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
MANTIS:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
MANTIS:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from MANTIS.AdvancedState | Description |
---|---|
Fields and Methods inherited from MANTIS.SamData | Description |
---|---|
no-firing range (green circle) |
|
Max firing height in km |
|
Radar typename on unit level (used as key) |
|
Max firing range in km |
|
MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range) |
Fields and Methods inherited from MANTIS.SamDataCH | Description |
---|---|
no-firing range (green circle) |
|
Max firing height in km |
|
Radar typename on unit level (used as key) |
|
Max firing range in km |
|
MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range) |
Fields and Methods inherited from MANTIS.SamDataHDS | Description |
---|---|
no-firing range (green circle) |
|
Max firing height in km |
|
Radar typename on unit level (used as key) |
|
Max firing range in km |
|
MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range) |
Fields and Methods inherited from MANTIS.SamDataSMA | Description |
---|---|
no-firing range (green circle) |
|
Max firing height in km |
|
Radar typename on unit level (used as key) |
|
Max firing range in km |
|
MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range) |
Fields and Methods inherited from MANTIS.SamType | Description |
---|---|
- MANTIS class, extends Core.Base#BASE
Field(s)
Prefix to build the #SET_GROUP for EWR group
Table of Core.Zone#ZONE Zones Consider SAM groups in this zone(s) only for this MANTIS instance, must be handed as #table of Zone objects.
The ME name of the HQ object
Table of SAM sites
Prefix to build the #SET_GROUP for SAM sites
table to hold alert states, so we don't trigger state changes twice in adv mode
Distance of an attacker in meters from a Mantis SAM site, on which Shorad will be switched on. Useful to not give away Shorad sites too early. Default 15km. Should be smaller than checkradius.
If true, #MANTIS has #SHORAD enabled
Timer in seconds, how long #SHORAD will be active after a detection inside of the defense range
Decide if we are using Emissions on/off (true) or AlarmState red/green (default)
Radius of the EWR detection
Boolean switch to use Awacs as a separate detection stream
Percentage to use for advanced mode, defaults to 100%
Advanced mode state tracker
Use advanced mode, will decrease reactivity of MANTIS, if HQ and/or EWR network dies. Set SAMs to RED state if both are dead. Requires usage of an HQ object
0.8 additions
Relocate HQ and EWR groups in random intervals. Note: You need to select units for this which are actually mobile
Detection range of an optional Awacs unit
If true, do not activate a SAM installation if a friendly aircraft is in firing range.
Radius of the SAM sites
Switch on extra messages
Interval in seconds for the target detection
Firing engage range of the SAMs, see [https://wiki.hoggitworld.com/view/DCS_option_engagementRange]
Radius to group detected objects
Prefix for logging
Name of this Mantis
random between 30 and 60 mins
switch alarm state RED
Switch on extra logging
TODO Version @field #string version
Function(s)
Add a SET_ZONE of zones for Shoot&Scoot - SHORAD units will move around
Defined in:
MANTIS
Parameters:
Core.Set#SET_ZONE ZoneSet
Set of zones to be used. Units will move around to the next (random) zone between 100m and 3000m away.
#number Number
Number of closest zones to be considered, defaults to 3.
#boolean Random
If true, use a random coordinate inside the next zone to scoot to.
#string Formation
Formation to use, defaults to "Cone". See mission editor dropdown for options.
Return value:
self
Function to link up #MANTIS with a #SHORAD installation
Defined in:
MANTIS
Parameters:
Functional.Shorad#SHORAD Shorad
The #SHORAD object
#number Shoradtime
Number of seconds #SHORAD stays active post wake-up
Function to set accept and reject zones.
Defined in:
MANTIS
Parameters:
#table AcceptZones
Table of Core.Zone#ZONE objects
#table RejectZones
Table of Core.Zone#ZONE objects
#table ConflictZones
Table of Core.Zone#ZONE objects
Return value:
self
Usage:
Parameters are **tables of Core.Zone#ZONE** objects!
This is effectively a 3-stage filter allowing for zone overlap. A coordinate is accepted first when
it is inside any AcceptZone. Then RejectZones are checked, which enforces both borders, but also overlaps of
Accept- and RejectZones. Last, if it is inside a conflict zone, it is accepted.
Function to set switch-on/off the debug state
Defined in:
MANTIS
Parameter:
#boolean onoff
Set true to switch on
Function to get the HQ object for further use
Defined in:
MANTIS
Return value:
The HQ #GROUP object or nil if it doesn't exist
Function to instantiate a new object of class MANTIS
Defined in:
MANTIS
Parameters:
#string name
Name of this MANTIS for reporting
#string samprefix
Prefixes for the SAM groups from the ME, e.g. all groups starting with "Red Sam..."
#string ewrprefix
Prefixes for the EWR groups from the ME, e.g. all groups starting with "Red EWR..."
#string hq
Group name of your HQ (optional)
#string coalition
Coalition side of your setup, e.g. "blue", "red" or "neutral"
#boolean dynamic
Use constant (true) filtering or just filter once (false, default) (optional)
#string awacs
Group name of your Awacs (optional)
#boolean EmOnOff
Make MANTIS switch Emissions on and off instead of changing the alarm state between RED and GREEN (optional)
#number Padding
For #SEAD - Extra number of seconds to add to radar switch-back-on time (optional)
#table Zones
Table of Core.Zone#ZONE Zones Consider SAM groups in this zone(s) only for this MANTIS instance, must be handed as #table of Zone objects
Return value:
self
Usage:
Start up your MANTIS with a basic setting
myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR",nil,"red",false)
myredmantis:Start()
[optional] Use
myredmantis:SetDetectInterval(interval)
myredmantis:SetAutoRelocate(hq, ewr)
before starting #MANTIS to fine-tune your setup.
If you want to use a separate AWACS unit (default detection range: 250km) to support your EWR system, use e.g. the following setup:
mybluemantis = MANTIS:New("bluemantis","Blue SAM","Blue EWR",nil,"blue",false,"Blue Awacs")
mybluemantis:Start()
On After "AdvStateChange" event.
Advanced state changed, influencing detection speed.
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
#number Oldstate
Old state - 0 = green, 1 = amber, 2 = red
#number Newstate
New state - 0 = green, 1 = amber, 2 = red
#number Interval
Calculated detection interval based on state and advanced feature setting
Return value:
self
On After "GreenState" event.
A SAM group was switched to GREEN alert.
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The GROUP object whose state was changed
Return value:
self
On After "RedState" event.
A SAM group was switched to RED alert.
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The GROUP object whose state was changed
Return value:
self
On After "Relocating" event.
HQ and/or EWR moved.
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Return value:
self
On After "SeadSuppressionEnd" event.
Mantis has switched on a site after a SEAD attack.
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The suppressed GROUP object
#string Name
Name of the suppressed group
On After "SeadSuppressionPlanned" event.
Mantis has planned to switch off a site to defend SEAD attack.
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The suppressed GROUP object
#string Name
Name of the suppressed group
#number SuppressionStartTime
Model start time of the suppression from timer.getTime()
#number SuppressionEndTime
Model end time of the suppression from timer.getTime()
Wrapper.Group#GROUP Attacker
The attacking GROUP object
On After "SeadSuppressionStart" event.
Mantis has switched off a site to defend a SEAD attack.
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The suppressed GROUP object
#string Name
Name of the suppressed group
Wrapper.Group#GROUP Attacker
The attacking GROUP object
On After "ShoradActivated" event.
Mantis has activated a SHORAD.
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
#string Name
Name of the GROUP which SHORAD shall protect
#number Radius
Radius around the named group to find SHORAD groups
#number Ontime
Seconds the SHORAD will stay active
Function to set Advanded Mode
Defined in:
MANTIS
Parameters:
#boolean onoff
If true, will activate Advanced Mode
#number ratio
[optional] Percentage to use for advanced mode, defaults to 100%
Usage:
Advanced mode will *decrease* reactivity of MANTIS, if HQ and/or EWR network dies. Set SAMs to RED state if both are dead. Requires usage of an **HQ** object and the **dynamic** option.
E.g. `mymantis:SetAdvancedMode(true, 90)`
Function to set autorelocation for HQ and EWR objects.
Note: Units must be actually mobile in DCS!
Defined in:
MANTIS
Parameters:
#boolean hq
If true, will relocate HQ object
#boolean ewr
If true, will relocate EWR objects
Function to set separate AWACS detection instance
Defined in:
MANTIS
Parameter:
#string prefix
Name of the AWACS group in the mission editor
Function to set AWACS detection range.
Defaults to 250.000m (250km) - use before starting your Mantis!
Defined in:
MANTIS
Parameter:
#number range
Detection range of the AWACS group
Function to set the HQ object for further use
Function to set the detection interval
Defined in:
MANTIS
Parameter:
#number interval
The interval in seconds
Function to set the grouping radius of the detection in meters
Defined in:
MANTIS
Parameter:
#number radius
Radius upon which detected objects will be grouped
Function to set the detection radius of the EWR in meters.
(Deprecated, SAM range is used)
Defined in:
MANTIS
Parameter:
#number radius
Radius of the EWR detection zone
Function to set number of SAMs going active on a valid, detected thread
Defined in:
MANTIS
Parameters:
#number Short
Number of short-range systems activated, defaults to 1.
#number Mid
Number of mid-range systems activated, defaults to 2.
#number Long
Number of long-range systems activated, defaults to 2.
#number Classic
(non-automode) Number of overall systems activated, defaults to 6.
Return value:
self
Function to set a new SAM firing engage range, use this method to adjust range while running MANTIS, e.g.
for different setups day and night
Defined in:
MANTIS
Parameter:
#number range
Percent of the max fire range
Function to set switch-on/off zone for the SAM sites in meters.
Overwritten per SAM in automode.
Defined in:
MANTIS
Parameter:
#number radius
Radius of the firing zone in classic mode
Function to set SAM firing engage range, 0-100 percent, e.g.
85
Defined in:
MANTIS
Parameter:
#number range
Percent of the max fire range
[Internal] Function to set the SAM start state
Set using your own #INTEL_DLINK object instead of #DETECTION
Set using Emissions on/off instead of changing alarm state
Defined in:
MANTIS
Parameter:
#boolean switch
Decide if we are changing alarm state or Emission state
Triggers the FSM event "Start".
Starts the MANTIS. Initializes parameters and starts event handlers.
Defined in:
MANTIS
[Internal] Function to start the detection via AWACS if defined as separate (classic)
[Internal] Function to start the detection via EWR groups - if INTEL isn't available
[Internal] Function to start the detection with INTEL via EWR groups
[Internal] Function to determine state of the advanced mode
Defined in:
MANTIS
Return values:
#number:
Newly calculated interval
#number:
Previous state for tracking 0, 1, or 2
[Internal] Check detection function
Defined in:
MANTIS
Parameters:
Functional.Detection#DETECTION_AREAS detection
Detection object
#boolean dlink
Return value:
self
[Internal] Check advanced state
[Internal] Function to check accept and reject zones
Defined in:
MANTIS
Parameter:
Core.Point#COORDINATE coord
The coordinate to check
Return value:
#boolean:
outcome
[Internal] Check DLink state
[Internal] Function to check if EWR is (at least partially) alive
Defined in:
MANTIS
Return value:
#boolean:
True if EWR is alive, else false
[Internal] Function to check if HQ is alive
Defined in:
MANTIS
Return value:
#boolean:
True if HQ is alive, else false
[Internal] Check detection function
Defined in:
MANTIS
Parameters:
#table samset
Table of SAM data
#table detset
Table of COORDINATES
#boolean dlink
Using DLINK
#number limit
of SAM sites to go active on a contact
Return value:
self
[Internal] Function to check if any object is in the given SAM zone
Defined in:
MANTIS
Parameters:
#table dectset
Table of coordinates of detected items
Core.Point#COORDINATE samcoordinate
Coordinate object.
#number radius
Radius to check.
#number height
Height to check.
#boolean dlink
Data from DLINK.
Return values:
#boolean:
True if in any zone, else false
#number:
Distance Target distance in meters or zero when no object is in zone
[Internal] Function to get SAM firing data from units types.
Defined in:
MANTIS
Parameters:
#string grpname
Name of the group
#boolean mod
HDS mod flag
#boolean sma
SMA mod flag
#boolean chm
CH mod flag
Return values:
#number:
range Max firing range
#number:
height Max firing height
#string:
type Long, medium or short range
#number:
blind "blind" spot
[Internal] Function to get SAM firing data
Defined in:
MANTIS
Parameter:
#string grpname
Name of the group
Return values:
#number:
range Max firing range
#number:
height Max firing height
#string:
type Long, medium or short range
#number:
blind "blind" spot
[Internal] Function to get the self.SAM_Table
Defined in:
MANTIS
Return value:
#table:
table
[Internal] Function to prefilter height based
Defined in:
MANTIS
Parameter:
#number height
Return value:
#table:
set
[Internal] Function to update SAM table and SEAD state
[Internal] Relocation relay function
[Internal] Function to execute the relocation
[Internal] Function to set the self.SAM_Table
Triggers the FSM event "Start" after a delay.
Starts the MANTIS. Initializes parameters and starts event handlers.
Defined in:
MANTIS
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Status" after a delay.
Defined in:
MANTIS
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Stop" after a delay.
Stops the MANTIS and all its event handlers.
Defined in:
MANTIS
Parameter:
#number delay
Delay in seconds.
[Internal] Function triggered by Event AdvStateChange
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
#number Oldstate
Old state - 0 = green, 1 = amber, 2 = red
#number Newstate
New state - 0 = green, 1 = amber, 2 = red
#number Interval
Calculated detection interval based on state and advanced feature setting
Return value:
self
[Internal] Function triggered by Event GreenState
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The GROUP object whose state was changed
Return value:
self
[Internal] Function triggered by Event RedState
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The GROUP object whose state was changed
Return value:
self
[Internal] Function triggered by Event Relocating
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Return value:
self
[Internal] Function triggered by Event SeadSuppressionEnd
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The suppressed GROUP object
#string Name
Name of the suppressed group
[Internal] Function triggered by Event SeadSuppressionPlanned
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The suppressed GROUP object
#string Name
Name of the suppressed group
#number SuppressionStartTime
Model start time of the suppression from timer.getTime()
#number SuppressionEndTime
Model end time of the suppression from timer.getTime()
Wrapper.Group#GROUP Attacker
The attacking GROUP object
[Internal] Function triggered by Event SeadSuppressionStart
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Wrapper.Group#GROUP Group
The suppressed GROUP object
#string Name
Name of the suppressed group
Wrapper.Group#GROUP Attacker
The attacking GROUP object
[Internal] Function triggered by Event ShoradActivated
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
#string Name
Name of the GROUP which SHORAD shall protect
#number Radius
Radius around the named group to find SHORAD groups
#number Ontime
Seconds the SHORAD will stay active
[Internal] Function to set start state
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Return value:
self
[Internal] Status function for MANTIS
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Return value:
self
[Internal] Function to stop MANTIS
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Return value:
self
[Internal] Before status function for MANTIS
Defined in:
MANTIS
Parameters:
#string From
The From State
#string Event
The Event
#string To
The To State
Return value:
self
Field(s)
Prefix to build the #SET_GROUP for EWR group
Table of Core.Zone#ZONE Zones Consider SAM groups in this zone(s) only for this MANTIS instance, must be handed as #table of Zone objects.
The ME name of the HQ object
Table of SAM sites
Prefix to build the #SET_GROUP for SAM sites
table to hold alert states, so we don't trigger state changes twice in adv mode
Distance of an attacker in meters from a Mantis SAM site, on which Shorad will be switched on. Useful to not give away Shorad sites too early. Default 15km. Should be smaller than checkradius.
If true, #MANTIS has #SHORAD enabled
Timer in seconds, how long #SHORAD will be active after a detection inside of the defense range
Decide if we are using Emissions on/off (true) or AlarmState red/green (default)
Radius of the EWR detection
Boolean switch to use Awacs as a separate detection stream
Percentage to use for advanced mode, defaults to 100%
Advanced mode state tracker
Use advanced mode, will decrease reactivity of MANTIS, if HQ and/or EWR network dies. Set SAMs to RED state if both are dead. Requires usage of an HQ object
0.8 additions
Relocate HQ and EWR groups in random intervals. Note: You need to select units for this which are actually mobile
Detection range of an optional Awacs unit
If true, do not activate a SAM installation if a friendly aircraft is in firing range.
Radius of the SAM sites
Switch on extra messages
Interval in seconds for the target detection
Firing engage range of the SAMs, see [https://wiki.hoggitworld.com/view/DCS_option_engagementRange]
Radius to group detected objects
Prefix for logging
Name of this Mantis
random between 30 and 60 mins
switch alarm state RED
Switch on extra logging
TODO Version @field #string version
Function(s)
Clear the state of an object.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
StateName
The key that is should be cleared.
Creation of a Birth Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
#string IniUnitName
The initiating unit name.
place
subplace
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
IniObjectCategory
Creation of a Dead Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
IniObjectCategory
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Advanced state enumerator
Field(s)
Function(s)
SAM data
Field(s)
no-firing range (green circle)
Max firing height in km
Radar typename on unit level (used as key)
Max firing range in km
units from HDS Mod, multi launcher options is tricky
MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
Function(s)
SAM data CH
Field(s)
units from CH (Military Assets by Currenthill) https://www.currenthill.com/ group name MUST contain CHM to ID launcher type correctly!
no-firing range (green circle)
Max firing height in km
Radar typename on unit level (used as key)
Max firing range in km
MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
Function(s)
SAM data HDS
Field(s)
no-firing range (green circle)
Max firing height in km
Radar typename on unit level (used as key)
Max firing range in km
units from HDS Mod, multi launcher options is tricky group name MUST contain HDS to ID launcher type correctly!
MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
Function(s)
SAM data SMA
Field(s)
no-firing range (green circle)
Max firing height in km
units from SMA Mod (Sweedish Military Assets) https://forum.dcs.world/topic/295202-swedish-military-assets-for-dcs-by-currenthill/ group name MUST contain SMA to ID launcher type correctly!
Radar typename on unit level (used as key)
Max firing range in km
MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
Function(s)
SAM Type