Banner Image

Module Ops.EasyGCICAP

Easy CAP/GCI Class, based on OPS classes

Documentation

https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Ops.EasyGCICAP.html


Date: September 2023

  • Ops - Easy GCI & CAP Manager

Main Features:

  • Automatically create and manage A2A CAP/GCI defenses using an AirWing and Squadrons for one coalition
  • Easy set-up
  • Add additional AirWings on other airbases
  • Each wing can have more than one Squadron - tasking to Squadrons is done on a random basis per AirWing
  • Create borders and zones of engagement
  • Detection can be ground based and/or via AWACS

AUTHOR: applevangelist

Global(s)

Global EASYGCICAP

*“Airspeed, altitude, and brains.

#EASYGCICAP EASYGCICAP

*“Airspeed, altitude, and brains.

Two are always needed to successfully complete the flight.”* -- Unknown.


The EasyGCICAP Concept

The idea of this class is partially to make the OPS classes easier operational for an A2A CAP/GCI defense network, and to replace the legacy AI_A2A_Dispatcher system - not to it's full extent, but make a basic system work very quickly.

Setup

Basic understanding

The basics are, there is one and only one AirWing per airbase. Each AirWing has at least one Squadron, who will do both CAP and GCI tasks. Squadrons will be randomly chosen for the task at hand. Each AirWing has at least one CAP Point that it manages. CAP Points will be covered by the AirWing automatically as long as airframes are available. Detected intruders will be assigned to one AirWing based on proximity (that is, if you have more than one).

Assignment of tasks for intruders

Either a CAP Plane or a newly spawned GCI plane will take care of the intruders. Standard overhead is 0.75, i.e. a group of 3 intrudes will be managed by 2 planes from the assigned AirWing. There is an maximum missions limitation per AirWing, so we do not spam the skies.

Basic set-up code

Prerequisites

You have to put a STATIC object on the airbase with the UNIT name according to the name of the airbase. E.g. for Kuitaisi this has to have the name Kutaisi. This object symbolizes the AirWing HQ. Next put a late activated template group for your CAP/GCI Squadron on the map. Last, put a zone on the map for the CAP operations, let's name it "Blue Zone 1". Size of the zone plays no role. Put an EW radar system on the map and name it aptly, like "Blue EWR".

