Banner Image

Module Functional.Range

Functional - Range Practice.


The RANGE class enables easy set up of bombing and strafing ranges within DCS World.

Implementation is based on the Simple Range Script by Ciribob, which itself was motivated by a script by SNAFU see here.

476th - Air Weapons Range Objects mod is highly recommended for this class.

Main Features:

  • Impact points of bombs, rockets and missiles are recorded and distance to closest range target is measured and reported to the player.
  • Number of hits on strafing passes are counted and reported. Also the percentage of hits w.r.t fired shots is evaluated.
  • Results of all bombing and strafing runs are stored and top 10 results can be displayed.
  • Range targets can be marked by smoke.
  • Range can be illuminated by illumination bombs for night missions.
  • Bomb, rocket and missile impact points can be marked by smoke.
  • Direct hits on targets can trigger flares.
  • Smoke and flare colors can be adjusted for each player via radio menu.
  • Range information and weather at the range can be obtained via radio menu.
  • Persistence: Bombing range results can be saved to disk and loaded the next time the mission is started.
  • Range control voice overs (>40) for hit assessment.

Youtube Videos:


Missions:


Sound files: MOOSE Sound Files


Author: funkyfranky

Contributions: FlightControl, Ciribob

SRS Additions: Applevangelist


Global(s)

Global RANGE

Don't only practice your art, but force your way into its secrets; art deserves that, for it and knowledge can raise man to the Divine. - Ludwig van Beethoven


Banner Image

The Range Concept

The RANGE class enables a mission designer to easily set up practice ranges in DCS.

#RANGE RANGE

Don't only practice your art, but force your way into its secrets; art deserves that, for it and knowledge can raise man to the Divine. - Ludwig van Beethoven


Banner Image

The Range Concept

The RANGE class enables a mission designer to easily set up practice ranges in DCS.

A new RANGE object can be created with the RANGE.New(rangename) contructor. The parameter rangename defines the name of the range. It has to be unique since this is also the name displayed in the radio menu.

Generally, a range consists of strafe pits and bombing targets. For strafe pits the number of hits for each pass is counted and tabulated. For bombing targets, the distance from the impact point of the bomb, rocket or missile to the closest range target is measured and tabulated. Each player can display his best results via a function in the radio menu or see the best best results from all players.

When all targets have been defined in the script, the range is started by the RANGE.Start() command.

IMPORTANT

Due to a DCS bug, it is not possible to directly monitor when a player enters a plane. So in a mission with client slots, it is vital that a player first enters as spectator or hits ESC twice and after that jumps into the slot of his aircraft! If that is not done, the script is not started correctly. This can be checked by looking at the radio menues. If the mission was entered correctly, there should be an "On the Range" menu items in the "F10. Other..." menu.

Strafe Pits

Each strafe pit can consist of multiple targets. Often one finds two or three strafe targets next to each other.

A strafe pit can be added to the range by the RANGE.AddStrafePit(targetnames, boxlength, boxwidth, heading, inverseheading, goodpass, foulline) function.

  • The first parameter targetnames defines the target or targets. This can be a single item or a Table with the name(s) of Wrapper.Unit or Wrapper.Static objects defined in the mission editor.
  • In order to perform a valid pass on the strafe pit, the pilot has to begin his run from the correct direction. Therefore, an "approach box" is defined in front of the strafe targets. The parameters boxlength and boxwidth define the size of the box in meters, while the heading parameter defines the heading of the box FROM the target. For example, if heading 120 is set, the approach box will start FROM the target and extend outwards on heading 120. A strafe run approach must then be flown apx. heading 300 TOWARDS the target. If the parameter heading is passed as nil, the heading is automatically taken from the heading set in the ME for the first target unit.
  • The parameter inverseheading turns the heading around by 180 degrees. This is useful when the default heading of strafe target units point in the wrong/opposite direction.
  • The parameter goodpass defines the number of hits a pilot has to achieve during a run to be judged as a "good" pass.
  • The last parameter foulline sets the distance from the pit targets to the foul line. Hit from closer than this line are not counted!

Another function to add a strafe pit is RANGE.AddStrafePitGroup(group, boxlength, boxwidth, heading, inverseheading, goodpass, foulline). Here, the first parameter group is a MOOSE Wrapper.Group object and all units in this group define one strafe pit.

Finally, a valid approach has to be performed below a certain maximum altitude. The default is 914 meters (3000 ft) AGL. This is a parameter valid for all strafing pits of the range and can be adjusted by the RANGE.SetMaxStrafeAlt(maxalt) function.

Bombing targets

One ore multiple bombing targets can be added to the range by the RANGE.AddBombingTargets(targetnames, goodhitrange, randommove) function.

  • The first parameter targetnames defines the target or targets. This can be a single item or a Table with the name(s) of Wrapper.Unit or Wrapper.Static objects defined in the mission editor.
  • The (optional) parameter goodhitrange specifies the radius in metres around the target within which a bomb/rocket hit is considered to be "good".
  • If final (optional) parameter "randommove" can be enabled to create moving targets. If this parameter is set to true, the units of this bombing target will randomly move within the range zone. Note that there might be quirks since DCS units can get stuck in buildings etc. So it might be safer to manually define a route for the units in the mission editor if moving targets are desired.

Adding Groups

Another possibility to add bombing targets is the RANGE.AddBombingTargetGroup(group, goodhitrange, randommove) function. Here the parameter group is a MOOSE Wrapper.Group object and all units in this group are defined as bombing targets.

Specifying Coordinates

It is also possible to specify coordinates rather than unit or static objects as bombing target locations. This has the advantage, that even when the unit/static object is dead, the specified coordinate will still be a valid impact point. This can be done via the RANGE.AddBombingTargetCoordinate(coord, name, goodhitrange) function.

Fine Tuning

Many range parameters have good default values. However, the mission designer can change these settings easily with the supplied user functions:

Radio Menu

Each range gets a radio menu with various submenus where each player can adjust his individual settings or request information about the range or his scores.

The main range menu can be found at "F10. Other..." --> "FX . On the Range..." --> "F1. ...".

The range menu contains the following submenus:

Banner Image

  • "F1. Statistics...": Range results of all players and personal stats.
  • "F2. Mark Targets": Mark range targets by smoke or flares.
  • "F3. My Settings" Personal settings.
  • "F4. Range Info": Information about the range, such as bearing and range.

F1 Statistics

Banner Image

F2 Mark Targets

Banner Image

F3 My Settings

Banner Image

F4 Range Info

Banner Image

Voice Overs

Voice over sound files can be downloaded from the Moose Discord. Check the pinned messages in the #func-range channel.

Instructor radio will inform players when they enter or exit the range zone and provide the radio frequency of the range control for hit assessment. This can be enabled via the RANGE.SetInstructorRadio(frequency) functions, where frequency is the AM frequency in MHz.

The range control can be enabled via the RANGE.SetRangeControl(frequency) functions, where frequency is the AM frequency in MHz.

By default, the sound files are placed in the "Range Soundfiles/" folder inside the mission (.miz) file. Another folder can be specified via the RANGE.SetSoundfilesPath(path) function.

Voice output via SRS

Alternatively, the voice output can be fully done via SRS, no sound file additions needed. Set up SRS with RANGE.SetSRS(). Range control and instructor frequencies and voices can then be set via RANGE.SetSRSRangeControl() and RANGE.SetSRSRangeInstructor().

Persistence

To automatically save bombing results to disk, use the RANGE.SetAutosave() function. Bombing results will be saved as csv file in your "Saved Games\DCS.openbeta\Logs" directory. Each range has a separate file, which is named "RANGE-<RangeName>_BombingResults.csv".

The next time you start the mission, these results are also automatically loaded.

Strafing results are currently not saved.

FSM Events

This class creates additional events that can be used by mission designers for custom reactions

Examples

Goldwater Range

This example shows hot to set up the Barry M. Goldwater range. It consists of two strafe pits each has two targets plus three bombing targets.

 -- Strafe pits. Each pit can consist of multiple targets. Here we have two pits and each of the pits has two targets.
 -- These are names of the corresponding units defined in the ME.
 local strafepit_left={"GWR Strafe Pit Left 1", "GWR Strafe Pit Left 2"}
 local strafepit_right={"GWR Strafe Pit Right 1", "GWR Strafe Pit Right 2"}

 -- Table of bombing target names. Again these are the names of the corresponding units as defined in the ME.
 local bombtargets={"GWR Bomb Target Circle Left", "GWR Bomb Target Circle Right", "GWR Bomb Target Hard"}

 -- Create a range object.
 GoldwaterRange=RANGE:New("Goldwater Range")

 -- Distance between strafe target and foul line. You have to specify the names of the unit or static objects.
 -- Note that this could also be done manually by simply measuring the distance between the target and the foul line in the ME.
 GoldwaterRange:GetFoullineDistance("GWR Strafe Pit Left 1", "GWR Foul Line Left")

 -- Add strafe pits. Each pit (left and right) consists of two targets. Where "nil" is used as input, the default value is used.
 GoldwaterRange:AddStrafePit(strafepit_left, 3000, 300, nil, true, 30, 500)
 GoldwaterRange:AddStrafePit(strafepit_right, nil, nil, nil, true, nil, 500)

 -- Add bombing targets. A good hit is if the bomb falls less then 50 m from the target.
 GoldwaterRange:AddBombingTargets(bombtargets, 50)

 -- Start range.
 GoldwaterRange:Start()

The 476th - Air Weapons Range Objects mod is (implicitly) used in this example.

Debugging

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

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

