Banner Image

Module Ops.RecoveryTanker

Ops - Recovery tanker for carrier operations.

Tanker aircraft flying a racetrack pattern overhead an aircraft carrier.

Main Features:

  • Regular pattern update with respect to carrier position.
  • No restrictions regarding carrier waypoints and heading.
  • Automatic respawning when tanker runs out of fuel for 24/7 operations.
  • Tanker can be spawned cold or hot on the carrier or at any other airbase or directly in air.
  • Automatic AA TACAN beacon setting.
  • Multiple tankers at the same carrier.
  • Multiple carriers due to object oriented approach.
  • Finite State Machine (FSM) implementation, which allows the mission designer to hook into certain events.

Author: funkyfranky

Special thanks to HighwaymanEd for testing and suggesting improvements!

Global(s)

Global RECOVERYTANKER

Recovery Tanker.

#RECOVERYTANKER RECOVERYTANKER

Recovery Tanker.


Banner Image

Recovery Tanker

A recovery tanker acts as refueling unit flying overhead an aircraft carrier in order to supply incoming flights with gas if they go "Bingo on the Ball".

Simple Script

In the mission editor you have to set up a carrier unit, which will act as "mother". In the following, this unit will be named "USS Stennis".

Secondly, you need to define a recovery tanker group in the mission editor and set it to "LATE ACTIVATED". The name of the group we'll use is "Texaco".

The basic script is very simple and consists of only two lines:

TexacoStennis=RECOVERYTANKER:New(UNIT:FindByName("USS Stennis"), "Texaco")
TexacoStennis:Start()

The first line will create a new RECOVERYTANKER object and the second line starts the process.

With this setup, the tanker will be spawned on the USS Stennis with running engines. After it takes off, it will fly a position ~10 NM astern of the boat and from there start its pattern. This is a counter clockwise racetrack pattern at angels 6.

A TACAN beacon will be automatically activated at channel 1Y with morse code "TKR". See below how to change this setting.

Note that the Tanker entry in the F10 radio menu will appear once the tanker is on station and not before. If you spawn the tanker cold or hot on the carrier, this will take ~10 minutes.

Also note, that currently the only carrier capable aircraft in DCS is the S-3B Viking (tanker version). If you want to use another refueling aircraft, you need to activate air spawn or set a different land based airport of the map. This will be explained below.

Banner Image

The "downwind" leg of the pattern is normally used for refueling.

Once the tanker runs out of fuel itself, it will return to the carrier, respawn with full fuel and take up its pattern again.

Options and Fine Tuning

Several parameters can be customized by the mission designer via user API functions.

Takeoff Type

By default, the tanker is spawned with running engines on the carrier. The mission designer has set option to set the take off type via the RECOVERYTANKER.SetTakeoff function. Or via shortcuts

For example,

TexacoStennis=RECOVERYTANKER:New(UNIT:FindByName("USS Stennis"), "Texaco")
TexacoStennis:SetTakeoffAir()
TexacoStennis:Start()

will spawn the tanker several nautical miles astern the carrier. From there it will start its pattern.

Spawning in air is not as realistic but can be useful do avoid DCS bugs and shortcomings like aircraft crashing into each other on the flight deck.

Note that when spawning in air is set, the tanker will also not return to the boat, once it is out of fuel. Instead it will be respawned directly in air.

If only the first spawning should happen on the carrier, one use the RECOVERYTANKER.SetRespawnInAir() function to command that all subsequent spawning will happen in air.

If the tanker should not be respawned at all, one can set RECOVERYTANKER.SetRespawnOff().

Pattern Parameters

The racetrack pattern parameters can be fine tuned via the following functions:

  • RECOVERYTANKER.SetAltitude(altitude), where altitude is the pattern altitude in feet. Default 6000 ft.
  • RECOVERYTANKER.SetSpeed(speed), where speed is the pattern speed in knots. Default is 274 knots TAS which results in ~250 KIAS.
  • RECOVERYTANKER.SetRacetrackDistances(distbow, diststern), where distbow and diststern are the distances ahead and astern the boat (default 10 and 4 NM), respectively. In principle, these number should be more like 8 and 6 NM but since the carrier is moving, we give translate the pattern points a bit forward.

Home Base

The home base is the airbase where the tanker is spawned (if not in air) and where it will go once it is running out of fuel. The default home base is the carrier itself. The home base can be changed via the RECOVERYTANKER.SetHomeBase(airbase) function, where airbase can be a MOOSE Wrapper.Airbase#AIRBASE object or simply the name of the airbase passed as string.

Note that only the S3B Viking is a refueling aircraft that is carrier capable. You can use other tanker aircraft types, e.g. the KC-130, but in this case you must either set an airport of the map as home base or activate spawning in air via RECOVERYTANKER.SetTakeoffAir.

TACAN

A TACAN beacon for the tanker can be activated via scripting, i.e. no need to do this within the mission editor.

The beacon is create with the RECOVERYTANKER.SetTACAN(channel, morse) function, where channel is the TACAN channel (a number), and morse a three letter string that is send as morse code to identify the tanker:

TexacoStennis:SetTACAN(10, "TKR")

will activate a TACAN beacon 10Y with more code "TKR".

If you do not set a TACAN beacon explicitly, it is automatically create on channel 1Y and morse code "TKR". The mode is always "Y" for AA TACAN stations since mode "X" does not work!

In order to completely disable the TACAN beacon, you can use the RECOVERYTANKER.SetTACANoff() function in your script.

Radio

The radio frequency on optionally modulation can be set via the RECOVERYTANKER.SetRadio(frequency, modulation) function. The first parameter denotes the radio frequency the tanker uses in MHz. The second parameter is optional and sets the modulation to either AM (default) or FM.

For example,

TexacoStennis:SetRadio(260)

will set the frequency of the tanker to 260 MHz AM.

Note that if this is not set, the tanker frequency will be automatically set to 251 MHz AM.

Pattern Update

The pattern of the tanker is updated if at least one of the two following conditions apply:

Note that updating the pattern often leads to a more or less small disruption of the perfect racetrack pattern of the tanker. This is because a new waypoint and new racetrack points need to be set as DCS task. This is the reason why the pattern is not constantly updated but rather when the position or heading of the carrier changes significantly.

The maximum update frequency is set to 10 minutes. You can adjust this by RECOVERYTANKER.SetPatternUpdateInterval. Also the pattern will not be updated whilst the carrier is turning or the tanker is currently refueling another unit.

Callsign