Code it

     -- Set up a basic system for the blue side, we'll reside on Kutaisi, and use GROUP objects with "Blue EWR" in the name as EW Radar Systems.
     local mywing = EASYGCICAP:New("Blue CAP Operations",AIRBASE.Caucasus.Kutaisi,"blue","Blue EWR")

     -- Add a CAP patrol point belonging to our airbase, we'll be at 30k ft doing 400 kn, initial direction 90 degrees (East), leg 20NM
     mywing:AddPatrolPointCAP(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone 1"):GetCoordinate(),30000,400,90,20)

     -- Add a Squadron with template "Blue Sq1 M2000c", 20 airframes, skill good, Modex starting with 102 and skin "Vendee Jeanne"
     mywing:AddSquadron("Blue Sq1 M2000c","CAP Kutaisi",AIRBASE.Caucasus.Kutaisi,20,AI.Skill.GOOD,102,"ec1.5_Vendee_Jeanne_clean")

     -- Add a couple of zones
     -- We'll defend our border
     mywing:AddAcceptZone(ZONE_POLYGON:New( "Blue Border", GROUP:FindByName( "Blue Border" ) ))
     -- We'll attack intruders also here
     mywing:AddAcceptZone(ZONE_POLYGON:New("Red Defense Zone", GROUP:FindByName( "Red Defense Zone" )))
     -- We'll leave the reds alone on their turf
     mywing:AddRejectZone(ZONE_POLYGON:New( "Red Border", GROUP:FindByName( "Red Border" ) ))

     -- Optional - Draw the borders on the map so we see what's going on
     -- Set up borders on map
     local BlueBorder = ZONE_POLYGON:New( "Blue Border", GROUP:FindByName( "Blue Border" ) )
     BlueBorder:DrawZone(-1,{0,0,1},1,FillColor,FillAlpha,1,true)
     local BlueNoGoZone = ZONE_POLYGON:New("Red Defense Zone", GROUP:FindByName( "Red Defense Zone" ))
     BlueNoGoZone:DrawZone(-1,{1,1,0},1,FillColor,FillAlpha,2,true)
     local BlueNoGoZone2 = ZONE_POLYGON:New( "Red Border", GROUP:FindByName( "Red Border" ) )
     BlueNoGoZone2:DrawZone(-1,{1,0,0},1,FillColor,FillAlpha,4,true)

Add a second airwing with squads and own CAP point (optional)

     -- Set this up at Sukhumi
     mywing:AddAirwing(AIRBASE.Caucasus.Sukhumi_Babushara,"Blue CAP Sukhumi")
     -- CAP Point "Blue Zone 2"
     mywing:AddPatrolPointCAP(AIRBASE.Caucasus.Sukhumi_Babushara,ZONE:FindByName("Blue Zone 2"):GetCoordinate(),30000,400,90,20)

     -- This one has two squadrons to choose from
     mywing:AddSquadron("Blue Sq3 F16","CAP Sukhumi II",AIRBASE.Caucasus.Sukhumi_Babushara,20,AI.Skill.GOOD,402,"JASDF 6th TFS 43-8526 Skull Riders")
     mywing:AddSquadron("Blue Sq2 F15","CAP Sukhumi I",AIRBASE.Caucasus.Sukhumi_Babushara,20,AI.Skill.GOOD,202,"390th Fighter SQN")

Add a tanker (optional)

   -- **Note** If you need different tanker types, i.e. Boom and Drogue, set them up at different AirWings!
   -- Add a tanker point
   mywing:AddPatrolPointTanker(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone Tanker"):GetCoordinate(),20000,280,270,50)
   -- Add a tanker squad - Radio 251 AM, TACAN 51Y
   mywing:AddTankerSquadron("Blue Tanker","Tanker Ops Kutaisi",AIRBASE.Caucasus.Kutaisi,20,AI.Skill.EXCELLENT,602,nil,251,radio.modulation.AM,51)

Add an AWACS (optional)

   -- Add an AWACS point
   mywing:AddPatrolPointAwacs(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone AWACS"):GetCoordinate(),25000,300,270,50)
   -- Add an AWACS squad - Radio 251 AM, TACAN 51Y
   mywing:AddAWACSSquadron("Blue AWACS","AWACS Ops Kutaisi",AIRBASE.Caucasus.Kutaisi,20,AI.Skill.AVERAGE,702,nil,271,radio.modulation.AM)        

Fine-Tuning

Change Defaults

Debug and Monitor

     mywing.debug = true -- log information
     mywing.Monitor = true -- show some statistics on screen

Type(s)

EASYGCICAP , extends Core.Fsm#FSM , extends Core.Base#BASE
Fields and Methods inherited from EASYGCICAP Description

EASYGCICAP:AddAWACSSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation)

Add an AWACS Squadron to an Airwing of the manager

EASYGCICAP:AddAcceptZone(Zone)

Add a zone to the accepted zones set.

EASYGCICAP:AddAirwing(Airbasename, Alias)

Add an AirWing to the manager

EASYGCICAP:AddPatrolPointAwacs(AirbaseName, Coordinate, Altitude, Speed, Heading, LegLength)

Add an AWACS patrol point to a Wing

EASYGCICAP:AddPatrolPointCAP(AirbaseName, Coordinate, Altitude, Speed, Heading, LegLength)

Add a CAP patrol point to a Wing

EASYGCICAP:AddPatrolPointRecon(AirbaseName, Coordinate, Altitude, Speed, Heading, LegLength)

Add a RECON patrol point to a Wing

EASYGCICAP:AddPatrolPointTanker(AirbaseName, Coordinate, Altitude, Speed, Heading, LegLength)

Add a TANKER patrol point to a Wing

EASYGCICAP:AddReconSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery)

Add a Recon Squadron to an Airwing of the manager

EASYGCICAP:AddRejectZone(Zone)

Add a zone to the rejected zones set.

EASYGCICAP:AddSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery)

