Banner Image

Module Functional.Mantis

Functional -- Modular, Automatic and Network capable Targeting and Interception System for Air Defenses


MANTIS - Moose derived Modular, Automatic and Network capable Targeting and Interception System Controls a network of SAM sites.

Use detection to switch on the AA site closest to the enemy Leverage evasiveness from SEAD Leverage attack range setup added by DCS in 11/20


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

Simple Class for a more intelligent Air Defense System

MANTIS

Moose derived Modular, Automatic and Network capable Targeting and Interception System.

#MANTIS 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

Simple 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. Use detection to switch on the AA site closest to the enemy. Leverage evasiveness from Functional.Sead#SEAD. Leverage attack range setup added by DCS in 11/20.

Set up your SAM sites in the mission editor. Name the groups with common prefix like "Red SAM". Set up your EWR system in the mission editor. Name the groups with common prefix like "Red EWR". Can be e.g. AWACS or a combination of AWACS and Search Radars like e.g. EWR 1L13 etc. [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 importantance 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-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 to RED, 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 missione 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()

[optional] Use

  • MANTIS:SetEWRGrouping(radius)
  • MANTIS:SetEWRRange(radius)
  • MANTIS:SetSAMRadius(radius)
  • MANTIS:SetDetectInterval(interval)
  • MANTIS: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()

3. Default settings

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
  • 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)
  • acceptrange = 80000 (meters) - Detection (EWR) will on consider flights inside a 80km radius - MANTIS:SetEWRRange(radius)
  • detectinterval = 30 (seconds) - MANTIS will decide every 30 seconds which SAM to activate - MANTIS:SetDetectInterval(interval)
  • engagerange = 85 (percent) - SAMs will only fire if flights are inside of a 85% 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,coaltion,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

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()

and (optionally) 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

MANTIS.AWACS_Detection

The #DETECTION_AREAS object for AWACS

MANTIS.AWACS_Prefix

MANTIS:AddShorad(Shorad, Shoradtime)

Function to link up #MANTIS with a #SHORAD installation

MANTIS.Adv_EWR_Group

The EWR #SET_GROUP used for advanced mode

MANTIS.AdvancedState

MANTIS:CheckObjectInZone(dectset, samcoordinate)

[Internal] Function to check if any object is in the given SAM zone

MANTIS.ClassName

MANTIS.Coalition

MANTIS.DLTimeStamp

MANTIS.DLink

MANTIS:Debug(onoff)

Function to set switch-on/off the debug state

MANTIS.Detection

The #DETECTION_AREAS object for EWR

MANTIS.EWR_Group

The EWR #SET_GROUP

MANTIS.EWR_Templates_Prefix

Prefix to build the #SET_GROUP for EWR group

MANTIS:GetCommandCenter()

Function to get the HQ object for further use

MANTIS.HQ_CC

The #GROUP object of the HQ

MANTIS.HQ_Template_CC

The ME name of the HQ object

MANTIS:New(name, samprefix, ewrprefix, hq, coaltion, dynamic, awacs, EmOnOff, Padding)

Function to instantiate a new object of class MANTIS

MANTIS:OnAfterAdvStateChange(From, Event, To, Oldstate, Newstate, Interval)

On After "AdvStateChange" event.

MANTIS:OnAfterGreenState(From, Event, To, Group)

On After "GreenState" event.

MANTIS:OnAfterRedState(From, Event, To, Group)

On After "RedState" event.

MANTIS:OnAfterRelocating(From, Event, To)

On After "Relocating" event.

MANTIS:OnAfterSeadSuppressionEnd(From, Event, To, Group, Name)

On After "SeadSuppressionEnd" event.

MANTIS:OnAfterSeadSuppressionPlanned(From, Event, To, Group, Name, SuppressionStartTime, SuppressionEndTime)

On After "SeadSuppressionPlanned" event.

MANTIS:OnAfterSeadSuppressionStart(From, Event, To, Group, Name)

On After "SeadSuppressionStart" event.

MANTIS:OnAfterShoradActivated(From, Event, To, Name, Radius, Ontime)

On After "ShoradActivated" event.

