Module Ops.TARS
Global(s)
Global TARS |
Simulates photo-reconnaissance and visual-observation missions in DCS World. |
Simulates photo-reconnaissance and visual-observation missions in DCS World.
Players fly designated recon aircraft or helicopters, activate the film from the F10 radio menu, overfly enemy units within the sensor's flight envelope, and return to an allied airbase or FARP to trigger a debrief. Detected targets are published as coalition-only F10 map markers and optional scoring credits are awarded.
Quick-start
The system initialises automatically at the bottom of this file:
local locale = "de" -- optional, default is "en"
TARS_Instance = TARS:New(locale)
Nothing else is required. Adjust the configuration fields at the top of the
file (TARS.filmLimitMax, TARS.parameters, TARS.allowedAmmo, …) to fit
your mission before loading.
Important: TARS:New() creates a (deep) copy of the TARS class table. All configuration and runtime
state is read from that instance. So either change TARS.* fields before calling TARS:New(),
or change the fields on the returned instance afterwards, e.g. TARS_Instance.filmLimitMax = 10.
Changing TARS.* after TARS:New() has no effect on the running instance.
To share an existing MOOSE SCORING object instead of creating a second one, pass it to the constructor:
local myScoring = SCORING:New("My Mission")
TARS_Instance = TARS:New("en", myScoring)
How it works
- Footprint (cameras): the camera looks forward-down at
offset(depression angle, radians) with a full opening angle offov(degrees). On flat ground this projects an ellipse ahead of the aircraft. Units and, optionally, statics inside the ellipse are captured when AGL is betweenminAltandmaxAltand roll/pitch are belowmaxRoll/maxPitch(degrees). - Footprint (visual helicopters,
optimalAltset): a circleAGL * tan(offset)ahead of the helicopter (hereoffsetis measured from the vertical) whose radius is interpolated fromminRange/optimalRange/maxRangeoverminAlt/optimalAlt/maxAlt. - Capture interval: each tick uses one exposition (
duration). The time to the next tick is derived from footprint size, ground speed andoverlap, clamped tomin_interval..120 seconds. - Debrief: after the film is stopped (menu, film exhausted or capture limit reached) land within
landingDistanceof a friendly airbase/FARP. Stopping the film while already on the ground at a base also starts the debrief.
Player workflow
1. Spawn into a recon-capable slot and open the F10 › Task TARS radio menu.
2. Select TARS validation on the ground. The system checks your loadout and
reports the platform's altitude band, FOV, and available film.
The validation item then disappears once approved.
3. Take off. Start filming / STB & Resume / Stop filming appear in the menu.
4. Select TARS mode : Start filming to begin recording.
5. Fly over enemy units within the sensor's altitude/attitude envelope.
Each detected unit is confirmed in the HUD (+1 Captured target).
6. Use TARS mode : STB & Resume to pause (e.g. to refuel).
Film resumes automatically on the next takeoff if the loadout is still valid.
7. Select TARS mode : Stop filming or let the film timer expire.
8. Land at an allied airbase or FARP within TARS.landingDistance metres.
The film controls disappear. After landingDelay + debriefDelay seconds the
intel marks appear on the F10 map and scoring credits are awarded.
After the debrief the TARS validation item reappears for the next sortie.
Localization
All player-facing strings are defined in TARS.Messages using a table.
Platforms and Settings
Player group name filters
TARS.recoNameFilter = { enabled=false, keyword="Reco" } -- Only allow groups with this keyword in the name
Adding a new platform
Add an entry to TARS.reconTypes and a matching typename and profile to TARS.parameters:
TARS_Instance.reconTypes["F-16C_50"] = true
TARS_Instance.parameters["F-16C_50"] = {
minAlt=300, maxAlt=8000, maxRoll=10, maxPitch=15, -- Note altitude is AGL!
fov=35, duration=300, offset=math.rad(20), -- fov = field of view, duration = # max of photos, offset = camera angle in Radians
name="F-16C with RECCE pod"
}
Optical System Parameters Demonstrator
The optical system is like a torchlight, the further away from the ground you are, the larger is the area covered. One underestimated effect is however, that on flat land, because at angle, you actually cover an elliptic area. You can checkout the effects of various parameters on this demonstrator.
Available Platforms are
TARS.reconTypes = {
["MiG-21Bis"]=true, ["AJS37"]=true, ["Mirage-F1EE"]=true,
["F-5E-3"]=true, ["F-14A-135-GR"]=true, ["F-14B"]=true,
["F-4E-45MC"]=true, ["P-51D"]=true, ["P-51D-30-NA"]=true,
["SpitfireLFMkIX"]=true, ["FW-190A8"]=true, ["FW-190D9"]=true,
["SA342M"]=true, ["SA342L"]=true, ["UH-1H"]=true, ["OH58D"]=true,
["Mi-8MT"]=true, ["MH-6J"]=true,
["OH-6A"]=true,}
Allowed weapon types on the platforms are - will be validated by the script
Gun ammo is always allowed and does not need to be listed.
TARS.allowedAmmo = {
["AIM-9B"]=true,["AIM-9D"]=true,["AIM-9E"]=true,["AIM-9G"]=true,
["AIM-9H"]=true,["AIM-9J"]=true,["AIM-9L"]=true,["AIM-9M"]=true,
["AIM-9N"]=true,["AIM-9P"]=true,["AIM-9P3"]=true,["AIM-9P5"]=true,
["AIM-9JULI"]=true,
["R-3S"]=true,["R-13M"]=true,["R-13M1"]=true,["R-60"]=true,["R-60M"]=true,
["R550 Magic II"]=true,
["7_62x51"]=true,}
Film and detection settings
TARS.filmLimitEnabled = true
TARS.filmLimitMax = 25 -- max 25 captured objects
TARS.detectUnits = true -- capture UNIT objects
TARS.detectStatics = false -- capture STATIC objects incl. of FARPs
Target UNIT Filters
TARS.units = { air=false, ground=true, ship=true }
Target UNIT Name Filters
You always only detect UNITs of the other coalition. E.g. below - a RED unit would only detect BLUE units which have "Hawk" somewhere in the UNIT name. Name keywords are tested independent of capitalization, it doesn't matter if it is Hawk, HAWK, or hAwK.
TARS.targetNameFilter = { enabled = true, keywords = { [coalition.side.BLUE] = { "Hawk" }, [coalition.side.RED] = { "Scud" },},}
Target STATIC Filters
TARS.statics = {
farps=true,
captureExceptions=false, captureExceptionsList={}, -- these are mutually exclusive, either exceptions from the typename list captureExceptionsList **or**
captureUnique=false, captureUniqueList={},} -- unique (once only) typenames from the captureUniqueList!
Other Settings
TARS.debug = false
TARS.mooseScoring = true -- if true use MOOSE scoring
TARS.valueScoring = 100 -- points per detection
TARS.landingDelay = 30 -- check valid landing after this many seconds
TARS.debriefDelay = 60 -- show debriefing after this many seconds
TARS.landingDistance = 2500 -- land closer than this many meters to a friendly base for debrief
TARS.PilotParameterHelper = false -- show helper checks on pitch/roll/AGL parameters
SRS integration
All player messages route through TARS:_MsgUnit() and TARS:_MsgCoalition().
To broadcast over SRS, init the SRS system with TARS_Instance:SetSRS(...), provide the necessary parameters.
Scoring
Two scoring backends are supported:
MOOSE SCORING —
TARS.mooseScoring = true(default, set beforeTARS:New()). Uses the SCORING object passed toTARS:New(locale, Scoring)or creates one, and awardsTARS_Instance.valueScoringpoints per target.DCSBot — used when mooseScoring is false. Awards
ceil(count/4)credits viadcsbot.addUserPoints()if the DCSBot table is present.
No points are awarded for a debrief without (new or updated) targets.
Mission Scripting integration
Moose FSM Style callback functions are available for mission designers. Optionally overwrite with own function. Processed after landing on debriefing analysis:
function mytars:OnBeforeDataProcessing(Snapshot) -- provides a #TARS.Snapshot data table for a captured object, function must return true to call the OnAfterDataProcessing() function next.
function mytars:OnAfterDataProcessing(Snapshot) -- provides a #TARS.Snapshot data table for a captured object for use in your mission script.
Global TARS_SESSION |
Tracks all states for a single recon sortie. |
Tracks all states for a single recon sortie.
One instance is created per player per flight when they take off from a validated slot. It holds the remaining film, the list of targets captured this pass, and all flags that drive the capture state-machine.
Instances are stored in TARS_Instance.instances[unitName] and are reset (not
destroyed) at the end of each successful debrief so the pilot can fly
another sortie in the same slot without rejoining.
Type(s)
| Fields and Methods inherited from # | Description |
|---|---|
| Fields and Methods inherited from TARS | Description |
|---|---|
|
[INTERNAL] Creates the Task TARS F10 sub-menu and its initial items. |
|
|
[INTERNAL] Validates the aircraft loadout. |
|
|
[INTERNAL] Validates loadout on the ground and sets the approved flag. |
|
|
[INTERNAL] Arms the capture session. |
|
|
[INTERNAL] Creates and registers a new TARS_SESSION. |
|
|
[INTERNAL] Returns the active TARS_SESSION for a unit name, or nil. |
|
|
[INTERNAL] Returns true if the unit is within landingDistance of any allied base/FARP. |
|
|
Nested localization table: |
|
|
Creates the TARS singleton and wires up all event handlers. |
|
|
Moose FSM Style callback function for mission designers. |
|
|
Moose FSM Style callback function for mission designers. |
|
|
[INTERNAL] Places a coalition F10 map marker for a detected target snapshot. |
|
|
If true, there will be messages about the correct parameters to the UNIT. |
|
|
[INTERNAL] Debrief: publishes marks and awards points after a valid landing. |
|
|
[INTERNAL] Removes the TARS F10 menu for a player. |
|
|
[INTERNAL] Removes F10 marks for units and statics that no longer exist. |
|
|
Configure SRS radio output. |
|
|
Set SRS Voice Speaker for Hound/Piper. |
|
|
[INTERNAL] Sends platform capabilities as a HUD message. |
|
|
[INTERNAL] Toggles film standby on/off. |
|
|
[INTERNAL] Ends the capture session; marks it as awaiting debrief. |
|
|
[INTERNAL] Awards credits via DCSBot (if loaded). |
|
|
[INTERNAL] F10 callback: show platform info. |
|
|
[INTERNAL] F10 callback: start capture. |
|
|
[INTERNAL] F10 callback: toggle STB. |
|
|
[INTERNAL] F10 callback: stop capture. |
|
|
[INTERNAL] F10 callback: ground validation. |
|
|
[INTERNAL] Resolves the MOOSE UNIT for a player from the groundMenus registry. |
|
|
[INTERNAL] Checks a group name against |
|
|
[INTERNAL] Adds the three film-control items using the active locale labels. |
|
|
[INTERNAL] Adds the "TARS validation" menu item using the active locale label. |
|
|
[INTERNAL] Removes the three film-control items. |
|
|
[INTERNAL] Removes the "TARS validation" menu item. |
|
|
[INTERNAL] Sends a localized MESSAGE to an entire coalition. |
|
|
[INTERNAL] Sends a localized MESSAGE to a single unit by player name. |
|
|
[INTERNAL] Handles unit birth. |
|
|
[INTERNAL] Handles unit death. |
|
|
[INTERNAL] Handles engine startup (fallback for pre-loaded slots). |
|
|
[INTERNAL] Handles landing events (Land + RunwayTouch share this handler). |
|
|
[INTERNAL] Handles player leaving a slot. |
|
|
[INTERNAL] Handles takeoff events (TakeOff + RunwayTakeOff share this handler). |
|
|
[INTERNAL] Schedules the landing validation and debrief for an ended session on the ground. |
|
|
[INTERNAL] Resolves a localized string by message ID. |
|
|
Maximum AGL (m) for visual-recon helicopters. |
|
|
Minimum AGL (m) for visual-recon helicopters. |
|
|
Optimal AGL (m) for visual-recon helicopters. |
|
|
Detection radius (m) at |
|
|
Detection radius (m) at |
|
|
Detection radius (m) at |
|
|
Map of |
|
|
Seconds after confirmation before F10 marks appear. |
|
|
Enable debugging in TARS. |
|
|
Master toggle for detecting DCS Static objects. |
|
|
Master toggle for detecting DCS Unit objects. |
|
|
Lifetime map |
|
|
Cap the number of detections per sortie. |
|
|
Maximum unique detections allowed per sortie. |
|
|
[INTERNAL] Returns the aircraft's pitch angle in degrees. |
|
|
[INTERNAL] Returns the aircraft's signed bank/roll angle in degrees. |
|
|
Runtime map |
|
|
Runtime map |
|
|
Seconds after touchdown before landing is confirmed. |
|
|
Max distance (m) from an allied base/FARP for a valid debrief. |
|
|
Log-line prefix shown in Moose.log entries. |
|
|
Maps a 0–100 health value to a human-readable damage status label. |
|
|
Active locale: |
|
|
|
|
|
Enable MOOSE SCORING backend. |
|
|
Map of |
|
|
|
|
|
Map of |
|
|
MOOSE SCORING instance (nil if mooseScoring is false). |
|
|
Sub-config for static filtering ( |
|
|
|
|
|
Sub-toggles |
|
|
Points awarded per detected target (MOOSE path). |
|
|
Semantic version string, e.g. |
| Fields and Methods inherited from BASE | Description |
|---|---|
|
The ID number of the object. Each object created with BASE.New() gets the next number. |
|
|
The name of the class. |
|
|
Clear a state value that was set for an object. |
|
TARS:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
TARS:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
TARS: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 |
|
|
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 Unit Lost 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 object's configured event priority. |
|
|
Get the parent object from the inheritance chain. |
|
|
Get all of the properties of an object in a table. |
|
|
Get one property of an object by the key. |
|
|
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. |
|
|
Check whether tracing is enabled for the object. |
|
|
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 when an option is changed for an AI group. |
|
|
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. |
|
|
Paratrooper landing. |
|
|
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. |
|
|
Weapon add. |
|
|
Properties stored with BASE.SetProperty(). |
|
|
Schedule a function call once after a delay. |
|
TARS:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a repeated function call. |
|
Stops the Schedule. |
|
|
The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use. |
|
|
Set the object's event priority for subsequent subscriptions. |
|
|
Set one property of an object. |
|
|
Set a state or property of the Object given a Key and a Value. |
|
|
States stored with BASE.SetState(), indexed by the class name and ID of the given object. |
|
|
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 all methods of a class. |
|
|
Set tracing for a specific method of a class. |
|
|
Set the highest trace level. |
|
|
Set trace off. |
|
|
Set trace on. |
|
|
Switch F and T tracing on or off. |
|
|
UnSubscribe to a DCS event. |
|
TARS:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
|
(Internal) Serialize arguments |
|
TARS:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
|
The main event handling function... |
| Fields and Methods inherited from TARS.MenuData | Description |
|---|---|
|
|
|
|
Numeric group ID. |
|
|
"TARS capture config" — always present. |
|
|
"Start filming" — added on takeoff. |
|
|
"STB & Resume" — added on takeoff. |
|
|
"Stop filming" — added on takeoff. |
|
|
"TARS validation" — present in GROUND_NEW; removed after validation. |
|
|
Root sub-menu. Call |
|
|
Player display name. |
|
|
DCS unit name. |
| Fields and Methods inherited from TARS.PlatformParams | Description |
|---|---|
|
Expositions (shots) available per sortie. |
|
|
Camera full opening angle (degrees). Not used for visual-recon helis. |
|
|
Maximum AGL altitude (m) for valid detections. |
|
|
Maximum pitch angle (degrees) — camera must be level. |
|
|
Detection radius (m) at |
|
|
Maximum bank angle (degrees) — camera must be level. |
|
|
Minimum AGL altitude (m) for valid detections. |
|
|
Detection radius (m) at |
|
|
Optional minimum seconds between two capture ticks (default 2). |
|
|
Human-readable label in player messages. |
|
|
Cameras: depression angle below the horizon (radians), footprint centre |
|
|
Optimal AGL (m) — triggers the dual-cone model. |
|
|
Detection radius (m) at |
|
|
Optional frame overlap 0–1 (default 0.5). Used by |
| Fields and Methods inherited from TARS.Snapshot | Description |
|---|---|
|
Ammo table at detection (units only). |
|
|
|
|
|
Coalition side (units only). |
|
|
Raw DCS object reference. |
|
|
Group category (units only). |
|
|
Group ID (units only). |
|
|
Health 0-100 at detection (units only). |
|
|
DCS unit name (registry key). |
|
|
Player name who captured the data. |
|
|
World position at detection time. |
|
|
Mission time of the snapshot. |
|
|
DCS type name. |
|
|
MOOSE UNIT wrapper or STATIC wrapper. |
| Fields and Methods inherited from TARS_SESSION | Description |
|---|---|
|
[INTERNAL] Merges a |
|
|
The TARS Callback object for menu functions etc. |
|
|
[INTERNAL] Starts the dynamic-interval capture loop. |
|
|
[INTERNAL] Main capture tick. |
|
|
[INTERNAL] Stops any running capture loop and removes this session from the registry. |
|
|
[INTERNAL] Searches for targets in the sensor footprint ahead of the aircraft. |
|
|
[INTERNAL] Creates a new TARS_SESSION for the given MOOSE UNIT. |
|
|
If true, there will be messages about the correct parameters to the UNIT. |
|
|
[INTERNAL] Publishes all captured targets as F10 coalition marks. |
|
|
[INTERNAL] Fully initialises (or resets) all sortie state. |
|
|
[INTERNAL] Refreshes aircraft references WITHOUT resetting sortie state. |
|
|
[INTERNAL] Calculates the sensor footprint at a given AGL. |
|
|
[INTERNAL] Calculates the capture interval in seconds based on current speed and altitude. |
|
|
[INTERNAL] Two-segment linear interpolation for visual-recon helicopter range. |
|
|
[INTERNAL] Freezes a MOOSE object into a |
|
|
[INTERNAL] Returns a unit's current health as a 0–100 percentage. |
|
|
[INTERNAL] Calculates the 2-D ground point ahead of the aircraft. |
|
|
[INTERNAL] Schedules the next capture tick for the current loop generation. |
|
|
[INTERNAL] Populates all shared fields from a MOOSE UNIT object. |
|
|
[INTERNAL] Validates a single DCS/MOOSE object against all active filters. |
|
|
Ammo table snapshot from |
|
|
Total unique targets captured this sortie. |
|
|
|
|
|
Group category at session creation. |
|
|
Coalition side (1 = Red, 2 = Blue). |
|
|
Generation counter of the scheduled debrief. Stale debrief timers are ignored. |
|
|
Enable debugging in TARS_SESSION. |
|
|
Enable Target Search Debug. |
|
|
Remaining expositions (shots) for this sortie. One exposition is used per capture tick. |
|
|
|
|
|
MOOSE GROUP the aircraft belongs to. |
|
|
Numeric group ID. |
|
|
[INTERNAL] Checks a point is inside of an elipse |
|
|
|
|
|
Mission time of the last takeoff, used for debouncing. |
|
|
Log-line prefix shown in Moose.log entries. |
|
|
|
|
|
Generation counter of the capture loop. Stale timer callbacks with an old ID are ignored. |
|
|
DCS unit name — used as the registry key. |
|
|
Numeric DCS unit ID, used as F10-menu and message key. |
|
|
Human-readable player name as shown in the scoreboard. |
|
|
|
|
|
|
|
|
Targets detected this pass, not yet reported. |
|
|
Mission time (seconds) when the session was last refreshed. |
|
|
DCS type name of the aircraft (key into |
|
|
The MOOSE UNIT object for the recon aircraft. |
|
|
World position snapshot taken at session creation. |
|
|
|
| Fields and Methods inherited from BASE | Description |
|---|---|
|
The ID number of the object. Each object created with BASE.New() gets the next number. |
|
|
The name of the class. |
|
|
Clear a state value that was set for an object. |
|
TARS_SESSION:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
TARS_SESSION:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
TARS_SESSION: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. |
|
TARS_SESSION:CreateEventGroupChangeOption(EventTime, Initiator) |
Creation of a |
|
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 Unit Lost 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 object's configured event priority. |
|
|
Get the parent object from the inheritance chain. |
|
|
Get all of the properties of an object in a table. |
|
|
Get one property of an object by the key. |
|
|
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. |
|
|
Check whether tracing is enabled for the object. |
|
|
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 when an option is changed for an AI group. |
|
|
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. |
|
|
Paratrooper landing. |
|
|
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. |
|
|
Weapon add. |
|
|
Properties stored with BASE.SetProperty(). |
|
|
Schedule a function call once after a delay. |
|
TARS_SESSION:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a repeated function call. |
|
Stops the Schedule. |
|
|
The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use. |
|
|
Set the object's event priority for subsequent subscriptions. |
|
|
Set one property of an object. |
|
|
Set a state or property of the Object given a Key and a Value. |
|
|
States stored with BASE.SetState(), indexed by the class name and ID of the given object. |
|
|
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 all methods of a class. |
|
|
Set tracing for a specific method of a class. |
|
|
Set the highest trace level. |
|
|
Set trace off. |
|
|
Set trace on. |
|
|
Switch F and T tracing on or off. |
|
|
UnSubscribe to a DCS event. |
|
TARS_SESSION:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
|
(Internal) Serialize arguments |
|
TARS_SESSION:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
|
The main event handling function... |
Field(s)
Nested localization table: TARS.Messages[locale][messageID] = string.
If true, there will be messages about the correct parameters to the UNIT.
Maximum AGL (m) for visual-recon helicopters.
Minimum AGL (m) for visual-recon helicopters.
Optimal AGL (m) for visual-recon helicopters.
Detection radius (m) at _vAltMax.
Detection radius (m) at _vAltMin.
Detection radius (m) at _vAltOpti.
Map of [weaponDisplayName] = true for permitted loadout items.
Seconds after confirmation before F10 marks appear.
Enable debugging in TARS.
Master toggle for detecting DCS Static objects.
Master toggle for detecting DCS Unit objects.
Lifetime map [unitName] = #TARS.Snapshot of all reported targets.
Cap the number of detections per sortie.
Maximum unique detections allowed per sortie.
Runtime map [playerName] = #TARS.MenuData of open F10 menus.
Runtime map [unitName] = #TARS_SESSION of active sorties.
Seconds after touchdown before landing is confirmed.
Max distance (m) from an allied base/FARP for a valid debrief.
Log-line prefix shown in Moose.log entries.
Active locale: "en" (default), "de", "fr".
{ blue = {}, red = {} } — maps [unitName] = markID. Mark IDs come from UTILS.GetMarkID().
Enable MOOSE SCORING backend.
Map of [typeName] = #TARS.PlatformParams with per-platform sensor profiles.
{ enabled=#boolean, keyword=#string } — restricts TARS menus to matching group names.
Map of [typeName] = true for all recon-capable DCS type names.
Sub-config for static filtering (farps, captureExceptions, whitelist).
{ enabled=#boolean, keywords=#table } — per-coalition keyword lists for target filtering.
Sub-toggles { air, ground, ship } for unit categories.
Points awarded per detected target (MOOSE path).
Semantic version string, e.g. "v2.1.0".
Function(s)
[INTERNAL] Creates the Task TARS F10 sub-menu and its initial items.
Initial state (GROUND_NEW): "TARS validation" + "TARS capture config".
[INTERNAL] Validates the aircraft loadout.
Defined in:
TARS
Parameter:
Wrapper.Unit#UNIT unit
Return values:
#boolean:
reconOk
#string:
refusedWeapon or nil
[INTERNAL] Validates loadout on the ground and sets the approved flag.
[INTERNAL] Arms the capture session.
[INTERNAL] Creates and registers a new TARS_SESSION.
Called on takeoff, so no validation menu item is added.
[INTERNAL] Returns the active TARS_SESSION for a unit name, or nil.
[INTERNAL] Returns true if the unit is within landingDistance of any allied base/FARP.
Creates the TARS singleton and wires up all event handlers.
Note: the returned instance is a copy of the TARS class table. Set TARS.* options before this call,
or set them on the returned instance afterwards.
Defined in:
TARS
Parameters:
#string locale
(optional) Set locale for text output, defaults to "en". "fr" and "de" available out-of-the-box.
Functional.Scoring#SCORING Scoring
(optional) An existing MOOSE SCORING object to use. If not given and mooseScoring is true, a new SCORING object is created.
Return value:
self
Moose FSM Style callback function for mission designers.
Optionally overwrite with own function. Processed after landing on debriefing analysis.
Defined in:
TARS
Parameter:
#TARS.Snapshot TargetSnap
Table of data of a single found object in the last session.
Return value:
self
Moose FSM Style callback function for mission designers.
Optionally overwrite with own function. Processed after landing on debriefing analysis. Use for pre-processing.
Defined in:
TARS
Parameter:
#TARS.Snapshot TargetSnap
Table of data of a single found object in the last session.
Return value:
#boolean:
returnvalue If false, then TARS:OnAfterDataProcessing will NOT be called.
[INTERNAL] Places a coalition F10 map marker for a detected target snapshot.
Defined in:
TARS
Parameters:
#TARS.Snapshot snap
#number coa
Coalition side.
Return value:
#number:
counter Mark ID used (from UTILS.GetMarkID(), so no clashes with other scripts).
[INTERNAL] Debrief: publishes marks and awards points after a valid landing.
[INTERNAL] Removes the TARS F10 menu for a player.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] Removes F10 marks for units and statics that no longer exist.
Runs every 120 seconds.
Defined in:
TARS
Parameters:
#boolean _
#number time
Return value:
#number:
time + 120
Configure SRS radio output.
Defined in:
TARS
Parameters:
#string Path
(Optional) Path to SRS (or nil to use MSRS default)
#number Frequency
MHz, e.g. 251
#number Modulation
radio.modulation.AM or FM (default AM)
#string Culture
(Optional) BCP-47 culture string, e.g. "ru-RU"
#string Gender
(Optional) "male" or "female". Usually not used when using a specific voice.
#string Voice
MSRS voice constant; do not forget to adjust voice to your locale!
#number Coalition
MSRS Coalition, e.g. coalition.side.BLUE.
#number Port
(Optional) SRS port (default 5002)
#number Speed
(Optional) Speech speed (or nil to use MSRS default)
#string Provider
(Optional) Provider, e.g. MSRS.Provider.GOOGLE (or nil to use MSRS default)
#string Backend
(Optional) Backend, e.g. MSRS.Backend.HOUND (or nil to use MSRS default)
#number Speaker
(Optional, HOUND/PIPER only!) Speaker number, e.g. 11 for Speaker "318 (11)"
Return value:
self
Set SRS Voice Speaker for Hound/Piper.
Call after TARS:SetSRS().
Defined in:
TARS
Parameter:
#number Speaker
Speaker number, e.g. 11 for Speaker "318 (11)"
Return value:
self
[INTERNAL] Sends platform capabilities as a HUD message.
All labels are resolved through the active locale.
[INTERNAL] Toggles film standby on/off.
[INTERNAL] Ends the capture session; marks it as awaiting debrief.
If the aircraft is already on the ground (e.g. film auto-STB after landing), the debrief is scheduled right away.
[INTERNAL] Awards credits via DCSBot (if loaded).
Defined in:
TARS
Parameters:
#string name
Player display name.
#number points
Credits to award.
Return value:
#boolean:
true if credited.
[INTERNAL] F10 callback: show platform info.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] F10 callback: start capture.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] F10 callback: toggle STB.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] F10 callback: stop capture.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] F10 callback: ground validation.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] Resolves the MOOSE UNIT for a player from the groundMenus registry.
[INTERNAL] Checks a group name against recoNameFilter (plain text, case-insensitive).
Defined in:
TARS
Parameter:
#string name
Group name.
Return value:
#boolean:
true if the filter is disabled or the keyword is contained in the name.
[INTERNAL] Adds the three film-control items using the active locale labels.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] Adds the "TARS validation" menu item using the active locale label.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] Removes the three film-control items.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] Removes the "TARS validation" menu item.
Defined in:
TARS
Parameter:
#string playerName
[INTERNAL] Sends a localized MESSAGE to an entire coalition.
Defined in:
TARS
Parameters:
#string text
Resolved message text.
#number seconds
Display duration in seconds.
#number coa
Coalition side (1 = Red, 2 = Blue).
[INTERNAL] Sends a localized MESSAGE to a single unit by player name.
Defined in:
TARS
Parameters:
#string text
Resolved message text.
#number seconds
Display duration in seconds.
#string playerName
Player display name.
#boolean Silent
Do not send via SRS if this is true.
[INTERNAL] Handles unit birth.
[INTERNAL] Handles unit death.
[INTERNAL] Handles engine startup (fallback for pre-loaded slots).
[INTERNAL] Handles landing events (Land + RunwayTouch share this handler).
Branch 1: capture active → auto standby. Branch 2: session ended → schedule debrief, remove film menus.
[INTERNAL] Handles player leaving a slot.
[INTERNAL] Handles takeoff events (TakeOff + RunwayTakeOff share this handler).
Branch 1: capture active → validate config, auto-resume film. Branch 2: film inactive → check approval, create session, add film menus.
[INTERNAL] Schedules the landing validation and debrief for an ended session on the ground.
Called on landing and when the film is stopped while already on the ground. A debrief generation ID makes sure that only the latest scheduled debrief is processed.
[INTERNAL] Resolves a localized string by message ID.
Lookup order: TARS.Messages[locale][id] → TARS.Messages["en"][id] → raw id.
Passes extra arguments through string.format when provided.
Defined in:
TARS
Parameters:
#string id
Message ID (key in TARS.Messages[locale]).
...
Optional string.format arguments.
Return value:
#string:
Resolved, formatted string.
[INTERNAL] Returns the aircraft's pitch angle in degrees.
Defined in:
TARS
Parameter:
Wrapper.Unit#UNIT mooseUnit
The recon aircraft.
Return value:
#number:
Pitch angle in degrees.
[INTERNAL] Returns the aircraft's signed bank/roll angle in degrees.
Defined in:
TARS
Parameter:
Wrapper.Unit#UNIT mooseUnit
The recon aircraft.
Return value:
#number:
Roll angle in degrees.
Maps a 0–100 health value to a human-readable damage status label.
Defined in:
TARS
Parameter:
#number life
Health percentage (0–100), or nil.
Return value:
#string:
Damage label.
Field(s)
Nested localization table: TARS.Messages[locale][messageID] = string.
If true, there will be messages about the correct parameters to the UNIT.
Maximum AGL (m) for visual-recon helicopters.
Minimum AGL (m) for visual-recon helicopters.
Optimal AGL (m) for visual-recon helicopters.
Detection radius (m) at _vAltMax.
Detection radius (m) at _vAltMin.
Detection radius (m) at _vAltOpti.
Map of [weaponDisplayName] = true for permitted loadout items.
Seconds after confirmation before F10 marks appear.
Enable debugging in TARS.
Master toggle for detecting DCS Static objects.
Master toggle for detecting DCS Unit objects.
Lifetime map [unitName] = #TARS.Snapshot of all reported targets.
Cap the number of detections per sortie.
Maximum unique detections allowed per sortie.
Runtime map [playerName] = #TARS.MenuData of open F10 menus.
Runtime map [unitName] = #TARS_SESSION of active sorties.
Seconds after touchdown before landing is confirmed.
Max distance (m) from an allied base/FARP for a valid debrief.
Log-line prefix shown in Moose.log entries.
Active locale: "en" (default), "de", "fr".
{ blue = {}, red = {} } — maps [unitName] = markID. Mark IDs come from UTILS.GetMarkID().
Enable MOOSE SCORING backend.
Map of [typeName] = #TARS.PlatformParams with per-platform sensor profiles.
{ enabled=#boolean, keyword=#string } — restricts TARS menus to matching group names.
Map of [typeName] = true for all recon-capable DCS type names.
Sub-config for static filtering (farps, captureExceptions, whitelist).
{ enabled=#boolean, keywords=#table } — per-coalition keyword lists for target filtering.
Sub-toggles { air, ground, ship } for unit categories.
Points awarded per detected target (MOOSE path).
Semantic version string, e.g. "v2.1.0".
Function(s)
Clear a state value that was set for an object.
Defined in:
Parameters:
Object
The object the state is about.
StateName
The key that 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.
DCS#Airbase place
(Optional) The airbase, FARP or ship where the object was born.
#number subplace
(Optional) The 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.
#number IniObjectCategory
(Optional) The object category of the initiator.
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.
#number IniObjectCategory
(Optional) The object category of the initiator.
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_GROUP_CHANGE_OPTION 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 Unit Lost 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 object's configured event priority.
Get the parent object from the inheritance chain.
To run a parent method on the current instance, call the function with self as its first argument.
local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )
Defined in:
Parameters:
#BASE Child
This is the Child class from which the Parent class needs to be retrieved.
#BASE FromClass
(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.
Return value:
The parent, or nil if there is none.
Get all of the properties of an object in a table.
Get one property of an object by the key.
Defined in:
Parameter:
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!
Return value:
Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.
Get a Value given a Key from the Object.
The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.
Defined in:
Parameters:
Object
The object the state is about.
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 no value is stored for the Key.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).
Return value:
self
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.
The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable.
Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).
Defined in:
Parameters:
#table Child
The Child class that inherits.
#BASE Parent
The Parent object that the Child inherits from.
Return value:
The new Child object.
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
The name of the class (#string, case insensitive) or the class itself to run the check against.
Return value:
#boolean:
True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.
Check whether tracing is enabled for the object.
Defined in:
Return value:
#boolean:
true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.
BASE constructor.
Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.
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 workaround for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workaround 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 workaround 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 when an option is changed for an AI group.
The event identifies the initiating group, but does not provide the option ID or value.
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 succumbs to Davy 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 workaround for DCS not creating these events as of Aug 2024.
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 multiplayer 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.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite weapon reload not counted). Have a look at the class Core.Event#EVENT as these are just the prototypes.
Schedule a function call once after a delay.
The schedule starts immediately.
The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).
Defined in:
Parameters:
#number Start
Delay in seconds before the function is called.
#function SchedulerFunction
The function to be called. It receives the optional arguments given after it.
...
(Optional) Arguments passed to the function.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a repeated function call.
The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.
Defined in:
Parameters:
#number Start
Delay in seconds before the first call.
#number Repeat
Interval in seconds between the calls.
#number RandomizeFactor
Randomization factor between 0 and 1 to randomize the Repeat interval.
#number Stop
(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit.
The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.
#function SchedulerFunction
The function to be called. It receives the optional arguments given after it.
...
(Optional) Arguments passed to the function.
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 object's event priority for subsequent subscriptions.
The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.
Defined in:
Parameter:
#number EventPriority
Priority used when registering events.
Return value:
self
Set one property of an object.
Defined in:
Parameters:
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 that is stored. Note that the value can be a #string, but it can also be any other type!
Set a state or property of the Object given a Key and a Value.
The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.
Defined in:
Parameters:
Object
The object the state is about. Its class name and ID are used as index.
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 be stored.
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
Defined in:
Parameter:
#boolean TraceAll
(Optional) true or nil = trace all methods in MOOSE, false = switch it off.
Set the highest trace level.
F and T methods up to this level write to the log.
Defined in:
Parameter:
#number Level
(Optional) Trace level 1, 2, or 3. Defaults to 1.
Set trace off.
Set trace on.
Switch F and T tracing on or off.
Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.
Defined in:
Parameter:
#boolean TraceOnOff
(Optional) Use false to disable tracing. Defaults to true.
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.
F10 menu registration data.
Stored in self.groundMenus[playerName].
Field(s)
true after successful ground validation.
Numeric group ID.
"TARS validation" — present in GROUND_NEW; removed after validation.
Player display name.
DCS unit name.
Function(s)
Platform sensor/camera profile.
Stored in TARS.parameters[typeName].
Field(s)
Expositions (shots) available per sortie.
Camera full opening angle (degrees). Not used for visual-recon helis.
Maximum AGL altitude (m) for valid detections.
Maximum pitch angle (degrees) — camera must be level.
Detection radius (m) at maxAlt.
Maximum bank angle (degrees) — camera must be level.
Minimum AGL altitude (m) for valid detections.
Detection radius (m) at minAlt — visual-recon helis only.
Optional minimum seconds between two capture ticks (default 2).
Human-readable label in player messages.
Cameras: depression angle below the horizon (radians), footprint centre AGL / tan(offset) ahead.
Visual-recon helis: look-ahead angle from the vertical (radians), circle centre AGL * tan(offset) ahead.
Optimal AGL (m) — triggers the dual-cone model.
Detection radius (m) at optimalAlt.
Optional frame overlap 0–1 (default 0.5). Used by _CalcInterval.
Function(s)
Frozen target snapshot.
Field(s)
Ammo table at detection (units only).
Object.Category.* of the detected object.
Coalition side (units only).
Group category (units only).
Group ID (units only).
Health 0-100 at detection (units only).
DCS unit name (registry key).
Player name who captured the data.
Mission time of the snapshot.
DCS type name.
Function(s)
Field(s)
If true, there will be messages about the correct parameters to the UNIT.
Ammo table snapshot from unit:GetAmmo().
Total unique targets captured this sortie.
true while the capture loop is actively running.
Group category at session creation.
Coalition side (1 = Red, 2 = Blue).
Generation counter of the scheduled debrief. Stale debrief timers are ignored.
Enable debugging in TARS_SESSION.
Enable Target Search Debug.
Remaining expositions (shots) for this sortie. One exposition is used per capture tick.
true when duration reached zero.
Numeric group ID.
true once the debrief timer has been registered.
Mission time of the last takeoff, used for debouncing.
Log-line prefix shown in Moose.log entries.
true while the TARS_SESSION:CaptureLoop timer is scheduled.
Generation counter of the capture loop. Stale timer callbacks with an old ID are ignored.
DCS unit name — used as the registry key.
Numeric DCS unit ID, used as F10-menu and message key.
Human-readable player name as shown in the scoreboard.
true after STOP or film exhaustion; awaiting debrief.
true when film is paused without ending the session.
Targets detected this pass, not yet reported. [unitName] = snap.
Mission time (seconds) when the session was last refreshed.
DCS type name of the aircraft (key into TARS.parameters).
true if capture was active at the moment of touchdown.
Function(s)
[INTERNAL] Merges a FindTargets result into this session's target list.
Notifies the player per new detection using the active locale.
Stops adding once the film limit (filmLimitMax) is reached.
Defined in:
TARS_SESSION
Parameter:
#table list
Map of [unitName] = Wrapper.Unit#UNIT from TARS_SESSION:FindTargets().
[INTERNAL] Starts the dynamic-interval capture loop.
The first tick fires after 2 seconds; subsequent ticks are spaced by
_CalcInterval() which adapts to the aircraft's current speed and altitude.
Defined in:
TARS_SESSION
[INTERNAL] Main capture tick.
Scheduled dynamically via timer.scheduleFunction.
The interval between ticks is calculated from the aircraft's current speed
and camera footprint via _CalcInterval(), ensuring adequate frame overlap
regardless of whether the platform is a slow helicopter or a fast jet.
duration is decremented by one exposition each tick.
Scheduled via _ScheduleLoop(); stale ticks of an older loop generation never get here.
Defined in:
TARS_SESSION
Return value:
nil
[INTERNAL] Stops any running capture loop and removes this session from the registry.
Defined in:
TARS_SESSION
[INTERNAL] Searches for targets in the sensor footprint ahead of the aircraft.
Cameras use an elliptical footprint, visual-recon helicopters a circle (see _CalcFootprint).
Nothing is scanned while the aircraft is outside its altitude/attitude envelope.
Defined in:
TARS_SESSION
Return value:
#table:
[unitName] = Wrapper.Unit#UNIT
[INTERNAL] Creates a new TARS_SESSION for the given MOOSE UNIT.
Defined in:
TARS_SESSION
Parameters:
Wrapper.Unit#UNIT unit
The recon aircraft's MOOSE UNIT.
#TARS Callback
The TARS singleton (for callbacks and config access).
#boolean NoMenu
(Optional) If true, do not (re-)add the validation menu item.
Return value:
self The newly created session.
[INTERNAL] Publishes all captured targets as F10 coalition marks.
Defined in:
TARS_SESSION
Return value:
#number:
count Number of marks placed or updated this debrief.
[INTERNAL] Fully initialises (or resets) all sortie state.
After a debrief reset, re-adds the validation menu item (GROUND_NEW state).
Defined in:
TARS_SESSION
Parameters:
Wrapper.Unit#UNIT unit
The recon aircraft's MOOSE UNIT.
#boolean NoMenu
(Optional) If true, do not re-add the validation menu item (e.g. when airborne).
Return value:
self
[INTERNAL] Refreshes aircraft references WITHOUT resetting sortie state.
[INTERNAL] Calculates the sensor footprint at a given AGL.
Cameras (fov set): ellipse of a forward-down looking camera (depression offset, full opening angle fov);
falls back to a circle if offset - fov/2 is less than 2°, i.e. the far edge would reach the horizon.
Visual-recon helicopters (optimalAlt set): circle with radius from _CalcVisualRange(). For these, offset is
the look-ahead angle from the vertical (as in the pre-ellipse model), so the circle centre is AGL * tan(offset)
ahead, i.e. close to the helicopter (6° → ~0.1 × AGL), not AGL / tan(offset) (~9.5 × AGL).
Defined in:
TARS_SESSION
Parameters:
#TARS.PlatformParams params
Platform parameter table.
#number alt
AGL in metres.
Return values:
#number:
a Along-track semi-axis (m).
#number:
b Cross-track semi-axis (m).
#number:
center_shift Shift (m) of the footprint centre relative to the point AGL / tan(offset) ahead.
[INTERNAL] Calculates the capture interval in seconds based on current speed and altitude.
Uses the footprint length along the flight path and the configured overlap to determine how long
the aircraft needs to travel before the next frame is needed.
Clamped between min_interval (default 2) and 120 seconds to prevent extreme values.
Defined in:
TARS_SESSION
Parameters:
Wrapper.Unit#UNIT unit
The recon aircraft.
#TARS.PlatformParams params
Platform parameter table.
Return value:
#number:
interval Capture interval in seconds.
[INTERNAL] Two-segment linear interpolation for visual-recon helicopter range.
Defined in:
TARS_SESSION
Parameters:
#TARS.PlatformParams params
#number altitude
AGL in metres.
Return value:
#number:
radius Detection sphere radius in metres.
[INTERNAL] Freezes a MOOSE object into a TARS.Snapshot.
Defined in:
TARS_SESSION
Parameter:
Wrapper.Unit#UNIT _Object
MOOSE UNIT or STATIC.
Return value:
snap
[INTERNAL] Returns a unit's current health as a 0–100 percentage.
Defined in:
TARS_SESSION
Parameter:
Wrapper.Unit#UNIT unit
Return value:
#number:
Health 0–100, or nil.
[INTERNAL] Calculates the 2-D ground point ahead of the aircraft.
Defined in:
TARS_SESSION
Parameters:
Wrapper.Unit#UNIT unit
#TARS.PlatformParams params
#number center_shift
shift value
Return value:
#table:
{ x, z, MSL, alt } ahead of the aircraft.
[INTERNAL] Schedules the next capture tick for the current loop generation.
The tick runs protected (pcall); errors are logged instead of silently killing the timer.
Defined in:
TARS_SESSION
Parameter:
#number delay
Seconds until the next tick.
[INTERNAL] Populates all shared fields from a MOOSE UNIT object.
[INTERNAL] Validates a single DCS/MOOSE object against all active filters.
Returns true if the object should be added to the target list.
Defined in:
TARS_SESSION
Parameter:
Wrapper.Unit#UNIT _Object
MOOSE UNIT or STATIC.
Return value:
#boolean:
[INTERNAL] Checks a point is inside of an elipse
Defined in:
TARS_SESSION
Parameters:
ox
oz
cx
cz
a
b
heading_rad
Return value:
#boolean:
IsInElipse
Field(s)
If true, there will be messages about the correct parameters to the UNIT.
Ammo table snapshot from unit:GetAmmo().
Total unique targets captured this sortie.
true while the capture loop is actively running.
Group category at session creation.
Coalition side (1 = Red, 2 = Blue).
Generation counter of the scheduled debrief. Stale debrief timers are ignored.
Enable debugging in TARS_SESSION.
Enable Target Search Debug.
Remaining expositions (shots) for this sortie. One exposition is used per capture tick.
true when duration reached zero.
Numeric group ID.
true once the debrief timer has been registered.
Mission time of the last takeoff, used for debouncing.
Log-line prefix shown in Moose.log entries.
true while the TARS_SESSION:CaptureLoop timer is scheduled.
Generation counter of the capture loop. Stale timer callbacks with an old ID are ignored.
DCS unit name — used as the registry key.
Numeric DCS unit ID, used as F10-menu and message key.
Human-readable player name as shown in the scoreboard.
true after STOP or film exhaustion; awaiting debrief.
true when film is paused without ending the session.
Targets detected this pass, not yet reported. [unitName] = snap.
Mission time (seconds) when the session was last refreshed.
DCS type name of the aircraft (key into TARS.parameters).
true if capture was active at the moment of touchdown.
Function(s)
Clear a state value that was set for an object.
Defined in:
Parameters:
Object
The object the state is about.
StateName
The key that 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.
DCS#Airbase place
(Optional) The airbase, FARP or ship where the object was born.
#number subplace
(Optional) The 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.
#number IniObjectCategory
(Optional) The object category of the initiator.
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.
#number IniObjectCategory
(Optional) The object category of the initiator.
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_GROUP_CHANGE_OPTION 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 Unit Lost Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the object's configured event priority.
Get the parent object from the inheritance chain.
To run a parent method on the current instance, call the function with self as its first argument.
local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )
Defined in:
Parameters:
#BASE Child
This is the Child class from which the Parent class needs to be retrieved.
#BASE FromClass
(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.
Return value:
The parent, or nil if there is none.
Get all of the properties of an object in a table.
Get one property of an object by the key.
Defined in:
Parameter:
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!
Return value:
Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.
Get a Value given a Key from the Object.
The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.
Defined in:
Parameters:
Object
The object the state is about.
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 no value is stored for the Key.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).
Return value:
self
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.
The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable.
Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).
Defined in:
Parameters:
#table Child
The Child class that inherits.
#BASE Parent
The Parent object that the Child inherits from.
Return value:
The new Child object.
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
The name of the class (#string, case insensitive) or the class itself to run the check against.
Return value:
#boolean:
True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.
Check whether tracing is enabled for the object.
Defined in:
Return value:
#boolean:
true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.
BASE constructor.
Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.
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 workaround for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workaround 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 workaround 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 when an option is changed for an AI group.
The event identifies the initiating group, but does not provide the option ID or value.
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 succumbs to Davy 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 workaround for DCS not creating these events as of Aug 2024.
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 multiplayer 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.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite weapon reload not counted). Have a look at the class Core.Event#EVENT as these are just the prototypes.
Schedule a function call once after a delay.
The schedule starts immediately.
The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).
Defined in:
Parameters:
#number Start
Delay in seconds before the function is called.
#function SchedulerFunction
The function to be called. It receives the optional arguments given after it.
...
(Optional) Arguments passed to the function.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a repeated function call.
The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.
Defined in:
Parameters:
#number Start
Delay in seconds before the first call.
#number Repeat
Interval in seconds between the calls.
#number RandomizeFactor
Randomization factor between 0 and 1 to randomize the Repeat interval.
#number Stop
(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit.
The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.
#function SchedulerFunction
The function to be called. It receives the optional arguments given after it.
...
(Optional) Arguments passed to the function.
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 object's event priority for subsequent subscriptions.
The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.
Defined in:
Parameter:
#number EventPriority
Priority used when registering events.
Return value:
self
Set one property of an object.
Defined in:
Parameters:
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 that is stored. Note that the value can be a #string, but it can also be any other type!
Set a state or property of the Object given a Key and a Value.
The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.
Defined in:
Parameters:
Object
The object the state is about. Its class name and ID are used as index.
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 be stored.
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
Defined in:
Parameter:
#boolean TraceAll
(Optional) true or nil = trace all methods in MOOSE, false = switch it off.
Set the highest trace level.
F and T methods up to this level write to the log.
Defined in:
Parameter:
#number Level
(Optional) Trace level 1, 2, or 3. Defaults to 1.
Set trace off.
Set trace on.
Switch F and T tracing on or off.
Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.
Defined in:
Parameter:
#boolean TraceOnOff
(Optional) Use false to disable tracing. Defaults to true.
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.