The callsign of the tanker can be set via the RECOVERYTANKER.SetCallsign(callsignname, callsignnumber) function. Both parameters are numbers. The first parameter callsignname defines the name (1=Texaco, 2=Arco, 3=Shell). The second (optional) parameter specifies the first number and has to be between 1-9. Also see DCS_enum_callsigns and DCS_command_setCallsign.

TexacoStennis:SetCallsign(CALLSIGN.Tanker.Arco)

For convenience, MOOSE has a CALLSIGN enumerator introduced.

AWACS

You can use the class also to have an AWACS orbiting overhead the carrier. This requires to add the RECOVERYTANKER.SetAWACS(switch, eplrs) function to the script, which sets the enroute tasks AWACS as soon as the aircraft enters its pattern. Note that the EPLRS data link is enabled by default. To disable it, the second parameter eplrs must be set to false.

A simple script could look like this:

-- E-2D at USS Stennis spawning in air.
local awacsStennis=RECOVERYTANKER:New("USS Stennis", "E2D Group")

-- Custom settings:
awacsStennis:SetAWACS()
awacsStennis:SetCallsign(CALLSIGN.AWACS.Wizard, 1)
awacsStennis:SetTakeoffAir()
awacsStennis:SetAltitude(20000)
awacsStennis:SetRadio(262)
awacsStennis:SetTACAN(2, "WIZ")

-- Start AWACS.
awacsStennis:Start()

Finite State Machine

The implementation uses a Finite State Machine (FSM). This allows the mission designer to hook in to certain events.

  • RECOVERYTANKER.Start: This event starts the FMS process and initialized parameters and spawns the tanker. DCS event handling is started.
  • RECOVERYTANKER.Status: This event is called in regular intervals (~60 seconds) and checks the status of the tanker and carrier. It triggers other events if necessary.
  • RECOVERYTANKER.PatternUpdate: This event commands the tanker to update its pattern
  • RECOVERYTANKER.RTB: This events sends the tanker to its home base (usually the carrier). This is called once the tanker runs low on gas.
  • RECOVERYTANKER.RefuelStart: This event is called when a tanker starts to refuel another unit.
  • RECOVERYTANKER.RefuelStop: This event is called when a tanker stopped to refuel another unit.
  • RECOVERYTANKER.Run: This event is called when the tanker resumes normal operations, e.g. after refueling stopped or tanker finished refueling.
  • RECOVERYTANKER.Stop: This event stops the FSM by unhandling DCS events.

The mission designer can capture these events by RECOVERYTANKER.OnAfterEventname functions, e.g. RECOVERYTANKER.OnAfterPatternUpdate.

Debugging

In case you have problems, it is always a good idea to have a look at your DCS log file. You find it in your "Saved Games" folder, so for example in

C:\Users\<yourname>\Saved Games\DCS\Logs\dcs.log

All output concerning the #RECOVERYTANKER class should have the string "RECOVERYTANKER" in the corresponding line. Searching for lines that contain the string "error" or "nil" can also give you a hint what's wrong.

The verbosity of the output can be increased by adding the following lines to your script:

BASE:TraceOnOff(true)
BASE:TraceLevel(1)
BASE:TraceClass("RECOVERYTANKER")

To get even more output you can increase the trace level to 2 or even 3, c.f. Core.Base#BASE for more details.

Debug Mode

You have the option to enable the debug mode for this class via the RECOVERYTANKER.SetDebugModeON function. If enabled, text messages about the tanker status will be displayed on screen and marks of the pattern created on the F10 map.

Global _RECOVERYTANKERID

Type(s)

Fields and Methods inherited from RECOVERYTANKER Description

RECOVERYTANKER.ClassName

Name of the class.

RECOVERYTANKER.Debug

Debug mode.

RECOVERYTANKER.Dupdate

Pattern update when carrier changes its position by more than this distance (meters).

RECOVERYTANKER:GetAlias()

Alias of tanker spawn group.

RECOVERYTANKER:GetUnitName()

Get unit name of the spawned tanker.

RECOVERYTANKER.Hupdate

Pattern update when carrier changes its heading by more than this number (degrees).

RECOVERYTANKER:IsRefueling()

Check if tanker is currently refueling another aircraft.

RECOVERYTANKER:IsReturned()

Check if tanker has returned to base.

RECOVERYTANKER:IsReturning()

Check if tanker is currently returning to base.

RECOVERYTANKER:IsRunning()

Check if tanker is currently operating.

RECOVERYTANKER:IsStopped()

Check if FMS was stopped.

RECOVERYTANKER:New(carrierunit, tankergroupname)

Create new RECOVERYTANKER object.

RECOVERYTANKER:OnAfterPatternUpdate(From, Event, To)

On after "PatternEvent" event user function.

RECOVERYTANKER:OnAfterRTB(From, Event, To, airbase)

On after "RTB" event user function.

RECOVERYTANKER:OnAfterRefuelStart(From, Event, To, receiver)

On after "RefuelStart" event user function.

RECOVERYTANKER:OnAfterRefuelStop(From, Event, To, receiver)

On after "RefuelStop" event user function.

RECOVERYTANKER:OnAfterReturned(From, Event, To, airbase)

On after "Returned" event user function.

RECOVERYTANKER:OnAfterStart(From, Event, To)

On after "Start" event function.

RECOVERYTANKER:OnEventEngineShutdown(EventData)

Event handler for engine shutdown of recovery tanker.

RECOVERYTANKER:OnEventLand(EventData)

Event handler for landing of recovery tanker.

RECOVERYTANKER:PatternUpdate()

Triggers the FSM event "PatternUpdate" that updates the pattern of the tanker wrt to the carrier position.

RECOVERYTANKER:RTB(airbase)

Triggers the FSM event "RTB" that sends the tanker home.

RECOVERYTANKER.RadioFreq

Radio frequency in MHz of the tanker. Default 251 MHz.

RECOVERYTANKER.RadioModu

Radio modulation "AM" or "FM". Default "AM".

RECOVERYTANKER:RefuelStart(receiver)

Triggers the FSM event "RefuelStart" when the tanker starts refueling another aircraft.

RECOVERYTANKER:RefuelStop(receiver)

Triggers the FSM event "RefuelStop" when the tanker stops refueling another aircraft.

RECOVERYTANKER:Returned(airbase)

Triggers the FSM event "Returned" after the tanker has landed.

RECOVERYTANKER:Run()

Triggers the FSM event "Run".

RECOVERYTANKER:SetAWACS(switch, eplrs)

Set that the group takes the role of an AWACS instead of a refueling tanker.

RECOVERYTANKER:SetAltitude(altitude)

Set orbit pattern altitude of the tanker.