All output concerning the RANGE class should have the string "RANGE" in the corresponding line.

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

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

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

The function RANGE.DebugON() can be used to send messages on screen. It also smokes all defined strafe and bombing targets, the strafe pit approach boxes and the range zone.

Note that it can happen that the RANGE radio menu is not shown. Check that the range object is defined as a global variable rather than a local one. The could avoid the lua garbage collection to accidentally/falsely deallocate the RANGE objects.

Type(s)

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

RANGE:AddBombingTargetCoordinate(coord, name, goodhitrange)

Add a coordinate of a bombing target.

RANGE:AddBombingTargetGroup(group, goodhitrange, randommove)

Add all units of a group as bombing targets.

RANGE:AddBombingTargetScenery(scenery, goodhitrange)

Add a scenery object as bombing target.

RANGE:AddBombingTargetUnit(unit, goodhitrange, randommove)

Add a unit or static object as bombing target.

RANGE:AddBombingTargets(targetnames, goodhitrange, randommove)

Add bombing target(s) to range.

RANGE:AddStrafePit(targetnames, boxlength, boxwidth, heading, inverseheading, goodpass, foulline)

Add new strafe pit.

RANGE:AddStrafePitGroup(group, boxlength, boxwidth, heading, inverseheading, goodpass, foulline)

Add all units of a group as one new strafe target pit.

RANGE.BombSmokeColor

Color id used for smoking bomb targets.

RANGE.BombtrackThreshold

Bombs/rockets/missiles are only tracked if player-range distance is smaller than this threshold [m]. Default 25000 m.

RANGE.ClassName

Name of the Class.

RANGE.Coalition

Coalition side for the menu, if any.

RANGE.Debug

If true, debug info is sent as messages on the screen.

RANGE:DebugOFF()

Disable debug modus.

RANGE:DebugON()

Enable debug modus.

RANGE.Defaults

RANGE:EnterRange(player)

Triggers the FSM event "EnterRange".

RANGE:ExitRange(player)

Triggers the FSM event "ExitRange".

RANGE:GetFoullineDistance(namepit, namefoulline)

Measures the foule line distance between two unit or static objects.

RANGE:Impact(result, player)

Triggers the FSM event "Impact".

RANGE.MenuAddedTo

Table for monitoring which players already got an F10 menu.

RANGE.MenuF10

Main radio menu on group level.

RANGE.MenuF10Root

Main radio menu on mission level.

RANGE.Names

Global list of all defined range names.

RANGE:New(RangeName, Coalition)

RANGE contructor.

RANGE:OnAfterEnterRange(From, Event, To, player)

On after "EnterRange" event user function.

RANGE:OnAfterExitRange(From, Event, To, player)

On after "ExitRange" event user function.

RANGE:OnAfterImpact(From, Event, To, result, player)

On after "Impact" event user function.

RANGE:OnAfterRollingIn(From, Event, To, player, target)

On after "RollingIn" event user function.

RANGE:OnAfterStrafeResult(From, Event, To, player, result)

On after "StrafeResult" event user function.

RANGE:OnEventBirth(EventData)

Range event handler for event birth.

RANGE:OnEventHit(EventData)

Range event handler for event hit.

RANGE:OnEventShot(EventData)