MANTIS.Padding

MANTIS:RemoveShorad()

Function to unlink #MANTIS from a #SHORAD installation

MANTIS.SAM_Group

The SAM #SET_GROUP

MANTIS.SAM_Table

Table of SAM sites

MANTIS.SAM_Templates_Prefix

Prefix to build the #SET_GROUP for SAM sites

MANTIS.SamStateTracker

MANTIS:SetAdvancedMode(onoff, ratio)

Function to set Advanded Mode

MANTIS:SetAutoRelocate(hq, ewr)

Function to set autorelocation for HQ and EWR objects.

MANTIS:SetAwacs(prefix)

Function to set separate AWACS detection instance

MANTIS:SetAwacsRange(range)

Function to set AWACS detection range.

MANTIS:SetCommandCenter(group)

Function to set the HQ object for further use

MANTIS:SetDetectInterval(interval)

Function to set the detection interval

MANTIS:SetEWRGrouping(radius)

Function to set the grouping radius of the detection in meters

MANTIS:SetEWRRange(radius)

Function to set the detection radius of the EWR in meters

MANTIS:SetNewSAMRangeWhileRunning(range)

Function to set a new SAM firing engage range, use this method to adjust range while running MANTIS, e.g.

MANTIS:SetSAMRadius(radius)

Function to set switch-on/off zone for the SAM sites in meters

MANTIS:SetSAMRange(range)

Function to set SAM firing engage range, 0-100 percent, e.g.

MANTIS:SetSAMStartState()

[Internal] Function to set the SAM start state

MANTIS:SetUsingDLink(DLink)

Set using an #INTEL_DLINK object instead of #DETECTION

MANTIS:SetUsingEmOnOff(switch)

Set using Emissions on/off instead of changing alarm state

MANTIS.Shorad

SHORAD Object, if available

MANTIS.ShoradActDistance

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.

MANTIS.ShoradLink

If true, #MANTIS has #SHORAD enabled

MANTIS.ShoradTime

Timer in seconds, how long #SHORAD will be active after a detection inside of the defense range

MANTIS:Start()

Triggers the FSM event "Start".

MANTIS:StartAwacsDetection()

[Internal] Function to start the detection via AWACS if defined as separate

MANTIS:StartDetection()

[Internal] Function to start the detection via EWR groups

MANTIS:Status()

Triggers the FSM event "Status".

MANTIS.SuppressedGroups

MANTIS.TimeStamp

MANTIS.UseEmOnOff

Decide if we are using Emissions on/off (true) or AlarmState red/green (default)

MANTIS:_CalcAdvState()

[Internal] Function to determine state of the advanced mode

MANTIS:_Check(detection)

[Internal] Check detection function

MANTIS:_CheckAdvState()

[Internal] Check advanced state

MANTIS:_CheckDLinkState()

[Internal] Check DLink state

MANTIS:_CheckEWRState()

[Internal] Function to check if EWR is (at least partially) alive

MANTIS:_CheckHQState()

[Internal] Function to check if HQ is alive

MANTIS:_GetSAMTable()

[Internal] Function to get the self.SAM_Table

MANTIS:_RefreshSAMTable()

[Internal] Function to update SAM table and SEAD state

MANTIS:_Relocate()

[Internal] Relocation relay function

MANTIS:_RelocateGroups()

[Internal] Function to execute the relocation

MANTIS:_SetSAMTable(table)

[Internal] Function to set the self.SAM_Table

MANTIS:__Start(delay)

Triggers the FSM event "Start" after a delay.

MANTIS:__Status(delay)

Triggers the FSM event "Status" after a delay.

MANTIS:__Stop(delay)

Triggers the FSM event "Stop" after a delay.

MANTIS.acceptrange

Radius of the EWR detection

MANTIS.advAwacs

Boolean switch to use Awacs as a separate detection stream

MANTIS.adv_ratio

Percentage to use for advanced mode, defaults to 100%

MANTIS.adv_state

Advanced mode state tracker

MANTIS.advanced

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

MANTIS.autorelocate

Relocate HQ and EWR groups in random intervals. Note: You need to select units for this which are actually mobile