RECOVERYTANKER:SetCallsign(callsignname, callsignnumber)

Set callsign of the tanker group.

RECOVERYTANKER:SetDebugModeOFF()

Deactivate debug mode.

RECOVERYTANKER:SetDebugModeON()

Activate debug mode.

RECOVERYTANKER:SetHomeBase(airbase, terminaltype)

Set home airbase of the tanker.

RECOVERYTANKER:SetLowFuelThreshold(fuelthreshold)

Set low fuel state of tanker.

RECOVERYTANKER:SetModex(modex)

Set modex (tail number) of the tanker.

RECOVERYTANKER:SetPatternUpdateDistance(distancechange)

Set pattern update distance threshold.

RECOVERYTANKER:SetPatternUpdateHeading(headingchange)

Set pattern update heading threshold.

RECOVERYTANKER:SetPatternUpdateInterval(interval)

Set minimum pattern update interval.

RECOVERYTANKER:SetRacetrackDistances(distbow, diststern)

Set race-track distances.

RECOVERYTANKER:SetRadio(frequency, modulation)

Set radio frequency and optionally modulation of the tanker.

RECOVERYTANKER:SetRecoveryAirboss(switch)

Activate recovery by the AIRBOSS class.

RECOVERYTANKER:SetRespawnInAir()

Tanker will be respawned in air, even it was initially spawned on the carrier.

RECOVERYTANKER:SetRespawnOff()

Disable respawning of tanker.

RECOVERYTANKER:SetRespawnOn()

Enable respawning of tanker.

RECOVERYTANKER:SetRespawnOnOff(switch)

Set whether tanker shall be respawned or not.

RECOVERYTANKER:SetSpeed(speed)

Set the speed the tanker flys in its orbit pattern.

RECOVERYTANKER:SetTACAN(channel, morse, mode)

Set TACAN channel of tanker.

RECOVERYTANKER:SetTACANoff()

Disable automatic TACAN activation.

RECOVERYTANKER:SetTakeoff(takeofftype)

Set takeoff type.

RECOVERYTANKER:SetTakeoffAir()

Set takeoff in air at the defined pattern altitude and ~10 NM astern the carrier.

RECOVERYTANKER:SetTakeoffCold()

Set takeoff with engines off (cold).

RECOVERYTANKER:SetTakeoffHot()

Set takeoff with engines running (hot).

RECOVERYTANKER:SetUnlimitedFuel(OnOff)

Set the tanker to have unlimited fuel.

RECOVERYTANKER:SetUseUncontrolledAircraft()

Use an uncontrolled aircraft already present in the mission rather than spawning a new tanker as initial recovery thanker.

RECOVERYTANKER:Start()

Triggers the FSM event "Start" that starts the recovery tanker.

RECOVERYTANKER:Status()

Triggers the FSM event "Status" that updates the tanker status.

RECOVERYTANKER:Stop()

Triggers the FSM event "Stop" that stops the recovery tanker.

RECOVERYTANKER.TACANchannel

TACAN channel. Default 1.

RECOVERYTANKER.TACANmode

TACAN mode, i.e. "X" or "Y". Default "Y". Use only "Y" for AA TACAN stations!

RECOVERYTANKER.TACANmorse

TACAN morse code. Three letters identifying the TACAN station. Default "TKR".

RECOVERYTANKER.TACANon

If true, TACAN is automatically activated. If false, TACAN is disabled.

RECOVERYTANKER.Tupdate

Last time the pattern was updated.

RECOVERYTANKER:_ActivateTACAN(delay)

Activate TACAN of tanker.

RECOVERYTANKER:_CheckPatternUpdate(dt)

Check if heading or position have changed significantly.

RECOVERYTANKER:_InitPatternTaskFunction()

Task function to

RECOVERYTANKER:_InitRoute(dist, delay)

Init waypoint after spawn.

RECOVERYTANKER:_OnEventCrashOrDead(EventData)

A unit crashed or died.

RECOVERYTANKER:_Pattern()

Self made race track pattern.

RECOVERYTANKER:_RefuelingStart(EventData)

Event handler for refueling started.

RECOVERYTANKER:_RefuelingStop(EventData)

Event handler for refueling stopped.

RECOVERYTANKER:__PatternUpdate(delay)

Triggers the delayed FSM event "PatternUpdate" that updates the pattern of the tanker wrt to the carrier position.

RECOVERYTANKER:__RTB(delay, airbase)

Triggers the FSM event "RTB" that sends the tanker home after a delay.

RECOVERYTANKER:__Returned(delay, airbase)

Triggers the delayed FSM event "Returned" after the tanker has landed.

RECOVERYTANKER:__Run(delay)

Triggers delayed the FSM event "Run".

RECOVERYTANKER:__Start(delay)

Triggers the FSM event "Start" that starts the recovery tanker after a delay.

RECOVERYTANKER:__Status(delay)

Triggers the delayed FSM event "Status" that updates the tanker status.

RECOVERYTANKER:__Stop(delay)

Triggers the FSM event "Stop" that stops the recovery tanker after a delay.

RECOVERYTANKER.airbase

The home airbase object of the tanker. Normally the aircraft carrier.

RECOVERYTANKER.alias

Alias of the spawn group.

RECOVERYTANKER.altitude

Tanker orbit pattern altitude.

RECOVERYTANKER.awacs

If true, the groups gets the enroute task AWACS instead of tanker.

RECOVERYTANKER.beacon

Tanker TACAN beacon.

RECOVERYTANKER.callsignname

Number for the callsign name.

RECOVERYTANKER.callsignnumber

Number of the callsign name.

RECOVERYTANKER.carrier

The carrier the tanker is attached to.

RECOVERYTANKER.carriertype

Carrier type.

RECOVERYTANKER.dTupdate

Minimum time interval in seconds before the next pattern update can happen.

RECOVERYTANKER.distBow

Race-track distance bow. distBow is >0.

RECOVERYTANKER.distStern

Race-track distance astern. distStern is <0.

RECOVERYTANKER.eplrs

If true, enable data link, e.g. if used as AWACS.

RECOVERYTANKER.lid

Log debug id text.

RECOVERYTANKER.lowfuel

Low fuel threshold in percent.

RECOVERYTANKER.modex

Tail number of the tanker.

RECOVERYTANKER:onafterPatternUpdate(From, Event, To)

On after "PatternUpdate" event.

RECOVERYTANKER:onafterRTB(From, Event, To, airbase)

On after "RTB" event.

RECOVERYTANKER:onafterReturned(From, Event, To, airbase)

On after Returned event.