Range event handler for event shot (when a unit releases a rocket or bomb (but not a fast firing gun).

RANGE.PlayerSettings

Individual player settings.

RANGE:RollingIn(player, target)

Triggers the FSM event "RollingIn".

RANGE:SetAutosaveOff()

Switch off auto save player results.

RANGE:SetAutosaveOn()

Automatically save player results to disc.

RANGE:SetBombTargetSmokeColor(colorid)

Set smoke color for marking bomb targets.

RANGE:SetBombtrackThreshold(distance)

Set bomb track threshold distance.

RANGE:SetBombtrackTimestep(dt)

Set time interval for tracking bombs.

RANGE:SetDefaultPlayerSmokeBomb(switch)

Set player setting whether bomb impact points are smoked or not.

RANGE:SetDisplayedMaxPlayerResults(nmax)

Set max number of player results that are displayed.

RANGE:SetFunkManOn(Port, Host)

Set FunkMan socket.

RANGE:SetInstructorRadio(frequency, relayunitname)

Enable instructor radio and set frequency (non-SRS).

RANGE:SetMaxStrafeAlt(maxalt)

Set maximal strafing altitude.

RANGE:SetMenuRoot(menu)

Set the root F10 menu under which the range F10 menu is created.

RANGE:SetMessageTimeDuration(time)

Set time how long (most) messages are displayed.

RANGE:SetMessageToExaminer(examinergroupname, exclusively)

Set messages to examiner.

RANGE:SetMessagesOFF()

Disable ALL messages to players.

RANGE:SetMessagesON()

Enable messages to players.

RANGE:SetRangeControl(frequency, relayunitname)

Enable range control and set frequency (non-SRS).

RANGE:SetRangeLocation(coordinate)

Set range location.

RANGE:SetRangeRadius(radius)

Set range radius.

RANGE:SetRangeZone(zone)

Set range zone.

RANGE:SetSRS(PathToSRS, Port, Coalition, Frequency, Modulation, Volume, PathToGoogleKey)

Use SRS Simple-Text-To-Speech for transmissions.

RANGE:SetSRSRangeControl(frequency, modulation, voice, culture, gender, relayunitname)

(SRS) Set range control frequency and voice.

RANGE:SetSRSRangeInstructor(frequency, modulation, voice, culture, gender, relayunitname)

(SRS) Set range instructor frequency and voice.

RANGE:SetScoreBombDistance(distance)

Set score bomb distance.

RANGE:SetSmokeTimeDelay(delay)

Set time delay between bomb impact and starting to smoke the impact point.

RANGE:SetSoundfilesInfo(csvfile)

Set the path to the csv file that contains information about the used sound files.

RANGE:SetSoundfilesPath(path)

Set sound files folder within miz file.

RANGE:SetStrafePitSmokeColor(colorid)

Set smoke color for marking strafe pit approach boxes.

RANGE:SetStrafeTargetSmokeColor(colorid)

Set smoke color for marking strafe targets.

RANGE:SetTargetSheet(path, prefix)

Enable saving of player's target sheets and specify an optional directory path.

RANGE.Sound

RANGE:Start()

Triggers the FSM event "Start".

RANGE:Status()

Triggers the FSM event "Status".

RANGE.StrafePitSmokeColor

Color id used to smoke strafe pit approach boxes.

RANGE:StrafeResult(player, result)

Triggers the FSM event "StrafeResult".

RANGE.StrafeSmokeColor

Color id used to smoke strafe targets.

RANGE.TargetType

RANGE.TdelaySmoke

Time delay in seconds between impact of bomb and starting the smoke. Default 3 seconds.

RANGE.Tmsg

Time [sec] messages to players are displayed. Default 30 sec.

RANGE:TrackBombsOFF()

Disables tracking of all bomb types.

RANGE:TrackBombsON()

Enables tracking of all bomb types.

RANGE:TrackMissilesOFF()

Disables tracking of all missile types.

RANGE:TrackMissilesON()

Enables tracking of all missile types.

RANGE:TrackRocketsOFF()

Disables tracking of all rocket types.

RANGE:TrackRocketsON()

Enables tracking of all rocket types.

RANGE:_AddF10Commands(_unitName)

Add menu commands for player.

RANGE:_CheckInZone(_unitName)

Check if player is inside a strafing zone.

RANGE:_CheckPlayers(_unitName)

Check status of players.

RANGE:_CheckStatic(name)

Checks if a static object with a certain name exists.

RANGE._DelayedSmoke(_args)

Start smoking a coordinate with a delay.

RANGE:_DisplayBombTargets(_unitname)

Display bombing target locations to player.

RANGE:_DisplayBombingResults(_unitName)

Display best bombing results of top 10 players.

RANGE:_DisplayMessageToGroup(_unit, _text, _time, _clear, display, _togroup)

Display message to group.

RANGE:_DisplayMyBombingResults(_unitName)

Display top 10 bombing run results of specific player.

RANGE:_DisplayMyStrafePitResults(_unitName)

Display top 10 stafing results of a specific player.

RANGE:_DisplayRangeInfo(_unitname)

Report information like bearing and range from player unit to range.

RANGE:_DisplayRangeWeather(_unitname)

Report weather conditions at range.

RANGE:_DisplayStrafePitResults(_unitName)

Display top 10 strafing results of all players.

RANGE:_DisplayStrafePits(_unitname)

Display pit location and heading to player.

RANGE:_FlareDirectHitsOnOff(unitname)

Toggle status of flaring direct hits of range targets.

RANGE:_GetAmmo(unitname)

Get the number of shells a unit currently has.

RANGE:_GetBombTargetCoordinate(target)

Get the number of shells a unit currently has.

RANGE:_GetPlayerUnitAndName(_unitName, PlayerName)

Returns the unit of a player and the player name.

RANGE:_GetSpeed(controllable)

Get max speed of controllable.

RANGE:_IlluminateBombTargets(_unitName)

Illuminate targets.

RANGE:_MarkTargetsOnMap(_unitName)

Mark targets on F10 map.

RANGE:_MessagesToPlayerOnOff(unitname)

Toggle display messages to player.

RANGE._OnImpact(weapon, self, playerData, attackHdg, attackAlt, attackVel)

Function called on impact of a tracked weapon.

RANGE:_ResetRangeStats(_unitName)

Reset player statistics.

RANGE:_SaveTargetSheet(_playername, result)

Save target sheet.

RANGE:_SmokeBombDelayOnOff(unitname)

Toggle status of time delay for smoking bomb impact points

RANGE:_SmokeBombImpactOnOff(unitname)

Toggle status of smoking bomb impact points.

RANGE:_SmokeBombTargets(unitname)

Mark bombing targets with smoke.

RANGE:_SmokeStrafeTargetBoxes(unitname)

Mark approach boxes of strafe targets with smoke.

RANGE:_SmokeStrafeTargets(unitname)

Mark strafing targets with smoke.

RANGE:_TargetsheetOnOff(_unitname)

Targetsheet saves if player on or off.

RANGE:__EnterRange(delay, player)

Triggers the FSM delayed event "EnterRange".

RANGE:__ExitRange(delay, player)

Triggers the FSM delayed event "ExitRange".

RANGE:__Impact(delay, result, player)

Triggers the FSM delayed event "Impact".

RANGE:__Start(delay)

Triggers the FSM event "Start" after a delay.

RANGE:__Status(delay)

Triggers the FSM event "Status" after a delay.

RANGE:__Stop(delay)

Triggers the FSM event "Stop" after a delay.

RANGE:_flarecolor2text(color)

Sets the flare color used to flare players direct target hits.

RANGE:_myname(unitname)

Returns a string which consists of the player name.

RANGE:_playerflarecolor(_unitName, color)

Sets the flare color used when player makes a direct hit on target.

RANGE:_playersmokecolor(_unitName, color)

Sets the smoke color used to smoke players bomb impact points.

RANGE:_smokecolor2text(color)

Converts a smoke color id to text.

RANGE.autosave

If true, automatically save results every X seconds.

RANGE.bombPlayerResults

Table containing the bombing results of each player.

RANGE.bombingTargets

Table of targets to bomb.

RANGE.controlmsrs

SRS wrapper for range controller.

RANGE.controlsrsQ

SRS queue for range controller.

RANGE.defaultsmokebomb

If true, initialize player settings to smoke bomb.

RANGE.dtBombtrack

Time step [sec] used for tracking released bomb/rocket positions. Default 0.005 seconds.

RANGE.examinerexclusive

If true, only the examiner gets messages. If false, clients and examiner get messages.

RANGE.examinergroupname

Name of the examiner group which should get all messages.

RANGE.funkmanSocket

RANGE.illuminationmaxalt

Maximum altitude in meters AGL at which illumination bombs are fired. Default is 1000 m.

RANGE.illuminationminalt

Minimum altitude in meters AGL at which illumination bombs are fired. Default is 500 m.

RANGE.instructmsrs

SRS wrapper for range instructor.

RANGE.instructor

Instructor radio queue.

RANGE.instructorfreq

Frequency on which the range control transmitts.

RANGE.instructorrelayname

Name of relay unit.

RANGE.instructsrsQ

SRS queue for range instructor.

RANGE.lid

String id of range for output in DCS log.

RANGE.location

Coordinate of the range location.

RANGE.menuF10root

Specific user defined root F10 menu.

RANGE.messages

Globally enable/disable all messages to players.

RANGE.nbombtargets

Number of bombing targets.

RANGE.ndisplayresult

Number of (player) results that a displayed. Default is 10.

RANGE.nstrafetargets

Number of strafing targets.

RANGE:onafterEnterRange(From, Event, To, player)

Function called after player enters the range zone.

RANGE:onafterExitRange(From, Event, To, player)

Function called after player leaves the range zone.

RANGE:onafterImpact(From, Event, To, result, player)

Function called after bomb impact on range.

RANGE:onafterLoad(From, Event, To)

On after "Load" event.

RANGE:onafterSave(From, Event, To)

Function called after save.

RANGE:onafterStart(From, Event, To)

Initializes number of targets and location of the range.

RANGE:onafterStatus(From, Event, To)

Check spawn queue and spawn aircraft if necessary.

RANGE:onafterStrafeResult(From, Event, To, player, result)

Function called after strafing run.

RANGE:onbeforeLoad(From, Event, To)

Function called before save event.

RANGE:onbeforeSave(From, Event, To)

Function called before save event.

RANGE.planes

Table for administration.

RANGE.rangecontrol

Range control radio queue.

RANGE.rangecontrolfreq

Frequency on which the range control transmitts.

RANGE.rangecontrolrelayname

Name of relay unit.

RANGE.rangename

Name of the range.

RANGE.rangeradius

Radius of range defining its total size for e.g. smoking bomb impact points and sending radio messages. Default 5 km.

RANGE.rangezone

MOOSE zone object of the range. For example, no bomb impacts are smoked if bombs fall outside of the range zone.

RANGE.scorebombdistance

Distance from closest target up to which bomb hits are counted. Default 1000 m.

RANGE.soundpath

Path inside miz file where the sound files are located. Default is "Range Soundfiles/".

RANGE.strafePlayerResults

Table containing the strafing results of each player.

RANGE.strafeStatus

Table containing the current strafing target a player as assigned to.

RANGE.strafeTargets

Table of strafing targets.

RANGE.strafemaxalt

Maximum altitude in meters AGL for registering for a strafe run. Default is 914 m = 3000 ft.

RANGE.targetpath

Path where to save the target sheets.

RANGE.targetprefix

File prefix for target sheet files.

RANGE.targetsheet

If true, players can save their target sheets. Rangeboss will not work if targetsheets do not save.

RANGE.timerCheckZone

RANGE.trackbombs

If true (default), all bomb types are tracked and impact point to closest bombing target is evaluated.

RANGE.trackmissiles

If true (default), all missile types are tracked and impact point to closest bombing target is evaluated.

RANGE.trackrockets

If true (default), all rocket types are tracked and impact point to closest bombing target is evaluated.

RANGE.useSRS

RANGE.verbose

Verbosity level. Higher means more output to DCS log file.

RANGE.version

Range script version.

Fields and Methods inherited from FSM Description

RANGE:AddEndState(State)

Adds an End state.

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

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

RANGE:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

RANGE:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

RANGE.CallScheduler

Call scheduler.

RANGE.ClassName

Name of the class.

RANGE.Events

RANGE:GetCurrentState()

Get current state.

RANGE:GetEndStates()

Returns the End states.

RANGE:GetProcess(From, Event)

RANGE:GetProcesses()

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

RANGE:GetScores()

Returns a table with the scores defined.

RANGE:GetStartState()

Returns the start state of the FSM.

RANGE:GetState()

Get current state.

RANGE:GetSubs()

Returns a table with the Subs defined.

RANGE:GetTransitions()

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

RANGE:Is(State)

Check if FSM is in state.

RANGE:LoadCallBacks(CallBackTable)

Load call backs.

RANGE:New()

Creates a new FSM object.

RANGE.Scores

Scores.

RANGE:SetProcess(From, Event, Fsm)

RANGE:SetStartState(State)

Sets the start state of the FSM.

RANGE._EndStates

RANGE._EventSchedules

RANGE._Processes

RANGE._Scores

RANGE._StartState

RANGE._Transitions

RANGE:_add_to_map(Map, Event)

Add to map.

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

Call handler.

RANGE:_create_transition(EventName)

Create transition.

RANGE:_delayed_transition(EventName)

Delayed transition.

RANGE:_eventmap(Events, EventStructure)

Event map.

RANGE:_gosub(ParentFrom, ParentEvent)

Go sub.

RANGE:_handler(EventName, ...)

Handler.

RANGE:_isendstate(Current)

Is end state.

RANGE:_submap(subs, sub, name)

Sub maps.

RANGE:can(e)

Check if can do an event.

RANGE:cannot(e)

Check if cannot do an event.

RANGE.current

Current state name.

RANGE.endstates

RANGE:is(State, state)

Check if FSM is in state.

RANGE.options

Options.

RANGE.subs

Subs.

Fields and Methods inherited from BASE Description

RANGE.ClassID

The ID number of the class.

RANGE.ClassName

The name of the class.

RANGE.ClassNameAndID

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

RANGE:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

RANGE:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

RANGE:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

RANGE:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

RANGE:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

RANGE:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

RANGE:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

RANGE:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

RANGE:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

RANGE:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

RANGE:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

RANGE:E(Arguments)

Log an exception which will be traced always.

RANGE:EventDispatcher()

Returns the event dispatcher

RANGE:EventRemoveAll()

Remove all subscribed events

RANGE:F(Arguments)

Trace a function call.

RANGE:F2(Arguments)

Trace a function call level 2.

RANGE:F3(Arguments)

Trace a function call level 3.

RANGE:GetClassID()

Get the ClassID of the class instance.

RANGE:GetClassName()

Get the ClassName of the class instance.

RANGE:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

RANGE:GetEventPriority()

Get the Class Core.Event processing Priority.

RANGE:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

RANGE:GetState(Object, Key)

Get a Value given a Key from the Object.

RANGE:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

RANGE:I(Arguments)

Log an information which will be traced always.

RANGE:Inherit(Child, Parent)

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

RANGE:IsInstanceOf(ClassName)

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

RANGE:IsTrace()

Enquires if tracing is on (for the class).

RANGE:New()

BASE constructor.

RANGE:OnEvent(EventData)

Occurs when an Event for an object is triggered.

RANGE:OnEventBDA(EventData)

BDA.

RANGE:OnEventBaseCaptured(EventData)

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

RANGE:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

RANGE:OnEventCrash(EventData)

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

RANGE:OnEventDead(EventData)

Occurs when an object is dead.

RANGE:OnEventDetailedFailure(EventData)

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

RANGE:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

RANGE:OnEventDynamicCargoLoaded(EventData)

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

RANGE:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

RANGE:OnEventDynamicCargoUnloaded(EventData)

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

RANGE:OnEventEjection(EventData)

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

RANGE:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

RANGE:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

RANGE:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

RANGE:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

RANGE:OnEventKill(EventData)

Occurs on the death of a unit.

RANGE:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

RANGE:OnEventLandingAfterEjection(EventData)

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

RANGE:OnEventLandingQualityMark(EventData)

Landing quality mark.

RANGE:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

RANGE:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

RANGE:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

RANGE:OnEventMissionEnd(EventData)

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

RANGE:OnEventMissionStart(EventData)

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

RANGE:OnEventNewDynamicCargo(EventData)

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

RANGE:OnEventParatrooperLanding(EventData)

Weapon add.

RANGE:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

RANGE:OnEventPlayerEnterAircraft(EventData)

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

RANGE:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

RANGE:OnEventPlayerLeaveUnit(EventData)

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

RANGE:OnEventRefueling(EventData)

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

RANGE:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

RANGE:OnEventScore(EventData)

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

RANGE:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

RANGE:OnEventShootingStart(EventData)

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

RANGE:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

RANGE:OnEventTakeoff(EventData)

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

RANGE:OnEventTriggerZone(EventData)

Trigger zone.

RANGE:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

RANGE:ScheduleStop(SchedulerID)

Stops the Schedule.

RANGE.Scheduler

RANGE:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

RANGE:SetState(Object, Key, Value)

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

RANGE:T(Arguments)

Trace a function logic level 1.

RANGE:T2(Arguments)

Trace a function logic level 2.

RANGE:T3(Arguments)

Trace a function logic level 3.

RANGE:TraceAll(TraceAll)

Trace all methods in MOOSE

RANGE:TraceClass(Class)

Set tracing for a class

RANGE:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

RANGE:TraceLevel(Level)

Set trace level

RANGE:TraceOff()

Set trace off.

RANGE:TraceOn()

Set trace on.

RANGE:TraceOnOff(TraceOnOff)

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

RANGE:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

RANGE._

RANGE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

RANGE:_Serialize(Arguments)

(Internal) Serialize arguments

RANGE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

RANGE.__

RANGE:onEvent(event)

The main event handling function...

Fields and Methods inherited from RANGE.BombResult Description

RANGE.BombResult.airframe

Aircraft type of player.

RANGE.BombResult.attackAlt

Attack altitude in feet.

RANGE.BombResult.attackHdg

Attack heading in degrees.

RANGE.BombResult.attackVel

Attack velocity in knots.

RANGE.BombResult.clock

Time of the run.

RANGE.BombResult.command

RANGE.BombResult.date

OS date.

RANGE.BombResult.distance

Distance in meters.

RANGE.BombResult.midate

RANGE.BombResult.name

Name of closest target.

RANGE.BombResult.player

Player name.

RANGE.BombResult.quality

Hit quality.

RANGE.BombResult.radial

Radial in degrees.

RANGE.BombResult.rangename

Name of the range.

RANGE.BombResult.roundsFired

RANGE.BombResult.roundsHit

RANGE.BombResult.roundsQuality

RANGE.BombResult.theatre

RANGE.BombResult.time

Time via timer.getAbsTime() in seconds of impact.

RANGE.BombResult.weapon

Name of the weapon.

Fields and Methods inherited from RANGE.BombTarget Description

RANGE.BombTarget.coordinate

Coordinate of the target.

RANGE.BombTarget.goodhitrange

Range in meters for a good hit.

RANGE.BombTarget.move

If true, unit move randomly.

RANGE.BombTarget.name

Name of unit.

RANGE.BombTarget.speed

Speed of unit.

RANGE.BombTarget.target

Target unit.

RANGE.BombTarget.type

Type of target.

Fields and Methods inherited from RANGE.PlayerData Description

RANGE.PlayerData.airframe

Aircraft type name.

RANGE.PlayerData.client

Client object of player.

RANGE.PlayerData.flarecolor

Color of flares.

RANGE.PlayerData.flaredirecthits

Flare when player directly hits a target.

RANGE.PlayerData.inzone

If true, player is inside the range zone.

RANGE.PlayerData.messages

Display info messages.

RANGE.PlayerData.playername

Name of player.

RANGE.PlayerData.smokebombimpact

Smoke bomb impact points.

RANGE.PlayerData.smokecolor

Color of smoke.

RANGE.PlayerData.targeton

Target on.

RANGE.PlayerData.unit

Player unit.

RANGE.PlayerData.unitname

Name of player aircraft unit.

Fields and Methods inherited from RANGE.Soundfile Description

RANGE.Soundfile.duration

Duration in seconds.

RANGE.Soundfile.filename

Name of the file

Fields and Methods inherited from RANGE.StrafeResult Description

RANGE.StrafeResult.airframe

Aircraft type of player.

RANGE.StrafeResult.clock

Time of the run.

RANGE.StrafeResult.command

RANGE.StrafeResult.date

OS date.

RANGE.StrafeResult.invalid

Invalid pass.

RANGE.StrafeResult.midate

RANGE.StrafeResult.name

Name of the target pit.

RANGE.StrafeResult.player

Player name.

RANGE.StrafeResult.rangename

Name of the range.

RANGE.StrafeResult.roundsFired

Number of rounds fired.

RANGE.StrafeResult.roundsHit

Number of rounds that hit the target.

RANGE.StrafeResult.roundsQuality

RANGE.StrafeResult.strafeAccuracy

Accuracy of the run in percent.

RANGE.StrafeResult.theatre

RANGE.StrafeResult.time

Time via timer.getAbsTime() in seconds of impact.

Fields and Methods inherited from RANGE.StrafeStatus Description

RANGE.StrafeStatus.ammo

Amount of ammo.

RANGE.StrafeStatus.hits

Number of hits on target.

RANGE.StrafeStatus.pastfoulline

If true, player passed foul line. Invalid pass.

RANGE.StrafeStatus.time

Number of times.

RANGE.StrafeStatus.zone

Strafe target.

Fields and Methods inherited from RANGE.StrafeTarget Description

RANGE.StrafeTarget.coordinate

Center coordinate of the pit.

RANGE.StrafeTarget.foulline

Foul line

RANGE.StrafeTarget.goodPass

Number of hits for a good pass.

RANGE.StrafeTarget.heading

Heading of pit.

RANGE.StrafeTarget.name

Name of the unit.

RANGE.StrafeTarget.polygon

Polygon zone.

RANGE.StrafeTarget.smokepoints

Number of smoke points.

RANGE.StrafeTarget.targets

Table of target units.

Fields and Methods inherited from RANGE.TargetType Description

RANGE.TargetType.COORD

Target is a coordinate.

RANGE.TargetType.SCENERY

Target is a scenery object.

RANGE.TargetType.STATIC

Target is a static object.

RANGE.TargetType.UNIT

Target is a unitobject.

RANGE class

Field(s)

Utilities.Utils#SMOKECOLOR RANGE.BombSmokeColor

Color id used for smoking bomb targets.

#number RANGE.BombtrackThreshold

Bombs/rockets/missiles are only tracked if player-range distance is smaller than this threshold [m]. Default 25000 m.

#string RANGE.ClassName

Name of the Class.

#number RANGE.Coalition

Coalition side for the menu, if any.

#boolean RANGE.Debug

If true, debug info is sent as messages on the screen.

#table RANGE.MenuAddedTo

Table for monitoring which players already got an F10 menu.

#table RANGE.MenuF10

Main radio menu on group level.

#table RANGE.MenuF10Root

Main radio menu on mission level.

#table RANGE.Names

Global list of all defined range names.

#table RANGE.PlayerSettings

Individual player settings.

Utilities.Utils#SMOKECOLOR RANGE.StrafePitSmokeColor

Color id used to smoke strafe pit approach boxes.

Utilities.Utils#SMOKECOLOR RANGE.StrafeSmokeColor

Color id used to smoke strafe targets.

#number RANGE.TdelaySmoke

Time delay in seconds between impact of bomb and starting the smoke. Default 3 seconds.

#number RANGE.Tmsg

Time [sec] messages to players are displayed. Default 30 sec.

#boolean RANGE.autosave

If true, automatically save results every X seconds.

#table RANGE.bombPlayerResults

Table containing the bombing results of each player.

#table RANGE.bombingTargets

Table of targets to bomb.

Sound.SRS#MSRS RANGE.controlmsrs

SRS wrapper for range controller.

Sound.SRS#MSRSQUEUE RANGE.controlsrsQ

SRS queue for range controller.

#boolean RANGE.defaultsmokebomb

If true, initialize player settings to smoke bomb.

#number RANGE.dtBombtrack

Time step [sec] used for tracking released bomb/rocket positions. Default 0.005 seconds.

#boolean RANGE.examinerexclusive

If true, only the examiner gets messages. If false, clients and examiner get messages.

#string RANGE.examinergroupname

Name of the examiner group which should get all messages.

#number RANGE.illuminationmaxalt

Maximum altitude in meters AGL at which illumination bombs are fired. Default is 1000 m.

#number RANGE.illuminationminalt

Minimum altitude in meters AGL at which illumination bombs are fired. Default is 500 m.

Sound.SRS#MSRS RANGE.instructmsrs

SRS wrapper for range instructor.

#number RANGE.instructorfreq

Frequency on which the range control transmitts.

#string RANGE.instructorrelayname

Name of relay unit.

Sound.SRS#MSRSQUEUE RANGE.instructsrsQ

SRS queue for range instructor.

#string RANGE.lid

String id of range for output in DCS log.

Core.Point#COORDINATE RANGE.location

Coordinate of the range location.

Core.Menu#MENU_MISSION RANGE.menuF10root

Specific user defined root F10 menu.

#boolean RANGE.messages

Globally enable/disable all messages to players.

#number RANGE.nbombtargets

Number of bombing targets.

#number RANGE.ndisplayresult

Number of (player) results that a displayed. Default is 10.

#number RANGE.nstrafetargets

Number of strafing targets.

#table RANGE.planes

Table for administration.

Sound.RadioQueue#RADIOQUEUE RANGE.rangecontrol

Range control radio queue.

#number RANGE.rangecontrolfreq

Frequency on which the range control transmitts.

#string RANGE.rangecontrolrelayname

Name of relay unit.

#string RANGE.rangename

Name of the range.

#number RANGE.rangeradius

Radius of range defining its total size for e.g. smoking bomb impact points and sending radio messages. Default 5 km.

Core.Zone#ZONE RANGE.rangezone

MOOSE zone object of the range. For example, no bomb impacts are smoked if bombs fall outside of the range zone.

#number RANGE.scorebombdistance

Distance from closest target up to which bomb hits are counted. Default 1000 m.

#string RANGE.soundpath

Path inside miz file where the sound files are located. Default is "Range Soundfiles/".

#table RANGE.strafePlayerResults

Table containing the strafing results of each player.

#table RANGE.strafeStatus

Table containing the current strafing target a player as assigned to.

#table RANGE.strafeTargets

Table of strafing targets.

#number RANGE.strafemaxalt

Maximum altitude in meters AGL for registering for a strafe run. Default is 914 m = 3000 ft.

#string RANGE.targetpath

Path where to save the target sheets.

#string RANGE.targetprefix

File prefix for target sheet files.

#boolean RANGE.targetsheet

If true, players can save their target sheets. Rangeboss will not work if targetsheets do not save.

#boolean RANGE.trackbombs

If true (default), all bomb types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.trackmissiles

If true (default), all missile types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.trackrockets

If true (default), all rocket types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.useSRS
#boolean RANGE.verbose

Verbosity level. Higher means more output to DCS log file.

#string RANGE.version

Range script version.

Function(s)

Add a coordinate of a bombing target.

This

Defined in:

RANGE

Parameters:

The coordinate.

#string name

Name of target.

#number goodhitrange

Max distance from unit which is considered as a good hit.

Return value:

self

Add all units of a group as bombing targets.

Defined in:

RANGE

Parameters:

Group of bombing targets. Can also be given as group name.

#number goodhitrange

Max distance from unit which is considered as a good hit.

#boolean randommove

If true, unit will move randomly within the range. Default is false.

Return value:

self

Add a scenery object as bombing target.

Defined in:

RANGE

Parameters:

Scenary object.

#number goodhitrange

Max distance from unit which is considered as a good hit.

Return value:

self

Add a unit or static object as bombing target.

Defined in:

RANGE

Parameters:

Positionable (unit or static) of the bombing target.

#number goodhitrange

Max distance from unit which is considered as a good hit.

#boolean randommove

If true, unit will move randomly within the range. Default is false.

Return value:

self

Add bombing target(s) to range.

Defined in:

RANGE

Parameters:

#table targetnames

Single or multiple (Table) names of unit or static objects serving as bomb targets.

#number goodhitrange

(Optional) Max distance from target unit (in meters) which is considered as a good hit. Default is 25 m.

#boolean randommove

If true, unit will move randomly within the range. Default is false.

Return value:

self

Add new strafe pit.

For a strafe pit, hits from guns are counted. One pit can consist of several units. A strafe run approach is only valid if the player enters via a zone in front of the pit, which is defined by boxlength, boxwidth, and heading. Furthermore, the player must not be too high and fly in the direction of the pit to make a valid target apporoach.

Defined in:

RANGE

Parameters:

#table targetnames

Single or multiple (Table) unit or static names defining the strafe targets. The first target in the list determines the approach box origin (heading and box).

#number boxlength

(Optional) Length of the approach box in meters. Default is 3000 m.

#number boxwidth

(Optional) Width of the approach box in meters. Default is 300 m.

#number heading

(Optional) Approach box heading in degrees (originating FROM the target). Default is the heading set in the ME for the first target unit

#boolean inverseheading

(Optional) Use inverse heading (heading --> heading - 180 Degrees). Default is false.

#number goodpass

(Optional) Number of hits for a "good" strafing pass. Default is 20.

#number foulline

(Optional) Foul line distance. Hits from closer than this distance are not counted. Default is 610 m = 2000 ft. Set to 0 for no foul line.

Return value:

self

Add all units of a group as one new strafe target pit.

For a strafe pit, hits from guns are counted. One pit can consist of several units. Note, an approach is only valid, if the player enters via a zone in front of the pit, which defined by boxlength and boxheading. Furthermore, the player must not be too high and fly in the direction of the pit to make a valid target apporoach.

Defined in:

RANGE

Parameters:

MOOSE group of unit names defining the strafe target pit. The first unit in the group determines the approach zone (heading and box).

#number boxlength

(Optional) Length of the approach box in meters. Default is 3000 m.

#number boxwidth

(Optional) Width of the approach box in meters. Default is 300 m.

#number heading

(Optional) Approach heading in Degrees. Default is heading of the unit as defined in the mission editor.

#boolean inverseheading

(Optional) Take inverse heading (heading --> heading - 180 Degrees). Default is false.

#number goodpass

(Optional) Number of hits for a "good" strafing pass. Default is 20.

#number foulline

(Optional) Foul line distance. Hits from closer than this distance are not counted. Default 610 m = 2000 ft. Set to 0 for no foul line.

Return value:

self

Disable debug modus.

Defined in:

RANGE

Return value:

self

Enable debug modus.

Defined in:

RANGE

Return value:

self

Triggers the FSM event "EnterRange".

Defined in:

RANGE

Parameter:

Data of player settings etc.

Triggers the FSM event "ExitRange".

Defined in:

RANGE

Parameter:

Data of player settings etc.

Measures the foule line distance between two unit or static objects.

Defined in:

RANGE

Parameters:

#string namepit

Name of the strafe pit target object.

#string namefoulline

Name of the fould line distance marker object.

Return value:

#number:

Foul line distance in meters.

Triggers the FSM event "Impact".

Defined in:

RANGE

Parameters:

Data of bombing run.

Data of player settings etc.

RANGE contructor.

Creates a new RANGE object.

Defined in:

RANGE

Parameters:

#string RangeName

Name of the range. Has to be unique. Will we used to create F10 menu items etc.

#number Coalition

(optional) Coalition of the range, if any, e.g. coalition.side.BLUE.

Return value:

RANGE object.

On after "EnterRange" event user function.

Called when a player enters the range zone.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Data of player settings etc.

On after "ExitRange" event user function.

Called when a player leaves the range zone.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Data of player settings etc.

On after "Impact" event user function.

Called when a bomb/rocket/missile impacted.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Data of the bombing run.

Data of player settings etc.

On after "RollingIn" event user function.

Called when a player rolls in to a strafe taret.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Data of player settings etc.

Strafe target.

On after "StrafeResult" event user function.

Called when a player finished a strafing run.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Data of player settings etc.

Data of the strafing run.

Range event handler for event birth.

Defined in:

RANGE

Parameter:

Range event handler for event hit.

Defined in:

RANGE

Parameter:

Range event handler for event shot (when a unit releases a rocket or bomb (but not a fast firing gun).

Defined in:

RANGE

Parameter:

Triggers the FSM event "RollingIn".

Defined in:

RANGE

Parameters:

Data of player settings etc.

Strafe target.

Switch off auto save player results.

Defined in:

RANGE

Return value:

self

Automatically save player results to disc.

Defined in:

RANGE

Return value:

self

Set smoke color for marking bomb targets.

By default bomb targets are marked by red smoke.

Defined in:

RANGE

Parameter:

Color id. Default SMOKECOLOR.Red.

Return value:

self

Set bomb track threshold distance.

Bombs/rockets/missiles are only tracked if player-range distance is less than this distance. Default 25 km.

Defined in:

RANGE

Parameter:

#number distance

Threshold distance in km. Default 25 km.

Return value:

self

Set time interval for tracking bombs.

A smaller time step increases accuracy but needs more CPU time.

Defined in:

RANGE

Parameter:

#number dt

Time interval in seconds. Default is 0.005 s.

Return value:

self

Set player setting whether bomb impact points are smoked or not.

Defined in:

RANGE

Parameter:

#boolean switch

If true nor nil default is to smoke impact points of bombs.

Return value:

self

Set max number of player results that are displayed.

Defined in:

RANGE

Parameter:

#number nmax

Number of results. Default is 10.

Return value:

self

Set FunkMan socket.

Bombing and strafing results will be send to your Discord bot. Requires running FunkMan program.

Defined in:

RANGE

Parameters:

#number Port

Port. Default 10042.

#string Host

Host. Default "127.0.0.1".

Return value:

self

Enable instructor radio and set frequency (non-SRS).

Defined in:

RANGE

Parameters:

#number frequency

Frequency in MHz. Default 305 MHz.

#string relayunitname

Name of the unit used for transmission.

Return value:

self

Set maximal strafing altitude.

Player entering a strafe pit above that altitude are not registered for a valid pass.

Defined in:

RANGE

Parameter:

#number maxalt

Maximum altitude in meters AGL. Default is 914 m = 3000 ft.

Return value:

self

Set the root F10 menu under which the range F10 menu is created.

Defined in:

RANGE

Parameter:

The root F10 menu.

Return value:

self

Set time how long (most) messages are displayed.

Defined in:

RANGE

Parameter:

#number time

Time in seconds. Default is 30 s.

Return value:

self

Set messages to examiner.

The examiner will receive messages from all clients.

Defined in:

RANGE

Parameters:

#string examinergroupname

Name of the group of the examiner.

#boolean exclusively

If true, messages are send exclusively to the examiner, i.e. not to the clients.

Return value:

self

Disable ALL messages to players.

Defined in:

RANGE

Return value:

self

Enable messages to players.

This is the default

Defined in:

RANGE

Return value:

self

Enable range control and set frequency (non-SRS).

Defined in:

RANGE

Parameters:

#number frequency

Frequency in MHz. Default 256 MHz.

#string relayunitname

Name of the unit used for transmission.

Return value:

self

Set range location.

If this is not done, one (random) unit position of the range is used to determine the location of the range. The range location determines the position at which the weather data is evaluated.

Defined in:

RANGE

Parameter:

Coordinate of the range.

Return value:

self

Set range radius.

Defines the area in which e.g. bomb impacts are smoked.

Defined in:

RANGE

Parameter:

#number radius

Radius in km. Default 5 km.

Return value:

self

Set range zone.

For example, no bomb impact points are smoked if a bomb falls outside of this zone. If a zone is not explicitly specified, the range zone is determined by its location and radius.

Defined in:

RANGE

Parameter:

MOOSE zone defining the range perimeters.

Return value:

self

Use SRS Simple-Text-To-Speech for transmissions.

No sound files necessary.

Defined in:

RANGE

Parameters:

#string PathToSRS

Path to SRS directory.

#number Port

SRS port. Default 5002.

#number Coalition

Coalition side, e.g. coalition.side.BLUE or coalition.side.RED. Default coalition.side.BLUE.

#number Frequency

Frequency to use. Default is 256 MHz for range control and 305 MHz for instructor. If given, both control and instructor get this frequency.

#number Modulation

Modulation to use, defaults to radio.modulation.AM

#number Volume

Volume, between 0.0 and 1.0. Defaults to 1.0

#string PathToGoogleKey

Path to Google TTS credentials.

Return value:

self

(SRS) Set range control frequency and voice.

Use RANGE:SetSRS() once first before using this function.

Defined in:

RANGE

Parameters:

#number frequency

Frequency in MHz. Default 256 MHz.

#number modulation

Modulation, defaults to radio.modulation.AM.

#string voice

Voice.

#string culture

Culture, defaults to "en-US".

#string gender

Gender, defaults to "female".

#string relayunitname

Name of the unit used for transmission location.

Return value:

self

(SRS) Set range instructor frequency and voice.

Use RANGE:SetSRS() once first before using this function.

Defined in:

RANGE

Parameters:

#number frequency

Frequency in MHz. Default 305 MHz.

#number modulation

Modulation, defaults to radio.modulation.AM.

#string voice

Voice.

#string culture

Culture, defaults to "en-US".

#string gender

Gender, defaults to "male".

#string relayunitname

Name of the unit used for transmission location.

Return value:

self

Set score bomb distance.

Defined in:

RANGE

Parameter:

#number distance

Distance in meters. Default 1000 m.

Return value:

self

Set time delay between bomb impact and starting to smoke the impact point.

Defined in:

RANGE

Parameter:

#number delay

Time delay in seconds. Default is 3 seconds.

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:

RANGE

Parameter:

#string csvfile

Full path to the csv file on your local disk.

Return value:

self

Set sound files folder within miz file.

Defined in:

RANGE

Parameter:

#string path

Path for sound files. Default "Range Soundfiles/". Mind the slash "/" at the end!

Return value:

self

Set smoke color for marking strafe pit approach boxes.

By default strafe pit boxes are marked by white smoke.

Defined in:

RANGE

Parameter:

Color id. Default SMOKECOLOR.White.

Return value:

self

Set smoke color for marking strafe targets.

By default strafe targets are marked by green smoke.

Defined in:

RANGE

Parameter:

Color id. Default SMOKECOLOR.Green.

Return value:

self

Enable saving of player's target sheets and specify an optional directory path.

Defined in:

RANGE

Parameters:

#string path

(Optional) Path where to save the target sheets.

#string prefix

(Optional) Prefix for target sheet files. File name will be saved as *prefix_aircrafttype-0001.csv*, *prefix_aircrafttype-0002.csv*, etc.

Return value:

self

Triggers the FSM event "Start".

Starts the RANGE. Initializes parameters and starts event handlers.

Defined in:

RANGE

Triggers the FSM event "Status".

Defined in:

RANGE

Triggers the FSM event "StrafeResult".

Defined in:

RANGE

Parameters:

Data of player settings etc.

Data of the strafing run.

Disables tracking of all bomb types.

Defined in:

RANGE

Return value:

self

Enables tracking of all bomb types.

Note that this is the default setting.

Defined in:

RANGE

Return value:

self

Disables tracking of all missile types.

Defined in:

RANGE

Return value:

self

Enables tracking of all missile types.

Note that this is the default setting.

Defined in:

RANGE

Return value:

self

Disables tracking of all rocket types.

Defined in:

RANGE

Return value:

self

Enables tracking of all rocket types.

Note that this is the default setting.

Defined in:

RANGE

Return value:

self

Add menu commands for player.

Defined in:

RANGE

Parameter:

#string _unitName

Name of player unit.

Check if player is inside a strafing zone.

If he is, we start looking for hits. If he was and left the zone again, the result is stored.

Defined in:

RANGE

Parameter:

#string _unitName

Name of player unit.

Check status of players.

Defined in:

RANGE

Parameter:

#string _unitName

Name of player unit.

Checks if a static object with a certain name exists.

It also added it to the MOOSE data base, if it is not already in there.

Defined in:

RANGE

Parameter:

#string name

Name of the potential static object.

Return value:

#boolean:

Returns true if a static with this name exists. Retruns false if a unit with this name exists. Returns nil if neither unit or static exist.

Start smoking a coordinate with a delay.

Defined in:

RANGE

Parameter:

#table _args

Argements passed.

Display bombing target locations to player.

Defined in:

RANGE

Parameter:

#string _unitname

Name of the player unit.

Display best bombing results of top 10 players.

Defined in:

RANGE

Parameter:

#string _unitName

Name of player unit.

Display message to group.

Defined in:

RANGE

Parameters:

Player unit.

#string _text

Message text.

#number _time

Duration how long the message is displayed.

#boolean _clear

Clear up old messages.

#boolean display

If true, display message regardless of player setting "Messages Off".

#boolean _togroup

If true, display the message to the group in any case

Display top 10 bombing run results of specific player.

Defined in:

RANGE

Parameter:

#string _unitName

Name of the player unit.

Display top 10 stafing results of a specific player.

Defined in:

RANGE

Parameter:

#string _unitName

Name of the player unit.

Report information like bearing and range from player unit to range.

Defined in:

RANGE

Parameter:

#string _unitname

Name of the player unit.

Report weather conditions at range.

Temperature, QFE pressure and wind data.

Defined in:

RANGE

Parameter:

#string _unitname

Name of the player unit.

Display top 10 strafing results of all players.

Defined in:

RANGE

Parameter:

#string _unitName

Name fo the player unit.

Display pit location and heading to player.

Defined in:

RANGE

Parameter:

#string _unitname

Name of the player unit.

Toggle status of flaring direct hits of range targets.

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Get the number of shells a unit currently has.

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Return value:

Number of shells left

Get the number of shells a unit currently has.

Defined in:

RANGE

Parameter:

Bomb target data.

Return value:

Target coordinate.

Returns the unit of a player and the player name.

If the unit does not belong to a player, nil is returned.

Defined in:

RANGE

Parameters:

#string _unitName

Name of the player unit.

PlayerName

Return values:

Unit of player.

#string:

Name of the player.

#boolean:

If true, group has > 1 player in it

Get max speed of controllable.

Defined in:

RANGE

Parameter:

Return value:

Maximum speed in km/h.

Illuminate targets.

Fires illumination bombs at one random bomb and one random strafe target at a random altitude between 400 and 800 m.

Defined in:

RANGE

Parameter:

#string _unitName

(Optional) Name of the player unit.

Mark targets on F10 map.

Defined in:

RANGE

Parameter:

#string _unitName

Name of the player unit.

Toggle display messages to player.

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Function called on impact of a tracked weapon.

Defined in:

RANGE

Parameters:

The weapon object.

#RANGE self

RANGE object.

#RANGE.PlayerData playerData

Player data table.

#number attackHdg

Attack heading.

#number attackAlt

Attack altitude.

#number attackVel

Attack velocity.

Reset player statistics.

Defined in:

RANGE

Parameter:

#string _unitName

Name of the player unit.

Save target sheet.

Defined in:

RANGE

Parameters:

#string _playername

Player name.

Results table.

Toggle status of time delay for smoking bomb impact points

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Toggle status of smoking bomb impact points.

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Mark bombing targets with smoke.

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Mark approach boxes of strafe targets with smoke.

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Mark strafing targets with smoke.

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Targetsheet saves if player on or off.

Defined in:

RANGE

Parameter:

#string _unitname

Name of the player unit.

Triggers the FSM delayed event "EnterRange".

Defined in:

RANGE

Parameters:

#number delay

Delay in seconds before the function is called.

Data of player settings etc.

Triggers the FSM delayed event "ExitRange".

Defined in:

RANGE

Parameters:

#number delay

Delay in seconds before the function is called.

Data of player settings etc.

Triggers the FSM delayed event "Impact".

Defined in:

RANGE

Parameters:

#number delay

Delay in seconds before the function is called.

Data of the bombing run.

Data of player settings etc.

Triggers the FSM event "Start" after a delay.

Starts the RANGE. Initializes parameters and starts event handlers.

Defined in:

RANGE

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Status" after a delay.

Defined in:

RANGE

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Stop" after a delay.

Stops the RANGE and all its event handlers.

Defined in:

RANGE

Parameter:

#number delay

Delay in seconds.

Sets the flare color used to flare players direct target hits.

Defined in:

RANGE

Parameter:

Color Id.

Return value:

#string:

Color text.

Returns a string which consists of the player name.

Defined in:

RANGE

Parameter:

#string unitname

Name of the player unit.

Sets the flare color used when player makes a direct hit on target.

Defined in:

RANGE

Parameters:

#string _unitName

Name of the player unit.

ID of flare color.

Sets the smoke color used to smoke players bomb impact points.

Defined in:

RANGE

Parameters:

#string _unitName

Name of the player unit.

ID of the smoke color.

Converts a smoke color id to text.

E.g. SMOKECOLOR.Blue --> "blue".

Defined in:

RANGE

Parameter:

Color Id.

Return value:

#string:

Color text.

Function called after player enters the range zone.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Player data.

Function called after player leaves the range zone.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Player data.

Function called after bomb impact on range.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Result of bomb impact.

Player data table.

On after "Load" event.

Loads results of all players from file.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Function called after save.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Initializes number of targets and location of the range.

Starts the event handlers.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Check spawn queue and spawn aircraft if necessary.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Function called after strafing run.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Player data table.

Result of run.

Function called before save event.

Checks that io and lfs are desanitized.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Function called before save event.

Checks that io and lfs are desanitized.

Defined in:

RANGE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Field(s)

Utilities.Utils#SMOKECOLOR RANGE.BombSmokeColor

Color id used for smoking bomb targets.

#number RANGE.BombtrackThreshold

Bombs/rockets/missiles are only tracked if player-range distance is smaller than this threshold [m]. Default 25000 m.

#string RANGE.ClassName

Name of the Class.

#number RANGE.Coalition

Coalition side for the menu, if any.

#boolean RANGE.Debug

If true, debug info is sent as messages on the screen.

#table RANGE.MenuAddedTo

Table for monitoring which players already got an F10 menu.

#table RANGE.MenuF10

Main radio menu on group level.

#table RANGE.MenuF10Root

Main radio menu on mission level.

#table RANGE.Names

Global list of all defined range names.

#table RANGE.PlayerSettings

Individual player settings.

Utilities.Utils#SMOKECOLOR RANGE.StrafePitSmokeColor

Color id used to smoke strafe pit approach boxes.

Utilities.Utils#SMOKECOLOR RANGE.StrafeSmokeColor

Color id used to smoke strafe targets.

#number RANGE.TdelaySmoke

Time delay in seconds between impact of bomb and starting the smoke. Default 3 seconds.

#number RANGE.Tmsg

Time [sec] messages to players are displayed. Default 30 sec.

#boolean RANGE.autosave

If true, automatically save results every X seconds.

#table RANGE.bombPlayerResults

Table containing the bombing results of each player.

#table RANGE.bombingTargets

Table of targets to bomb.

Sound.SRS#MSRS RANGE.controlmsrs

SRS wrapper for range controller.

Sound.SRS#MSRSQUEUE RANGE.controlsrsQ

SRS queue for range controller.

#boolean RANGE.defaultsmokebomb

If true, initialize player settings to smoke bomb.

#number RANGE.dtBombtrack

Time step [sec] used for tracking released bomb/rocket positions. Default 0.005 seconds.

#boolean RANGE.examinerexclusive

If true, only the examiner gets messages. If false, clients and examiner get messages.

#string RANGE.examinergroupname

Name of the examiner group which should get all messages.

#number RANGE.illuminationmaxalt

Maximum altitude in meters AGL at which illumination bombs are fired. Default is 1000 m.

#number RANGE.illuminationminalt

Minimum altitude in meters AGL at which illumination bombs are fired. Default is 500 m.

Sound.SRS#MSRS RANGE.instructmsrs

SRS wrapper for range instructor.

#number RANGE.instructorfreq

Frequency on which the range control transmitts.

#string RANGE.instructorrelayname

Name of relay unit.

Sound.SRS#MSRSQUEUE RANGE.instructsrsQ

SRS queue for range instructor.

#string RANGE.lid

String id of range for output in DCS log.

Core.Point#COORDINATE RANGE.location

Coordinate of the range location.

Core.Menu#MENU_MISSION RANGE.menuF10root

Specific user defined root F10 menu.

#boolean RANGE.messages

Globally enable/disable all messages to players.

#number RANGE.nbombtargets

Number of bombing targets.

#number RANGE.ndisplayresult

Number of (player) results that a displayed. Default is 10.

#number RANGE.nstrafetargets

Number of strafing targets.

#table RANGE.planes

Table for administration.

Sound.RadioQueue#RADIOQUEUE RANGE.rangecontrol

Range control radio queue.

#number RANGE.rangecontrolfreq

Frequency on which the range control transmitts.

#string RANGE.rangecontrolrelayname

Name of relay unit.

#string RANGE.rangename

Name of the range.

#number RANGE.rangeradius

Radius of range defining its total size for e.g. smoking bomb impact points and sending radio messages. Default 5 km.

Core.Zone#ZONE RANGE.rangezone

MOOSE zone object of the range. For example, no bomb impacts are smoked if bombs fall outside of the range zone.

#number RANGE.scorebombdistance

Distance from closest target up to which bomb hits are counted. Default 1000 m.

#string RANGE.soundpath

Path inside miz file where the sound files are located. Default is "Range Soundfiles/".

#table RANGE.strafePlayerResults

Table containing the strafing results of each player.

#table RANGE.strafeStatus

Table containing the current strafing target a player as assigned to.

#table RANGE.strafeTargets

Table of strafing targets.

#number RANGE.strafemaxalt

Maximum altitude in meters AGL for registering for a strafe run. Default is 914 m = 3000 ft.

#string RANGE.targetpath

Path where to save the target sheets.

#string RANGE.targetprefix

File prefix for target sheet files.

#boolean RANGE.targetsheet

If true, players can save their target sheets. Rangeboss will not work if targetsheets do not save.

#boolean RANGE.trackbombs

If true (default), all bomb types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.trackmissiles

If true (default), all missile types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.trackrockets

If true (default), all rocket types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.useSRS
#boolean RANGE.verbose

Verbosity level. Higher means more output to DCS log file.

#string RANGE.version

Range script version.

Function(s)

Adds an End state.

Defined in:

Parameter:

#string State

The FSM state.

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

Defined in:

Parameters:

#table From

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

#string Event

The Event name.

An sub-process FSM.

#table ReturnEvents

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

Return value:

The SubFSM.

Adds a score for the FSM to be achieved.

Defined in:

Parameters:

#string State

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

#string ScoreText

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

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Adds a score for the FSM_PROCESS to be achieved.

Defined in:

Parameters:

#string From

is the From State of the main process.

#string Event

is the Event of the main process.

#string State

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

#string ScoreText

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

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Add a new transition rule to the FSM.

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

Defined in:

Parameters:

#table From

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

#string Event

The Event name.

#string To

The To state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns the End states.

Defined in:

Return value:

#table:

End states.

Defined in:

Parameters:

From

Event

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

Defined in:

Return value:

#table:

Sub processes.

Returns a table with the scores defined.

Defined in:

Return value:

#table:

Scores.

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns a table with the Subs defined.

Defined in:

Return value:

#table:

Sub processes.

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

Defined in:

Return value:

#table:

Transitions.

Check if FSM is in state.

Defined in:

Parameter:

#string State

State name.

Return value:

#boolean:

If true, FSM is in this state.

Load call backs.

Defined in:

Parameter:

#table CallBackTable

Table of call backs.

Creates a new FSM object.

Defined in:

Return value:

#FSM:

Defined in:

Parameters:

From

Event

Fsm

Sets the start state of the FSM.

Defined in:

Parameter:

#string State

A string defining the start state.

Add to map.

Defined in:

Parameters:

#table Map

Map.

#table Event

Event table.

Call handler.

Defined in:

Parameters:

#string step

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

#string trigger

Trigger.

#table params

Parameters.

#string EventName

Event name.

Return value:

Value.

Create transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Delayed transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Event map.

Defined in:

Parameters:

#table Events

Events.

#table EventStructure

Event structure.

Go sub.

Defined in:

Parameters:

#string ParentFrom

Parent from state.

#string ParentEvent

Parent event name.

Return value:

#table:

Subs.

Handler.

Defined in:

Parameters:

#string EventName

Event name.

...

Arguments.

Is end state.

Defined in:

Parameter:

#string Current

Current state name.

Return values:

#table:

FSM parent.

#string:

Event name.

Sub maps.

Defined in:

Parameters:

#table subs

Subs.

#table sub

Sub.

#string name

Name.

Check if can do an event.

Defined in:

Parameter:

#string e

Event name.

Return values:

#boolean:

If true, FSM can do the event.

#string:

To state.

Check if cannot do an event.

Defined in:

Parameter:

#string e

Event name.

Return value:

#boolean:

If true, FSM cannot do the event.

Check if FSM is in state.

Defined in:

Parameters:

#string State

State name.

state

Return value:

#boolean:

If true, FSM is in this state.

Field(s)

Utilities.Utils#SMOKECOLOR RANGE.BombSmokeColor

Color id used for smoking bomb targets.

#number RANGE.BombtrackThreshold

Bombs/rockets/missiles are only tracked if player-range distance is smaller than this threshold [m]. Default 25000 m.

#string RANGE.ClassName

Name of the Class.

#number RANGE.Coalition

Coalition side for the menu, if any.

#boolean RANGE.Debug

If true, debug info is sent as messages on the screen.

#table RANGE.MenuAddedTo

Table for monitoring which players already got an F10 menu.

#table RANGE.MenuF10

Main radio menu on group level.

#table RANGE.MenuF10Root

Main radio menu on mission level.

#table RANGE.Names

Global list of all defined range names.

#table RANGE.PlayerSettings

Individual player settings.

Utilities.Utils#SMOKECOLOR RANGE.StrafePitSmokeColor

Color id used to smoke strafe pit approach boxes.

Utilities.Utils#SMOKECOLOR RANGE.StrafeSmokeColor

Color id used to smoke strafe targets.

#number RANGE.TdelaySmoke

Time delay in seconds between impact of bomb and starting the smoke. Default 3 seconds.

#number RANGE.Tmsg

Time [sec] messages to players are displayed. Default 30 sec.

#boolean RANGE.autosave

If true, automatically save results every X seconds.

#table RANGE.bombPlayerResults

Table containing the bombing results of each player.

#table RANGE.bombingTargets

Table of targets to bomb.

Sound.SRS#MSRS RANGE.controlmsrs

SRS wrapper for range controller.

Sound.SRS#MSRSQUEUE RANGE.controlsrsQ

SRS queue for range controller.

#boolean RANGE.defaultsmokebomb

If true, initialize player settings to smoke bomb.

#number RANGE.dtBombtrack

Time step [sec] used for tracking released bomb/rocket positions. Default 0.005 seconds.

#boolean RANGE.examinerexclusive

If true, only the examiner gets messages. If false, clients and examiner get messages.

#string RANGE.examinergroupname

Name of the examiner group which should get all messages.

#number RANGE.illuminationmaxalt

Maximum altitude in meters AGL at which illumination bombs are fired. Default is 1000 m.

#number RANGE.illuminationminalt

Minimum altitude in meters AGL at which illumination bombs are fired. Default is 500 m.

Sound.SRS#MSRS RANGE.instructmsrs

SRS wrapper for range instructor.

#number RANGE.instructorfreq

Frequency on which the range control transmitts.

#string RANGE.instructorrelayname

Name of relay unit.

Sound.SRS#MSRSQUEUE RANGE.instructsrsQ

SRS queue for range instructor.

#string RANGE.lid

String id of range for output in DCS log.

Core.Point#COORDINATE RANGE.location

Coordinate of the range location.

Core.Menu#MENU_MISSION RANGE.menuF10root

Specific user defined root F10 menu.

#boolean RANGE.messages

Globally enable/disable all messages to players.

#number RANGE.nbombtargets

Number of bombing targets.

#number RANGE.ndisplayresult

Number of (player) results that a displayed. Default is 10.

#number RANGE.nstrafetargets

Number of strafing targets.

#table RANGE.planes

Table for administration.

Sound.RadioQueue#RADIOQUEUE RANGE.rangecontrol

Range control radio queue.

#number RANGE.rangecontrolfreq

Frequency on which the range control transmitts.

#string RANGE.rangecontrolrelayname

Name of relay unit.

#string RANGE.rangename

Name of the range.

#number RANGE.rangeradius

Radius of range defining its total size for e.g. smoking bomb impact points and sending radio messages. Default 5 km.

Core.Zone#ZONE RANGE.rangezone

MOOSE zone object of the range. For example, no bomb impacts are smoked if bombs fall outside of the range zone.

#number RANGE.scorebombdistance

Distance from closest target up to which bomb hits are counted. Default 1000 m.

#string RANGE.soundpath

Path inside miz file where the sound files are located. Default is "Range Soundfiles/".

#table RANGE.strafePlayerResults

Table containing the strafing results of each player.

#table RANGE.strafeStatus

Table containing the current strafing target a player as assigned to.

#table RANGE.strafeTargets

Table of strafing targets.

#number RANGE.strafemaxalt

Maximum altitude in meters AGL for registering for a strafe run. Default is 914 m = 3000 ft.

#string RANGE.targetpath

Path where to save the target sheets.

#string RANGE.targetprefix

File prefix for target sheet files.

#boolean RANGE.targetsheet

If true, players can save their target sheets. Rangeboss will not work if targetsheets do not save.

#boolean RANGE.trackbombs

If true (default), all bomb types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.trackmissiles

If true (default), all missile types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.trackrockets

If true (default), all rocket types are tracked and impact point to closest bombing target is evaluated.

#boolean RANGE.useSRS
#boolean RANGE.verbose

Verbosity level. Higher means more output to DCS log file.

#string RANGE.version

Range script version.

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

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

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

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

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

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

Defined in:

Parameter:

The EventData structure.

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

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

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

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

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

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

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

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

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

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

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

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Bomb target result.

Field(s)

#string RANGE.BombResult.airframe

Aircraft type of player.

#number RANGE.BombResult.attackAlt

Attack altitude in feet.

#number RANGE.BombResult.attackHdg

Attack heading in degrees.

#number RANGE.BombResult.attackVel

Attack velocity in knots.

#string RANGE.BombResult.clock

Time of the run.

#string RANGE.BombResult.date

OS date.

#number RANGE.BombResult.distance

Distance in meters.

#string RANGE.BombResult.name

Name of closest target.

#string RANGE.BombResult.player

Player name.

#string RANGE.BombResult.quality

Hit quality.

#number RANGE.BombResult.radial

Radial in degrees.

#string RANGE.BombResult.rangename

Name of the range.

#number RANGE.BombResult.roundsFired

Rangeboss Edit

#number RANGE.BombResult.roundsHit

Rangeboss Edit

#string RANGE.BombResult.roundsQuality

Rangeboss Edit

#number RANGE.BombResult.time

Time via timer.getAbsTime() in seconds of impact.

#string RANGE.BombResult.weapon

Name of the weapon.

Function(s)

Bomb target data.

Field(s)

#number RANGE.BombTarget.goodhitrange

Range in meters for a good hit.

#boolean RANGE.BombTarget.move

If true, unit move randomly.

#string RANGE.BombTarget.name

Name of unit.

#number RANGE.BombTarget.speed

Speed of unit.

Function(s)

Player settings.

Field(s)

#string RANGE.PlayerData.airframe

Aircraft type name.

#number RANGE.PlayerData.flarecolor

Color of flares.

#boolean RANGE.PlayerData.flaredirecthits

Flare when player directly hits a target.

#boolean RANGE.PlayerData.inzone

If true, player is inside the range zone.

#boolean RANGE.PlayerData.messages

Display info messages.

#string RANGE.PlayerData.playername

Name of player.

#boolean RANGE.PlayerData.smokebombimpact

Smoke bomb impact points.

#number RANGE.PlayerData.smokecolor

Color of smoke.

#boolean RANGE.PlayerData.targeton

Target on.

#string RANGE.PlayerData.unitname

Name of player aircraft unit.

Function(s)

Sound files.

Field(s)

Function(s)

Sound file data.

Field(s)

#number RANGE.Soundfile.duration

Duration in seconds.

#string RANGE.Soundfile.filename

Name of the file

Function(s)

Strafe result.

Field(s)

#string RANGE.StrafeResult.airframe

Aircraft type of player.

#string RANGE.StrafeResult.clock

Time of the run.

#string RANGE.StrafeResult.date

OS date.

#boolean RANGE.StrafeResult.invalid

Invalid pass.

#string RANGE.StrafeResult.name

Name of the target pit.

#string RANGE.StrafeResult.player

Player name.

#string RANGE.StrafeResult.rangename

Name of the range.

#number RANGE.StrafeResult.roundsFired

Number of rounds fired.

#number RANGE.StrafeResult.roundsHit

Number of rounds that hit the target.

#number RANGE.StrafeResult.strafeAccuracy

Accuracy of the run in percent.

#number RANGE.StrafeResult.time

Time via timer.getAbsTime() in seconds of impact.

Function(s)

Strafe status for player.

Field(s)

#number RANGE.StrafeStatus.ammo

Amount of ammo.

#number RANGE.StrafeStatus.hits

Number of hits on target.

#boolean RANGE.StrafeStatus.pastfoulline

If true, player passed foul line. Invalid pass.

#number RANGE.StrafeStatus.time

Number of times.

Function(s)

Strafe target data.

Field(s)

#number RANGE.StrafeTarget.foulline

Foul line

#number RANGE.StrafeTarget.goodPass

Number of hits for a good pass.

#number RANGE.StrafeTarget.heading

Heading of pit.

#string RANGE.StrafeTarget.name

Name of the unit.

#number RANGE.StrafeTarget.smokepoints

Number of smoke points.

#table RANGE.StrafeTarget.targets

Table of target units.

Function(s)

Target type, i.e.

unit, static, or coordinate.

Field(s)

#string RANGE.TargetType.COORD

Target is a coordinate.

#string RANGE.TargetType.SCENERY

Target is a scenery object.

#string RANGE.TargetType.STATIC

Target is a static object.

#string RANGE.TargetType.UNIT

Target is a unitobject.

Function(s)