Add a Squadron to an Airwing of the manager

EASYGCICAP:AddTankerSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation, TACAN)

Add a Tanker Squadron to an Airwing of the manager

EASYGCICAP.CapFormation

EASYGCICAP.ClassName

EASYGCICAP.EWRName

EASYGCICAP.GoZoneSet

EASYGCICAP.Intel

EASYGCICAP.ManagedAW

EASYGCICAP.ManagedCP

EASYGCICAP.ManagedEWR

EASYGCICAP.ManagedREC

EASYGCICAP.ManagedSQ

EASYGCICAP.ManagedTK

EASYGCICAP.MaxAliveMissions

EASYGCICAP.Monitor

EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)

Create a new GCICAP Manager

EASYGCICAP.NoGoZoneSet

EASYGCICAP.ReadyFlightGroups

EASYGCICAP:SetCAPFormation(Formation)

Set CAP formation.

EASYGCICAP:SetCapStartTimeVariation(Start, End)

Set CAP mission start to vary randomly between Start end End seconds.

EASYGCICAP:SetDefaultCAPAlt(Altitude)

Set default CAP Altitude in feet

EASYGCICAP:SetDefaultCAPDirection(Direction)

Set default CAP lieg initial direction in degrees

EASYGCICAP:SetDefaultCAPGrouping(Grouping)

Set default grouping, i.e.

EASYGCICAP:SetDefaultCAPLeg(Leg)

Set default leg length in NM

EASYGCICAP:SetDefaultCAPSpeed(Speed)

Set default CAP Speed in knots

EASYGCICAP:SetDefaultEngageRange(Range)

Set default engage range for intruders detected by CAP flights in NM.

EASYGCICAP:SetDefaultMissionRange(Range)

Set default range planes can fly from their homebase in NM

EASYGCICAP:SetDefaultNumberAlter5Standby(Airframes)

Set default number of airframes standing by for intercept tasks (visible on the airfield)

EASYGCICAP:SetDefaultOverhead(Overhead)

Set default overhead for intercept calculations

EASYGCICAP:SetDefaultRepeatOnFailure(Retries)

Add default repeat attempts if an Intruder intercepts fails.

EASYGCICAP:SetDefaultResurrection(Seconds)

Add default time to resurrect Airwing building if destroyed

EASYGCICAP:SetMaxAliveMissions(Maxiumum)

Set Maximum of alive missions to stop airplanes spamming the map

EASYGCICAP:SetTankerAndAWACSInvisible(Switch)

Set Tanker and AWACS to be invisible to enemy AI eyes

EASYGCICAP.TankerInvisible

EASYGCICAP:_AddAWACSSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation)

(Internal) Add a AWACS Squadron to an Airwing of the manager

EASYGCICAP:_AddAirwing(Airbasename, Alias)

(internal) Create and add another AirWing to the manager

EASYGCICAP:_AddReconSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery)

(Internal) Add a Recon Squadron to an Airwing of the manager

EASYGCICAP:_AddSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation)

(Internal) Add a Squadron to an Airwing of the manager

EASYGCICAP:_AddTankerSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation, TACAN)

(Internal) Add a Tanker Squadron to an Airwing of the manager

EASYGCICAP:_AssignIntercept(Cluster)

Add a zone to the rejected zones set.

EASYGCICAP:_CreateAirwings()

(Internal) Create actual AirWings from the list

EASYGCICAP:_CreateSquads()

(Internal) Create actual Squadrons from the list

EASYGCICAP:_SetAwacsPatrolPoints()

(Internal) Set actual Awacs Points from the list

EASYGCICAP:_SetCAPPatrolPoints()

(Internal) Set actual PatrolPoints from the list

EASYGCICAP:_SetReconPatrolPoints()

(Internal) Set actual PatrolPoints from the list

EASYGCICAP:_SetTankerPatrolPoints()

(Internal) Set actual Tanker Points from the list

EASYGCICAP:_StartIntel()

(Internal) Start detection.

EASYGCICAP:_TryAssignIntercept(ReadyFlightGroups, InterceptAuftrag, Group, WingSize)

