Module Ops.ATIS
Global(s)
Global ATIS |
It is a very sad thing that nowadays there is so little useless information. - Oscar Wilde The ATIS ConceptAutomatic terminal information service, or ATIS, is a continuous broadcast of recorded aeronautical information in busier terminal areas, i.e. airports and their immediate surroundings. |
It is a very sad thing that nowadays there is so little useless information. - Oscar Wilde
The ATIS Concept
Automatic terminal information service, or ATIS, is a continuous broadcast of recorded aeronautical information in busier terminal areas, i.e. airports and their immediate surroundings.
ATIS broadcasts contain essential information, such as current weather information, active runways, and any other information required by the pilots.
DCS Limitations
Unfortunately, the DCS API only allow to get the temperature, pressure as well as wind direction and speed. Therefore, some other information such as cloud coverage, base and ceiling are not available when dynamic weather is used.
Scripting
The lua script to create an ATIS at an airport is pretty easy:
-- ATIS at Batumi Airport on 143.00 MHz AM.
atisBatumi=ATIS:New("Batumi", 143.00)
atisBatumi:Start()
The ATIS.New(airbasename, frequency) creates a new ATIS object. The parameter airbasename is the name of the airbase or airport. Note that this has to be spelled exactly as in the DCS mission editor. The parameter frequency is the frequency the ATIS broadcasts in MHz.
Broadcasting is started via the ATIS.Start() function. The start can be delayed by using ATIS.__Start(delay), where delay is the delay in seconds.
Subtitles
Note Subtitles are not displayed when using SRS. The DCS mechanic to show subtitles (top left screen), is via the function call that plays a sound file from a UNIT, hence this doesn't work here.
Currently, DCS allows for displaying subtitles of radio transmissions only from airborne units, i.e. airplanes and helicopters. Therefore, if you want to have subtitles, it is necessary to place an additional aircraft on the ATIS airport and set it to uncontrolled. This unit can then function as a radio relay to transmit messages with subtitles. These subtitles will only be displayed, if the player has tuned in the correct ATIS frequency.
Radio transmissions via an airborne unit can be set via the ATIS.SetRadioRelayUnitName(unitname) function, where the parameter unitname is the name of the unit passed as string, e.g.
atisBatumi:SetRadioRelayUnitName("Radio Relay Batumi")
With a unit set in the mission editor with name "Radio Relay Batumi".
Note that you should use a different relay unit for each ATIS!
By default, subtitles are displayed for 10 seconds. This can be changed using ATIS.SetSubtitleDuration(duration) with duration being the duration in seconds. Setting a duration of 0 will completely disable all subtitles.
Active Runway
By default, the currently active runway is determined automatically by analyzing the wind direction. Therefore, you should obviously set the wind speed to be greater zero in your mission.
Note however, there are a few special cases, where automatic detection does not yield the correct or desired result. For example, there are airports with more than one runway facing in the same direction (usually denoted left and right). In this case, there is obviously no unique result depending on the wind vector.
If the automatic runway detection fails, the active runway can be specified manually in the script via the ATIS.SetActiveRunway(runway) function. The parameter runway is a string which can be used to specify the runway heading and, if applicable, whether the left or right runway is in use.
For example, setting runway 21L would be
atisNellis:SetActiveRunway("21L")
The script will examine the string and search for the characters "L" (left) and "R" (right).
If only left or right should be set and the direction determined by the wind vector, the runway heading can be left out, e.g.
atisAbuDhabi:SetActiveRunway("L")
The first two digits of the runway are determined by converting the true runway heading into its magnetic heading. The magnetic declination (or variation) is assumed to be constant on the given map. An explicit correction factor can be set via ATIS.SetRunwayCorrectionMagnetic2True.
Tower Frequencies
The tower frequency (or frequencies) can also be included in the ATIS information. However, there is no way to get these automatically. Therefore, it is necessary to manually specify them in the script via the ATIS.SetTowerFrequencies(frequencies) function. The parameter frequencies can be a plain number if only one frequency is necessary or it can be a table of frequencies.
Nav Aids
Frequencies or channels of navigation aids can be specified by the user and are then provided as additional information. Unfortunately, it is not possible to acquire this information via the DCS API we have access to.
As they say, all road lead to Rome but (for me) the easiest way to obtain the available nav aids data of an airport, is to start a mission and click on an airport symbol.
For example, the AIRDROME DATA for Batumi reads:
- TACAN 16X - set via ATIS.SetTACAN
- VOR N/A - set via ATIS.SetVOR
- RSBN N/A - set via ATIS.SetRSBN
- ATC 260.000, 131.000, 40.400, 4.250 - set via ATIS.SetTowerFrequencies
- Runways 31 and 13 - automatic but can be set manually via ATIS.SetRunwayHeadingsMagnetic
- ILS 110.30 for runway 13 - set via ATIS.AddILS
- PRMG N/A - set via ATIS.AddPRMG
- OUTER NDB N/A - set via ATIS.AddNDBouter
- INNER NDB N/A - set via ATIS.AddNDBinner
And the AIRDROME DATA for Kobuleti reads:
- TACAN 67X - set via ATIS.SetTACAN
- VOR N/A - set via ATIS.SetVOR
- RSBN N/A - set via ATIS.SetRSBN
- ATC 262.000, 133.000, 40.800, 4.350 - set via ATIS.SetTowerFrequencies
- Runways 25 and 07 - automatic but can be set manually via ATIS.SetRunwayHeadingsMagnetic
- ILS 111.50 for runway 07 - set via ATIS.AddILS
- PRMG N/A - set via ATIS.AddPRMG
- OUTER NDB 870.00 - set via ATIS.AddNDBouter
- INNER NDB 490.00 - set via ATIS.AddNDBinner
TACAN
The TACtical Air Navigation system (TACAN) channel can be set via the ATIS.SetTACAN(channel) function, where channel is the TACAN channel. Band is always assumed to be X-ray.
VOR
The Very high frequency Omni-directional Range (VOR) frequency can be set via the ATIS.SetVOR(frequency) function, where frequency is the VOR frequency.
ILS
The Instrument Landing System (ILS) frequency can be set via the ATIS.AddILS(frequency, runway) function, where frequency is the ILS frequency and runway the two letter string of the corresponding runway, e.g. "31". If the parameter runway is omitted (nil) then the frequency is supposed to be valid for all runways of the airport.
NDB
Inner and outer Non-Directional (radio) Beacons NDBs can be set via the ATIS.AddNDBinner(frequency, runway) and ATIS.AddNDBouter(frequency, runway) functions, respectively.
In both cases, the parameter frequency is the NDB frequency and runway the two letter string of the corresponding runway, e.g. "31". If the parameter runway is omitted (nil) then the frequency is supposed to be valid for all runways of the airport.
RSBN
The RSBN channel can be set via the ATIS.SetRSBN(channel) function.
PRMG
The PRMG channel can be set via the ATIS.AddPRMG(channel, runway) function for each runway.
Unit System
By default, information is given in imperial units, i.e. wind speed in knots, pressure in inches of mercury, visibility in Nautical miles, etc.
If you prefer metric units, you can enable this via the ATIS.SetMetricUnits() function,
atisBatumi:SetMetricUnits()
With this, wind speed is given in meters per second, pressure in hectopascal (hPa, which is the same as millibar - mbar), visibility in kilometers etc.
Sound Files
More than 180 individual sound files have been created using a text-to-speech program. All ATIS information is given with en-US accent. You can find the sound files here. Also check out the pinned messages in the Moose discord #ops-atis channel.
To include the files, open the mission (.miz) file with, e.g., 7-zip. Then just drag-n-drop the file into the miz.
Note that the default folder name is ATIS Soundfiles/. If you want to change it, you can use the ATIS.SetSoundfilesPath(path), where path is the path of the directory. This must end with a slash "/"!
Marks on the F10 Map
You can place marks on the F10 map via the ATIS.SetMapMarks() function. These will contain info about the ATIS frequency, the currently active runway and some basic info about the weather (wind, pressure and temperature).
Text-To-Speech
You can enable text-to-speech ATIS information with the ATIS.SetSRS() function. This uses SRS (Version >= 1.9.6.0) for broadcasting. Advantages are that no sound files or radio relay units are necessary. Also the issue that FC3 aircraft hear all transmissions will be circumvented.
The ATIS.SetSRS() requires you to specify the path to the SRS install directory or more specifically the path to the DCS-SR-ExternalAudio.exe file.
Unfortunately, it is not possible to determine the duration of the complete transmission. So once the transmission is finished, there might be some radio silence before the next iteration begins. You can fine tune the time interval between transmissions with the ATIS.SetQueueUpdateTime() function. The default interval is 90 seconds.
An SRS Setup-Guide can be found here: Moose TTS Setup Guide
Examples
Caucasus: Batumi
-- ATIS Batumi Airport on 143.00 MHz AM.
atisBatumi=ATIS:New(AIRBASE.Caucasus.Batumi, 143.00)
atisBatumi:SetRadioRelayUnitName("Radio Relay Batumi")
atisBatumi:Start()
Nevada: Nellis AFB
-- ATIS Nellis AFB on 270.10 MHz AM.
atisNellis=ATIS:New(AIRBASE.Nevada.Nellis, 270.1)
atisNellis:SetRadioRelayUnitName("Radio Relay Nellis")
atisNellis:SetActiveRunway("21L")
atisNellis:SetTowerFrequencies({327.000, 132.550})
atisNellis:SetTACAN(12)
atisNellis:AddILS(109.1, "21")
atisNellis:Start()
Persian Gulf: Abu Dhabi International Airport
-- ATIS Abu Dhabi International on 125.1 MHz AM.
atisAbuDhabi=ATIS:New(AIRBASE.PersianGulf.Abu_Dhabi_Intl, 125.1)
atisAbuDhabi:SetRadioRelayUnitName("Radio Relay Abu Dhabi International Airport")
atisAbuDhabi:SetMetricUnits()
atisAbuDhabi:SetActiveRunway("L")
atisAbuDhabi:SetTowerFrequencies({250.5, 119.2})
atisAbuDhabi:SetVOR(114.25)
atisAbuDhabi:Start()
SRS
atis=ATIS:New("Batumi", 305, radio.modulation.AM)
atis:SetSRS("D:\\DCS\\_SRS\\", "male", "en-US")
atis:Start()
This uses a male voice with US accent. It requires SRS to be installed in the `D:\DCS_SRS` directory. Note that backslashes need to be escaped or simply use slashes (as in linux).
SRS can use multiple frequencies:
atis=ATIS:New("Batumi", {305,103.85}, {radio.modulation.AM,radio.modulation.FM})
atis:SetSRS("D:\\DCS\\_SRS\\", "male", "en-US")
atis:Start()
SRS Localization
You can localize the SRS output, all you need is to provide a table of translations and set the locale
of your instance. You need to provide the translations in your script before you instantiate your ATIS.
The German localization (already provided in the code) e.g. looks like follows:
ATIS.Messages.DE =
{
HOURS = "Uhr",
TIME = "Zeit",
NOCLOUDINFO = "Informationen über Wolken nicht verfuegbar",
OVERCAST = "Geschlossene Wolkendecke",
BROKEN = "Stark bewoelkt",
SCATTERED = "Bewoelkt",
FEWCLOUDS = "Leicht bewoelkt",
NOCLOUDS = "Klar",
AIRPORT = "Flughafen",
INFORMATION ="Information",
SUNRISEAT = "Sonnenaufgang um %s lokaler Zeit",
SUNSETAT = "Sonnenuntergang um %s lokaler Zeit",
WINDFROMMS = "Wind aus %s mit %s m/s",
WINDFROMKNOTS = "Wind aus %s mit %s Knoten",
GUSTING = "boeig",
VISIKM = "Sichtweite %s km",
VISISM = "Sichtweite %s Meilen",
RAIN = "Regen",
TSTORM = "Gewitter",
SNOW = "Schnee",
SSTROM = "Schneesturm",
FOG = "Nebel",
DUST = "Staub",
PHENOMENA = "Wetter Phaenomene",
CLOUDBASEM = "Wolkendecke von %s bis %s Meter",
CLOUDBASEFT = "Wolkendecke von %s bis %s Fuß",
TEMPERATURE = "Temperatur",
DEWPOINT = "Taupunkt",
ALTIMETER = "Hoehenmesser",
ACTIVERUN = "Aktive Startbahn",
ACTIVELANDING = "Aktive Landebahn",
LEFT = "Links",
RIGHT = "Rechts",
RWYLENGTH = "Startbahn",
METERS = "Meter",
FEET = "Fuß",
ELEVATION = "Hoehe",
TOWERFREQ = "Kontrollturm Frequenz",
ILSFREQ = "ILS Frequenz",
OUTERNDB = "Aeussere NDB Frequenz",
INNERNDB = "Innere NDB Frequenz",
VORFREQ = "VOR Frequenz",
VORFREQTTS = "V O R Frequenz",
TACANCH = "TACAN Kanal %d Xaver",
RSBNCH = "RSBN Kanal",
PRMGCH = "PRMG Kanal",
ADVISE = "Hinweis bei Erstkontakt, Sie haben Informationen",
STATUTE = "englische Meilen",
DEGREES = "Grad Celsius",
FAHRENHEIT = "Grad Fahrenheit",
INCHHG = "Inches H G",
MMHG = "Millimeter H G",
HECTO = "Hektopascal",
METERSPER = "Meter pro Sekunde",
TACAN = "Tackan",
FARP = "Farp",
DELIMITER = "Komma", -- decimal delimiter
}
Then set up your ATIS and set the locale:
atis=ATIS:New("Batumi", 305, radio.modulation.AM)
atis:SetSRS("D:\\DCS\\_SRS\\", "female", "de_DE")
atis:SetLocale("de") -- available locales from source are "en", "de" and "es"
atis:Start()
FARPS
ATIS is working with FARPS, but this requires the usage of SRS. The airbase name for the New()-method
is the UNIT name of the FARP:
atis = ATIS:New("FARP Gold",119,radio.modulation.AM)
atis:SetMetricUnits()
atis:SetTransmitOnlyWithPlayers(true)
atis:SetReportmBar(true)
atis:SetTowerFrequencies(127.50)
atis:SetSRS("D:\\DCS\\_SRS\\", "male", "en-US",nil,5002)
atis:SetAdditionalInformation("Welcome to the Jungle!")
atis:__Start(3)
Global _ATIS |
ATIS table containing all defined ATISes. |
ATIS table containing all defined ATISes.
Type(s)
Fields and Methods inherited from ATIS | Description |
---|---|
Will be set to true if the base given is a FARP/Helipad |
|
Add ILS station. |
|
Add inner NDB. |
|
Add outer NDB. |
|
Add PRMG channel. |
|
Triggers the FSM event "Broadcast". |
|
Triggers the FSM event "CheckQueue". |
|
Name of the class. |
|
Get active runway runway. |
|
Get the coalition of the associated airbase. |
|
Get runway from user supplied magnetic heading. |
|
Get weather of this mission from env.mission.weather variable. |
|
Get nav aid data. |
|
Get info if left or right runway is active. |
|
Get runway heading without left or right info. |
|
Return the complete SRS Text block, if at least generated once. |
|
Place marks with runway data on the F10 map. |
|
Create a new ATIS class object for a specific airbase. |
|
On after "Report" event user function. |
|
Base captured |
|
If true, give pressure in millimeters of Mercury. Default is inHg for imperial and hectopascal (hPa, which is the same as millibar - mbar) for metric units. |
|
Triggers the FSM event "Report". |
|
Suppresses QFE readout. |
|
Suppresses local time, sunrise, and sunset. |
|
Report mBar/hpa even if not metric, i.e. for Mirage flights |
|
Text of the complete SRS message (if done at least once, else nil) |
|
Set active runway for landing operations. |
|
Set the active runway for landing. |
|
Set the active runway for take-off. |
|
Additionally report free text, only working with SRS(!) |
|
Report altimeter QNH. |
|
Give information on airfield elevation |
|
Set unit system to imperial units. |
|
Set locale for localized text-to-sound output via SRS, defaults to "en". |
|
Set magnetic declination/variation at the airport. |
|
Use F10 map mark points. |
|
Set unit system to metric units. |
|
Set pressure unit to millimeters of mercury (mmHg). |
|
Set the time interval between radio queue updates. |
|
Set RSBN channel. |
|
Set radio power. |
|
Set airborne unit (airplane or helicopter), used to transmit radio messages including subtitles. |
|
Set relative humidity. |
|
Set wind direction (from) to be reported as true heading. |
|
Additionally report altimeter QNH/QFE in hPa, even if not set to metric. |
|
Explicitly set correction of magnetic to true heading for runways. |
|
Set magnetic runway headings as depicted on the runway, e.g. "13" for 130° or "25L" for the left runway with magnetic heading 250°. |
|
Give information on runway length. |
|
ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port, GoogleKey) |
Use SRS Simple-Text-To-Speech for transmissions. |
Set an alternative provider to the one set in your MSRS configuration file. |
|
Set the path to the csv file that contains information about the used sound files. |
|
Set sound files folder within miz file (not your local hard drive!). |
|
Set duration how long subtitles are displayed. |
|
Set TACAN channel. |
|
Set temperature to be given in degrees Fahrenheit. |
|
Set tower frequencies. |
|
For SRS - Switch to only transmit if there are players on the server. |
|
Set VOR station. |
|
Set time local difference with respect to Zulu time. |
|
Play all audio files. |
|
Triggers the FSM event "Start". |
|
Triggers the FSM event "Status". |
|
Triggers the FSM event "Stop". |
|
If true, give temperature in degrees Fahrenheit. Default is in degrees Celsius independent of chosen unit system. |
|
Transmission via RADIOQUEUE. |
|
For SRS - If true, only transmit if there are alive Players. |
|
ATIS:UpdateMarker(information, runact, wind, altimeter, temperature) |
Update F10 map marker. |
Get thousands of a number. |
|
[Internal] Init localization |
|
Triggers the FSM event "Broadcast" after a delay. |
|
Triggers the FSM event "CheckQueue" after a delay. |
|
Triggers the FSM event "Report" after a delay. |
|
Triggers the FSM event "Start" after a delay. |
|
Triggers the FSM event "Status" after a delay. |
|
Triggers the FSM event "Stop" after a delay. |
|
The active runway specified by the user. |
|
The airbase object. |
|
The name of the airbase. |
|
Report altimeter QNH. |
|
Time interval to check the radio queue. Default 5 sec or 90 sec if SRS is used. |
|
If true, give info on airfield elevation. |
|
Radio frequency in MHz. |
|
Gettext for localization |
|
Table of ILS frequencies (can be runway specific). |
|
Class id string for output to DCS log file. |
|
Current locale |
|
Magnetic declination/variation at the airport in degrees. |
|
Numerical ID of the F10 map mark point. |
|
If true, use metric units. If false, use imperial (default). |
|
Radio modulation 0=AM or 1=FM. |
|
Moose SRS object. |
|
Table of inner NDB frequencies (can be runway specific). |
|
Table of outer NDB frequencies (can be runway specific). |
|
Broadcast ATIS radio message. |
|
Check if radio queue is empty. |
|
Text report of ATIS information. |
|
Start ATIS FSM. |
|
Update status. |
|
Radio power in Watts. Default 100 W. |
|
PRMG channels (can be runway specific). |
|
If true, suppresses reporting QFE. Default is to report both QNH and QFE. |
|
Radio queue for broadcasing messages. |
|
Relative humidity (used to approximately calculate the dew point). |
|
Name of the radio relay unit. |
|
RSBN channel. |
|
Optional correction for magnetic to true runway heading conversion (and vice versa) in degrees. |
|
Table of magnetic runway headings. |
|
If true, give info on runway length. |
|
Path to sound files. |
|
Path to airport names sound files. |
|
Path to NATO alphabet sound files. |
|
Duration how long subtitles are displayed in seconds. |
|
TACAN channel. |
|
DCS map name. |
|
Table with tower frequencies. |
|
If true, use SRS for transmission. |
|
Use mark on the F10 map. |
|
ATIS class version. |
|
VOR frequency. |
|
Report true (from) heading of wind. Default is magnetic. |
|
Time difference local vs. zulu in hours. |
|
If true, suppresses report of local time, sunrise, and sunset. |
Fields and Methods inherited from FSM | Description |
---|---|
Adds an End 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. |
|
Adds a score for the FSM to be achieved. |
|
Adds a score for the FSM_PROCESS to be achieved. |
|
Add a new transition rule to the FSM. |
|
Call scheduler. |
|
Name of the class. |
|
Get current state. |
|
Returns the End states. |
|
Returns a table of the SubFSM rules defined within the FSM. |
|
Returns a table with the scores defined. |
|
Returns the start state of the FSM. |
|
Get current state. |
|
Returns a table with the Subs defined. |
|
Returns a table of the transition rules defined within the FSM. |
|
Check if FSM is in state. |
|
Load call backs. |
|
Creates a new FSM object. |
|
Scores. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
Call handler. |
|
Create transition. |
|
Delayed transition. |
|
Event map. |
|
Go sub. |
|
Handler. |
|
Is end state. |
|
Sub maps. |
|
Check if can do an event. |
|
Check if cannot do an event. |
|
Current state name. |
|
Check if FSM is in state. |
|
Options. |
|
Subs. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
ATIS:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
ATIS:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
ATIS:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
ATIS:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
ATIS:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
ATIS:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from ATIS.ICAOPhraseology | Description |
---|---|
true. |
|
true. |
|
true. |
|
false. |
|
true. |
|
true. |
|
true. |
|
true. |
|
true. |
Fields and Methods inherited from ATIS.NavPoint | Description |
---|---|
Nav point frequency. |
|
If true, runway has left "L" and right "R" runways. |
|
Runway, e.g. "21". |
Fields and Methods inherited from ATIS.RunwayM2T | Description |
---|---|
0° (East). |
|
+2° (East). |
|
+12° (East). |
|
-10° (West). |
|
+2° (East). |
|
+5° (East). |
|
+5° (East). |
|
-10° (West). |
Fields and Methods inherited from ATIS.Sound | Description |
---|---|
Fields and Methods inherited from ATIS.Soundfile | Description |
---|---|
Duration in seconds. |
|
Name of the file |
ATIS class.
Field(s)
Will be set to true if the base given is a FARP/Helipad
Name of the class.
If true, give pressure in millimeters of Mercury. Default is inHg for imperial and hectopascal (hPa, which is the same as millibar - mbar) for metric units.
Report mBar/hpa even if not metric, i.e. for Mirage flights
Text of the complete SRS message (if done at least once, else nil)
If true, give temperature in degrees Fahrenheit. Default is in degrees Celsius independent of chosen unit system.
For SRS - If true, only transmit if there are alive Players.
The active runway specified by the user.
The name of the airbase.
Report altimeter QNH.
Time interval to check the radio queue. Default 5 sec or 90 sec if SRS is used.
If true, give info on airfield elevation.
Radio frequency in MHz.
Table of ILS frequencies (can be runway specific).
Class id string for output to DCS log file.
Current locale
Magnetic declination/variation at the airport in degrees.
Numerical ID of the F10 map mark point.
If true, use metric units. If false, use imperial (default).
Radio modulation 0=AM or 1=FM.
Table of inner NDB frequencies (can be runway specific).
Table of outer NDB frequencies (can be runway specific).
Radio power in Watts. Default 100 W.
PRMG channels (can be runway specific).
If true, suppresses reporting QFE. Default is to report both QNH and QFE.
Relative humidity (used to approximately calculate the dew point).
Name of the radio relay unit.
RSBN channel.
Optional correction for magnetic to true runway heading conversion (and vice versa) in degrees.
Table of magnetic runway headings.
If true, give info on runway length.
Path to sound files.
Path to airport names sound files.
Path to NATO alphabet sound files.
Duration how long subtitles are displayed in seconds.
TACAN channel.
DCS map name.
Table with tower frequencies.
If true, use SRS for transmission.
Use mark on the F10 map.
ATIS class version.
VOR frequency.
Report true (from) heading of wind. Default is magnetic.
Time difference local vs. zulu in hours.
If true, suppresses report of local time, sunrise, and sunset.
Function(s)
Add ILS station.
Note that this can be runway specific.
Defined in:
ATIS
Parameters:
#number frequency
ILS frequency in MHz.
#string runway
(Optional) Runway for which the given ILS frequency applies. Default all (nil).
Return value:
self
Add inner NDB.
Note that this can be runway specific.
Defined in:
ATIS
Parameters:
#number frequency
NDB frequency in MHz.
#string runway
(Optional) Runway for which the given NDB frequency applies. Default all (nil).
Return value:
self
Add outer NDB.
Note that this can be runway specific.
Defined in:
ATIS
Parameters:
#number frequency
NDB frequency in MHz.
#string runway
(Optional) Runway for which the given NDB frequency applies. Default all (nil).
Return value:
self
Add PRMG channel.
Note that this can be runway specific.
Defined in:
ATIS
Parameters:
#number channel
PRMG channel.
#string runway
(Optional) Runway for which the given PRMG channel applies. Default all (nil).
Return value:
self
Get active runway runway.
Defined in:
ATIS
Parameter:
#boolean Takeoff
If true
, get runway for takeoff. Default is for landing.
Return values:
#string:
Active runway, e.g. "31" for 310 deg.
#boolean:
Use Left=true, Right=false, or nil.
Get the coalition of the associated airbase.
Defined in:
ATIS
Return value:
#number:
Coalition of the associated airbase.
Get runway from user supplied magnetic heading.
Defined in:
ATIS
Parameter:
#number windfrom
Wind direction (from) in degrees.
Return value:
#string:
Runway magnetic heading divided by ten (and rounded). Eg, "13" for 130°.
Get weather of this mission from env.mission.weather variable.
Defined in:
ATIS
Return values:
#table:
Clouds table which has entries "thickness", "density", "base", "iprecptns".
#number:
Visibility distance in meters.
#number:
Ground turbulence in m/s.
#table:
Fog table, which has entries "thickness", "visibility" or nil if fog is disabled in the mission.
#number:
Dust density or nil if dust is disabled in the mission.
#boolean:
static If true, static weather is used. If false, dynamic weather is used.
Get nav aid data.
Get info if left or right runway is active.
Defined in:
ATIS
Parameter:
#string runway
Runway heading, e.g. "31L".
Return value:
#boolean:
If true, left runway is active. If false, right runway. If nil, neither applies.
Get runway heading without left or right info.
Defined in:
ATIS
Parameter:
#string runway
Runway heading, e.g. "31L".
Return value:
#string:
Runway heading without left or right, e.g. "31".
Return the complete SRS Text block, if at least generated once.
Else nil.
Defined in:
ATIS
Return value:
#string:
SRSText
Place marks with runway data on the F10 map.
Defined in:
ATIS
Parameter:
#boolean markall
If true, mark all runways of the map. By default only the current ATIS runways are marked.
Create a new ATIS class object for a specific airbase.
Defined in:
ATIS
Parameters:
#string AirbaseName
Name of the airbase.
#number Frequency
Radio frequency in MHz. Default 143.00 MHz. When using SRS this can be passed as a table of multiple frequencies.
#number Modulation
Radio modulation: 0=AM, 1=FM. Default 0=AM. See radio.modulation.AM
and radio.modulation.FM
enumerators. When using SRS this can be passed as a table of multiple modulations.
Return value:
self
On after "Report" event user function.
Defined in:
ATIS
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#string Text
Report text.
Base captured
Triggers the FSM event "Report".
Defined in:
ATIS
Parameter:
#string Text
Report text.
Suppresses QFE readout.
Default is to report both QNH and QFE.
Suppresses local time, sunrise, and sunset.
Default is to report all these times.
Set active runway for landing operations.
This can be used if the automatic runway determination via the wind direction gives incorrect results. For example, use this if there are two runways with the same directions.
Set the active runway for landing.
Defined in:
ATIS
Parameters:
#string runway
: Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
#boolean preferleft
: If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
Return value:
self
Set the active runway for take-off.
Defined in:
ATIS
Parameters:
#string runway
: Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
#boolean preferleft
: If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
Return value:
self
Additionally report free text, only working with SRS(!)
Defined in:
ATIS
Parameter:
#string text
The text to report at the end of the ATIS message, e.g. runway closure, warnings, etc.
Return value:
self
Report altimeter QNH.
Defined in:
ATIS
Parameter:
#boolean switch
If true or nil, report altimeter QHN. If false, report QFF.
Return value:
self
Give information on airfield elevation
Set unit system to imperial units.
Set locale for localized text-to-sound output via SRS, defaults to "en".
Defined in:
ATIS
Parameter:
#string locale
Locale for localized text-to-sound output via SRS, defaults to "en".
Return value:
self
Set magnetic declination/variation at the airport.
Default is per map:
- Caucasus +6 (East), year ~ 2011
- NTTR +12 (East), year ~ 2011
- Normandy -10 (West), year ~ 1944
- Persian Gulf +2 (East), year ~ 2011
To get true from magnetic heading one has to add easterly or substract westerly variation, e.g
A magnetic heading of 180° corresponds to a true heading of
- 186° on the Caucaus map
- 192° on the Nevada map
- 170° on the Normandy map
- 182° on the Persian Gulf map
Likewise, to convert true into magnetic heading, one has to substract easterly and add westerly variation.
Or you make your life simple and just include the sign so you don't have to bother about East/West.
Defined in:
ATIS
Parameter:
#number magvar
Magnetic variation in degrees. Positive for easterly and negative for westerly variation. Default is magnatic declinaton of the used map, c.f. Utilities.Utils#UTILS.GetMagneticDeclination.
Return value:
self
Use F10 map mark points.
Defined in:
ATIS
Parameter:
#boolean switch
If true or nil, marks are placed on F10 map. If false this feature is set to off (default).
Return value:
self
Set pressure unit to millimeters of mercury (mmHg).
Default is inHg for imperial and hPa (=mBar) for metric units.
Set the time interval between radio queue updates.
Defined in:
ATIS
Parameter:
#number TimeInterval
Interval in seconds. Default 5 sec.
Return value:
self
Set RSBN channel.
Set radio power.
Note that this only applies if no relay unit is used.
Defined in:
ATIS
Parameter:
#number power
Radio power in Watts. Default 100 W.
Return value:
self
Set airborne unit (airplane or helicopter), used to transmit radio messages including subtitles.
Best is to place the unit on a parking spot of the airbase and set it to uncontrolled in the mission editor.
Set relative humidity.
This is used to approximately calculate the dew point. Note that the dew point is only an artificial information as DCS does not have an atmospheric model that includes humidity (yet).
Defined in:
ATIS
Parameter:
#number Humidity
Relative Humidity, i.e. a number between 0 and 100 %. Default is 50 %.
Return value:
self
Set wind direction (from) to be reported as true heading.
Default is magnetic.
Additionally report altimeter QNH/QFE in hPa, even if not set to metric.
Defined in:
ATIS
Parameter:
#boolean switch
If true or nil, report mBar/hPa in addition.
Return value:
self
Explicitly set correction of magnetic to true heading for runways.
Defined in:
ATIS
Parameter:
#number correction
Correction of magnetic to true heading for runways in degrees.
Return value:
self
Set magnetic runway headings as depicted on the runway, e.g. "13" for 130° or "25L" for the left runway with magnetic heading 250°.
Defined in:
ATIS
Parameter:
#table headings
Magnetic headings. Inverse (-180°) headings are added automatically. You only need to specify one heading per runway direction. "L"eft and "R" right can also be appended.
Return value:
self
Give information on runway length.
Use SRS Simple-Text-To-Speech for transmissions.
No sound files necessary.SetSRS()
will try to use as many attributes configured with Sound.SRS#MSRS.LoadConfigFile() as possible.
Defined in:
ATIS
Parameters:
#string PathToSRS
Path to SRS directory (only necessary if SRS exe backend is used).
#string Gender
Gender: "male" or "female" (default).
#string Culture
Culture, e.g. "en-GB" (default).
#string Voice
Specific voice. Overrides Gender
and Culture
.
#number Port
SRS port. Default 5002.
#string GoogleKey
Path to Google JSON-Key (SRS exe backend) or Google API key (DCS-gRPC backend).
Return value:
self
Set an alternative provider to the one set in your MSRS configuration file.
Defined in:
ATIS
Parameter:
#string Provider
The provider to use. Known providers are: MSRS.Provider.WINDOWS
and MSRS.Provider.GOOGLE
Return value:
self
Set the path to the csv file that contains information about the used sound files.
The parameter file has to be located on your local disk (not inside the miz file).
Defined in:
ATIS
Parameter:
#string csvfile
Full path to the csv file on your local disk.
Return value:
self
Set sound files folder within miz file (not your local hard drive!).
Defined in:
ATIS
Parameters:
#string pathMain
Path to folder containing main sound files. Default "ATIS Soundfiles/". Mind the slash "/" at the end!
#string pathAirports
Path folder containing the airport names sound files. Default is "ATIS Soundfiles/<Map Name>"
, e.g. "ATIS Soundfiles/Caucasus/"
.
#string pathNato
Path folder containing the NATO alphabet sound files. Default is "ATIS Soundfiles/NATO Alphabet/".
Return value:
self
Set duration how long subtitles are displayed.
Defined in:
ATIS
Parameter:
#number duration
Duration in seconds. Default 10 seconds.
Return value:
self
Set TACAN channel.
Set temperature to be given in degrees Fahrenheit.
Set tower frequencies.
Defined in:
ATIS
Parameter:
#table freqs
Table of frequencies in MHz. A single frequency can be given as a plain number (i.e. must not be table).
Return value:
self
For SRS - Switch to only transmit if there are players on the server.
Defined in:
ATIS
Parameter:
#boolean Switch
If true, only send SRS if there are alive Players.
Return value:
self
Set VOR station.
Set time local difference with respect to Zulu time.
Default is per map:
- Caucasus +4
- Nevada -8
- Normandy 0
- Persian Gulf +4
- The Channel +2 (should be 0)
Transmission via RADIOQUEUE.
Defined in:
ATIS
Parameters:
#ATIS.Soundfile sound
ATIS sound object.
#number interval
Interval in seconds after the last transmission finished.
#string subtitle
Subtitle of the transmission.
#string path
Path to sound file. Default self.soundpath
.
Update F10 map marker.
Defined in:
ATIS
Parameters:
#string information
Information tag text.
#string runact
Active runway text.
#string wind
Wind text.
#string altimeter
Altimeter text.
#string temperature
Temperature text.
Return value:
#number:
Marker ID.
Get thousands of a number.
Defined in:
ATIS
Parameter:
#number n
Number, e.g. 4359.
Return values:
#string:
Thousands of n, e.g. "4" for 4359.
#string:
Hundreds of n, e.g. "4" for 4359 because its rounded.
Triggers the FSM event "Broadcast" after a delay.
Defined in:
ATIS
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "CheckQueue" after a delay.
Defined in:
ATIS
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Report" after a delay.
Defined in:
ATIS
Parameters:
#number delay
Delay in seconds.
#string Text
Report text.
Triggers the FSM event "Start" after a delay.
Defined in:
ATIS
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Status" after a delay.
Defined in:
ATIS
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Stop" after a delay.
Defined in:
ATIS
Parameter:
#number delay
Delay in seconds.
Broadcast ATIS radio message.
Defined in:
ATIS
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Check if radio queue is empty.
If so, start broadcasting the message again.
Defined in:
ATIS
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Text report of ATIS information.
Information delimitor is a semicolon ";" and a line break "\n".
Defined in:
ATIS
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#string Text
Report text.
Start ATIS FSM.
Defined in:
ATIS
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Update status.
Defined in:
ATIS
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Field(s)
Will be set to true if the base given is a FARP/Helipad
Name of the class.
If true, give pressure in millimeters of Mercury. Default is inHg for imperial and hectopascal (hPa, which is the same as millibar - mbar) for metric units.
Report mBar/hpa even if not metric, i.e. for Mirage flights
Text of the complete SRS message (if done at least once, else nil)
If true, give temperature in degrees Fahrenheit. Default is in degrees Celsius independent of chosen unit system.
For SRS - If true, only transmit if there are alive Players.
The active runway specified by the user.
The name of the airbase.
Report altimeter QNH.
Time interval to check the radio queue. Default 5 sec or 90 sec if SRS is used.
If true, give info on airfield elevation.
Radio frequency in MHz.
Table of ILS frequencies (can be runway specific).
Class id string for output to DCS log file.
Current locale
Magnetic declination/variation at the airport in degrees.
Numerical ID of the F10 map mark point.
If true, use metric units. If false, use imperial (default).
Radio modulation 0=AM or 1=FM.
Table of inner NDB frequencies (can be runway specific).
Table of outer NDB frequencies (can be runway specific).
Radio power in Watts. Default 100 W.
PRMG channels (can be runway specific).
If true, suppresses reporting QFE. Default is to report both QNH and QFE.
Relative humidity (used to approximately calculate the dew point).
Name of the radio relay unit.
RSBN channel.
Optional correction for magnetic to true runway heading conversion (and vice versa) in degrees.
Table of magnetic runway headings.
If true, give info on runway length.
Path to sound files.
Path to airport names sound files.
Path to NATO alphabet sound files.
Duration how long subtitles are displayed in seconds.
TACAN channel.
DCS map name.
Table with tower frequencies.
If true, use SRS for transmission.
Use mark on the F10 map.
ATIS class version.
VOR frequency.
Report true (from) heading of wind. Default is magnetic.
Time difference local vs. zulu in hours.
If true, suppresses report of local time, sunrise, and sunset.
Function(s)
Adds an End 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.
Core.Fsm#FSM_PROCESS Process
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.
Returns the End states.
Returns a table of the SubFSM rules defined within the FSM.
Returns a table with the scores defined.
Returns the start state of the FSM.
Get current state.
Returns a table with the Subs defined.
Returns a table of the transition rules defined within the FSM.
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.
Sets the start state of the FSM.
Add to map.
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.
Go sub.
Defined in:
Parameters:
#string ParentFrom
Parent from state.
#string ParentEvent
Parent event name.
Return value:
#table:
Subs.
Handler.
Is end state.
Defined in:
Parameter:
#string Current
Current state name.
Return values:
#table:
FSM parent.
#string:
Event name.
Sub maps.
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)
Will be set to true if the base given is a FARP/Helipad
Name of the class.
If true, give pressure in millimeters of Mercury. Default is inHg for imperial and hectopascal (hPa, which is the same as millibar - mbar) for metric units.
Report mBar/hpa even if not metric, i.e. for Mirage flights
Text of the complete SRS message (if done at least once, else nil)
If true, give temperature in degrees Fahrenheit. Default is in degrees Celsius independent of chosen unit system.
For SRS - If true, only transmit if there are alive Players.
The active runway specified by the user.
The name of the airbase.
Report altimeter QNH.
Time interval to check the radio queue. Default 5 sec or 90 sec if SRS is used.
If true, give info on airfield elevation.
Radio frequency in MHz.
Table of ILS frequencies (can be runway specific).
Class id string for output to DCS log file.
Current locale
Magnetic declination/variation at the airport in degrees.
Numerical ID of the F10 map mark point.
If true, use metric units. If false, use imperial (default).
Radio modulation 0=AM or 1=FM.
Table of inner NDB frequencies (can be runway specific).
Table of outer NDB frequencies (can be runway specific).
Radio power in Watts. Default 100 W.
PRMG channels (can be runway specific).
If true, suppresses reporting QFE. Default is to report both QNH and QFE.
Relative humidity (used to approximately calculate the dew point).
Name of the radio relay unit.
RSBN channel.
Optional correction for magnetic to true runway heading conversion (and vice versa) in degrees.
Table of magnetic runway headings.
If true, give info on runway length.
Path to sound files.
Path to airport names sound files.
Path to NATO alphabet sound files.
Duration how long subtitles are displayed in seconds.
TACAN channel.
DCS map name.
Table with tower frequencies.
If true, use SRS for transmission.
Use mark on the F10 map.
ATIS class version.
VOR frequency.
Report true (from) heading of wind. Default is magnetic.
Time difference local vs. zulu in hours.
If true, suppresses report of local time, sunrise, and sunset.
Function(s)
Clear the state of an object.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
StateName
The key that is should be cleared.
Creation of a Birth Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
#string IniUnitName
The initiating unit name.
place
subplace
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
IniObjectCategory
Creation of a Dead Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
IniObjectCategory
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Whether ICAO phraseology is used for ATIS broadcasts.
Field(s)
true.
true.
true.
false.
true.
true.
true.
true.
true.
Function(s)
Runway correction for converting true to magnetic heading.
Field(s)
0° (East).
+2° (East).
+12° (East).
-10° (West).
+2° (East).
+5° (East).
+5° (East).
-10° (West).
Function(s)
Sound files.
Field(s)
Function(s)
Sound file data.
Field(s)
Duration in seconds.
Name of the file