MANTIS.autorelocateunits

MANTIS.awacsrange

Detection range of an optional Awacs unit

MANTIS.checkradius

Radius of the SAM sites

MANTIS.debug

Switch on extra messages

MANTIS.detectinterval

Interval in seconds for the target detection

MANTIS.dynamic

MANTIS.engagerange

Firing engage range of the SAMs, see [https://wiki.hoggitworld.com/view/DCS_option_engagementRange]

MANTIS.grouping

Radius to group detected objects

MANTIS.lid

Prefix for logging

MANTIS.mysead

MANTIS.name

Name of this Mantis

MANTIS:onafterAdvStateChange(From, Event, To, Oldstate, Newstate, Interval)

[Internal] Function triggered by Event AdvStateChange

MANTIS:onafterGreenState(From, Event, To, Group)

[Internal] Function triggered by Event GreenState

MANTIS:onafterRedState(From, Event, To, Group)

[Internal] Function triggered by Event RedState

MANTIS:onafterRelocating(From, Event, To)

[Internal] Function triggered by Event Relocating

MANTIS:onafterSeadSuppressionEnd(From, Event, To, Group, Name)

[Internal] Function triggered by Event SeadSuppressionEnd

MANTIS:onafterSeadSuppressionPlanned(From, Event, To, Group, Name, SuppressionStartTime, SuppressionEndTime)

[Internal] Function triggered by Event SeadSuppressionPlanned

MANTIS:onafterSeadSuppressionStart(From, Event, To, Group, Name)

[Internal] Function triggered by Event SeadSuppressionStart

MANTIS:onafterShoradActivated(From, Event, To, Name, Radius, Ontime)

[Internal] Function triggered by Event ShoradActivated

MANTIS:onafterStart(From, Event, To)

[Internal] Function to set start state

MANTIS:onafterStatus(From, Event, To)

[Internal] Status function for MANTIS

MANTIS:onafterStop(From, Event, To)

[Internal] Function to stop MANTIS

MANTIS:onbeforeStatus(From, Event, To)

[Internal] Before status function for MANTIS

MANTIS.relointerval

MANTIS.state2flag

MANTIS.verbose

Switch on extra logging

MANTIS.version

Fields and Methods inherited from BASE Description

MANTIS.ClassID

The ID number of the class.

MANTIS.ClassName

The name of the class.

MANTIS.ClassNameAndID

The name of the class concatenated with the ID number of the class.

MANTIS:ClearState(Object, StateName)

Clear the state of an object.

MANTIS:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)

Creation of a Birth Event.

MANTIS:CreateEventCrash(EventTime, Initiator)

Creation of a Crash Event.

MANTIS:CreateEventDead(EventTime, Initiator)

Creation of a Dead Event.

MANTIS:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

MANTIS:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

MANTIS:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

MANTIS:E(Arguments)

Log an exception which will be traced always.

MANTIS:EventDispatcher()

Returns the event dispatcher

MANTIS:EventRemoveAll()

Remove all subscribed events

MANTIS:F(Arguments)

Trace a function call.

MANTIS:F2(Arguments)

Trace a function call level 2.

MANTIS:F3(Arguments)

Trace a function call level 3.

MANTIS:GetClassID()

Get the ClassID of the class instance.

MANTIS:GetClassName()

Get the ClassName of the class instance.

MANTIS:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

MANTIS:GetEventPriority()

Get the Class Event processing Priority.

MANTIS:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

MANTIS:GetState(Object, Key)

Get a Value given a Key from the Object.

MANTIS:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

MANTIS:I(Arguments)

Log an information which will be traced always.

MANTIS:Inherit(Child, Parent)

This is the worker method to inherit from a parent class.

MANTIS:IsInstanceOf(ClassName)

This is the worker method to check if an object is an (sub)instance of a class.

MANTIS:IsTrace()

Enquires if tracing is on (for the class).

MANTIS:New()

BASE constructor.

MANTIS:OnEvent(EventData)

Occurs when an object is completely destroyed.

MANTIS:OnEventBDA(EventData)

BDA.

MANTIS:OnEventBaseCaptured(EventData)