(Internal) Try to assign the intercept to a FlightGroup already in air and ready.

EASYGCICAP.airbase

EASYGCICAP.airbasename

EASYGCICAP.alias

EASYGCICAP.capOptionVaryEndTime

EASYGCICAP.capOptionVaryStartTime

EASYGCICAP.capalt

EASYGCICAP.capdir

EASYGCICAP.capgrouping

EASYGCICAP.capleg

EASYGCICAP.capspeed

EASYGCICAP.coalition

EASYGCICAP.coalitionname

EASYGCICAP.debug

EASYGCICAP.engagerange

EASYGCICAP.lid

EASYGCICAP.maxinterceptsize

EASYGCICAP.missionrange

EASYGCICAP.noaltert5

EASYGCICAP:onafterStart(From, Event, To)

(Internal) FSM Function onafterStart

EASYGCICAP:onafterStatus(From, Event, To)

(Internal) FSM Function onafterStatus

EASYGCICAP:onafterStop(From, Event, To)

(Internal) FSM Function onafterStop

EASYGCICAP:onbeforeStatus(From, Event, To)

(Internal) FSM Function onbeforeStatus

EASYGCICAP.overhead

EASYGCICAP.repeatsonfailure

EASYGCICAP.resurrection

EASYGCICAP.version

EASYGCICAP class version.

EASYGCICAP.wings

Fields and Methods inherited from FSM Description

EASYGCICAP:AddEndState(State)

Adds an End state.

EASYGCICAP:AddProcess(From, Event, Process, ReturnEvents)

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

EASYGCICAP:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

EASYGCICAP:AddScoreProcess(From, Event, State, ScoreText, Score)

Adds a score for the FSM_PROCESS to be achieved.

EASYGCICAP:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

EASYGCICAP.CallScheduler

Call scheduler.

EASYGCICAP.ClassName

Name of the class.

EASYGCICAP.Events

EASYGCICAP:GetCurrentState()

Get current state.

EASYGCICAP:GetEndStates()

Returns the End states.

EASYGCICAP:GetProcess(From, Event)

EASYGCICAP:GetProcesses()

Returns a table of the SubFSM rules defined within the FSM.

EASYGCICAP:GetScores()

Returns a table with the scores defined.

EASYGCICAP:GetStartState()

Returns the start state of the FSM.

EASYGCICAP:GetState()

Get current state.

EASYGCICAP:GetSubs()

Returns a table with the Subs defined.

EASYGCICAP:GetTransitions()

Returns a table of the transition rules defined within the FSM.

EASYGCICAP:Is(State)

Check if FSM is in state.

EASYGCICAP:LoadCallBacks(CallBackTable)

Load call backs.

EASYGCICAP:New()

Creates a new FSM object.

EASYGCICAP.Scores

Scores.

EASYGCICAP:SetProcess(From, Event, Fsm)

EASYGCICAP:SetStartState(State)

Sets the start state of the FSM.

EASYGCICAP._EndStates

EASYGCICAP._EventSchedules

EASYGCICAP._Processes

EASYGCICAP._Scores

EASYGCICAP._StartState

EASYGCICAP._Transitions

EASYGCICAP:_add_to_map(Map, Event)

Add to map.

EASYGCICAP:_call_handler(step, trigger, params, EventName)

Call handler.

EASYGCICAP:_create_transition(EventName)

Create transition.

EASYGCICAP:_delayed_transition(EventName)

Delayed transition.

EASYGCICAP:_eventmap(Events, EventStructure)

Event map.

EASYGCICAP:_gosub(ParentFrom, ParentEvent)

Go sub.

EASYGCICAP:_handler(EventName, ...)

Handler.

EASYGCICAP:_isendstate(Current)

Is end state.

EASYGCICAP:_submap(subs, sub, name)

Sub maps.

EASYGCICAP:can(e)

Check if can do an event.

EASYGCICAP:cannot(e)

Check if cannot do an event.

EASYGCICAP.current

Current state name.

EASYGCICAP.endstates

EASYGCICAP:is(State, state)

Check if FSM is in state.