RECOVERYTANKER:onafterStart(From, Event, To)

On after Start event.

RECOVERYTANKER:onafterStatus(From, Event, To)

On after Status event.

RECOVERYTANKER:onafterStop(From, Event, To)

On after Stop event.

RECOVERYTANKER.orientation

Orientation of the carrier. Used to monitor changes and update the pattern if heading changes significantly.

RECOVERYTANKER.orientlast

Orientation of the carrier for checking if carrier is currently turning.

RECOVERYTANKER.position

Position of carrier. Used to monitor if carrier significantly changed its position and then update the tanker pattern.

RECOVERYTANKER.recovery

If true, tanker will recover using the AIRBOSS marshal pattern.

RECOVERYTANKER.respawn

If true, tanker be respawned (default). If false, no respawning will happen.

RECOVERYTANKER.respawninair

If true, tanker will always be respawned in air. This has no impact on the initial spawn setting.

RECOVERYTANKER.speed

Tanker speed when flying pattern.

RECOVERYTANKER.takeoff

Takeoff type (cold, hot, air).

RECOVERYTANKER.tanker

Tanker group.

RECOVERYTANKER.tankergroupname

Name of the late activated tanker template group.

RECOVERYTANKER.terminaltype

Terminal type of used parking spots on airbases.

RECOVERYTANKER.uid

Unique ID of this tanker.

RECOVERYTANKER.uncontrolledac

If true, use and uncontrolled tanker group already present in the mission.

RECOVERYTANKER.unlimitedfuel

If true, the tanker will have unlimited fuel.

RECOVERYTANKER.version

Class version.

Fields and Methods inherited from FSM Description

RECOVERYTANKER:AddEndState(State)

Adds an End state.

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

RECOVERYTANKER:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

RECOVERYTANKER:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

RECOVERYTANKER.CallScheduler

Call scheduler.

RECOVERYTANKER.ClassName

Name of the class.

RECOVERYTANKER.Events

RECOVERYTANKER:GetCurrentState()

Get current state.

RECOVERYTANKER:GetEndStates()

Returns the End states.

RECOVERYTANKER:GetProcess(From, Event)

RECOVERYTANKER:GetProcesses()

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

RECOVERYTANKER:GetScores()

Returns a table with the scores defined.

RECOVERYTANKER:GetStartState()

Returns the start state of the FSM.

RECOVERYTANKER:GetState()

Get current state.

RECOVERYTANKER:GetSubs()

Returns a table with the Subs defined.

RECOVERYTANKER:GetTransitions()

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

RECOVERYTANKER:Is(State)

Check if FSM is in state.

RECOVERYTANKER:LoadCallBacks(CallBackTable)

Load call backs.

RECOVERYTANKER:New()

Creates a new FSM object.

RECOVERYTANKER.Scores

Scores.

RECOVERYTANKER:SetProcess(From, Event, Fsm)

RECOVERYTANKER:SetStartState(State)

Sets the start state of the FSM.

RECOVERYTANKER._EndStates

RECOVERYTANKER._EventSchedules

RECOVERYTANKER._Processes

RECOVERYTANKER._Scores

RECOVERYTANKER._StartState

RECOVERYTANKER._Transitions

RECOVERYTANKER:_add_to_map(Map, Event)

Add to map.

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

Call handler.

RECOVERYTANKER:_create_transition(EventName)

Create transition.

RECOVERYTANKER:_delayed_transition(EventName)

Delayed transition.

RECOVERYTANKER:_eventmap(Events, EventStructure)

Event map.

RECOVERYTANKER:_gosub(ParentFrom, ParentEvent)

Go sub.

RECOVERYTANKER:_handler(EventName, ...)

Handler.

RECOVERYTANKER:_isendstate(Current)

Is end state.

RECOVERYTANKER:_submap(subs, sub, name)

Sub maps.

RECOVERYTANKER:can(e)

Check if can do an event.

RECOVERYTANKER:cannot(e)

Check if cannot do an event.

RECOVERYTANKER.current

Current state name.

RECOVERYTANKER.endstates

RECOVERYTANKER:is(State, state)

Check if FSM is in state.

RECOVERYTANKER.options

Options.

RECOVERYTANKER.subs

Subs.

Fields and Methods inherited from BASE Description

RECOVERYTANKER.ClassID

The ID number of the class.

RECOVERYTANKER.ClassName

The name of the class.

RECOVERYTANKER.ClassNameAndID

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

RECOVERYTANKER:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

RECOVERYTANKER:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

RECOVERYTANKER:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

RECOVERYTANKER:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

RECOVERYTANKER:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

RECOVERYTANKER:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

RECOVERYTANKER:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

RECOVERYTANKER:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

RECOVERYTANKER:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

RECOVERYTANKER:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

RECOVERYTANKER:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

RECOVERYTANKER:E(Arguments)

Log an exception which will be traced always.

RECOVERYTANKER:EventDispatcher()

Returns the event dispatcher

RECOVERYTANKER:EventRemoveAll()

Remove all subscribed events

RECOVERYTANKER:F(Arguments)

Trace a function call.

RECOVERYTANKER:F2(Arguments)

Trace a function call level 2.

RECOVERYTANKER:F3(Arguments)

Trace a function call level 3.

RECOVERYTANKER:GetClassID()

Get the ClassID of the class instance.

RECOVERYTANKER:GetClassName()

Get the ClassName of the class instance.

RECOVERYTANKER:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

RECOVERYTANKER:GetEventPriority()

Get the Class Core.Event processing Priority.

RECOVERYTANKER:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

RECOVERYTANKER:GetState(Object, Key)

Get a Value given a Key from the Object.

RECOVERYTANKER:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

RECOVERYTANKER:I(Arguments)

Log an information which will be traced always.

RECOVERYTANKER:Inherit(Child, Parent)

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

RECOVERYTANKER:IsInstanceOf(ClassName)

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

RECOVERYTANKER:IsTrace()

Enquires if tracing is on (for the class).

RECOVERYTANKER:New()

BASE constructor.

RECOVERYTANKER:OnEvent(EventData)

Occurs when an Event for an object is triggered.

RECOVERYTANKER:OnEventBDA(EventData)

BDA.

RECOVERYTANKER:OnEventBaseCaptured(EventData)

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

RECOVERYTANKER:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

RECOVERYTANKER:OnEventCrash(EventData)

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

RECOVERYTANKER:OnEventDead(EventData)

Occurs when an object is dead.

RECOVERYTANKER:OnEventDetailedFailure(EventData)

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

RECOVERYTANKER:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