Occurs when a ground unit captures either an airbase or a farp.

MANTIS:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

MANTIS:OnEventCrash(EventData)

Occurs when any aircraft crashes into the ground and is completely destroyed.

MANTIS:OnEventDead(EventData)

Occurs when an object is dead.

MANTIS:OnEventDetailedFailure(EventData)

Unknown precisely what creates this event, likely tied into newer damage model.

MANTIS:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

MANTIS:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected

MANTIS:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

MANTIS:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

MANTIS:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

MANTIS:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

MANTIS:OnEventKill(EventData)

Occurs on the death of a unit.

MANTIS:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed.

MANTIS:OnEventLandingAfterEjection(EventData)

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

MANTIS:OnEventLandingQualityMark(EventData)

Landing quality mark.

MANTIS:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

MANTIS:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

MANTIS:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

MANTIS:OnEventMissionEnd(EventData)

Occurs when a mission ends.

MANTIS:OnEventMissionStart(EventData)

Occurs when a mission starts.

MANTIS:OnEventParatrooperLanding(EventData)

Weapon add.

MANTIS:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

MANTIS:OnEventPlayerEnterAircraft(EventData)

Occurs when a player enters a slot and takes control of an aircraft.

MANTIS:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

MANTIS:OnEventPlayerLeaveUnit(EventData)

Occurs when any player relieves control of a unit to the AI.

MANTIS:OnEventRefueling(EventData)

Occurs when an aircraft connects with a tanker and begins taking on fuel.

MANTIS:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

MANTIS:OnEventScore(EventData)

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

MANTIS:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

MANTIS:OnEventShootingStart(EventData)

Occurs when any unit begins firing a weapon that has a high rate of fire.

MANTIS:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

MANTIS:OnEventTakeoff(EventData)

Occurs when an aircraft takes off from an airbase, farp, or ship.

MANTIS:OnEventTriggerZone(EventData)

Trigger zone.

MANTIS:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

MANTIS:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

MANTIS:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...)

Schedule a new time event.

MANTIS:ScheduleStop(SchedulerFunction)

Stops the Schedule.

MANTIS.Scheduler

MANTIS:SetEventPriority(EventPriority)

Set the Class Event processing Priority.

MANTIS:SetState(Object, Key, Value)

Set a state or property of the Object given a Key and a Value.

MANTIS:T(Arguments)

Trace a function logic level 1.

MANTIS:T2(Arguments)

Trace a function logic level 2.

MANTIS:T3(Arguments)

Trace a function logic level 3.

MANTIS:TraceAll(TraceAll)

Trace all methods in MOOSE

MANTIS:TraceClass(Class)

Set tracing for a class

MANTIS:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

MANTIS:TraceLevel(Level)

Set trace level

MANTIS:TraceOff()

Set trace off.

MANTIS:TraceOn()

Set trace on.

MANTIS:TraceOnOff(TraceOnOff)

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.

MANTIS:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

MANTIS._

MANTIS:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

MANTIS:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

MANTIS.__

MANTIS:onEvent(event)

Fields and Methods inherited from MANTIS.AdvancedState Description

MANTIS.AdvancedState.AMBER

MANTIS.AdvancedState.GREEN

MANTIS.AdvancedState.RED

  • MANTIS class, extends Core.Base#BASE

Field(s)

Functional.Detection#DETECTION_AREAS MANTIS.AWACS_Detection

The #DETECTION_AREAS object for AWACS

Core.Set#SET_GROUP MANTIS.Adv_EWR_Group

The EWR #SET_GROUP used for advanced mode

#boolean MANTIS.DLink
Functional.Detection#DETECTION_AREAS MANTIS.Detection

The #DETECTION_AREAS object for EWR

#string MANTIS.EWR_Templates_Prefix

Prefix to build the #SET_GROUP for EWR group

Wrapper.Group#GROUP MANTIS.HQ_CC

The #GROUP object of the HQ

#string MANTIS.HQ_Template_CC

The ME name of the HQ object

#table MANTIS.SAM_Table

Table of SAM sites

#string MANTIS.SAM_Templates_Prefix