EASYGCICAP.options

Options.

EASYGCICAP.subs

Subs.

Fields and Methods inherited from BASE Description

EASYGCICAP.ClassID

The ID number of the class.

EASYGCICAP.ClassName

The name of the class.

EASYGCICAP.ClassNameAndID

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

EASYGCICAP:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

EASYGCICAP:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

EASYGCICAP:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

EASYGCICAP:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

EASYGCICAP:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

EASYGCICAP:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

EASYGCICAP:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

EASYGCICAP:E(Arguments)

Log an exception which will be traced always.

EASYGCICAP:EventDispatcher()

Returns the event dispatcher

EASYGCICAP:EventRemoveAll()

Remove all subscribed events

EASYGCICAP:F(Arguments)

Trace a function call.

EASYGCICAP:F2(Arguments)

Trace a function call level 2.

EASYGCICAP:F3(Arguments)

Trace a function call level 3.

EASYGCICAP:GetClassID()

Get the ClassID of the class instance.

EASYGCICAP:GetClassName()

Get the ClassName of the class instance.

EASYGCICAP:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

EASYGCICAP:GetEventPriority()

Get the Class Core.Event processing Priority.

EASYGCICAP:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

EASYGCICAP:GetState(Object, Key)

Get a Value given a Key from the Object.

EASYGCICAP:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

EASYGCICAP:I(Arguments)

Log an information which will be traced always.

EASYGCICAP:Inherit(Child, Parent)

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

EASYGCICAP:IsInstanceOf(ClassName)

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

EASYGCICAP:IsTrace()

Enquires if tracing is on (for the class).

EASYGCICAP:New()

BASE constructor.

EASYGCICAP:OnEvent(EventData)

Occurs when an Event for an object is triggered.

EASYGCICAP:OnEventBDA(EventData)

BDA.

EASYGCICAP:OnEventBaseCaptured(EventData)

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

EASYGCICAP:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

EASYGCICAP:OnEventCrash(EventData)

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

EASYGCICAP:OnEventDead(EventData)

Occurs when an object is dead.

EASYGCICAP:OnEventDetailedFailure(EventData)

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

EASYGCICAP:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

EASYGCICAP:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

EASYGCICAP:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

EASYGCICAP:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

EASYGCICAP:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

EASYGCICAP:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

EASYGCICAP:OnEventKill(EventData)

Occurs on the death of a unit.

EASYGCICAP:OnEventLand(EventData)

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.

EASYGCICAP:OnEventLandingAfterEjection(EventData)

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

EASYGCICAP:OnEventLandingQualityMark(EventData)

Landing quality mark.

EASYGCICAP:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

EASYGCICAP:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

EASYGCICAP:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

EASYGCICAP:OnEventMissionEnd(EventData)

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

EASYGCICAP:OnEventMissionStart(EventData)

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

EASYGCICAP:OnEventParatrooperLanding(EventData)

Weapon add.

EASYGCICAP:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

EASYGCICAP:OnEventPlayerEnterAircraft(EventData)

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

EASYGCICAP:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

EASYGCICAP:OnEventPlayerLeaveUnit(EventData)

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

EASYGCICAP:OnEventRefueling(EventData)

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

EASYGCICAP:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

EASYGCICAP:OnEventScore(EventData)

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

EASYGCICAP:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

EASYGCICAP:OnEventShootingStart(EventData)

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

EASYGCICAP:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

EASYGCICAP:OnEventTakeoff(EventData)

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

EASYGCICAP:OnEventTriggerZone(EventData)

Trigger zone.

EASYGCICAP:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

EASYGCICAP:ScheduleStop(SchedulerID)

Stops the Schedule.

EASYGCICAP.Scheduler

EASYGCICAP:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

EASYGCICAP:SetState(Object, Key, Value)

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

EASYGCICAP:T(Arguments)

Trace a function logic level 1.

EASYGCICAP:T2(Arguments)

Trace a function logic level 2.

EASYGCICAP:T3(Arguments)

Trace a function logic level 3.

EASYGCICAP:TraceAll(TraceAll)

Trace all methods in MOOSE