RECOVERYTANKER:OnEventDynamicCargoLoaded(EventData)

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

RECOVERYTANKER:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

RECOVERYTANKER:OnEventDynamicCargoUnloaded(EventData)

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

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

RECOVERYTANKER:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

RECOVERYTANKER:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

RECOVERYTANKER:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

RECOVERYTANKER:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

RECOVERYTANKER:OnEventKill(EventData)

Occurs on the death of a unit.

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

RECOVERYTANKER:OnEventLandingAfterEjection(EventData)

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

RECOVERYTANKER:OnEventLandingQualityMark(EventData)

Landing quality mark.

RECOVERYTANKER:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

RECOVERYTANKER:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

RECOVERYTANKER:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

RECOVERYTANKER:OnEventMissionEnd(EventData)

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

RECOVERYTANKER:OnEventMissionStart(EventData)

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

RECOVERYTANKER:OnEventNewDynamicCargo(EventData)

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

RECOVERYTANKER:OnEventParatrooperLanding(EventData)

Weapon add.

RECOVERYTANKER:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

RECOVERYTANKER:OnEventPlayerEnterAircraft(EventData)

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

RECOVERYTANKER:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

RECOVERYTANKER:OnEventPlayerLeaveUnit(EventData)

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

RECOVERYTANKER:OnEventRefueling(EventData)

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

RECOVERYTANKER:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

RECOVERYTANKER:OnEventScore(EventData)

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

RECOVERYTANKER:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

RECOVERYTANKER:OnEventShootingStart(EventData)

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

RECOVERYTANKER:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

RECOVERYTANKER:OnEventTakeoff(EventData)

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

RECOVERYTANKER:OnEventTriggerZone(EventData)

Trigger zone.

RECOVERYTANKER:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

RECOVERYTANKER:ScheduleStop(SchedulerID)

Stops the Schedule.

RECOVERYTANKER.Scheduler

RECOVERYTANKER:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

RECOVERYTANKER:SetState(Object, Key, Value)

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

RECOVERYTANKER:T(Arguments)

Trace a function logic level 1.

RECOVERYTANKER:T2(Arguments)

Trace a function logic level 2.

RECOVERYTANKER:T3(Arguments)

Trace a function logic level 3.

RECOVERYTANKER:TraceAll(TraceAll)

Trace all methods in MOOSE

RECOVERYTANKER:TraceClass(Class)

Set tracing for a class

RECOVERYTANKER:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

RECOVERYTANKER:TraceLevel(Level)

Set trace level

RECOVERYTANKER:TraceOff()

Set trace off.

RECOVERYTANKER:TraceOn()

Set trace on.

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

RECOVERYTANKER:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

RECOVERYTANKER._

RECOVERYTANKER:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

RECOVERYTANKER:_Serialize(Arguments)

(Internal) Serialize arguments

RECOVERYTANKER:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

RECOVERYTANKER.__

RECOVERYTANKER:onEvent(event)

The main event handling function...

RECOVERYTANKER class.

Field(s)

#string RECOVERYTANKER.ClassName

Name of the class.

#boolean RECOVERYTANKER.Debug

Debug mode.

#number RECOVERYTANKER.Dupdate

Pattern update when carrier changes its position by more than this distance (meters).

#number RECOVERYTANKER.Hupdate

Pattern update when carrier changes its heading by more than this number (degrees).

#number RECOVERYTANKER.RadioFreq

Radio frequency in MHz of the tanker. Default 251 MHz.

#string RECOVERYTANKER.RadioModu

Radio modulation "AM" or "FM". Default "AM".

#number RECOVERYTANKER.TACANchannel

TACAN channel. Default 1.

#string RECOVERYTANKER.TACANmode

TACAN mode, i.e. "X" or "Y". Default "Y". Use only "Y" for AA TACAN stations!

#string RECOVERYTANKER.TACANmorse

TACAN morse code. Three letters identifying the TACAN station. Default "TKR".

#boolean RECOVERYTANKER.TACANon

If true, TACAN is automatically activated. If false, TACAN is disabled.

#number RECOVERYTANKER.Tupdate

Last time the pattern was updated.

Wrapper.Airbase#AIRBASE RECOVERYTANKER.airbase

The home airbase object of the tanker. Normally the aircraft carrier.

#string RECOVERYTANKER.alias

Alias of the spawn group.

#number RECOVERYTANKER.altitude

Tanker orbit pattern altitude.

#boolean RECOVERYTANKER.awacs

If true, the groups gets the enroute task AWACS instead of tanker.

#number RECOVERYTANKER.callsignname

Number for the callsign name.

#number RECOVERYTANKER.callsignnumber

Number of the callsign name.

Wrapper.Unit#UNIT RECOVERYTANKER.carrier

The carrier the tanker is attached to.

#string RECOVERYTANKER.carriertype

Carrier type.

#number RECOVERYTANKER.dTupdate

Minimum time interval in seconds before the next pattern update can happen.

#number RECOVERYTANKER.distBow

Race-track distance bow. distBow is >0.

#number RECOVERYTANKER.distStern

Race-track distance astern. distStern is <0.

#boolean RECOVERYTANKER.eplrs

If true, enable data link, e.g. if used as AWACS.

#string RECOVERYTANKER.lid

Log debug id text.

#number RECOVERYTANKER.lowfuel

Low fuel threshold in percent.

#string RECOVERYTANKER.modex

Tail number of the tanker.

DCS#Vec3 RECOVERYTANKER.orientation

Orientation of the carrier. Used to monitor changes and update the pattern if heading changes significantly.

DCS#Vec3 RECOVERYTANKER.orientlast

Orientation of the carrier for checking if carrier is currently turning.

Core.Point#COORDINATE RECOVERYTANKER.position

Position of carrier. Used to monitor if carrier significantly changed its position and then update the tanker pattern.

#boolean RECOVERYTANKER.recovery

If true, tanker will recover using the AIRBOSS marshal pattern.

#boolean RECOVERYTANKER.respawn

If true, tanker be respawned (default). If false, no respawning will happen.

#boolean RECOVERYTANKER.respawninair

If true, tanker will always be respawned in air. This has no impact on the initial spawn setting.

#number RECOVERYTANKER.speed

Tanker speed when flying pattern.

#number RECOVERYTANKER.takeoff

Takeoff type (cold, hot, air).

#string RECOVERYTANKER.tankergroupname

Name of the late activated tanker template group.

#number RECOVERYTANKER.terminaltype

Terminal type of used parking spots on airbases.

#number RECOVERYTANKER.uid

Unique ID of this tanker.