Prefix to build the #SET_GROUP for SAM sites

#table MANTIS.SamStateTracker

table to hold alert states, so we don't trigger state changes twice in adv mode

Functional.Shorad#SHORAD MANTIS.Shorad

SHORAD Object, if available

#number MANTIS.ShoradActDistance

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.

#boolean MANTIS.ShoradLink

If true, #MANTIS has #SHORAD enabled

#number MANTIS.ShoradTime

Timer in seconds, how long #SHORAD will be active after a detection inside of the defense range

#boolean MANTIS.UseEmOnOff

Decide if we are using Emissions on/off (true) or AlarmState red/green (default)

#number MANTIS.acceptrange

Radius of the EWR detection

#boolean MANTIS.advAwacs

Boolean switch to use Awacs as a separate detection stream

#number MANTIS.adv_ratio

Percentage to use for advanced mode, defaults to 100%

#number MANTIS.adv_state

Advanced mode state tracker

#boolean MANTIS.advanced

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

#boolean MANTIS.autorelocate

Relocate HQ and EWR groups in random intervals. Note: You need to select units for this which are actually mobile

#number MANTIS.awacsrange

Detection range of an optional Awacs unit

#number MANTIS.checkradius

Radius of the SAM sites

#boolean MANTIS.debug

Switch on extra messages

#number MANTIS.detectinterval

Interval in seconds for the target detection

#number MANTIS.engagerange