EASYGCICAP:TraceClass(Class)

Set tracing for a class

EASYGCICAP:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

EASYGCICAP:TraceLevel(Level)

Set trace level

EASYGCICAP:TraceOff()

Set trace off.

EASYGCICAP:TraceOn()

Set trace on.

EASYGCICAP: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.

EASYGCICAP:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

EASYGCICAP._

EASYGCICAP:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

EASYGCICAP:_Serialize(Arguments)

(Internal) Serialize arguments

EASYGCICAP:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

EASYGCICAP.__

EASYGCICAP:onEvent(event)

The main event handling function...

Fields and Methods inherited from EASYGCICAP.Wing Description

EASYGCICAP.Wing.AirbaseName

EASYGCICAP.Wing.Alias

EASYGCICAP.Wing.CapZoneName

EASYGCICAP Class

Field(s)

#boolean EASYGCICAP.debug
EASYGCICAP.lid

Set some string id for output to DCS.log file.

#string EASYGCICAP.version

EASYGCICAP class version.

Function(s)

Add an AWACS Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio Frequency to be used.

#number Modulation

(optional) Radio Modulation to be used, e.g. radio.modulation.AM or radio.modulation.FM

Return value:

self

Add a zone to the accepted zones set.

Defined in:

EASYGCICAP

Parameter:

Return value:

self

Add an AirWing to the manager

Defined in:

EASYGCICAP

Parameters:

#string Airbasename

#string Alias

Return value:

self

Add an AWACS patrol point to a Wing

Defined in:

EASYGCICAP

Parameters:

#string AirbaseName

Name of the Wing's airbase

#number Altitude

Defaults to 25000 feet.

#number Speed

Defaults to 300 knots.

#number Heading

Defaults to 90 degrees (East).

#number LegLength

Defaults to 15 NM.

Return value:

self

Add a CAP patrol point to a Wing

Defined in:

EASYGCICAP

Parameters:

#string AirbaseName

Name of the Wing's airbase

#number Altitude

Defaults to 25000 feet ASL.

#number Speed

Defaults to 300 knots TAS.

#number Heading

Defaults to 90 degrees (East).

#number LegLength

Defaults to 15 NM.

Return value:

self

Add a RECON patrol point to a Wing

Defined in:

EASYGCICAP

Parameters:

#string AirbaseName

Name of the Wing's airbase

#number Altitude

Defaults to 25000 feet.

#number Speed

Defaults to 300 knots.

#number Heading

Defaults to 90 degrees (East).

#number LegLength

Defaults to 15 NM.

Return value:

self

Add a TANKER patrol point to a Wing

Defined in:

EASYGCICAP

Parameters:

#string AirbaseName

Name of the Wing's airbase

#number Altitude

Defaults to 25000 feet.

#number Speed

Defaults to 300 knots.

#number Heading

Defaults to 90 degrees (East).

#number LegLength

Defaults to 15 NM.

Return value:

self

Add a Recon Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

Return value:

self

Add a zone to the rejected zones set.

Defined in:

EASYGCICAP

Parameter:

Return value:

self

Add a Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

Return value:

self

Add a Tanker Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio Frequency to be used.

#number Modulation

(optional) Radio Modulation to be used, e.g. radio.modulation.AM or radio.modulation.FM

#number TACAN

(optional) TACAN channel, e.g. 71, resulting in Channel 71Y

Return value:

self

Create a new GCICAP Manager

Defined in:

EASYGCICAP

Parameters:

#string Alias

A Name for this GCICAP

#string AirbaseName

Name of the Home Airbase

#string Coalition

Coalition, e.g. "blue" or "red"

#string EWRName

(Partial) group name of the EWR system of the coalition, e.g. "Red EWR"

Return value:

self

Set CAP formation.

Defined in:

EASYGCICAP

Parameter:

#number Formation

Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group

Return value:

self

Set CAP mission start to vary randomly between Start end End seconds.

Defined in:

EASYGCICAP

Parameters:

#number Start

#number End

Return value:

self

Set default CAP Altitude in feet

Defined in:

EASYGCICAP

Parameter:

#number Altitude