#boolean RECOVERYTANKER.uncontrolledac

If true, use and uncontrolled tanker group already present in the mission.

#boolean RECOVERYTANKER.unlimitedfuel

If true, the tanker will have unlimited fuel.

#string RECOVERYTANKER.version

Class version.

Function(s)

Alias of tanker spawn group.

Defined in:

RECOVERYTANKER

Return value:

#string:

Alias of the tanker.

Get unit name of the spawned tanker.

Defined in:

RECOVERYTANKER

Return value:

#string:

Name of the tanker unit or nil if it does not exist.

Check if tanker is currently refueling another aircraft.

Defined in:

RECOVERYTANKER

Return value:

#boolean:

If true, tanker is refueling.

Check if tanker has returned to base.

Defined in:

RECOVERYTANKER

Return value:

#boolean:

If true, tanker has returned to base.

Check if tanker is currently returning to base.

Defined in:

RECOVERYTANKER

Return value:

#boolean:

If true, tanker is returning to base.

Check if tanker is currently operating.

Defined in:

RECOVERYTANKER

Return value:

#boolean:

If true, tanker is operating.

Check if FMS was stopped.

Defined in:

RECOVERYTANKER

Return value:

#boolean:

If true, is stopped.

Create new RECOVERYTANKER object.

Defined in:

RECOVERYTANKER

Parameters:

Wrapper.Unit#UNIT carrierunit

Carrier unit.

#string tankergroupname

Name of the late activated tanker aircraft template group.

Return value:

RECOVERYTANKER object.

On after "PatternEvent" event user function.

Called when a the pattern of the tanker is updated.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "RTB" event user function.

Called when a the the tanker returns to its home base.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The airbase where the tanker should return to.

On after "RefuelStart" event user function.

Called when a the the tanker started to refuel another unit.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Unit receiving fuel from the tanker.

On after "RefuelStop" event user function.

Called when a the the tanker stopped to refuel another unit.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Unit that received fuel from the tanker.

On after "Returned" event user function.

Called when a the the tanker has landed at an airbase.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The airbase the tanker has landed.

On after "Start" event function.

Called when FSM is started.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Event handler for engine shutdown of recovery tanker.

Respawn tanker group once it landed because it was out of fuel.

Defined in:

RECOVERYTANKER

Parameter:

Event data.

Event handler for landing of recovery tanker.

Defined in:

RECOVERYTANKER

Parameter:

Event data.

Triggers the FSM event "PatternUpdate" that updates the pattern of the tanker wrt to the carrier position.

Defined in:

RECOVERYTANKER

Triggers the FSM event "RTB" that sends the tanker home.

Defined in:

RECOVERYTANKER

Parameter:

The airbase where the tanker should return to.

Triggers the FSM event "RefuelStart" when the tanker starts refueling another aircraft.

Defined in:

RECOVERYTANKER

Parameter:

Unit receiving fuel from the tanker.

Triggers the FSM event "RefuelStop" when the tanker stops refueling another aircraft.

Defined in:

RECOVERYTANKER

Parameter:

Unit stoped receiving fuel from the tanker.

Triggers the FSM event "Returned" after the tanker has landed.

Defined in:

RECOVERYTANKER

Parameter:

The airbase the tanker has landed.

Triggers the FSM event "Run".

Simply puts the group into "Running" state.

Defined in:

RECOVERYTANKER

Set that the group takes the role of an AWACS instead of a refueling tanker.

Defined in:

RECOVERYTANKER

Parameters:

#boolean switch

If true or nil, set role AWACS.

#boolean eplrs

If true or nil, enable EPLRS. If false, EPLRS will be off.

Return value:

Set orbit pattern altitude of the tanker.

Defined in:

RECOVERYTANKER

Parameter:

#number altitude

Tanker altitude in feet. Default 6000 ft.

Return value:

Set callsign of the tanker group.

Defined in:

RECOVERYTANKER

Parameters:

#number callsignname

Number

#number callsignnumber

Number

Return value:

Deactivate debug mode.

This is also the default setting.

Defined in:

RECOVERYTANKER

Return value:

Activate debug mode.

Marks of pattern on F10 map and debug messages displayed on screen.

Defined in:

RECOVERYTANKER

Return value:

Set home airbase of the tanker.

This is the airbase where the tanker will go when it is out of fuel.

Defined in:

RECOVERYTANKER

Parameters:

The home airbase. Can be the airbase name or a Moose AIRBASE object.

#number terminaltype

(Optional) The terminal type of parking spots used for spawning at airbases. Default AIRBASE.TerminalType.OpenMedOrBig.

Return value:

Set low fuel state of tanker.

When fuel is below this threshold, the tanker will RTB or be respawned if takeoff type is in air.

Defined in:

RECOVERYTANKER

Parameter:

#number fuelthreshold

Low fuel threshold in percent. Default 10 % of max fuel.

Return value:

Set modex (tail number) of the tanker.

Defined in:

RECOVERYTANKER

Parameter:

#number modex

Tail number.

Return value:

Set pattern update distance threshold.

Tanker will update its pattern when the carrier changes its position by more than this distance.

Defined in:

RECOVERYTANKER

Parameter:

#number distancechange

Distance threshold in NM. Default 5 NM (=9.62 km).

Return value:

Set pattern update heading threshold.

Tanker will update its pattern when the carrier changes its heading by more than this value.

Defined in:

RECOVERYTANKER

Parameter:

#number headingchange

Heading threshold in degrees. Default 5 degrees.

Return value:

Set minimum pattern update interval.

After a pattern update this time interval has to pass before the next update is allowed.

Defined in:

RECOVERYTANKER

Parameter:

#number interval

Min interval in minutes. Default is 10 minutes.

Return value:

Set race-track distances.

Defined in:

RECOVERYTANKER

Parameters:

#number distbow

Distance [NM] in front of the carrier. Default 10 NM.

#number diststern

Distance [NM] behind the carrier. Default 4 NM.

Return value:

Set radio frequency and optionally modulation of the tanker.

Defined in:

RECOVERYTANKER

Parameters:

#number frequency

Radio frequency in MHz. Default 251 MHz.

#string modulation

Radio modulation, either "AM" or "FM". Default "AM".

Return value:

Activate recovery by the AIRBOSS class.

Tanker will get a Marshal stack and perform a CASE I, II or III recovery when RTB.

Defined in:

RECOVERYTANKER

Parameter:

#boolean switch

If true or nil, recovery is done by AIRBOSS.

Return value:

Tanker will be respawned in air, even it was initially spawned on the carrier.

