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:
- MAR - On the Range - MOOSE - SC by shagrat
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 The Range ConceptThe RANGE class enables a mission designer to easily set up practice ranges in DCS. |
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
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:
- RANGE.SetMaxStrafeAlt() sets the max altitude for valid strafing runs.
- RANGE.SetMessageTimeDuration() sets the duration how long (most) messages are displayed.
- RANGE.SetDisplayedMaxPlayerResults() sets the number of results displayed.
- RANGE.SetRangeRadius() defines the total range area.
- RANGE.SetBombTargetSmokeColor() sets the color used to smoke bombing targets.
- RANGE.SetStrafeTargetSmokeColor() sets the color used to smoke strafe targets.
- RANGE.SetStrafePitSmokeColor() sets the color used to smoke strafe pit approach boxes.
- RANGE.SetSmokeTimeDelay() sets the time delay between smoking bomb/rocket impact points after impact.
- RANGE.TrackBombsON() or RANGE.TrackBombsOFF() can be used to enable/disable tracking and evaluating of all bomb types a player fires.
- RANGE.TrackRocketsON() or RANGE.TrackRocketsOFF() can be used to enable/disable tracking and evaluating of all rocket types a player fires.
- RANGE.TrackMissilesON() or RANGE.TrackMissilesOFF() can be used to enable/disable tracking and evaluating of all missile types a player fires.
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:
- "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
F2 Mark Targets
F3 My Settings
F4 Range Info
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
EnterRange
when a player enters a range zone. See RANGE.OnAfterEnterRangeExitRange
when a player leaves a range zone. See RANGE.OnAfterExitRangeImpact
on impact of a player's weapon on a bombing target. See RANGE.OnAfterImpactRollingIn
when a player rolls in on a strafing target. See RANGE.OnAfterRollingInStrafeResult
when a player finishes a strafing run. See RANGE.OnAfterStrafeResult
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)
Fields and Methods inherited from RANGE | Description |
---|---|
Add a coordinate of a bombing target. |
|
RANGE:AddBombingTargetGroup(group, goodhitrange, randommove) |
Add all units of a group as bombing targets. |
Add a scenery object as bombing target. |
|
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. |
Color id used for smoking bomb targets. |
|
Bombs/rockets/missiles are only tracked if player-range distance is smaller than this threshold [m]. Default 25000 m. |
|
Name of the Class. |
|
Coalition side for the menu, if any. |
|
If true, debug info is sent as messages on the screen. |
|
Disable debug modus. |
|
Enable debug modus. |
|
Triggers the FSM event "EnterRange". |
|
Triggers the FSM event "ExitRange". |
|
Measures the foule line distance between two unit or static objects. |
|
Triggers the FSM event "Impact". |
|
Table for monitoring which players already got an F10 menu. |
|
Main radio menu on group level. |
|
Main radio menu on mission level. |
|
Global list of all defined range names. |
|
RANGE contructor. |
|
On after "EnterRange" event user function. |
|
On after "ExitRange" event user function. |
|
On after "Impact" event user function. |
|
On after "RollingIn" event user function. |
|
On after "StrafeResult" event user function. |
|
Range event handler for event birth. |
|
Range event handler for event hit. |
|
Range event handler for event shot (when a unit releases a rocket or bomb (but not a fast firing gun). |
|
Individual player settings. |
|
Triggers the FSM event "RollingIn". |
|
Switch off auto save player results. |
|
Automatically save player results to disc. |
|
Set smoke color for marking bomb targets. |
|
Set bomb track threshold distance. |
|
Set time interval for tracking bombs. |
|
Set player setting whether bomb impact points are smoked or not. |
|
Set max number of player results that are displayed. |
|
Set FunkMan socket. |
|
Enable instructor radio and set frequency (non-SRS). |
|
Set maximal strafing altitude. |
|
Set the root F10 menu under which the range F10 menu is created. |
|
Set time how long (most) messages are displayed. |
|
Set messages to examiner. |
|
Disable ALL messages to players. |
|
Enable messages to players. |
|
Enable range control and set frequency (non-SRS). |
|
Set range location. |
|
Set range radius. |
|
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. |
Set score bomb distance. |
|
Set time delay between bomb impact and starting to smoke the impact point. |
|
Set the path to the csv file that contains information about the used sound files. |
|
Set sound files folder within miz file. |
|
Set smoke color for marking strafe pit approach boxes. |
|
Set smoke color for marking strafe targets. |
|
Enable saving of player's target sheets and specify an optional directory path. |
|
Triggers the FSM event "Start". |
|
Triggers the FSM event "Status". |
|
Color id used to smoke strafe pit approach boxes. |
|
Triggers the FSM event "StrafeResult". |
|
Color id used to smoke strafe targets. |
|
Time delay in seconds between impact of bomb and starting the smoke. Default 3 seconds. |
|
Time [sec] messages to players are displayed. Default 30 sec. |
|
Disables tracking of all bomb types. |
|
Enables tracking of all bomb types. |
|
Disables tracking of all missile types. |
|
Enables tracking of all missile types. |
|
Disables tracking of all rocket types. |
|
Enables tracking of all rocket types. |
|
Add menu commands for player. |
|
Check if player is inside a strafing zone. |
|
Check status of players. |
|
Checks if a static object with a certain name exists. |
|
Start smoking a coordinate with a delay. |
|
Display bombing target locations to player. |
|
Display best bombing results of top 10 players. |
|
RANGE:_DisplayMessageToGroup(_unit, _text, _time, _clear, display, _togroup) |
Display message to group. |
Display top 10 bombing run results of specific player. |
|
Display top 10 stafing results of a specific player. |
|
Report information like bearing and range from player unit to range. |
|
Report weather conditions at range. |
|
Display top 10 strafing results of all players. |
|
Display pit location and heading to player. |
|
Toggle status of flaring direct hits of range targets. |
|
Get the number of shells a unit currently has. |
|
Get the number of shells a unit currently has. |
|
Returns the unit of a player and the player name. |
|
Get max speed of controllable. |
|
Illuminate targets. |
|
Mark targets on F10 map. |
|
Toggle display messages to player. |
|
RANGE._OnImpact(weapon, self, playerData, attackHdg, attackAlt, attackVel) |
Function called on impact of a tracked weapon. |
Reset player statistics. |
|
Save target sheet. |
|
Toggle status of time delay for smoking bomb impact points |
|
Toggle status of smoking bomb impact points. |
|
Mark bombing targets with smoke. |
|
Mark approach boxes of strafe targets with smoke. |
|
Mark strafing targets with smoke. |
|
Targetsheet saves if player on or off. |
|
Triggers the FSM delayed event "EnterRange". |
|
Triggers the FSM delayed event "ExitRange". |
|
Triggers the FSM delayed event "Impact". |
|
Triggers the FSM event "Start" after a delay. |
|
Triggers the FSM event "Status" after a delay. |
|
Triggers the FSM event "Stop" after a delay. |
|
Sets the flare color used to flare players direct target hits. |
|
Returns a string which consists of the player name. |
|
Sets the flare color used when player makes a direct hit on target. |
|
Sets the smoke color used to smoke players bomb impact points. |
|
Converts a smoke color id to text. |
|
If true, automatically save results every X seconds. |
|
Table containing the bombing results of each player. |
|
Table of targets to bomb. |
|
SRS wrapper for range controller. |
|
SRS queue for range controller. |
|
If true, initialize player settings to smoke bomb. |
|
Time step [sec] used for tracking released bomb/rocket positions. Default 0.005 seconds. |
|
If true, only the examiner gets messages. If false, clients and examiner get messages. |
|
Name of the examiner group which should get all messages. |
|
Maximum altitude in meters AGL at which illumination bombs are fired. Default is 1000 m. |
|
Minimum altitude in meters AGL at which illumination bombs are fired. Default is 500 m. |
|
SRS wrapper for range instructor. |
|
Instructor radio queue. |
|
Frequency on which the range control transmitts. |
|
Name of relay unit. |
|
SRS queue for range instructor. |
|
String id of range for output in DCS log. |
|
Coordinate of the range location. |
|
Specific user defined root F10 menu. |
|
Globally enable/disable all messages to players. |
|
Number of bombing targets. |
|
Number of (player) results that a displayed. Default is 10. |
|
Number of strafing targets. |
|
Function called after player enters the range zone. |
|
Function called after player leaves the range zone. |
|
Function called after bomb impact on range. |
|
On after "Load" event. |
|
Function called after save. |
|
Initializes number of targets and location of the range. |
|
Check spawn queue and spawn aircraft if necessary. |
|
Function called after strafing run. |
|
Function called before save event. |
|
Function called before save event. |
|
Table for administration. |
|
Range control radio queue. |
|
Frequency on which the range control transmitts. |
|
Name of relay unit. |
|
Name of the range. |
|
Radius of range defining its total size for e.g. smoking bomb impact points and sending radio messages. Default 5 km. |
|
MOOSE zone object of the range. For example, no bomb impacts are smoked if bombs fall outside of the range zone. |
|
Distance from closest target up to which bomb hits are counted. Default 1000 m. |
|
Path inside miz file where the sound files are located. Default is "Range Soundfiles/". |
|
Table containing the strafing results of each player. |
|
Table containing the current strafing target a player as assigned to. |
|
Table of strafing targets. |
|
Maximum altitude in meters AGL for registering for a strafe run. Default is 914 m = 3000 ft. |
|
Path where to save the target sheets. |
|
File prefix for target sheet files. |
|
If true, players can save their target sheets. Rangeboss will not work if targetsheets do not save. |
|
If true (default), all bomb types are tracked and impact point to closest bombing target is evaluated. |
|
If true (default), all missile types are tracked and impact point to closest bombing target is evaluated. |
|
If true (default), all rocket types are tracked and impact point to closest bombing target is evaluated. |
|
Verbosity level. Higher means more output to DCS log file. |
|
Range script version. |
Fields and Methods inherited from FSM | Description |
---|---|
Adds an End state. |
|
Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task. |
|
Adds a score for the FSM to be achieved. |
|
Adds a score for the FSM_PROCESS to be achieved. |
|
Add a new transition rule to the FSM. |
|
Get current state. |
|
Returns the End states. |
|
Returns a table of the SubFSM rules defined within the FSM. |
|
Returns a table with the scores defined. |
|
Returns the start state of the FSM. |
|
Get current state. |
|
Returns a table with the Subs defined. |
|
Returns a table of the transition rules defined within the FSM. |
|
Check if FSM is in state. |
|
Load call backs. |
|
Creates a new FSM object. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
Call handler. |
|
Create transition. |
|
Delayed transition. |
|
Event map. |
|
Go sub. |
|
Handler. |
|
Is end state. |
|
Sub maps. |
|
Check if can do an event. |
|
Check if cannot do an event. |
|
Check if FSM is in state. |
|
Fields and Methods inherited from RANGE.BombResult | Description |
---|---|
Aircraft type of player. |
|
Attack altitude in feet. |
|
Attack heading in degrees. |
|
Attack velocity in knots. |
|
Time of the run. |
|
OS date. |
|
Distance in meters. |
|
Name of closest target. |
|
Player name. |
|
Hit quality. |
|
Radial in degrees. |
|
Name of the range. |
|
Time via timer.getAbsTime() in seconds of impact. |
|
Name of the weapon. |
Fields and Methods inherited from RANGE.BombTarget | Description |
---|---|
Coordinate of the target. |
|
Range in meters for a good hit. |
|
If true, unit move randomly. |
|
Name of unit. |
|
Speed of unit. |
|
Target unit. |
|
Type of target. |
Fields and Methods inherited from RANGE.Defaults | Description |
---|---|
Fields and Methods inherited from RANGE.PlayerData | Description |
---|---|
Aircraft type name. |
|
Client object of player. |
|
Color of flares. |
|
Flare when player directly hits a target. |
|
If true, player is inside the range zone. |
|
Display info messages. |
|
Name of player. |
|
Smoke bomb impact points. |
|
Color of smoke. |
|
Target on. |
|
Player unit. |
|
Name of player aircraft unit. |
Fields and Methods inherited from RANGE.Sound | Description |
---|---|
Fields and Methods inherited from RANGE.Soundfile | Description |
---|---|
Duration in seconds. |
|
Name of the file |
Fields and Methods inherited from RANGE.StrafeResult | Description |
---|---|
Aircraft type of player. |
|
Time of the run. |
|
OS date. |
|
Invalid pass. |
|
Name of the target pit. |
|
Player name. |
|
Name of the range. |
|
Number of rounds fired. |
|
Number of rounds that hit the target. |
|
Accuracy of the run in percent. |
|
Time via timer.getAbsTime() in seconds of impact. |
Fields and Methods inherited from RANGE.StrafeStatus | Description |
---|---|
Amount of ammo. |
|
Number of hits on target. |
|
If |
|
Number of times. |
|
Strafe target. |
Fields and Methods inherited from RANGE.StrafeTarget | Description |
---|---|
Center coordinate of the pit. |
|
Foul line |
|
Number of hits for a good pass. |
|
Heading of pit. |
|
Name of the unit. |
|
Polygon zone. |
|
Number of smoke points. |
|
Table of target units. |
Fields and Methods inherited from RANGE.TargetType | Description |
---|---|
Target is a coordinate. |
|
Target is a scenery object. |
|
Target is a static object. |
|
Target is a unitobject. |
RANGE class
Field(s)
Bombs/rockets/missiles are only tracked if player-range distance is smaller than this threshold [m]. Default 25000 m.
Name of the Class.
Coalition side for the menu, if any.
If true, debug info is sent as messages on the screen.
Table for monitoring which players already got an F10 menu.
Main radio menu on group level.
Main radio menu on mission level.
Global list of all defined range names.
Individual player settings.
Color id used to smoke strafe pit approach boxes.
Time delay in seconds between impact of bomb and starting the smoke. Default 3 seconds.
Time [sec] messages to players are displayed. Default 30 sec.
If true, automatically save results every X seconds.
Table containing the bombing results of each player.
Table of targets to bomb.
If true, initialize player settings to smoke bomb.
Time step [sec] used for tracking released bomb/rocket positions. Default 0.005 seconds.
If true, only the examiner gets messages. If false, clients and examiner get messages.
Name of the examiner group which should get all messages.
Maximum altitude in meters AGL at which illumination bombs are fired. Default is 1000 m.
Minimum altitude in meters AGL at which illumination bombs are fired. Default is 500 m.
Frequency on which the range control transmitts.
Name of relay unit.
String id of range for output in DCS log.
Globally enable/disable all messages to players.
Number of bombing targets.
Number of (player) results that a displayed. Default is 10.
Number of strafing targets.
Table for administration.
Frequency on which the range control transmitts.
Name of relay unit.
Name of the range.
Radius of range defining its total size for e.g. smoking bomb impact points and sending radio messages. Default 5 km.
MOOSE zone object of the range. For example, no bomb impacts are smoked if bombs fall outside of the range zone.
Distance from closest target up to which bomb hits are counted. Default 1000 m.
Path inside miz file where the sound files are located. Default is "Range Soundfiles/".
Table containing the strafing results of each player.
Table containing the current strafing target a player as assigned to.
Table of strafing targets.
Maximum altitude in meters AGL for registering for a strafe run. Default is 914 m = 3000 ft.
Path where to save the target sheets.
File prefix for target sheet files.
If true, players can save their target sheets. Rangeboss will not work if targetsheets do not save.
If true (default), all bomb types are tracked and impact point to closest bombing target is evaluated.
If true (default), all missile types are tracked and impact point to closest bombing target is evaluated.
If true (default), all rocket types are tracked and impact point to closest bombing target is evaluated.
Verbosity level. Higher means more output to DCS log file.
Range script version.
Function(s)
Add a coordinate of a bombing target.
This
Defined in:
RANGE
Parameters:
Core.Point#COORDINATE coord
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:
Wrapper.Group#GROUP group
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:
Wrapper.Scenery#SCENERY scenery
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:
Wrapper.Group#GROUP group
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
Triggers the FSM event "EnterRange".
Triggers the FSM event "ExitRange".
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:
#RANGE.BombResult result
Data of bombing run.
#RANGE.PlayerData player
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.
#RANGE.PlayerData player
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.
#RANGE.PlayerData player
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.
#RANGE.BombResult result
Data of the bombing run.
#RANGE.PlayerData player
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.
#RANGE.PlayerData player
Data of player settings etc.
#RANGE.StrafeTarget target
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.
#RANGE.PlayerData player
Data of player settings etc.
#RANGE.StrafeResult result
Data of the strafing run.
Range event handler for event birth.
Range event handler for event hit.
Range event handler for event shot (when a unit releases a rocket or bomb (but not a fast firing gun).
Triggers the FSM event "RollingIn".
Defined in:
RANGE
Parameters:
#RANGE.PlayerData player
Data of player settings etc.
#RANGE.StrafeTarget target
Strafe target.
Switch off auto save player results.
Automatically save player results to disc.
Set smoke color for marking bomb targets.
By default bomb targets are marked by red smoke.
Defined in:
RANGE
Parameter:
Utilities.Utils#SMOKECOLOR colorid
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.
Enable messages to players.
This is the default
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:
Core.Point#COORDINATE coordinate
Coordinate of the range.
Return value:
self
Set range radius.
Defines the area in which e.g. bomb impacts are smoked.
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:
Core.Zone#ZONE zone
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:
Utilities.Utils#SMOKECOLOR colorid
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:
Utilities.Utils#SMOKECOLOR colorid
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 "StrafeResult".
Defined in:
RANGE
Parameters:
#RANGE.PlayerData player
Data of player settings etc.
#RANGE.StrafeResult result
Data of the strafing run.
Disables tracking of all bomb types.
Enables tracking of all bomb types.
Note that this is the default setting.
Disables tracking of all missile types.
Enables tracking of all missile types.
Note that this is the default setting.
Disables tracking of all rocket types.
Enables tracking of all rocket types.
Note that this is the default setting.
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:
Wrapper.Unit#UNIT _unit
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:
#RANGE.BombTarget target
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:
Wrapper.Controllable#CONTROLLABLE controllable
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:
Wrapper.Weapon#WEAPON weapon
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.
#RANGE.StrafeResult result
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.
#RANGE.PlayerData player
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.
#RANGE.PlayerData player
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.
#RANGE.BombResult result
Data of the bombing run.
#RANGE.PlayerData player
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.
#RANGE.PlayerData player
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.
#RANGE.PlayerData player
Player data.
Function called after bomb impact on range.
Defined in:
RANGE
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#RANGE.BombResult result
Result of bomb impact.
#RANGE.PlayerData player
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.
#RANGE.PlayerData player
Player data table.
#RANGE.StrafeResult result
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)
Bombs/rockets/missiles are only tracked if player-range distance is smaller than this threshold [m]. Default 25000 m.
Name of the Class.
Coalition side for the menu, if any.
If true, debug info is sent as messages on the screen.
Table for monitoring which players already got an F10 menu.
Main radio menu on group level.
Main radio menu on mission level.
Global list of all defined range names.
Individual player settings.
Color id used to smoke strafe pit approach boxes.
Time delay in seconds between impact of bomb and starting the smoke. Default 3 seconds.
Time [sec] messages to players are displayed. Default 30 sec.
If true, automatically save results every X seconds.
Table containing the bombing results of each player.
Table of targets to bomb.
If true, initialize player settings to smoke bomb.
Time step [sec] used for tracking released bomb/rocket positions. Default 0.005 seconds.
If true, only the examiner gets messages. If false, clients and examiner get messages.
Name of the examiner group which should get all messages.
Maximum altitude in meters AGL at which illumination bombs are fired. Default is 1000 m.
Minimum altitude in meters AGL at which illumination bombs are fired. Default is 500 m.
Frequency on which the range control transmitts.
Name of relay unit.
String id of range for output in DCS log.
Globally enable/disable all messages to players.
Number of bombing targets.
Number of (player) results that a displayed. Default is 10.
Number of strafing targets.
Table for administration.
Frequency on which the range control transmitts.
Name of relay unit.
Name of the range.
Radius of range defining its total size for e.g. smoking bomb impact points and sending radio messages. Default 5 km.
MOOSE zone object of the range. For example, no bomb impacts are smoked if bombs fall outside of the range zone.
Distance from closest target up to which bomb hits are counted. Default 1000 m.
Path inside miz file where the sound files are located. Default is "Range Soundfiles/".
Table containing the strafing results of each player.
Table containing the current strafing target a player as assigned to.
Table of strafing targets.
Maximum altitude in meters AGL for registering for a strafe run. Default is 914 m = 3000 ft.
Path where to save the target sheets.
File prefix for target sheet files.
If true, players can save their target sheets. Rangeboss will not work if targetsheets do not save.
If true (default), all bomb types are tracked and impact point to closest bombing target is evaluated.
If true (default), all missile types are tracked and impact point to closest bombing target is evaluated.
If true (default), all rocket types are tracked and impact point to closest bombing target is evaluated.
Verbosity level. Higher means more output to DCS log file.
Range script version.
Function(s)
Adds an End state.
Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.
Defined in:
Parameters:
#table From
Can contain a string indicating the From state or a table of strings containing multiple From states.
#string Event
The Event name.
Core.Fsm#FSM_PROCESS Process
An sub-process FSM.
#table ReturnEvents
A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.
Return value:
The SubFSM.
Adds a score for the FSM to be achieved.
Defined in:
Parameters:
#string State
is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).
#string ScoreText
is a text describing the score that is given according the status.
#number Score
is a number providing the score of the status.
Return value:
#FSM:
self
Adds a score for the FSM_PROCESS to be achieved.
Defined in:
Parameters:
#string From
is the From State of the main process.
#string Event
is the Event of the main process.
#string State
is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).
#string ScoreText
is a text describing the score that is given according the status.
#number Score
is a number providing the score of the status.
Return value:
#FSM:
self
Add a new transition rule to the FSM.
A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.
Defined in:
Parameters:
#table From
Can contain a string indicating the From state or a table of strings containing multiple From states.
#string Event
The Event name.
#string To
The To state.
Get current state.
Returns the End states.
Returns a table of the SubFSM rules defined within the FSM.
Returns a table with the scores defined.
Returns the start state of the FSM.
Get current state.
Returns a table with the Subs defined.
Returns a table of the transition rules defined within the FSM.
Check if FSM is in state.
Defined in:
Parameter:
#string State
State name.
Return value:
#boolean:
If true, FSM is in this state.
Load call backs.
Sets the start state of the FSM.
Add to map.
Call handler.
Defined in:
Parameters:
#string step
Step "onafter", "onbefore", "onenter", "onleave".
#string trigger
Trigger.
#table params
Parameters.
#string EventName
Event name.
Return value:
Value.
Create transition.
Defined in:
Parameter:
#string EventName
Event name.
Return value:
#function:
Function.
Delayed transition.
Defined in:
Parameter:
#string EventName
Event name.
Return value:
#function:
Function.
Event map.
Go sub.
Defined in:
Parameters:
#string ParentFrom
Parent from state.
#string ParentEvent
Parent event name.
Return value:
#table:
Subs.
Handler.
Is end state.
Defined in:
Parameter:
#string Current
Current state name.
Return values:
#table:
FSM parent.
#string:
Event name.
Sub maps.
Check if can do an event.
Defined in:
Parameter:
#string e
Event name.
Return values:
#boolean:
If true, FSM can do the event.
#string:
To state.
Check if cannot do an event.
Defined in:
Parameter:
#string e
Event name.
Return value:
#boolean:
If true, FSM cannot do the event.
Check if FSM is in state.
Defined in:
Parameters:
#string State
State name.
state
Return value:
#boolean:
If true, FSM is in this state.
Bomb target result.
Field(s)
Aircraft type of player.
Attack altitude in feet.
Attack heading in degrees.
Attack velocity in knots.
Time of the run.
OS date.
Distance in meters.
Name of closest target.
Player name.
Hit quality.
Radial in degrees.
Name of the range.
Rangeboss Edit
Rangeboss Edit
Rangeboss Edit
Time via timer.getAbsTime() in seconds of impact.
Name of the weapon.
Function(s)
Bomb target data.
Field(s)
Range in meters for a good hit.
If true, unit move randomly.
Name of unit.
Speed of unit.
Function(s)
Default range parameters.
Field(s)
Function(s)
Player settings.
Field(s)
Aircraft type name.
Color of flares.
Flare when player directly hits a target.
If true, player is inside the range zone.
Display info messages.
Name of player.
Smoke bomb impact points.
Color of smoke.
Target on.
Name of player aircraft unit.
Function(s)
Sound files.
Field(s)
Function(s)
Sound file data.
Field(s)
Duration in seconds.
Name of the file
Function(s)
Strafe result.
Field(s)
Aircraft type of player.
Time of the run.
OS date.
Invalid pass.
Name of the target pit.
Player name.
Name of the range.
Number of rounds fired.
Number of rounds that hit the target.
Accuracy of the run in percent.
Time via timer.getAbsTime() in seconds of impact.
Function(s)
Strafe status for player.
Field(s)
Amount of ammo.
Number of hits on target.
If true
, player passed foul line. Invalid pass.
Number of times.
Function(s)
Strafe target data.
Field(s)
Foul line
Number of hits for a good pass.
Heading of pit.
Name of the unit.
Number of smoke points.
Table of target units.
Function(s)
Target type, i.e.
unit, static, or coordinate.
Field(s)
Target is a coordinate.
Target is a scenery object.
Target is a static object.
Target is a unitobject.