Altitude defaults to 25000

Return value:

self

Set default CAP lieg initial direction in degrees

Defined in:

EASYGCICAP

Parameter:

#number Direction

Direction defaults to 90 (East)

Return value:

self

Set default grouping, i.e.

how many airplanes per CAP point

Defined in:

EASYGCICAP

Parameter:

#number Grouping

Grouping defaults to 2

Return value:

self

Set default leg length in NM

Defined in:

EASYGCICAP

Parameter:

#number Leg

Leg defaults to 15

Return value:

self

Set default CAP Speed in knots

Defined in:

EASYGCICAP

Parameter:

#number Speed

Speed defaults to 300

Return value:

self

Set default engage range for intruders detected by CAP flights in NM.

Defined in:

EASYGCICAP

Parameter:

#number Range

defaults to 50NM

Return value:

self

Set default range planes can fly from their homebase in NM

Defined in:

EASYGCICAP

Parameter:

#number Range

Range defaults to 100 NM

Return value:

self

Set default number of airframes standing by for intercept tasks (visible on the airfield)

Defined in:

EASYGCICAP

Parameter:

#number Airframes

defaults to 2

Return value:

self

Set default overhead for intercept calculations

Defined in:

EASYGCICAP

Parameter:

#number Overhead

The overhead to use.

Return value:

self

Usage:

Either a CAP Plane or a newly spawned GCI plane will take care of intruders. Standard overhead is 0.75, i.e. a group of 3 intrudes will
be managed by 2 planes from the assigned AirWing. There is an maximum missions limitation per AirWing, so we do not spam the skies.

Add default repeat attempts if an Intruder intercepts fails.

Defined in:

EASYGCICAP

Parameter:

#number Retries

Retries, defaults to 3

Return value:

self

Add default time to resurrect Airwing building if destroyed

Defined in:

EASYGCICAP

Parameter:

#number Seconds

Seconds, defaults to 900

Return value:

self

Set Maximum of alive missions to stop airplanes spamming the map

Defined in:

EASYGCICAP

Parameter:

#number Maxiumum

Maxmimum number of parallel missions allowed. Count is Cap-Missions + Intercept-Missions + Alert5-Missionsm default is 6

Return value:

self

Set Tanker and AWACS to be invisible to enemy AI eyes

Defined in:

EASYGCICAP

Parameter:

#boolean Switch

Set to true or false, by default this is set to true already

Return value:

self

(Internal) Add a AWACS Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio frequency of the AWACS

#number Modulation

(Optional) Radio modulation of the AWACS

Return value:

self

(internal) Create and add another AirWing to the manager

Defined in:

EASYGCICAP

Parameters:

#string Airbasename

#string Alias

Return value:

self

(Internal) Add a Recon Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

Return value:

self

(Internal) Add a Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio Frequency to be used.

#number Modulation

(optional) Radio Modulation to be used, e.g. radio.modulation.AM or radio.modulation.FM

Return value:

self

(Internal) Add a Tanker Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio frequency of the Tanker

#number Modulation

(Optional) Radio modulation of the Tanker

#number TACAN

(Optional) TACAN Channel to be used, will always be an "Y" channel

Return value:

self

Add a zone to the rejected zones set.

Defined in:

EASYGCICAP

Parameter:

Return value:

self

(Internal) Create actual AirWings from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Create actual Squadrons from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Set actual Awacs Points from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Set actual PatrolPoints from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Set actual PatrolPoints from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Set actual Tanker Points from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Start detection.

Defined in:

EASYGCICAP

Return value:

self

(Internal) Try to assign the intercept to a FlightGroup already in air and ready.

Defined in:

EASYGCICAP

Parameters:

#table ReadyFlightGroups

ReadyFlightGroups

Ops.Auftrag#AUFTRAG InterceptAuftrag

The Auftrag

The Target

#number WingSize

Calculated number of Flights

Return values:

#boolean:

assigned

#number:

leftover

(Internal) FSM Function onafterStart

Defined in:

EASYGCICAP

Parameters:

#string From

#string Event

#string To

Return value:

self

(Internal) FSM Function onafterStatus