So only the first spawn will be on the carrier while all subsequent spawns will happen in air. This allows for undisrupted operations and less problems on the carrier deck.

Defined in:

RECOVERYTANKER

Return value:

Disable respawning of tanker.

Defined in:

RECOVERYTANKER

Return value:

Enable respawning of tanker.

Note that this is the default behaviour.

Defined in:

RECOVERYTANKER

Return value:

Set whether tanker shall be respawned or not.

Defined in:

RECOVERYTANKER

Parameter:

#boolean switch

If true (or nil), tanker will be respawned. If false, tanker will not be respawned.

Return value:

Set the speed the tanker flys in its orbit pattern.

Defined in:

RECOVERYTANKER

Parameter:

#number speed

True air speed (TAS) in knots. Default 274 knots, which results in ~250 KIAS.

Return value:

Set TACAN channel of tanker.

Note that mode is automatically set to "Y" for AA TACAN since only that works.

Defined in:

RECOVERYTANKER

Parameters:

#number channel

TACAN channel. Default 1.

#string morse

TACAN morse code identifier. Three letters. Default "TKR".

#string mode

TACAN mode, which can be either "Y" (default) or "X".

Return value:

Disable automatic TACAN activation.

Defined in:

RECOVERYTANKER

Return value:

Set takeoff type.

Defined in:

RECOVERYTANKER

Parameter:

#number takeofftype

Takeoff type.

Return value:

Set takeoff in air at the defined pattern altitude and ~10 NM astern the carrier.

Defined in:

RECOVERYTANKER

Return value:

Set takeoff with engines off (cold).

Defined in:

RECOVERYTANKER

Return value:

Set takeoff with engines running (hot).

Defined in:

RECOVERYTANKER

Return value:

Set the tanker to have unlimited fuel.

Defined in:

RECOVERYTANKER

Parameter:

#boolean OnOff

If true, the tanker will have unlimited fuel.

Return value:

Use an uncontrolled aircraft already present in the mission rather than spawning a new tanker as initial recovery thanker.

This can be useful when interfaced with, e.g., a MOOSE Functional.Warehouse#WAREHOUSE. The group name is the one specified in the RECOVERYTANKER.New function.

Defined in:

RECOVERYTANKER

Return value:

Triggers the FSM event "Start" that starts the recovery tanker.

Initializes parameters and starts event handlers.

Defined in:

RECOVERYTANKER

Triggers the FSM event "Status" that updates the tanker status.

Defined in:

RECOVERYTANKER

Triggers the FSM event "Stop" that stops the recovery tanker.

Event handlers are stopped.

Defined in:

RECOVERYTANKER

Activate TACAN of tanker.

Defined in:

RECOVERYTANKER

Parameter:

#number delay

Delay in seconds.

Check if heading or position have changed significantly.

Defined in:

RECOVERYTANKER

Parameter:

#number dt

Time since last update in seconds.

Return value:

#boolean:

If true, heading and/or position have changed more than 5 degrees or 10 km, respectively.

Task function to

Defined in:

RECOVERYTANKER

Init waypoint after spawn.

Tanker is first guided to a position astern the carrier and starts its racetrack pattern from there.

Defined in:

RECOVERYTANKER

Parameters:

#number dist

Distance [NM] of initial waypoint astern carrier. Default 8 NM.

#number delay

Delay before routing in seconds. Default 1 second.

A unit crashed or died.

Defined in:

RECOVERYTANKER

Parameter:

Event data.

Self made race track pattern.

Not working as desired, since tanker changes course too rapidly after each waypoint.

Defined in:

RECOVERYTANKER

Return value:

#table:

Table of pattern waypoints.

Event handler for refueling started.

Defined in:

RECOVERYTANKER

Parameter:

Event data.

Event handler for refueling stopped.

Defined in:

RECOVERYTANKER

Parameter:

Event data.

Triggers the delayed FSM event "PatternUpdate" that updates the pattern of the tanker wrt to the carrier position.

Defined in:

RECOVERYTANKER

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "RTB" that sends the tanker home after a delay.

Defined in:

RECOVERYTANKER

Parameters:

#number delay

Delay in seconds.

The airbase where the tanker should return to.

Triggers the delayed FSM event "Returned" after the tanker has landed.

Defined in:

RECOVERYTANKER

Parameters:

#number delay

Delay in seconds.

The airbase the tanker has landed.

Triggers delayed the FSM event "Run".

Simply puts the group into "Running" state.

Defined in:

RECOVERYTANKER

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Start" that starts the recovery tanker after a delay.

Initializes parameters and starts event handlers.

Defined in:

RECOVERYTANKER

Parameter:

#number delay

Delay in seconds.

Triggers the delayed FSM event "Status" that updates the tanker status.

Defined in:

RECOVERYTANKER

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Stop" that stops the recovery tanker after a delay.

Event handlers are stopped.

Defined in:

RECOVERYTANKER

Parameter:

#number delay

Delay in seconds.

On after "PatternUpdate" event.

Updates the racetrack pattern of the tanker wrt the carrier position.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "RTB" event.

Send tanker back to carrier.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The airbase where the tanker should return to.

On after Returned event.

The tanker has landed.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The base at which the tanker landed.

On after Start event.

Starts the warehouse. Addes event handlers and schedules status updates of reqests and queue.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after Status event.

Checks player status.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after Stop event.

Unhandle events and stop status updates.

Defined in:

RECOVERYTANKER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Field(s)

#string RECOVERYTANKER.ClassName

Name of the class.

#boolean RECOVERYTANKER.Debug

Debug mode.

#number RECOVERYTANKER.Dupdate

Pattern update when carrier changes its position by more than this distance (meters).

#number RECOVERYTANKER.Hupdate

Pattern update when carrier changes its heading by more than this number (degrees).

#number RECOVERYTANKER.RadioFreq

Radio frequency in MHz of the tanker. Default 251 MHz.

#string RECOVERYTANKER.RadioModu

Radio modulation "AM" or "FM". Default "AM".

#number RECOVERYTANKER.TACANchannel

TACAN channel. Default 1.

#string RECOVERYTANKER.TACANmode

TACAN mode, i.e. "X" or "Y". Default "Y". Use only "Y" for AA TACAN stations!

#string RECOVERYTANKER.TACANmorse

TACAN morse code. Three letters identifying the TACAN station. Default "TKR".

#boolean RECOVERYTANKER.TACANon

If true, TACAN is automatically activated. If false, TACAN is disabled.

#number RECOVERYTANKER.Tupdate

Last time the pattern was updated.

Wrapper.Airbase#AIRBASE RECOVERYTANKER.airbase

