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


Global(s)

Global RANGE

#table RANGE

LuaFormatter on

Type(s)

Fields and Methods inherited from RANGE Description

RANGE.BombSmokeColor

RANGE.BombtrackThreshold

RANGE.Debug

RANGE:EnterRange(player)

Triggers the FSM event "EnterRange".

RANGE:ExitRange(player)

Triggers the FSM event "ExitRange".

RANGE:Impact(result, player)

Triggers the FSM event "Impact".

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:Start()

Triggers the FSM event "Start".

RANGE:Status()

Triggers the FSM event "Status".

RANGE.StrafePitSmokeColor

RANGE.StrafeSmokeColor

RANGE.TdelaySmoke

RANGE.Tmsg

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.autosave

RANGE.bombPlayerResults

RANGE.defaultsmokebomb

RANGE.dtBombtrack

RANGE.examinerexclusive

RANGE.examinergroupname

RANGE.id

RANGE.instructor

RANGE.instructorfreq

RANGE.instructorrelayname

RANGE.location

RANGE.messages

RANGE.nbombtargets

RANGE.ndisplayresult

RANGE.nstrafetargets

RANGE.rangecontrol

RANGE.rangecontrolfreq

RANGE.rangecontrolrelayname

RANGE.rangename

RANGE.rangeradius

RANGE.rangezone

RANGE.scorebombdistance

RANGE.smokebombimpact

RANGE.soundpath

RANGE.strafemaxalt

RANGE.timerCheckZone

RANGE.trackbombs

RANGE.trackmissiles

RANGE.trackrockets

Fields and Methods inherited from RANGE.BombResult Description

RANGE.BombResult.airframe

Aircraft type of player.

RANGE.BombResult.date

OS date.

RANGE.BombResult.distance

Distance in meters.

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.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.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.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.STATIC

Target is a static.

RANGE.TargetType.UNIT

Target is a unit.

Field(s)

#boolean RANGE.Debug
#boolean RANGE.autosave
#table RANGE.bombPlayerResults

Init player scores table.

RANGE.id

Log id.

RANGE.instructor

Radio queue.

#boolean RANGE.messages
RANGE.rangecontrol

Radio queue.

RANGE.timerCheckZone

SCHEDULER:New(nil, self._CheckInZone, {self, EventData.IniUnitName}, 1, 1)

#boolean RANGE.trackbombs

Function(s)

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.

Triggers the FSM event "Impact".

Defined in:

RANGE

Parameters:

Data of bombing run.

Data of player settings etc.

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.

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

Bomb target result.

Field(s)

#string RANGE.BombResult.airframe

Aircraft type of player.

#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.

#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.

#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 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.STATIC

Target is a static.

#string RANGE.TargetType.UNIT

Target is a unit.

Function(s)