Defined in:

EASYGCICAP

Parameters:

#string From

#string Event

#string To

Return value:

self

(Internal) FSM Function onafterStop

Defined in:

EASYGCICAP

Parameters:

#string From

#string Event

#string To

Return value:

self

(Internal) FSM Function onbeforeStatus

Defined in:

EASYGCICAP

Parameters:

#string From

#string Event

#string To

Return value:

self

Field(s)

#boolean EASYGCICAP.debug
EASYGCICAP.lid

Set some string id for output to DCS.log file.

#string EASYGCICAP.version

EASYGCICAP class version.

Function(s)

Adds an End state.

Defined in:

Parameter:

#string State

The FSM state.

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

An sub-process FSM.

#table ReturnEvents

A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

Return value:

The SubFSM.

Adds a score for the FSM to be achieved.

Defined in:

Parameters:

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Adds a score for the FSM_PROCESS to be achieved.

Defined in:

Parameters:

#string From

is the From State of the main process.

#string Event

is the Event of the main process.

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Add a new transition rule to the FSM.

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

#string To

The To state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns the End states.

Defined in:

Return value:

#table:

End states.

Defined in:

Parameters:

From

Event

Returns a table of the SubFSM rules defined within the FSM.

Defined in:

Return value:

#table:

Sub processes.

Returns a table with the scores defined.

Defined in:

Return value:

#table:

Scores.

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns a table with the Subs defined.

Defined in:

Return value:

#table:

Sub processes.

Returns a table of the transition rules defined within the FSM.

Defined in:

Return value:

#table:

Transitions.

Check if FSM is in state.

Defined in:

Parameter:

#string State

State name.

Return value:

#boolean:

If true, FSM is in this state.

Load call backs.

Defined in:

Parameter:

#table CallBackTable

Table of call backs.

Creates a new FSM object.

Defined in:

Return value:

#FSM:

Defined in:

Parameters:

From

Event

Fsm

Sets the start state of the FSM.

Defined in:

Parameter:

#string State

A string defining the start state.

Add to map.

Defined in:

Parameters:

#table Map

Map.

#table Event

Event table.

Call handler.

Defined in:

Parameters:

#string step

Step "onafter", "onbefore", "onenter", "onleave".

#string trigger

Trigger.

#table params

Parameters.

#string EventName

Event name.

Return value:

Value.

Create transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Delayed transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Event map.

Defined in:

Parameters:

#table Events

Events.

#table EventStructure

Event structure.

Go sub.

Defined in:

Parameters:

#string ParentFrom

Parent from state.

#string ParentEvent

Parent event name.

Return value:

#table:

Subs.

Handler.

Defined in:

Parameters:

#string EventName

Event name.

...

Arguments.

Is end state.

Defined in:

Parameter:

#string Current

Current state name.

Return values:

#table:

FSM parent.

#string:

Event name.

Sub maps.

Defined in:

Parameters:

#table subs

Subs.

#table sub

Sub.

#string name

Name.

Check if can do an event.

Defined in:

Parameter:

#string e

Event name.

Return values:

#boolean:

If true, FSM can do the event.

#string:

To state.

Check if cannot do an event.

Defined in:

Parameter:

#string e

Event name.

Return value:

#boolean:

If true, FSM cannot do the event.

Check if FSM is in state.

Defined in:

Parameters:

#string State

State name.

state

Return value:

#boolean:

If true, FSM is in this state.

Field(s)

#boolean EASYGCICAP.debug
EASYGCICAP.lid

Set some string id for output to DCS.log file.

#string EASYGCICAP.version

EASYGCICAP class 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_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.

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.

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

Defined in:

Return value:

#number:

The Core.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 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.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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.

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.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

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. Have a look at the class Core.Event#EVENT as these are just the prototypes.

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. Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

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.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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.

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. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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.

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

Defined in:

Parameter:

The EventData structure.

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.

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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.

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:

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

Defined in:

Parameter:

#number EventPriority

The Core.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

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

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

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

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.

Defined in:

Parameter:

DCS#Event event

Internal Wing data type

Field(s)

Function(s)