The home airbase object of the tanker. Normally the aircraft carrier.

#string RECOVERYTANKER.alias

Alias of the spawn group.

#number RECOVERYTANKER.altitude

Tanker orbit pattern altitude.

#boolean RECOVERYTANKER.awacs

If true, the groups gets the enroute task AWACS instead of tanker.

#number RECOVERYTANKER.callsignname

Number for the callsign name.

#number RECOVERYTANKER.callsignnumber

Number of the callsign name.

Wrapper.Unit#UNIT RECOVERYTANKER.carrier

The carrier the tanker is attached to.

#string RECOVERYTANKER.carriertype

Carrier type.

#number RECOVERYTANKER.dTupdate

Minimum time interval in seconds before the next pattern update can happen.

#number RECOVERYTANKER.distBow

Race-track distance bow. distBow is >0.

#number RECOVERYTANKER.distStern

Race-track distance astern. distStern is <0.

#boolean RECOVERYTANKER.eplrs

If true, enable data link, e.g. if used as AWACS.

#string RECOVERYTANKER.lid

Log debug id text.

#number RECOVERYTANKER.lowfuel

Low fuel threshold in percent.

#string RECOVERYTANKER.modex

Tail number of the tanker.

DCS#Vec3 RECOVERYTANKER.orientation

Orientation of the carrier. Used to monitor changes and update the pattern if heading changes significantly.

DCS#Vec3 RECOVERYTANKER.orientlast

Orientation of the carrier for checking if carrier is currently turning.

Core.Point#COORDINATE RECOVERYTANKER.position

Position of carrier. Used to monitor if carrier significantly changed its position and then update the tanker pattern.

#boolean RECOVERYTANKER.recovery

If true, tanker will recover using the AIRBOSS marshal pattern.

#boolean RECOVERYTANKER.respawn

If true, tanker be respawned (default). If false, no respawning will happen.

#boolean RECOVERYTANKER.respawninair

If true, tanker will always be respawned in air. This has no impact on the initial spawn setting.

#number RECOVERYTANKER.speed

Tanker speed when flying pattern.

#number RECOVERYTANKER.takeoff

Takeoff type (cold, hot, air).

#string RECOVERYTANKER.tankergroupname

Name of the late activated tanker template group.

#number RECOVERYTANKER.terminaltype

Terminal type of used parking spots on airbases.

#number RECOVERYTANKER.uid

Unique ID of this tanker.

#boolean RECOVERYTANKER.uncontrolledac

If true, use and uncontrolled tanker group already present in the mission.

#boolean RECOVERYTANKER.unlimitedfuel

If true, the tanker will have unlimited fuel.

#string RECOVERYTANKER.version

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)

#string RECOVERYTANKER.ClassName

Name of the class.

#boolean RECOVERYTANKER.Debug

Debug mode.

#number RECOVERYTANKER.Dupdate

Pattern update when carrier changes its position by more than this distance (meters).

#number RECOVERYTANKER.Hupdate

Pattern update when carrier changes its heading by more than this number (degrees).

#number RECOVERYTANKER.RadioFreq

Radio frequency in MHz of the tanker. Default 251 MHz.

#string RECOVERYTANKER.RadioModu

Radio modulation "AM" or "FM". Default "AM".

#number RECOVERYTANKER.TACANchannel

TACAN channel. Default 1.

#string RECOVERYTANKER.TACANmode

TACAN mode, i.e. "X" or "Y". Default "Y". Use only "Y" for AA TACAN stations!

#string RECOVERYTANKER.TACANmorse

TACAN morse code. Three letters identifying the TACAN station. Default "TKR".

#boolean RECOVERYTANKER.TACANon

If true, TACAN is automatically activated. If false, TACAN is disabled.

#number RECOVERYTANKER.Tupdate

Last time the pattern was updated.

Wrapper.Airbase#AIRBASE RECOVERYTANKER.airbase

The home airbase object of the tanker. Normally the aircraft carrier.

#string RECOVERYTANKER.alias

Alias of the spawn group.

#number RECOVERYTANKER.altitude

Tanker orbit pattern altitude.

#boolean RECOVERYTANKER.awacs

If true, the groups gets the enroute task AWACS instead of tanker.

#number RECOVERYTANKER.callsignname

Number for the callsign name.

#number RECOVERYTANKER.callsignnumber

Number of the callsign name.

Wrapper.Unit#UNIT RECOVERYTANKER.carrier

The carrier the tanker is attached to.

#string RECOVERYTANKER.carriertype

Carrier type.

#number RECOVERYTANKER.dTupdate

Minimum time interval in seconds before the next pattern update can happen.

#number RECOVERYTANKER.distBow

Race-track distance bow. distBow is >0.

#number RECOVERYTANKER.distStern

Race-track distance astern. distStern is <0.

#boolean RECOVERYTANKER.eplrs

If true, enable data link, e.g. if used as AWACS.

#string RECOVERYTANKER.lid

Log debug id text.

#number RECOVERYTANKER.lowfuel

Low fuel threshold in percent.

#string RECOVERYTANKER.modex

Tail number of the tanker.

DCS#Vec3 RECOVERYTANKER.orientation

Orientation of the carrier. Used to monitor changes and update the pattern if heading changes significantly.

DCS#Vec3 RECOVERYTANKER.orientlast

Orientation of the carrier for checking if carrier is currently turning.

Core.Point#COORDINATE RECOVERYTANKER.position

Position of carrier. Used to monitor if carrier significantly changed its position and then update the tanker pattern.

#boolean RECOVERYTANKER.recovery

If true, tanker will recover using the AIRBOSS marshal pattern.

#boolean RECOVERYTANKER.respawn

If true, tanker be respawned (default). If false, no respawning will happen.

#boolean RECOVERYTANKER.respawninair

If true, tanker will always be respawned in air. This has no impact on the initial spawn setting.

#number RECOVERYTANKER.speed

Tanker speed when flying pattern.

#number RECOVERYTANKER.takeoff

Takeoff type (cold, hot, air).

#string RECOVERYTANKER.tankergroupname

Name of the late activated tanker template group.

#number RECOVERYTANKER.terminaltype

Terminal type of used parking spots on airbases.

#number RECOVERYTANKER.uid

Unique ID of this tanker.

#boolean RECOVERYTANKER.uncontrolledac

If true, use and uncontrolled tanker group already present in the mission.

#boolean RECOVERYTANKER.unlimitedfuel

If true, the tanker will have unlimited fuel.

#string RECOVERYTANKER.version

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

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

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 player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

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.

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

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