Firing engage range of the SAMs, see [https://wiki.hoggitworld.com/view/DCS_option_engagementRange]

#number MANTIS.grouping

Radius to group detected objects

#string MANTIS.lid

Prefix for logging

#string MANTIS.name

Name of this Mantis

MANTIS.relointerval

random between 30 and 60 mins

#boolean MANTIS.verbose

Switch on extra logging

#string MANTIS.version

@field #string version

Function(s)

Function to link up #MANTIS with a #SHORAD installation

Defined in:

MANTIS

Parameters:

The #SHORAD object

#number Shoradtime

Number of seconds #SHORAD stays active post wake-up

[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.

Return values:

#boolean:

True if in any zone, else false

#number:

Distance Target distance in meters or zero when no object is in zone

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 coaltion

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)

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

  * MANTIS:SetEWRGrouping(radius)
  * MANTIS:SetEWRRange(radius)
  * MANTIS:SetSAMRadius(radius)
  * MANTIS:SetDetectInterval(interval)
  * MANTIS: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

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

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

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

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()

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

The suppressed GROUP object

#string Name

Name of the suppressed groupe

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 unlink #MANTIS from a #SHORAD installation

Defined in:

MANTIS

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

Defined in:

MANTIS

Parameter:

The #GROUP object to be set as HQ

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

Defined in:

MANTIS

Parameter:

#number radius

Radius of the EWR detection zone

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

Defined in:

MANTIS

Parameter:

#number radius

Radius of the firing zone

Function to set SAM firing engage range, 0-100 percent, e.g.

75

Defined in:

MANTIS

Parameter:

#number range

Percent of the max fire range

[Internal] Function to set the SAM start state

Defined in:

MANTIS

Return value:

self

Set using an #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

Defined in:

MANTIS

Return value:

The running detection set

[Internal] Function to start the detection via EWR groups

Defined in:

MANTIS

Return value:

The running detection set

Triggers the FSM event "Status".

Defined in:

MANTIS

[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

Parameter:

Detection object

Return value:

self

[Internal] Check advanced state

Defined in:

MANTIS

Return value:

self

[Internal] Check DLink state

Defined in:

MANTIS

Return value:

self

[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] Function to get the self.SAM_Table

Defined in:

MANTIS

Return value:

#table:

table

[Internal] Function to update SAM table and SEAD state

Defined in:

MANTIS

Return value:

self

[Internal] Relocation relay function

Defined in:

MANTIS

Return value:

self

[Internal] Function to execute the relocation

Defined in:

MANTIS

[Internal] Function to set the self.SAM_Table

Defined in:

MANTIS

Parameter:

table

Return value:

self

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

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

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

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

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()

[Internal] Function triggered by Event SeadSuppressionStart

Defined in:

MANTIS

Parameters:

#string From

The From State

#string Event

The Event

#string To

The To State

The suppressed GROUP object

#string Name

Name of the suppressed group

[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)

Functional.Detection#DETECTION_AREAS MANTIS.AWACS_Detection

The #DETECTION_AREAS object for AWACS

Core.Set#SET_GROUP MANTIS.Adv_EWR_Group

The EWR #SET_GROUP used for advanced mode

#boolean MANTIS.DLink
Functional.Detection#DETECTION_AREAS MANTIS.Detection

The #DETECTION_AREAS object for EWR

#string MANTIS.EWR_Templates_Prefix

Prefix to build the #SET_GROUP for EWR group

Wrapper.Group#GROUP MANTIS.HQ_CC

The #GROUP object of the HQ

#string MANTIS.HQ_Template_CC

The ME name of the HQ object

#table MANTIS.SAM_Table

Table of SAM sites

#string MANTIS.SAM_Templates_Prefix

Prefix to build the #SET_GROUP for SAM sites

#table MANTIS.SamStateTracker

table to hold alert states, so we don't trigger state changes twice in adv mode

Functional.Shorad#SHORAD MANTIS.Shorad

SHORAD Object, if available

#number MANTIS.ShoradActDistance

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.

#boolean MANTIS.ShoradLink

If true, #MANTIS has #SHORAD enabled

#number MANTIS.ShoradTime

Timer in seconds, how long #SHORAD will be active after a detection inside of the defense range

#boolean MANTIS.UseEmOnOff

Decide if we are using Emissions on/off (true) or AlarmState red/green (default)

#number MANTIS.acceptrange

Radius of the EWR detection

#boolean MANTIS.advAwacs

Boolean switch to use Awacs as a separate detection stream

#number MANTIS.adv_ratio

Percentage to use for advanced mode, defaults to 100%

#number MANTIS.adv_state

Advanced mode state tracker

#boolean MANTIS.advanced

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

#boolean MANTIS.autorelocate

Relocate HQ and EWR groups in random intervals. Note: You need to select units for this which are actually mobile

#number MANTIS.awacsrange

Detection range of an optional Awacs unit

#number MANTIS.checkradius

Radius of the SAM sites

#boolean MANTIS.debug

Switch on extra messages

#number MANTIS.detectinterval

Interval in seconds for the target detection

#number MANTIS.engagerange

Firing engage range of the SAMs, see [https://wiki.hoggitworld.com/view/DCS_option_engagementRange]

#number MANTIS.grouping

Radius to group detected objects

#string MANTIS.lid

Prefix for logging

#string MANTIS.name

Name of this Mantis

MANTIS.relointerval

random between 30 and 60 mins

#boolean MANTIS.verbose

Switch on extra logging

#string MANTIS.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.

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.

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

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.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class 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.

Defined in:

Return value:

#number:

The Event processing Priority.

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()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

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:

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.

Defined in:

Parameter:

Arguments

A #table or any field.

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).

Defined in:

Return value:

#boolean:

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

Defined in:

Return value:

Occurs when an object is completely destroyed.

initiator : The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

BDA.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

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.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

initiator : The unit that was spawned.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

initiator : The unit that has crashed.

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

initiator : The unit that is stopping its engines..

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

initiator : The unit that is starting its engines..

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

initiator : The unit object the fired the weapon. weapon: Weapon object that hit the target. target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

initiator : The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

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.

  • initiator: The unit that killed the target.
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed.

place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships.

Defined in:

Parameter:

The EventData structure.

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.

  • 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.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.

Defined in:

Parameter:

The EventData structure.

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. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

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.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), auto cannons, and machine guns. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or auto cannon based weapon, those are handled by EVENT.ShootingStart.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

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:

#number:

The ScheduleID 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:

#number:

The ScheduleID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

Set the Class 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.

Defined in:

Parameter:

#number EventPriority

The Event processing Priority.

Return value:

self

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.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

#string Method

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

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.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event

Defined in:

Parameter:

event

Advanced state enumerator

Field(s)

Function(s)