Banner Image

Module Functional.Artillery

Functional - Control artillery units.


The ARTY class can be used to easily assign and manage targets for artillery units using an advanced queueing system.

Features:

  • Multiple targets can be assigned. No restriction on number of targets.
  • Targets can be given a priority. Engagement of targets is executed a according to their priority.
  • Engagements can be scheduled, i.e. will be executed at a certain time of the day.
  • Multiple relocations of the group can be assigned and scheduled via queueing system.
  • Special weapon types can be selected for each attack, e.g. cruise missiles for Naval units.
  • Automatic rearming once the artillery is out of ammo (optional).
  • Automatic relocation after each firing engagement to prevent counter strikes (optional).
  • Automatic relocation movements to get the battery within firing range (optional).
  • Simulation of tactical nuclear shells as well as illumination and smoke shells.
  • New targets can be added during the mission, e.g. when they are detected by recon units.
  • Targets and relocations can be assigned by placing markers on the F10 map.
  • Finite state machine implementation. Mission designer can interact when certain events occur.

MOOSE YouTube Channel


Author: funkyfranky

Contributions: FlightControl


Global(s)

Global ARTY

Enables mission designers easily to assign targets for artillery units.

#ARTY ARTY

Enables mission designers easily to assign targets for artillery units.

Since the implementation is based on a Finite State Model (FSM), the mission designer can interact with the process at certain events or states.

A new ARTY object can be created with the ARTY.New(group) constructor. The parameter group has to be a MOOSE Group object and defines ARTY group.

The ARTY FSM process can be started by the ARTY.Start() command.

The ARTY Process

Process

Blue Branch

After the FMS process is started the ARTY group will be in the state CombatReady. Once a target is assigned the OpenFire event will be triggered and the group starts firing. At this point the group in in the state Firing. When the defined number of shots has been fired on the current target the event CeaseFire is triggered. The group will stop firing and go back to the state CombatReady. If another target is defined (or multiple engagements of the same target), the cycle starts anew.

Violet Branch

When the ARTY group runs out of ammunition, the event Winchester is triggered and the group enters the state OutOfAmmo. In this state, the group is unable to engage further targets.

Red Branch

With the ARTY.SetRearmingGroup(group) command, a special group can be defined to rearm the ARTY group. If this unit has been assigned and the group has entered the state OutOfAmmo the event Rearm is triggered followed by a transition to the state Rearming. If the rearming group is less than 100 meters away from the ARTY group, the rearming process starts. If the rearming group is more than 100 meters away from the ARTY unit, the rearming group is routed to a point 20 to 100 m from the ARTY group.

Once the rearming is complete, the Rearmed event is triggered and the group enters the state CombatReady. At this point targeted can be engaged again.

Green Branch

The ARTY group can be ordered to change its position via the ARTY.AssignMoveCoord() function as described below. When the group receives the command to move the event Move is triggered and the state changes to Moving. When the unit arrives to its destination the event Arrived is triggered and the group becomes CombatReady again.

Note, that the ARTY group will not open fire while it is in state Moving. This property differentiates artillery from tanks.

Yellow Branch

When a new target is assigned via the ARTY.AssignTargetCoord() function (see below), the NewTarget event is triggered.

Assigning Targets

Assigning targets is a central point of the ARTY class. Multiple targets can be assigned simultaneously and are put into a queue. Of course, targets can be added at any time during the mission. For example, once they are detected by a reconnaissance unit.

In order to add a target, the function ARTY.AssignTargetCoord(coord, prio, radius, nshells, maxengage, time, weapontype, name) has to be used. Only the first parameter coord is mandatory while all remaining parameters are all optional.

Parameters:

  • coord: Coordinates of the target, given as Core.Point#COORDINATE object.
  • prio: Priority of the target. This a number between 1 (high prio) and 100 (low prio). Targets with higher priority are engaged before targets with lower priority.
  • radius: Radius in meters which defines the area the ARTY group will attempt to be hitting. Default is 100 meters.
  • nshells: Number of shots (shells, rockets, missiles) fired by the group at each engagement of a target. Default is 5.
  • maxengage: Number of times a target is engaged.
  • time: Time of day the engagement is schedule in the format "hh:mm:ss" for hh=hours, mm=minutes, ss=seconds. For example "10:15:35". In the case the attack will be executed at a quarter past ten in the morning at the day the mission started. If the engagement should start on the following day the format can be specified as "10:15:35+1", where the +1 denotes the following day. This is useful for longer running missions or if the mission starts at 23:00 hours and the attack should be scheduled at 01:00 hours on the following day. Of course, later days are also possible by appending "+2", "+3", etc. Note that the time has to be given as a string. So the enclosing quotation marks "" are important.
  • weapontype: Specified the weapon type that should be used for this attack if the ARTY group has multiple weapons to engage the target. For example, this is useful for naval units which carry a bigger arsenal (cannons and missiles). Default is Auto, i.e. DCS logic selects the appropriate weapon type. name: A special name can be defined for this target. Default name are the coordinates of the target in LL DMS format. If a name is already given for another target or the same target should be attacked two or more times with different parameters a suffix "#01", "#02", "#03" is automatically appended to the specified name.

Target Queue

In case multiple targets have been defined, it is important to understand how the target queue works.

Here, the essential parameters are the priority prio, the number of engagements maxengage and the scheduled time as described above.

For example, we have assigned two targets one with prio=10 and the other with prio=50 and both targets should be engaged three times (maxengage=3). Let's first consider the case that none of the targets is scheduled to be executed at a certain time (time=nil). The ARTY group will first engage the target with higher priority (prio=10). After the engagement is finished, the target with lower priority is attacked. This is because the target with lower prio has been attacked one time less. After the attack on the lower priority task is finished and both targets have been engaged equally often, the target with the higher priority is engaged again. This continues until a target has engaged three times. Once the maximum number of engagements is reached, the target is deleted from the queue.

In other words, the queue is first sorted with respect to the number of engagements and targets with the same number of engagements are sorted with respect to their priority.

Timed Engagements

As mentioned above, targets can be engaged at a specific time of the day via the time parameter.

If the time parameter is specified for a target, the first engagement of that target will happen at that time of the day and not before. This also applies when multiple engagements are requested via the maxengage parameter. The first attack will not happen before the specified time. When that timed attack is finished, the time parameter is deleted and the remaining engagements are carried out in the same manner as for untimed targets (described above).

Of course, it can happen that a scheduled task should be executed at a time, when another target is already under attack. If the priority of the target is higher than the priority of the current target, then the current attack is cancelled and the engagement of the target with the higher priority is started.

By contrast, if the current target has a higher priority than the target scheduled at that time, the current attack is finished before the scheduled attack is started.

Determining the Amount of Ammo

In order to determine when a unit is out of ammo and possible initiate the rearming process it is necessary to know which types of weapons have to be counted. For most artillery unit types, this is simple because they only have one type of weapon and hence ammunition.

However, there are more complex scenarios. For example, naval units carry a big arsenal of different ammunition types ranging from various cannon shell types over surface-to-air missiles to cruise missiles. Obviously, not all of these ammo types can be employed for artillery tasks.

Unfortunately, there is no easy way to count only those ammo types useable as artillery. Therefore, to keep the implementation general the user can specify the names of the ammo types by the following functions:

  • ARTY.SetShellTypes(tableofnames): Defines the ammo types for unguided cannons, e.g. tableofnames={"weapons.shells"}, i.e. all types of shells are counted.
  • ARTY.SetRocketTypes(tableofnames): Defines the ammo types of unguided rockets, e.g. tableofnames={"weapons.nurs"}, i.e. all types of rockets are counted.
  • ARTY.SetMissileTypes(tableofnames): Defines the ammo types of guided missiles, e.g. is tableofnames={"weapons.missiles"}, i.e. all types of missiles are counted.

Note that the default parameters "weapons.shells", "weapons.nurs", "weapons.missiles" should in priciple capture all the corresponding ammo types. However, the logic searches for the string "weapon.missies" in the ammo type. Especially for missiles, this string is often not contained in the ammo type descriptor.

One way to determine which types of ammo the unit carries, one can use the debug mode of the arty class via ARTY.SetDebugON(). In debug mode, the all ammo types of the group are printed to the monitor as message and can be found in the DCS.log file.

Employing Selected Weapons

If an ARTY group carries multiple weapons, which can be used for artillery task, a certain weapon type can be selected to attack the target. This is done via the weapontype parameter of the ARTY.AssignTargetCoord(..., weapontype, ...) function.

The enumerator ARTY.WeaponType has been defined to select a certain weapon type. Supported values are:

  • ARTY.WeaponType.Auto: Automatic weapon selection by the DCS logic. This is the default setting.
  • ARTY.WeaponType.Cannon: Only cannons are used during the attack. Corresponding ammo type are shells and can be defined by ARTY.SetShellTypes.
  • ARTY.WeaponType.Rockets: Only unguided are used during the attack. Corresponding ammo type are rockets/nurs and can be defined by ARTY.SetRocketTypes.
  • ARTY.WeaponType.CruiseMissile: Only cruise missiles are used during the attack. Corresponding ammo type are missiles and can be defined by ARTY.SetMissileTypes.
  • ARTY.WeaponType.TacticalNukes: Use tactical nuclear shells. This works only with units that have shells and is described below.
  • ARTY.WeaponType.IlluminationShells: Use illumination shells. This works only with units that have shells and is described below.
  • ARTY.WeaponType.SmokeShells: Use smoke shells. This works only with units that have shells and is described below.

Assigning Relocation Movements

The ARTY group can be commanded to move. This is done by the ARTY.AssignMoveCoord(coord, time, speed, onroad, cancel, name) function. With this multiple timed moves of the group can be scheduled easily. By default, these moves will only be executed if the group is state CombatReady.

Parameters

  • coord: Coordinates where the group should move to given as Core.Point#COORDINATE object.
  • time: The time when the move should be executed. This has to be given as a string in the format "hh:mm:ss" (hh=hours, mm=minutes, ss=seconds).
  • speed: Speed of the group in km/h.
  • onroad: If this parameter is set to true, the group uses mainly roads to get to the commanded coordinates.
  • cancel: If set to true, any current engagement of targets is cancelled at the time the move should be executed.
  • name: Can be used to set a user defined name of the move. By default the name is created from the LL DMS coordinates.

Automatic Rearming

If an ARTY group runs out of ammunition, it can be rearmed automatically.

Rearming Group

The first way to activate the automatic rearming is to define a rearming group with the function ARTY.SetRearmingGroup(group). For the blue side, this could be a M181 transport truck and for the red side an Ural-375 truck.

Once the ARTY group is out of ammo and the Rearm event is triggered, the defined rearming truck will drive to the ARTY group. So the rearming truck does not have to be placed nearby the artillery group. When the rearming is complete, the rearming truck will drive back to its original position.

Rearming Place

The second alternative is to define a rearming place, e.g. a FRAP, airport or any other warehouse. This is done with the function ARTY.SetRearmingPlace(coord). The parameter coord specifies the coordinate of the rearming place which should not be further away then 100 meters from the warehouse.

When the Rearm event is triggered, the ARTY group will move to the rearming place. Of course, the group must be mobil. So for a mortar this rearming procedure would not work.

After the rearming is complete, the ARTY group will move back to its original position and resume normal operations.

Rearming Group and Rearming Place

If both a rearming group and a rearming place are specified like described above, both the ARTY group and the rearming truck will move to the rearming place and meet there.

After the rearming is complete, both groups will move back to their original positions.

Simulated Weapons

In addition to the standard weapons a group has available some special weapon types that are not possible to use in the native DCS environment are simulated.

Tactical Nukes

ARTY groups that can fire shells can also be used to fire tactical nukes. This is achieved by setting the weapon type to ARTY.WeaponType.TacticalNukes in the ARTY.AssignTargetCoord() function.

By default, they group does not have any nukes available. To give the group the ability the function ARTY.SetTacNukeShells(n ) can be used. This supplies the group with n nuclear shells, where n is restricted to the number of conventional shells the group can carry. Note that the group must always have conventional shells left in order to fire a nuclear shell.

The default explosion strength is 0.075 kilo tons TNT. The can be changed with the ARTY.SetTacNukeWarhead(strength), where strength is given in kilo tons TNT.

Illumination Shells

ARTY groups that possess shells can fire shells with illumination bombs. First, the group needs to be equipped with this weapon. This is done by the function ARTY.SetIlluminationShells(n , power), where n is the number of shells the group has available and power the illumination power in mega candela (mcd).

In order to execute an engagement with illumination shells one has to use the weapon type ARTY.WeaponType.IlluminationShells in the ARTY.AssignTargetCoord() function.

In the simulation, the explosive shell that is fired is destroyed once it gets close to the target point but before it can actually impact. At this position an illumination bomb is triggered at a random altitude between 500 and 1000 meters. This interval can be set by the function ARTY.SetIlluminationMinMaxAlt(minalt, maxalt).

Smoke Shells

In a similar way to illumination shells, ARTY groups can also employ smoke shells. The number of smoke shells the group has available is set by the function ARTY.SetSmokeShells(n , color), where n is the number of shells and color defines the smoke color. Default is SMOKECOLOR.Red.

The weapon type to be used in the ARTY.AssignTargetCoord() function is ARTY.WeaponType.SmokeShells.

The explosive shell the group fired is destroyed shortly before its impact on the ground and smoke of the specified color is triggered at that position.

Assignments via Markers on F10 Map

Targets and relocations can be assigned by players via placing a mark on the F10 map. The marker text must contain certain keywords.

This feature can be turned on with the ARTY.SetMarkAssignmentsOn(key, readonly). The parameter key is optional. When set, it can be used as PIN, i.e. only players who know the correct key are able to assign and cancel targets or relocations. Default behavior is that all players belonging to the same coalition as the ARTY group are able to assign targets and moves without a key.

Target Assignments

A new target can be assigned by writing arty engage in the marker text. This is followed by a comma separated list of (optional) keywords and parameters. First, it is important to address the ARTY group or groups that should engage. This can be done in numerous ways. The keywords are battery, alias, cluster. It is also possible to address all ARTY groups by the keyword everyone or allbatteries. These two can be used synonymously. Note that, if no battery is assigned nothing will happen.

  • everyone or allbatteries The target is assigned to all batteries.
  • battery Name of the ARTY group that the target is assigned to. Note that the name is case sensitive and has to be given in quotation marks. Default is all ARTY groups of the right coalition.
  • alias Alias of the ARTY group that the target is assigned to. The alias is case sensitive and needs to be in quotation marks.
  • cluster The cluster of ARTY groups that is addressed. Clusters can be defined by the function ARTY.AddToCluster(clusters). Names are case sensitive and need to be in quotation marks.
  • key A number to authorize the target assignment. Only specifying the correct number will trigger an engagement.
  • time Time for which which the engagement is schedules, e.g. 08:42. Default is as soon as possible.
  • prio Priority of the engagement as number between 1 (high prio) and 100 (low prio). Default is 50, i.e. medium priority.
  • shots Number of shots (shells, rockets or missiles) fired at each engagement. Default is 5.
  • maxengage Number of times the target is engaged. Default is 1.
  • radius Scattering radius of the fired shots in meters. Default is 100 m.
  • weapon Type of weapon to be used. Valid parameters are cannon, rocket, missile, nuke. Default is automatic selection.
  • lldms Specify the coordinates in Lat/Long degrees, minutes and seconds format. The actual location of the marker is unimportant here. The group will engage the coordinates given in the lldms keyword. Format is DD:MM:SS[N,S] DD:MM:SS[W,E]. See example below. This can be useful when coordinates in this format are obtained from elsewhere.
  • readonly The marker is readonly and cannot be deleted by users. Hence, assignment cannot be cancelled by removing the marker.

Here are examples of valid marker texts:

 arty engage, battery "Blue Paladin Alpha"
 arty engage, everyone
 arty engage, allbatteries
 arty engage, alias "Bob", weapon missiles
 arty engage, cluster "All Mortas"
 arty engage, cluster "Northern Batteries" "Southern Batteries"
 arty engage, cluster "Northern Batteries", cluster "Southern Batteries"
 arty engage, cluster "Horwitzers", shots 20, prio 10, time 08:15, weapon cannons
 arty engage, battery "Blue Paladin 1" "Blue MRLS 1", shots 10, time 10:15
 arty engage, battery "Blue MRLS 1", key 666
 arty engage, battery "Paladin Alpha", weapon nukes, shots 1, time 20:15
 arty engage, battery "Horwitzer 1", lldms 41:51:00N 41:47:58E

Note that the keywords and parameters are case insensitive. Only exception are the battery, alias and cluster names. These must be exactly the same as the names of the groups defined in the mission editor or the aliases and cluster names defined in the script.

Relocation Assignments

Markers can also be used to relocate the group with the keyphrase arty move. This is done in a similar way as assigning targets. Here, the (optional) keywords and parameters are:

  • time Time for which which the relocation/move is schedules, e.g. 08:42. Default is as soon as possible.
  • speed The speed in km/h the group will drive at. Default is 70% of its max possible speed.
  • on road Group will use mainly roads. Default is off, i.e. it will go in a straight line from its current position to the assigned coordinate.
  • canceltarget Group will cancel all running firing engagements and immediately start to move. Default is that group will wait until is current assignment is over.
  • battery Name of the ARTY group that the relocation is assigned to.
  • alias Alias of the ARTY group that the target is assigned to. The alias is case sensitive and needs to be in quotation marks.
  • cluster The cluster of ARTY groups that is addressed. Clusters can be defined by the function ARTY.AddToCluster(clusters). Names are case sensitive and need to be in quotation marks.
  • key A number to authorize the target assignment. Only specifying the correct number will trigger an engagement.
  • lldms Specify the coordinates in Lat/Long degrees, minutes and seconds format. The actual location of the marker is unimportant. The group will move to the coordinates given in the lldms keyword. Format is DD:MM:SS[N,S] DD:MM:SS[W,E]. See example below.
  • readonly Marker cannot be deleted by users any more. Hence, assignment cannot be cancelled by removing the marker.

Here are some examples:

 arty move, battery "Blue Paladin"
 arty move, battery "Blue MRLS", canceltarget, speed 10, on road
 arty move, cluster "mobile", lldms 41:51:00N 41:47:58E
 arty move, alias "Bob", weapon missiles
 arty move, cluster "All Howitzer"
 arty move, cluster "Northern Batteries" "Southern Batteries"
 arty move, cluster "Northern Batteries", cluster "Southern Batteries"
 arty move, everyone

Requests

Marks can also be to send requests to the ARTY group. This is done by the keyword arty request, which can have the keywords

  • target All assigned targets are reported.
  • move All assigned relocation moves are reported.
  • ammo Current ammunition status is reported.

For example

 arty request, everyone, ammo
 arty request, battery "Paladin Bravo", targets
 arty request, cluster "All Mortars", move

The actual location of the marker is irrelevant for these requests.

Cancel

Current actions can be cancelled by the keyword arty cancel. Actions that can be cancelled are current engagements, relocations and rearming assignments.

For example

 arty cancel, target, battery "Paladin Bravo"
 arty cancel, everyone, move
 arty cancel, rearming, battery "MRLS Charly"

Settings

A few options can be set by marks. The corresponding keyword is arty set. This can be used to define the rearming place and group for a battery.

To set the rearming place of a group at the marker position type

 arty set, battery "Paladin Alpha", rearming place

Setting the rearming group is independent of the position of the mark. Just create one anywhere on the map and type

 arty set, battery "Mortar Bravo", rearming group "Ammo Truck M939"

Note that the name of the rearming group has to be given in quotation marks and spelt exactly as the group name defined in the mission editor.

Transporting

ARTY groups can be transported to another location as Cargo.Cargo by means of classes such as AI.AI_Cargo_APC, AI.AI_Cargo_Dispatcher_APC, AI.AI_Cargo_Helicopter, AI.AI_Cargo_Dispatcher_Helicopter or AI.AI_Cargo_Airplane.

In order to do this, one needs to define an ARTY object via the ARTY.NewFromCargoGroup(cargogroup, alias) function. The first argument cargogroup has to be a Cargo.CargoGroup#CARGO_GROUP object. The second argument alias is a string which can be freely chosen by the user.

Fine Tuning

The mission designer has a few options to tailor the ARTY object according to his needs.

  • ARTY.SetAutoRelocateToFiringRange(maxdist, onroad) lets the ARTY group automatically move to within firing range if a current target is outside the min/max firing range. The optional parameter maxdist is the maximum distance im km the group will move. If the distance is greater no relocation is performed. Default is 50 km.
  • ARTY.SetAutoRelocateAfterEngagement(rmax, rmin) will cause the ARTY group to change its position after each firing assignment. Optional parameters rmax, rmin define the max/min distance for relocation of the group. Default distance is randomly between 300 and 800 m.
  • ARTY.AddToCluster(clusters) Can be used to add the ARTY group to one or more clusters. All groups in a cluster can be addressed simultaniously with one marker command.
  • ARTY.SetSpeed(speed) sets the speed in km/h the group moves at if not explicitly stated otherwise.
  • ARTY.RemoveAllTargets() removes all targets from the target queue.
  • ARTY.RemoveTarget(name) deletes the target with name from the target queue.
  • ARTY.SetMaxFiringRange(range) defines the maximum firing range. Targets further away than this distance are not engaged.
  • ARTY.SetMinFiringRange(range) defines the minimum firing range. Targets closer than this distance are not engaged.
  • ARTY.SetRearmingGroup(group) sets the group responsible for rearming of the ARTY group once it is out of ammo.
  • ARTY.SetReportON() and ARTY.SetReportOFF() can be used to enable/disable status reports of the ARTY group send to all coalition members.
  • ARTY.SetWaitForShotTime(waittime) sets the time after which a target is deleted from the queue if no shooting event occured after the target engagement started. Default is 300 seconds. Note that this can for example happen, when the assigned target is out of range.
  • ARTY.SetDebugON() and ARTY.SetDebugOFF() can be used to enable/disable the debug mode.

Examples

Assigning Multiple Targets

This basic example illustrates how to assign multiple targets and defining a rearming group.

-- Creat a new ARTY object from a Paladin group.
paladin=ARTY:New(GROUP:FindByName("Blue Paladin"))

-- Define a rearming group. This is a Transport M939 truck.
paladin:SetRearmingGroup(GROUP:FindByName("Blue Ammo Truck"))

-- Set the max firing range. A Paladin unit has a range of 20 km.
paladin:SetMaxFiringRange(20)

-- Low priorty (90) target, will be engage last. Target is engaged two times. At each engagement five shots are fired.
paladin:AssignTargetCoord(GROUP:FindByName("Red Targets 3"):GetCoordinate(),  90, nil,  5, 2)
-- Medium priorty (nil=50) target, will be engage second. Target is engaged two times. At each engagement ten shots are fired.
paladin:AssignTargetCoord(GROUP:FindByName("Red Targets 1"):GetCoordinate(), nil, nil, 10, 2)
-- High priorty (10) target, will be engage first. Target is engaged three times. At each engagement twenty shots are fired.
paladin:AssignTargetCoord(GROUP:FindByName("Red Targets 2"):GetCoordinate(),  10, nil, 20, 3)

-- Start ARTY process.
paladin:Start()

Note

  • If a parameter should be set to its default value, it has to be set to nil if other non-default parameters follow. Parameters at the end can simply be skiped.
  • In this example, the target coordinates are taken from groups placed in the mission edit using the COORDINATE:GetCoordinate() function.

Scheduled Engagements

-- Mission starts at 8 o'clock.
-- Assign two scheduled targets.

-- Create ARTY object from Paladin group.
paladin=ARTY:New(GROUP:FindByName("Blue Paladin"))

-- Assign target coordinates. Priority=50 (medium), radius=100 m, use 5 shells per engagement, engage 1 time at two past 8 o'clock.
paladin:AssignTargetCoord(GROUP:FindByName("Red Targets 1"):GetCoordinate(), 50, 100,  5, 1, "08:02:00", ARTY.WeaponType.Auto, "Target 1")

-- Assign target coordinates. Priority=10 (high), radius=300 m, use 10 shells per engagement, engage 1 time at seven past 8 o'clock.
paladin:AssignTargetCoord(GROUP:FindByName("Red Targets 2"):GetCoordinate(), 10, 300, 10, 1, "08:07:00", ARTY.WeaponType.Auto, "Target 2")

-- Start ARTY process.
paladin:Start()

Specific Weapons

This example demonstrates how to use specific weapons during an engagement.

-- Define the Normandy as ARTY object.
normandy=ARTY:New(GROUP:FindByName("Normandy"))

-- Add target: prio=50, radius=300 m, number of missiles=20, number of engagements=1, start time=08:05 hours, only use cruise missiles for this attack.
normandy:AssignTargetCoord(GROUP:FindByName("Red Targets 1"):GetCoordinate(),  20, 300,  50, 1, "08:01:00", ARTY.WeaponType.CruiseMissile)

-- Add target: prio=50, radius=300 m, number of shells=100, number of engagements=1, start time=08:15 hours, only use cannons during this attack.
normandy:AssignTargetCoord(GROUP:FindByName("Red Targets 1"):GetCoordinate(),  50, 300, 100, 1, "08:15:00", ARTY.WeaponType.Cannon)

-- Define shells that are counted to check whether the ship is out of ammo.
-- Note that this is necessary because the Normandy has a lot of other shell type weapons which cannot be used to engage ground targets in an artillery style manner.
normandy:SetShellTypes({"MK45_127"})

-- Define missile types that are counted.
normandy:SetMissileTypes({"BGM"})

-- Start ARTY process.
normandy:Start()

Transportation as Cargo

This example demonstates how an ARTY group can be transported to another location as cargo.

 -- Define a group as CARGO_GROUP
 CargoGroupMortars=CARGO_GROUP:New(GROUP:FindByName("Mortars"), "Mortars", "Mortar Platoon Alpha", 100 , 10)

 -- Define the mortar CARGO GROUP as ARTY object
 mortars=ARTY:NewFromCargoGroup(CargoGroupMortars, "Mortar Platoon Alpha")

 -- Start ARTY process
 mortars:Start()

 -- Setup AI cargo dispatcher for e.g. helos
 SetHeloCarriers = SET_GROUP:New():FilterPrefixes("CH-47D"):FilterStart()
 SetCargoMortars = SET_CARGO:New():FilterTypes("Mortars"):FilterStart()
 SetZoneDepoly   = SET_ZONE:New():FilterPrefixes("Deploy"):FilterStart()
 CargoHelo=AI_CARGO_DISPATCHER_HELICOPTER:New(SetHeloCarriers, SetCargoMortars, SetZoneDepoly)
 CargoHelo:Start()

The ARTY group will be transported and resume its normal operation after it has been deployed. New targets can be assigned at any time also during the transportation process.

Type(s)

Fields and Methods inherited from ARTY Description

ARTY:AddToCluster(clusters)

Add ARTY group to one or more clusters.

ARTY:Arrived()

Tell ARTY group it has arrived at its destination.

ARTY:AssignAttackGroup(group, prio, radius, nshells, maxengage, time, weapontype, name, unique)

Assign a target group to the ARTY group.

ARTY:AssignMoveCoord(coord, time, speed, onroad, cancel, name, unique)

Assign coordinate to where the ARTY group should move.

ARTY:AssignTargetCoord(coord, prio, radius, nshells, maxengage, time, weapontype, name, unique)

Assign target coordinates to the ARTY group.

ARTY:CeaseFire(target)

Order ARTY group to cease firing on a target.

ARTY.ClassName

Name of the class.

ARTY:CombatReady()

Tell ARTY group it is combat ready.

ARTY.Controllable

ARTY.DCSdesc

DCS descriptors of the ARTY group.

ARTY:Dead(unitname)

Function called when a unit of the ARTY group died.

ARTY.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

ARTY.DisplayName

Extended type name of the ARTY group.

ARTY:GetAmmo(display)

Get the number of shells a unit or group currently has.

ARTY.IniGroupStrength

Inital number of units in the ARTY group.

ARTY.InitialCoord

Initial coordinates of the ARTY group.

ARTY.IsArtillery

If true, ARTY group has attribute "Artillery". This is automatically derived from the DCS descriptor table.

ARTY:Move(move)

Order ARTY group to move to another location.

ARTY.Nammo0

Initial amount total ammunition (shells+rockets+missiles) of the whole group.

ARTY.Narty0

Initial amount of artillery shells of the whole group.

ARTY:New(group, alias)

Creates a new ARTY object from a MOOSE group object.

ARTY:NewFromCargoGroup(cargogroup, alias)

Creates a new ARTY object from a MOOSE CARGO_GROUP object.

ARTY:NewMove(move)

Add a new relocation move for the ARTY group.

ARTY:NewTarget(target)

Add a new target for the ARTY group.

ARTY.Nillu

Number of illumination shells the group has available. Note that if normal shells are empty, firing illumination shells is also not possible any more.

ARTY.Nillu0

Initial amount of illumination shells of the whole group. Default is 0.

ARTY.Nmissiles0

Initial amount of missiles of the whole group.

ARTY.Nrockets0

Initial amount of rockets of the whole group.

ARTY.Nshells0

Initial amount of shells of the whole group.

ARTY.Nshots

Number of shots fired on current target.

ARTY.Nsmoke

Number of smoke shells the group has available. Note that if normal shells are empty, firing smoke shells is also not possible any more.

ARTY.Nsmoke0

Initial amount of smoke shells of the whole group. Default is 0.

ARTY.Nukes

Number of nuclear shells, the group has available. Note that if normal shells are empty, firing nukes is also not possible any more.

ARTY.Nukes0

Initial amount of tactical nukes of the whole group. Default is 0.

ARTY:OnAfterArrvied(Controllable, From, Event, To)

User function for OnAfer "Arrived" event.

ARTY:OnAfterCeaseFire(Controllable, From, Event, To, target)

User function for OnAfter "CeaseFire" event.

ARTY:OnAfterDead(Controllable, From, Event, To, Unitname)

User function for OnAfter "Dead" event.

ARTY:OnAfterMove(Controllable, From, Event, To, move)

User function for OnAfer "Move" event.

ARTY:OnAfterNewMove(Controllable, From, Event, To, move)

User function for OnAfer "NewMove" event.

ARTY:OnAfterNewTarget(Controllable, From, Event, To, target)

User function for OnAfter "NewTarget" event.

ARTY:OnAfterOpenFire(Controllable, From, Event, To, target)

User function for OnAfter "OpenFire" event.

ARTY:OnAfterRearm(Controllable, From, Event, To)

User function for OnAfter "Rearm" event.

ARTY:OnAfterRearmed(Controllable, From, Event, To)

User function for OnAfter "Rearmed" event.

ARTY:OnAfterRespawn(Controllable, From, Event, To)

User function for OnAfter "Respawn" event.

ARTY:OnAfterStart(Controllable, From, Event, To)

User function for OnAfter "Start" event.

ARTY:OnAfterStatus(Controllable, From, Event, To)

User function for OnAfter "Status" event.

ARTY:OnAfterWinchester(Controllable, From, Event, To)

User function for OnAfter "Winchester" event.

ARTY:OnEnterCombatReady(Controllable, From, Event, To)

User function for OnEnter "CombatReady" state.

ARTY:OnEnterFiring(Controllable, From, Event, To)

User function for OnEnter "Firing" state.

ARTY:OnEnterMoving(Controllable, From, Event, To)

User function for OnEnter "Moving" state.

ARTY:OnEnterOutOfAmmo(Controllable, From, Event, To)

User function for OnEnter "OutOfAmmo" state.

ARTY:OnEnterRearmed(Controllable, From, Event, To)

User function for OnEnter "Rearmed" state.

ARTY:OnEnterRearming(Controllable, From, Event, To)

User function for OnEnter "Rearming" state.

ARTY:OnEventDead(EventData)

Event handler for event Dead.

ARTY:OnEventShot(EventData)

Eventhandler for shot event.

ARTY:OpenFire(target)

Order ARTY group to open fire on a target.

ARTY.RearmingArtyOnRoad

If true, ARTY group will move to rearming place using mainly roads. Default false.

ARTY.RearmingDistance

Safe distance in meters between ARTY group and rearming group or place at which rearming is possible. Default 100 m.

ARTY.RearmingGroup

Unit designated to rearm the ARTY group.

ARTY.RearmingGroupCoord

Initial coordinates of the rearming unit. After rearming complete, the unit will return to this position.

ARTY.RearmingGroupOnRoad

If true, rearming group will move to ARTY group or rearming place using mainly roads. Default false.

ARTY.RearmingGroupSpeed

Speed in km/h the rearming unit moves at. Default is 50% of the max speed possible of the group.

ARTY.RearmingPlaceCoord

Coordinates of the rearming place. If the place is more than 100 m away from the ARTY group, the group will go there.

ARTY:RemoveAllTargets()

Delete ALL targets from current target list.

ARTY:RemoveMove(name)

Delete a move from move list.

ARTY:RemoveTarget(name)

Delete a target from target list.

ARTY:Respawn()

Respawn ARTY group.

ARTY:SetAlias(alias)

Set alias, i.e.

ARTY:SetAutoRelocateAfterEngagement(rmax, rmin)

Set relocate after firing.

ARTY:SetAutoRelocateToFiringRange(maxdistance, onroad)

Set automatic relocation of ARTY group if a target is assigned which is out of range.

ARTY:SetDebugOFF()

Turn debug mode off.

ARTY:SetDebugON()

Turn debug mode on.

ARTY:SetIlluminationMinMaxAlt(minalt, maxalt)

Set minimum and maximum detotation altitude for illumination shells.

ARTY:SetIlluminationShells(n, power)

Set number of illumination shells available to the group.

ARTY:SetMarkAssignmentsOn(key, readonly)

Enable assigning targets and moves by placing markers on the F10 map.

ARTY:SetMarkTargetsOff()

Disable assigning targets by placing markers on the F10 map.

ARTY:SetMaxFiringRange(range)

Set maximum firing range.

ARTY:SetMinFiringRange(range)

Set minimum firing range.

ARTY:SetMissileTypes(tableofnames)

Define missile types that are counted to determine the ammo amount the ARTY group has.

ARTY:SetRearmingArtyOnRoad(onroad)

Define if ARTY group uses mainly roads to drive to the rearming place.

ARTY:SetRearmingDistance(distance)

Define the safe distance between ARTY group and rearming unit or rearming place at which rearming process is possible.

ARTY:SetRearmingGroup(group)

Assign a group, which is responsible for rearming the ARTY group.

ARTY:SetRearmingGroupOnRoad(onroad)

Define if rearming group uses mainly roads to drive to the ARTY group or rearming place.

ARTY:SetRearmingGroupSpeed(speed)

Set the speed the rearming group moves at towards the ARTY group or the rearming place.

ARTY:SetRearmingPlace(coord)

Defines the rearming place of the ARTY group.

ARTY:SetReportOFF()

Report messages of ARTY group turned off.

ARTY:SetReportON()

Report messages of ARTY group turned on.

ARTY:SetRespawnOnDeath(delay)

Respawn group once all units are dead.

ARTY:SetRocketTypes(tableofnames)

Define rocket types that are counted to determine the ammo amount the ARTY group has.

ARTY:SetShellTypes(tableofnames)

Define shell types that are counted to determine the ammo amount the ARTY group has.

ARTY:SetSmokeShells(n, color)

Set number of smoke shells available to the group.

ARTY:SetSpeed(speed)

Set default speed the group is moving at if not specified otherwise.

ARTY:SetStatusInterval(interval)

Set time interval between status updates.

ARTY:SetTacNukeFires(nfires, demolitionrange, range)

Set nuclear fires and extra demolition explosions.

ARTY:SetTacNukeShells(n)

Set number of tactical nuclear warheads available to the group.

ARTY:SetTacNukeWarhead(strength)

Set nuclear warhead explosion strength.

ARTY:SetTrackInterval(interval)

Set time interval for weapon tracking.

ARTY:SetWaitForShotTime(waittime)

Set time how it is waited a unit the first shot event happens.

ARTY.Smoke

color of smoke shells. Default SMOKECOLOR.red.

ARTY.Speed

Default speed in km/h the ARTY group moves at. Maximum speed possible is 80% of maximum speed the group can do.

ARTY.SpeedMax

Maximum speed of ARTY group in km/h. This is determined from the DCS descriptor table.

ARTY:Start()

Function to start the ARTY FSM process.

ARTY:Status()

Function to update the status of the ARTY group and tigger FSM events.

ARTY.StatusInterval

Update interval in seconds between status updates. Default 10 seconds.

ARTY.Type

Type of the ARTY group.

ARTY.WaitForShotTime

Max time in seconds to wait until fist shot event occurs after target is assigned. If time is passed without shot, the target is deleted. Default is 300 seconds.

ARTY.WeaponType

ARTY:Winchester()

Tell ARTY group it is out of ammo.

ARTY:_AttackGroup(target)

Set task for attacking a group.

ARTY:_CheckDB(displayname)

Check the DB for properties of the specified artillery unit type.

ARTY:_CheckMoves()

Check all moves and return the one which should be executed next.

ARTY:_CheckName(givennames, name, makeunique)

Check if a name is unique.

ARTY:_CheckNormalTargets()

Check all normal (untimed) targets and return the target with the highest priority which has been engaged the fewest times.

ARTY:_CheckOutOfAmmo(targets)

Check if group is (partly) out of ammo of a special weapon type.

ARTY:_CheckRearmed()

Check if ARTY group is rearmed, i.e.

ARTY:_CheckShootingStarted()

Check whether shooting started within a certain time (~5 min).

ARTY:_CheckTargetsInRange()

Check all targets whether they are in range.

ARTY:_CheckTimedTargets()

Check all timed targets and return the target which should be attacked next.

ARTY:_CheckWeaponTypeAvailable(target)

Check if a selected weapon type is available for this target, i.e.

ARTY:_CheckWeaponTypePossible(target)

Check if a selected weapon type is in principle possible for this group.

ARTY:_ClockToSeconds(clock)

Convert clock time from hours, minutes and seconds to seconds.

ARTY:_EventFromTo(BA, Event, From, To)

Print event-from-to string to DCS log file.

ARTY:_FireAtCoord(coord, radius, nshells, weapontype)

Set task for firing at a coordinate.

ARTY._FuncImpact(weapon, self, target)

Function called after impact of weapon.

ARTY._FuncTrack(weapon, self, target)

Function called during tracking of weapon.

ARTY:_GetHeading(a, b)

Heading from point a to point b in degrees.

ARTY:_GetMarkIDfromName(name)

Get the marker ID from the assigned task name.

ARTY:_GetMoveIndexByName(name)

Get the index of a move by its name.

ARTY:_GetTargetIndexByName(name)

Get the index of a target by its name.

ARTY:_LLDMS2DD(l1, l2)

Convert Latitude and Lontigude from DMS to DD.

ARTY:_MarkMoveName(markerid)

Create a name for a relocation move initiated by placing a marker.

ARTY:_MarkRequestAmmo()

Request ammo via mark.

ARTY:_MarkRequestMoves()

Request Moves.

ARTY:_MarkRequestStatus()

Request status via mark.

ARTY:_MarkRequestTargets()

Request Targets.

ARTY:_MarkTargetName(markerid)

Create a name for an engagement initiated by placing a marker.

ARTY:_MarkerKeyAuthentification(text)

Extract engagement assignments and parameters from mark text.

ARTY:_Markertext(text)

Extract engagement assignments and parameters from mark text.

ARTY:_MissileCategoryName(categorynumber)

Returns a name of a missile category.

ARTY:_Move(group, ToCoord, Speed, OnRoad)

Route group to a certain point.

ARTY:_MoveInfo(move)

Returns a formatted string with information about all move parameters.

ARTY:_NuclearBlast(_coord)

Model a nuclear blast/destruction by creating fires and destroy scenery.

ARTY:_OnEventMarkChange(Event)

Function called when a F10 map mark was changed.

ARTY:_OnEventMarkRemove(Event)

Function called when a F10 map mark was removed.

ARTY._PassingWaypoint(group, arty, i, final)

Function called when group is passing a waypoint.

ARTY:_Relocate()

Relocate to another position, e.g.

ARTY:_SecondsToClock(seconds)

Convert time in seconds to hours, minutes and seconds.

ARTY:_SortQueueTime(queue)

Sort array with respect to time.

ARTY:_SortTargetQueuePrio()

Sort targets with respect to priority and number of times it was already engaged.

ARTY:_StatusReport(display)

After "Start" event.

ARTY:_TargetInRange(target, message)

Check if target is in range.

ARTY:_TargetInfo(target)

Returns the target parameters as formatted string.

ARTY:_VicinityCoord(coord, rmin, rmax)

Find a random coordinate in the vicinity of another coordinate.

ARTY:_WeaponTypeName(tnumber)

Get the weapon type name, which should be used to attack the target.

ARTY:__Arrived(delay)

Tell ARTY group it has arrived at its destination after a delay.

ARTY:__CeaseFire(delay, target)

Order ARTY group to cease firing on a target after a delay.

ARTY:__CombatReady(delay)

Tell ARTY group it is combat ready after a delay.

ARTY:__Dead(Delay, unitname)

Function called when a unit of the ARTY group died after a delay.

ARTY:__Move(delay, move)

Order ARTY group to move to another location after a delay.

ARTY:__NewMove(delay, move)

Add a new relocation for the ARTY group after a delay.

ARTY:__NewTarget(delay, target)

Add a new target for the ARTY group with a delay.

ARTY:__OpenFire(delay, target)

Order ARTY group to open fire on a target with a delay.

ARTY:__Respawn(delay)

Respawn ARTY group after a delay.

ARTY:__Start(Delay)

Function to start the ARTY FSM process after a delay.

ARTY:__Status(Delay)

Function to update the status of the ARTY group and tigger FSM events after a delay.

ARTY:__Winchester(delay)

Tell ARTY group it is out of ammo after a delay.

ARTY:_split(str, sep)

Split string.

ARTY.alias

Name of the ARTY group.

ARTY.ammomissiles

Table holding names of the missile types which are included when counting the ammo. Default is {"weapons.missiles"} which includes some guided missiles.

ARTY.ammorockets

Table holding names of the rocket types which are included when counting the ammo. Default is {"weapons.nurs"} which includes most unguided rockets.

ARTY.ammoshells

Table holding names of the shell types which are included when counting the ammo. Default is {"weapons.shells"} which include most shells.

ARTY.autorelocate

ARTY group will automatically move to within the max/min firing range.

ARTY.autorelocatemaxdist

Max distance [m] the ARTY group will travel to get within firing range. Default 50000 m = 50 km.

ARTY.autorelocateonroad

ARTY group will use mainly road to automatically get within firing range. Default is false.

ARTY.cargogroup

Cargo group object if ARTY group is a cargo that will be transported to another place.

ARTY.clusters

Table of names of clusters the group belongs to. Can be used to address all groups within the cluster simultaniously.

ARTY.coalition

The coalition of the arty group.

ARTY.currentMove

Holds the current commanded move, if there is one assigned.

ARTY.currentTarget

Holds the current target, if there is one assigned.

ARTY.db

ARTY.dtTrack

Time interval in seconds for weapon tracking.

ARTY.groupname

Name of the ARTY group as defined in the mission editor.

ARTY.illuMaxalt

Maximum altitude in meters the illumination warhead will detonate.

ARTY.illuMinalt

Minimum altitude in meters the illumination warhead will detonate.

ARTY.illuPower

Power of illumination warhead in mega candela. Default 1 mcd.

ARTY.iscargo

If true, ARTY group is defined as possible cargo. If it is immobile, targets out of range are not deleted from the queue.

ARTY.ismobile

If true, ARTY group can move.

ARTY.lid

Log id for DCS.log file.

ARTY.markallow

If true, Players are allowed to assign targets and moves for ARTY group by placing markers on the F10 map. Default is false.

ARTY.markkey

Authorization key. Only player who know this key can assign targets and moves via markers on the F10 map. Default no authorization required.

ARTY.markreadonly

Marks for targets are readonly and cannot be removed by players. Default is false.

ARTY.maxrange

Maximum firing range in kilometers. Targets further away than this distance are not engaged. Default 10000 km.

ARTY.minrange

Minimum firing range in kilometers. Targets closer than this distance are not engaged. Default 0.1 km.

ARTY.moves

All moves assigned.

ARTY.nukefire

Ignite additional fires and smoke for nuclear explosions Default true.

ARTY.nukefires

Number of nuclear fires and subexplosions.

ARTY.nukerange

Demolition range of tactical nuclear explostions.

ARTY.nukewarhead

Explosion strength of tactical nuclear warhead in kg TNT. Default 75000.

ARTY:onEvent(Event)

After "Start" event.

ARTY:onafterArrived(Controllable, From, Event, To)

After "Arrived" event.

ARTY:onafterCeaseFire(Controllable, From, Event, To, target)

After "CeaseFire" event.

ARTY:onafterDead(Controllable, From, Event, To, Unitname)

After "Dead" event, when a unit has died.

ARTY:onafterMove(Controllable, From, Event, To, move)

After "Move" event.

ARTY:onafterNewMove(Controllable, From, Event, To, move)

After "NewMove" event.

ARTY:onafterNewTarget(Controllable, From, Event, To, target)

After "NewTarget" event.

ARTY:onafterOpenFire(Controllable, From, Event, To, target)

After "OpenFire" event.

ARTY:onafterRearm(Controllable, From, Event, To)

After "Rearm" event.

ARTY:onafterRearmed(Controllable, From, Event, To)

After "Rearmed" event.

ARTY:onafterRespawn(Controllable, From, Event, To)

After "Dead" event, when a unit has died.

ARTY:onafterStart(Controllable, From, Event, To)

After "Start" event.

ARTY:onafterStatus(Controllable, From, Event, To)

After "Status" event.

ARTY:onafterStop(Controllable, From, Event, To)

After "Stop" event.

ARTY:onafterUnLoaded(Controllable, From, Event, To)

After "UnLoaded" event.

ARTY:onafterWinchester(Controllable, From, Event, To)

After "Winchester" event.

ARTY:onbeforeLoaded(Controllable, From, Event, To)

Before "Loaded" event.

ARTY:onbeforeMove(Controllable, From, Event, To, move, ToCoord, OnRoad)

Before "Move" event.

ARTY:onbeforeOpenFire(Controllable, From, Event, To, target)

Before "OpenFire" event.

ARTY:onbeforeRearm(Controllable, From, Event, To)

Before "Rearm" event.

ARTY:onenterCombatReady(Controllable, From, Event, To)

Enter "CombatReady" state.

ARTY.relocateRmax

Maximum distance in meters the group will look for places to relocate.

ARTY.relocateRmin

Minimum distance in meters the group will look for places to relocate.

ARTY.relocateafterfire

Group will relocate after each firing task. Default false.

ARTY.report

Arty group sends messages about their current state or target to its coalition.

ARTY.respawnafterdeath

Respawn arty group after all units are dead.

ARTY.respawndelay

Respawn delay in seconds.

ARTY.respawning

ARTY.smokeColor

ARTY.targets

All targets assigned.

ARTY.version

Arty script version.

Fields and Methods inherited from FSM_CONTROLLABLE Description

ARTY.Controllable

ARTY:GetControllable()

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

ARTY:New(FSMT, Controllable)

Creates a new FSM_CONTROLLABLE object.

ARTY:OnAfterStop(Controllable, From, Event, To)

OnAfter Transition Handler for Event Stop.

ARTY:OnBeforeStop(Controllable, From, Event, To)

OnBefore Transition Handler for Event Stop.

ARTY:OnEnterStopped(Controllable, From, Event, To)

OnEnter Transition Handler for State Stopped.

ARTY:OnLeaveStopped(Controllable, From, Event, To)

OnLeave Transition Handler for State Stopped.

ARTY:SetControllable(FSMControllable)

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

ARTY:Stop()

Synchronous Event Trigger for Event Stop.

ARTY:__Stop(Delay)

Asynchronous Event Trigger for Event Stop.

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

Fields and Methods inherited from FSM Description

ARTY:AddEndState(State)

Adds an End state.

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

ARTY:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

ARTY:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

ARTY.CallScheduler

Call scheduler.

ARTY.ClassName

Name of the class.

ARTY.Events

ARTY:GetCurrentState()

Get current state.

ARTY:GetEndStates()

Returns the End states.

ARTY:GetProcess(From, Event)

ARTY:GetProcesses()

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

ARTY:GetScores()

Returns a table with the scores defined.

ARTY:GetStartState()

Returns the start state of the FSM.

ARTY:GetState()

Get current state.

ARTY:GetSubs()

Returns a table with the Subs defined.

ARTY:GetTransitions()

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

ARTY:Is(State)

Check if FSM is in state.

ARTY:LoadCallBacks(CallBackTable)

Load call backs.

ARTY:New()

Creates a new FSM object.

ARTY.Scores

Scores.

ARTY:SetProcess(From, Event, Fsm)

ARTY:SetStartState(State)

Sets the start state of the FSM.

ARTY._EndStates

ARTY._EventSchedules

ARTY._Processes

ARTY._Scores

ARTY._StartState

ARTY._Transitions

ARTY:_add_to_map(Map, Event)

Add to map.

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

Call handler.

ARTY:_create_transition(EventName)

Create transition.

ARTY:_delayed_transition(EventName)

Delayed transition.

ARTY:_eventmap(Events, EventStructure)

Event map.

ARTY:_gosub(ParentFrom, ParentEvent)

Go sub.

ARTY:_handler(EventName, ...)

Handler.

ARTY:_isendstate(Current)

Is end state.

ARTY:_submap(subs, sub, name)

Sub maps.

ARTY:can(e)

Check if can do an event.

ARTY:cannot(e)

Check if cannot do an event.

ARTY.current

Current state name.

ARTY.endstates

ARTY:is(State, state)

Check if FSM is in state.

ARTY.options

Options.

ARTY.subs

Subs.

Fields and Methods inherited from BASE Description

ARTY.ClassID

The ID number of the class.

ARTY.ClassName

The name of the class.

ARTY.ClassNameAndID

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

ARTY:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

ARTY:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

ARTY:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

ARTY:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

ARTY:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

ARTY:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

ARTY:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

ARTY:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

ARTY:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

ARTY:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

ARTY:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

ARTY:E(Arguments)

Log an exception which will be traced always.

ARTY:EventDispatcher()

Returns the event dispatcher

ARTY:EventRemoveAll()

Remove all subscribed events

ARTY:F(Arguments)

Trace a function call.

ARTY:F2(Arguments)

Trace a function call level 2.

ARTY:F3(Arguments)

Trace a function call level 3.

ARTY:GetClassID()

Get the ClassID of the class instance.

ARTY:GetClassName()

Get the ClassName of the class instance.

ARTY:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

ARTY:GetEventPriority()

Get the Class Core.Event processing Priority.

ARTY:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

ARTY:GetState(Object, Key)

Get a Value given a Key from the Object.

ARTY:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

ARTY:I(Arguments)

Log an information which will be traced always.

ARTY:Inherit(Child, Parent)

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

ARTY:IsInstanceOf(ClassName)

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

ARTY:IsTrace()

Enquires if tracing is on (for the class).

ARTY:New()

BASE constructor.

ARTY:OnEvent(EventData)

Occurs when an Event for an object is triggered.

ARTY:OnEventBDA(EventData)

BDA.

ARTY:OnEventBaseCaptured(EventData)

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

ARTY:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

ARTY:OnEventCrash(EventData)

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

ARTY:OnEventDead(EventData)

Occurs when an object is dead.

ARTY:OnEventDetailedFailure(EventData)

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

ARTY:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

ARTY:OnEventDynamicCargoLoaded(EventData)

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

ARTY:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

ARTY:OnEventDynamicCargoUnloaded(EventData)

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

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

ARTY:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

ARTY:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

ARTY:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

ARTY:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

ARTY:OnEventKill(EventData)

Occurs on the death of a unit.

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

ARTY:OnEventLandingAfterEjection(EventData)

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

ARTY:OnEventLandingQualityMark(EventData)

Landing quality mark.

ARTY:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

ARTY:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

ARTY:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

ARTY:OnEventMissionEnd(EventData)

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

ARTY:OnEventMissionStart(EventData)

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

ARTY:OnEventNewDynamicCargo(EventData)

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

ARTY:OnEventParatrooperLanding(EventData)

Weapon add.

ARTY:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

ARTY:OnEventPlayerEnterAircraft(EventData)

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

ARTY:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

ARTY:OnEventPlayerLeaveUnit(EventData)

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

ARTY:OnEventRefueling(EventData)

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

ARTY:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

ARTY:OnEventScore(EventData)

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

ARTY:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

ARTY:OnEventShootingStart(EventData)

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

ARTY:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

ARTY:OnEventTakeoff(EventData)

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

ARTY:OnEventTriggerZone(EventData)

Trigger zone.

ARTY:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

ARTY:ScheduleStop(SchedulerID)

Stops the Schedule.

ARTY.Scheduler

ARTY:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

ARTY:SetState(Object, Key, Value)

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

ARTY:T(Arguments)

Trace a function logic level 1.

ARTY:T2(Arguments)

Trace a function logic level 2.

ARTY:T3(Arguments)

Trace a function logic level 3.

ARTY:TraceAll(TraceAll)

Trace all methods in MOOSE

ARTY:TraceClass(Class)

Set tracing for a class

ARTY:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

ARTY:TraceLevel(Level)

Set trace level

ARTY:TraceOff()

Set trace off.

ARTY:TraceOn()

Set trace on.

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

ARTY:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

ARTY._

ARTY:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

ARTY:_Serialize(Arguments)

(Internal) Serialize arguments

ARTY:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

ARTY.__

ARTY:onEvent(event)

The main event handling function...

Fields and Methods inherited from ARTY.Target Description

ARTY.Target.Tassigned

Abs. mission time when target was assigned.

ARTY.Target.attackgroup

If true, use task attack group rather than fire at point for engagement.

ARTY.Target.coord

Target coordinates.

ARTY.Target.engaged

Number of times this target was engaged.

ARTY.Target.maxengage

Max number of times, the target will be engaged.

ARTY.Target.name

Name of target.

ARTY.Target.nshells

Number of shells (or other weapon types) fired upon target.

ARTY.Target.prio

Priority of target.

ARTY.Target.radius

Shelling radius in meters.

ARTY.Target.time

Abs. mission time in seconds, when the target is scheduled to be attacked.

ARTY.Target.underfire

If true, target is currently under fire.

ARTY.Target.weapontype

Type of weapon used for engagement. See #ARTY.WeaponType.

Fields and Methods inherited from ARTY.WeaponType Description

ARTY.WeaponType.Auto

Automatic selection of weapon type.

ARTY.WeaponType.Cannon

Cannons using conventional shells.

ARTY.WeaponType.CruiseMissile

Cruise missiles.

ARTY.WeaponType.IlluminationShells

Illumination shells (simulated).

ARTY.WeaponType.Rockets

Unguided rockets.

ARTY.WeaponType.SmokeShells

Smoke shells (simulated).

ARTY.WeaponType.TacticalNukes

Tactical nuclear shells (simulated).

  • ARTY class

Field(s)

#string ARTY.ClassName

Name of the class.

ARTY.Controllable

Respawn group.

#table ARTY.DCSdesc

DCS descriptors of the ARTY group.

#boolean ARTY.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

#string ARTY.DisplayName

Extended type name of the ARTY group.

#number ARTY.IniGroupStrength

Inital number of units in the ARTY group.

Core.Point#COORDINATE ARTY.InitialCoord

Initial coordinates of the ARTY group.

#boolean ARTY.IsArtillery

If true, ARTY group has attribute "Artillery". This is automatically derived from the DCS descriptor table.

#number ARTY.Nammo0

Initial amount total ammunition (shells+rockets+missiles) of the whole group.

#number ARTY.Narty0

Initial amount of artillery shells of the whole group.

#number ARTY.Nillu

Number of illumination shells the group has available. Note that if normal shells are empty, firing illumination shells is also not possible any more.

#number ARTY.Nillu0

Initial amount of illumination shells of the whole group. Default is 0.

#number ARTY.Nmissiles0

Initial amount of missiles of the whole group.

#number ARTY.Nrockets0

Initial amount of rockets of the whole group.

#number ARTY.Nshells0

Initial amount of shells of the whole group.

#number ARTY.Nshots

Number of shots fired on current target.

#number ARTY.Nsmoke

Number of smoke shells the group has available. Note that if normal shells are empty, firing smoke shells is also not possible any more.

#number ARTY.Nsmoke0

Initial amount of smoke shells of the whole group. Default is 0.

#number ARTY.Nukes

Number of nuclear shells, the group has available. Note that if normal shells are empty, firing nukes is also not possible any more.

#number ARTY.Nukes0

Initial amount of tactical nukes of the whole group. Default is 0.

#boolean ARTY.RearmingArtyOnRoad

If true, ARTY group will move to rearming place using mainly roads. Default false.

#number ARTY.RearmingDistance

Safe distance in meters between ARTY group and rearming group or place at which rearming is possible. Default 100 m.

Wrapper.Group#GROUP ARTY.RearmingGroup

Unit designated to rearm the ARTY group.

Core.Point#COORDINATE ARTY.RearmingGroupCoord

Initial coordinates of the rearming unit. After rearming complete, the unit will return to this position.

#boolean ARTY.RearmingGroupOnRoad

If true, rearming group will move to ARTY group or rearming place using mainly roads. Default false.

#number ARTY.RearmingGroupSpeed

Speed in km/h the rearming unit moves at. Default is 50% of the max speed possible of the group.

Core.Point#COORDINATE ARTY.RearmingPlaceCoord

Coordinates of the rearming place. If the place is more than 100 m away from the ARTY group, the group will go there.

Utilities.Utils#SMOKECOLOR ARTY.Smoke

color of smoke shells. Default SMOKECOLOR.red.

#number ARTY.Speed

Default speed in km/h the ARTY group moves at. Maximum speed possible is 80% of maximum speed the group can do.

#number ARTY.SpeedMax

Maximum speed of ARTY group in km/h. This is determined from the DCS descriptor table.

#number ARTY.StatusInterval

Update interval in seconds between status updates. Default 10 seconds.

#string ARTY.Type

Type of the ARTY group.

#number ARTY.WaitForShotTime

Max time in seconds to wait until fist shot event occurs after target is assigned. If time is passed without shot, the target is deleted. Default is 300 seconds.

#string ARTY.alias

Name of the ARTY group.

#table ARTY.ammomissiles

Table holding names of the missile types which are included when counting the ammo. Default is {"weapons.missiles"} which includes some guided missiles.

#table ARTY.ammorockets

Table holding names of the rocket types which are included when counting the ammo. Default is {"weapons.nurs"} which includes most unguided rockets.

#table ARTY.ammoshells

Table holding names of the shell types which are included when counting the ammo. Default is {"weapons.shells"} which include most shells.

#boolean ARTY.autorelocate

ARTY group will automatically move to within the max/min firing range.

#number ARTY.autorelocatemaxdist

Max distance [m] the ARTY group will travel to get within firing range. Default 50000 m = 50 km.

#boolean ARTY.autorelocateonroad

ARTY group will use mainly road to automatically get within firing range. Default is false.

Cargo.CargoGroup#CARGO_GROUP ARTY.cargogroup

Cargo group object if ARTY group is a cargo that will be transported to another place.

#table ARTY.clusters

Table of names of clusters the group belongs to. Can be used to address all groups within the cluster simultaniously.

#number ARTY.coalition

The coalition of the arty group.

#table ARTY.currentMove

Holds the current commanded move, if there is one assigned.

#ARTY.Target ARTY.currentTarget

Holds the current target, if there is one assigned.

#number ARTY.dtTrack

Time interval in seconds for weapon tracking.

#string ARTY.groupname

Name of the ARTY group as defined in the mission editor.

#number ARTY.illuMaxalt

Maximum altitude in meters the illumination warhead will detonate.

#number ARTY.illuMinalt

Minimum altitude in meters the illumination warhead will detonate.

#number ARTY.illuPower

Power of illumination warhead in mega candela. Default 1 mcd.

#boolean ARTY.iscargo

If true, ARTY group is defined as possible cargo. If it is immobile, targets out of range are not deleted from the queue.

#boolean ARTY.ismobile

If true, ARTY group can move.

#string ARTY.lid

Log id for DCS.log file.

#boolean ARTY.markallow

If true, Players are allowed to assign targets and moves for ARTY group by placing markers on the F10 map. Default is false.

#number ARTY.markkey

Authorization key. Only player who know this key can assign targets and moves via markers on the F10 map. Default no authorization required.

#boolean ARTY.markreadonly

Marks for targets are readonly and cannot be removed by players. Default is false.

#number ARTY.maxrange

Maximum firing range in kilometers. Targets further away than this distance are not engaged. Default 10000 km.

#number ARTY.minrange

Minimum firing range in kilometers. Targets closer than this distance are not engaged. Default 0.1 km.

#table ARTY.moves

All moves assigned.

#boolean ARTY.nukefire

Ignite additional fires and smoke for nuclear explosions Default true.

#number ARTY.nukefires

Number of nuclear fires and subexplosions.

#number ARTY.nukerange

Demolition range of tactical nuclear explostions.

#number ARTY.nukewarhead

Explosion strength of tactical nuclear warhead in kg TNT. Default 75000.

#number ARTY.relocateRmax

Maximum distance in meters the group will look for places to relocate.

#number ARTY.relocateRmin

Minimum distance in meters the group will look for places to relocate.

#boolean ARTY.relocateafterfire

Group will relocate after each firing task. Default false.

#boolean ARTY.report

Arty group sends messages about their current state or target to its coalition.

#boolean ARTY.respawnafterdeath

Respawn arty group after all units are dead.

#number ARTY.respawndelay

Respawn delay in seconds.

#boolean ARTY.respawning
#table ARTY.targets

All targets assigned.

#string ARTY.version

Arty script version.

Function(s)

Add ARTY group to one or more clusters.

Enables addressing all ARTY groups within a cluster simultaniously via marker assignments.

Defined in:

ARTY

Parameter:

#table clusters

Table of cluster names the group should belong to.

Return value:

self

Tell ARTY group it has arrived at its destination.

Triggers the FSM event "Arrived".

Defined in:

ARTY

Assign a target group to the ARTY group.

Note that this will use the Attack Group Task rather than the Fire At Point Task.

Defined in:

ARTY

Parameters:

Target group.

#number prio

(Optional) Priority of target. Number between 1 (high) and 100 (low). Default 50.

#number radius

(Optional) Radius. Default is 100 m.

#number nshells

(Optional) How many shells (or rockets) are fired on target per engagement. Default 5.

#number maxengage

(Optional) How many times a target is engaged. Default 1.

#string time

(Optional) Day time at which the target should be engaged. Passed as a string in format "08:13:45". Current task will be canceled.

#number weapontype

(Optional) Type of weapon to be used to attack this target. Default ARTY.WeaponType.Auto, i.e. the DCS logic automatically determins the appropriate weapon.

#string name

(Optional) Name of the target. Default is LL DMS coordinate of the target. If the name was already given, the numbering "#01", "#02",... is appended automatically.

#boolean unique

(Optional) Target is unique. If the target name is already known, the target is rejected. Default false.

Return value:

#string:

Name of the target. Can be used for further reference, e.g. deleting the target from the list.

Usage:

paladin=ARTY:New(GROUP:FindByName("Blue Paladin"))
paladin:AssignTargetCoord(GROUP:FindByName("Red Targets 1"):GetCoordinate(), 10, 300, 10, 1, "08:02:00", ARTY.WeaponType.Auto, "Target 1")
paladin:Start()

Assign coordinate to where the ARTY group should move.

Defined in:

ARTY

Parameters:

Coordinates of the new position.

#string time

(Optional) Day time at which the group should start moving. Passed as a string in format "08:13:45". Default is now.

#number speed

(Optinal) Speed in km/h the group should move at. Default 70% of max posible speed of group.

#boolean onroad

(Optional) If true, group will mainly use roads. Default off, i.e. go directly towards the specified coordinate.

#boolean cancel

(Optional) If true, cancel any running attack when move should begin. Default is false.

#string name

(Optional) Name of the coordinate. Default is LL DMS string of the coordinate. If the name was already given, the numbering "#01", "#02",... is appended automatically.

#boolean unique

(Optional) Move is unique. If the move name is already known, the move is rejected. Default false.

Return value:

#string:

Name of the move. Can be used for further reference, e.g. deleting the move from the list.

Assign target coordinates to the ARTY group.

Only the first parameter, i.e. the coordinate of the target is mandatory. The remaining parameters are optional and can be used to fine tune the engagement.

Defined in:

ARTY

Parameters:

Coordinates of the target.

#number prio

(Optional) Priority of target. Number between 1 (high) and 100 (low). Default 50.

#number radius

(Optional) Radius. Default is 100 m.

#number nshells

(Optional) How many shells (or rockets) are fired on target per engagement. Default 5.

#number maxengage

(Optional) How many times a target is engaged. Default 1.

#string time

(Optional) Day time at which the target should be engaged. Passed as a string in format "08:13:45". Current task will be canceled.

#number weapontype

(Optional) Type of weapon to be used to attack this target. Default ARTY.WeaponType.Auto, i.e. the DCS logic automatically determins the appropriate weapon.

#string name

(Optional) Name of the target. Default is LL DMS coordinate of the target. If the name was already given, the numbering "#01", "#02",... is appended automatically.

#boolean unique

(Optional) Target is unique. If the target name is already known, the target is rejected. Default false.

Return value:

#string:

Name of the target. Can be used for further reference, e.g. deleting the target from the list.

Usage:

paladin=ARTY:New(GROUP:FindByName("Blue Paladin"))
paladin:AssignTargetCoord(GROUP:FindByName("Red Targets 1"):GetCoordinate(), 10, 300, 10, 1, "08:02:00", ARTY.WeaponType.Auto, "Target 1")
paladin:Start()

Order ARTY group to cease firing on a target.

Triggers the FSM event "CeaseFire".

Defined in:

ARTY

Parameter:

#table target

Array holding the target data.

Tell ARTY group it is combat ready.

Triggers the FSM event "CombatReady".

Defined in:

ARTY

Function called when a unit of the ARTY group died.

Triggers the FSM event "Dead".

Defined in:

ARTY

Parameter:

#string unitname

Name of the unit that died.

Get the number of shells a unit or group currently has.

For a group the ammo count of all units is summed up.

Defined in:

ARTY

Parameter:

#boolean display

Display ammo table as message to all. Default false.

Return values:

#number:

Total amount of ammo the whole group has left.

#number:

Number of shells the group has left.

#number:

Number of rockets the group has left.

#number:

Number of missiles the group has left.

#number:

Number of artillery shells the group has left.

Order ARTY group to move to another location.

Triggers the FSM event "Move".

Defined in:

ARTY

Parameter:

#table move

Array holding the relocation move data.

Creates a new ARTY object from a MOOSE group object.

Defined in:

ARTY

Parameters:

The GROUP object for which artillery tasks should be assigned.

alias

(Optional) Alias name the group will be calling itself when sending messages. Default is the group name.

Return value:

ARTY object or nil if group does not exist or is not a ground or naval group.

Creates a new ARTY object from a MOOSE CARGO_GROUP object.

Defined in:

ARTY

Parameters:

The CARGO GROUP object for which artillery tasks should be assigned.

alias

(Optional) Alias name the group will be calling itself when sending messages. Default is the group name.

Return value:

ARTY object or nil if group does not exist or is not a ground or naval group.

Add a new relocation move for the ARTY group.

Triggers the FSM event "NewMove".

Defined in:

ARTY

Parameter:

#table move

Array holding the relocation move data.

Add a new target for the ARTY group.

Triggers the FSM event "NewTarget".

Defined in:

ARTY

Parameter:

#table target

Array holding the target data.

User function for OnAfer "Arrived" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "CeaseFire" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table target

Array holding the target info.

User function for OnAfter "Dead" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#string Unitname

Name of the dead unit.

User function for OnAfer "Move" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table move

Array holding the move info.

User function for OnAfer "NewMove" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table move

Array holding the move info.

User function for OnAfter "NewTarget" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table target

Array holding the target info.

User function for OnAfter "OpenFire" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table target

Array holding the target info.

User function for OnAfter "Rearm" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Rearmed" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Respawn" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Start" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Status" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Winchester" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnEnter "CombatReady" state.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnEnter "Firing" state.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnEnter "Moving" state.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnEnter "OutOfAmmo" state.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnEnter "Rearmed" state.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnEnter "Rearming" state.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Event handler for event Dead.

Defined in:

ARTY

Parameter:

Eventhandler for shot event.

Defined in:

ARTY

Parameter:

Order ARTY group to open fire on a target.

Triggers the FSM event "OpenFire".

Defined in:

ARTY

Parameter:

#table target

Array holding the target data.

Delete ALL targets from current target list.

Defined in:

ARTY

Delete a move from move list.

Defined in:

ARTY

Parameter:

#string name

Name of the target.

Delete a target from target list.

If the target is currently engaged, it is cancelled.

Defined in:

ARTY

Parameter:

#string name

Name of the target.

Respawn ARTY group.

Defined in:

ARTY

Set alias, i.e.

the name the group will use when sending messages.

Defined in:

ARTY

Parameter:

#string alias

The alias for the group.

Return value:

self

Set relocate after firing.

Group will find a new location after each engagement. Default is off

Defined in:

ARTY

Parameters:

#number rmax

(Optional) Max distance in meters, the group will move to relocate. Default is 800 m.

#number rmin

(Optional) Min distance in meters, the group will move to relocate. Default is 300 m.

Return value:

self

Set automatic relocation of ARTY group if a target is assigned which is out of range.

The unit will drive automatically towards or away from the target to be in max/min firing range.

Defined in:

ARTY

Parameters:

#number maxdistance

(Optional) The maximum distance in km the group will travel to get within firing range. Default is 50 km. No automatic relocation is performed if targets are assigned which are further away.

#boolean onroad

(Optional) If true, ARTY group uses roads whenever possible. Default false, i.e. group will move in a straight line to the assigned coordinate.

Return value:

self

Turn debug mode off.

This is the default setting.

Defined in:

ARTY

Return value:

self

Turn debug mode on.

Information is printed to screen.

Defined in:

ARTY

Return value:

self

Set minimum and maximum detotation altitude for illumination shells.

A value between min/max is selected randomly. The illumination bomb will burn for 300 seconds (5 minutes). Assuming a descent rate of ~3 m/s the "optimal" altitude would be 900 m.

Defined in:

ARTY

Parameters:

#number minalt

(Optional) Minium altitude in meters. Default 500 m.

#number maxalt

(Optional) Maximum altitude in meters. Default 1000 m.

Return value:

self

Set number of illumination shells available to the group.

Note that it can be max the number of normal shells. Also if all normal shells are empty, firing illumination shells is also not possible any more until group gets rearmed.

Defined in:

ARTY

Parameters:

#number n

Number of illumination shells for the whole group.

#number power

(Optional) Power of illumination warhead in mega candela. Default 1.0 mcd.

Return value:

self

Enable assigning targets and moves by placing markers on the F10 map.

Defined in:

ARTY

Parameters:

#number key

(Optional) Authorization key. Only players knowing this key can assign targets. Default is no authorization required.

#boolean readonly

(Optional) Marks are readonly and cannot be removed by players. This also means that targets cannot be cancelled by removing the mark. Default false.

Return value:

self

Disable assigning targets by placing markers on the F10 map.

Defined in:

ARTY

Return value:

self

Set maximum firing range.

Targets further away than this distance are not engaged.

Defined in:

ARTY

Parameter:

#number range

Max range in kilometers. Default is 1000 km.

Return value:

self

Set minimum firing range.

Targets closer than this distance are not engaged.

Defined in:

ARTY

Parameter:

#number range

Min range in kilometers. Default is 0.1 km.

Return value:

self

Define missile types that are counted to determine the ammo amount the ARTY group has.

Defined in:

ARTY

Parameter:

#table tableofnames

Table of rocket type names.

Return value:

self

Define if ARTY group uses mainly roads to drive to the rearming place.

Defined in:

ARTY

Parameter:

#boolean onroad

If true, ARTY group uses mainly roads. If false, it drives directly to the rearming place.

Return value:

self

Define the safe distance between ARTY group and rearming unit or rearming place at which rearming process is possible.

Defined in:

ARTY

Parameter:

#number distance

Safe distance in meters. Default is 100 m.

Return value:

self

Assign a group, which is responsible for rearming the ARTY group.

If the group is too far away from the ARTY group it will be guided towards the ARTY group.

Defined in:

ARTY

Parameter:

Group that is supposed to rearm the ARTY group. For the blue coalition, this is often a unarmed M939 transport whilst for red an unarmed Ural-375 transport can be used.

Return value:

self

Define if rearming group uses mainly roads to drive to the ARTY group or rearming place.

Defined in:

ARTY

Parameter:

#boolean onroad

If true, rearming group uses mainly roads. If false, it drives directly to the ARTY group or rearming place.

Return value:

self

Set the speed the rearming group moves at towards the ARTY group or the rearming place.

Defined in:

ARTY

Parameter:

#number speed

Speed in km/h.

Return value:

self

Defines the rearming place of the ARTY group.

If the place is too far away from the ARTY group it will be routed to the place.

Defined in:

ARTY

Parameter:

Coordinates of the rearming place.

Return value:

self

Report messages of ARTY group turned off.

Default is on.

Defined in:

ARTY

Return value:

self

Report messages of ARTY group turned on.

This is the default.

Defined in:

ARTY

Return value:

self

Respawn group once all units are dead.

Defined in:

ARTY

Parameter:

#number delay

(Optional) Delay before respawn in seconds.

Return value:

self

Define rocket types that are counted to determine the ammo amount the ARTY group has.

Defined in:

ARTY

Parameter:

#table tableofnames

Table of rocket type names.

Return value:

self

Define shell types that are counted to determine the ammo amount the ARTY group has.

Defined in:

ARTY

Parameter:

#table tableofnames

Table of shell type names.

Return value:

self

Set number of smoke shells available to the group.

Note that it can be max the number of normal shells. Also if all normal shells are empty, firing smoke shells is also not possible any more until group gets rearmed.

Defined in:

ARTY

Parameters:

#number n

Number of smoke shells for the whole group.

(Optional) Color of the smoke. Default SMOKECOLOR.Red.

Return value:

self

Set default speed the group is moving at if not specified otherwise.

Defined in:

ARTY

Parameter:

#number speed

Speed in km/h.

Return value:

self

Set time interval between status updates.

During the status check, new events are triggered.

Defined in:

ARTY

Parameter:

#number interval

Time interval in seconds. Default 10 seconds.

Return value:

self

Set nuclear fires and extra demolition explosions.

Defined in:

ARTY

Parameters:

#number nfires

(Optional) Number of big smoke and fire objects created in the demolition zone.

#number demolitionrange

(Optional) Demolition range in meters.

range

Return value:

self

Set number of tactical nuclear warheads available to the group.

Note that it can be max the number of normal shells. Also if all normal shells are empty, firing nuclear shells is also not possible any more until group gets rearmed.

Defined in:

ARTY

Parameter:

#number n

Number of warheads for the whole group.

Return value:

self

Set nuclear warhead explosion strength.

Defined in:

ARTY

Parameter:

#number strength

Explosion strength in kilo tons TNT. Default is 0.075 kt.

Return value:

self

Set time interval for weapon tracking.

Defined in:

ARTY

Parameter:

#number interval

Time interval in seconds. Default 0.2 seconds.

Return value:

self

Set time how it is waited a unit the first shot event happens.

If no shot is fired after this time, the task to fire is aborted and the target removed.

Defined in:

ARTY

Parameter:

#number waittime

Time in seconds. Default 300 seconds.

Return value:

self

Function to start the ARTY FSM process.

Defined in:

ARTY

Function to update the status of the ARTY group and tigger FSM events.

Triggers the FSM event "Status".

Defined in:

ARTY

Tell ARTY group it is out of ammo.

Triggers the FSM event "Winchester".

Defined in:

ARTY

Set task for attacking a group.

Defined in:

ARTY

Parameter:

#ARTY.Target target

Target data.

Check the DB for properties of the specified artillery unit type.

Defined in:

ARTY

Parameter:

displayname

Return value:

#table:

Properties of the requested artillery type. Returns nil if no matching DB entry could be found.

Check all moves and return the one which should be executed next.

Defined in:

ARTY

Return value:

#table:

Move which is due.

Check if a name is unique.

If not, a new unique name can be created by adding a running index #01, #02, ...

Defined in:

ARTY

Parameters:

#table givennames

Table with entries of already given names. Must contain a .name item.

#string name

Name to check if it already exists in givennames table.

#boolean makeunique

If true, a new unique name is returned by appending the running index.

Return value:

#string:

Unique name, which is not already given for another target.

Check all normal (untimed) targets and return the target with the highest priority which has been engaged the fewest times.

Defined in:

ARTY

Return value:

#table:

Target which is due to be attacked now or nil if no target could be found.

Check if group is (partly) out of ammo of a special weapon type.

Defined in:

ARTY

Parameter:

#table targets

Table of targets.

Return value:

@boolean True if any target requests a weapon type that is empty.

Check if ARTY group is rearmed, i.e.

has its full amount of ammo.

Defined in:

ARTY

Return value:

#boolean:

True if rearming is complete, false otherwise.

Check whether shooting started within a certain time (~5 min).

If not, the current target is considered invalid and removed from the target list.

Defined in:

ARTY

Check all targets whether they are in range.

Defined in:

ARTY

Check all timed targets and return the target which should be attacked next.

Defined in:

ARTY

Return value:

#table:

Target which is due to be attacked now.

Check if a selected weapon type is available for this target, i.e.

if the current amount of ammo of this weapon type is currently available.

Defined in:

ARTY

Parameter:

#boolean target

Target array data structure.

Return value:

#number:

Amount of shells, rockets or missiles available of the weapon type selected for the target.

Check if a selected weapon type is in principle possible for this group.

The current amount of ammo might be zero but the group still can be rearmed at a later point in time.

Defined in:

ARTY

Parameter:

#boolean target

Target array data structure.

Return value:

#boolean:

True if the group can carry this weapon type, false otherwise.

Convert clock time from hours, minutes and seconds to seconds.

Defined in:

ARTY

Parameter:

#string clock

String of clock time. E.g., "06:12:35".

Print event-from-to string to DCS log file.

Defined in:

ARTY

Parameters:

#string BA

Before/after info.

#string Event

Event.

#string From

From state.

#string To

To state.

Set task for firing at a coordinate.

Defined in:

ARTY

Parameters:

Coordinates to fire upon.

#number radius

Radius around coordinate.

#number nshells

Number of shells to fire.

#number weapontype

Type of weapon to use.

Function called after impact of weapon.

Defined in:

ARTY

Parameters:

Weapon object.

#ARTY self

ARTY object.

#ARTY.Target target

Target of the weapon.

Function called during tracking of weapon.

Defined in:

ARTY

Parameters:

Weapon object.

#ARTY self

ARTY object.

#ARTY.Target target

Target of the weapon.

Heading from point a to point b in degrees.

Defined in:

ARTY

Parameters:

Coordinate.

Coordinate.

Return value:

#number:

angle Angle from a to b in degrees.

Get the marker ID from the assigned task name.

Defined in:

ARTY

Parameter:

#string name

Name of the assignment.

Return values:

#string:

Name of the ARTY group or nil

#number:

ID of the marked target or nil.

#number:

ID of the marked relocation move or nil

Get the index of a move by its name.

Defined in:

ARTY

Parameter:

#string name

Name of move.

Return value:

#number:

Arrayindex of move.

Get the index of a target by its name.

Defined in:

ARTY

Parameter:

#string name

Name of target.

Return value:

#number:

Arrayindex of target.

Convert Latitude and Lontigude from DMS to DD.

Defined in:

ARTY

Parameters:

#string l1

Latitude or longitude as string in the format DD:MM:SS N/S/W/E

#string l2

Latitude or longitude as string in the format DD:MM:SS N/S/W/E

Return values:

#number:

Latitude in decimal degree format.

#number:

Longitude in decimal degree format.

Create a name for a relocation move initiated by placing a marker.

Defined in:

ARTY

Parameter:

#number markerid

ID of the placed marker.

Return value:

#string:

Name of relocation move.

Request ammo via mark.

Defined in:

ARTY

Request Moves.

Defined in:

ARTY

Request status via mark.

Defined in:

ARTY

Request Targets.

Defined in:

ARTY

Create a name for an engagement initiated by placing a marker.

Defined in:

ARTY

Parameter:

#number markerid

ID of the placed marker.

Return value:

#string:

Name of target engagement.

Extract engagement assignments and parameters from mark text.

Defined in:

ARTY

Parameter:

#string text

Marker text.

Return value:

#boolean:

If true, authentification successful.

Extract engagement assignments and parameters from mark text.

Defined in:

ARTY

Parameter:

#string text

Marker text to be analyzed.

Return value:

#table:

Table with assignment parameters, e.g. number of shots, radius, time etc.

Returns a name of a missile category.

Defined in:

ARTY

Parameter:

#number categorynumber

Number of missile category from weapon missile category enumerator. See https://wiki.hoggitworld.com/view/DCS_Class_Weapon

Return value:

#string:

Missile category name.

Route group to a certain point.

Defined in:

ARTY

Parameters:

Group to route.

Coordinate where we want to go.

#number Speed

(Optional) Speed in km/h. Default is 70% of max speed the group can do.

#boolean OnRoad

If true, use (mainly) roads.

Returns a formatted string with information about all move parameters.

Defined in:

ARTY

Parameter:

#table move

Move table item.

Return value:

#string:

Info string.

Model a nuclear blast/destruction by creating fires and destroy scenery.

Defined in:

ARTY

Parameter:

Coordinate of the impact point (center of the blast).

Function called when a F10 map mark was changed.

This happens when a user enters text.

Defined in:

ARTY

Parameter:

#table Event

Event data.

Function called when a F10 map mark was removed.

Defined in:

ARTY

Parameter:

#table Event

Event data.

Function called when group is passing a waypoint.

Defined in:

ARTY

Parameters:

Group for which waypoint passing should be monitored.

#ARTY arty

ARTY object.

#number i

Waypoint number that has been reached.

#boolean final

True if it is the final waypoint.

Relocate to another position, e.g.

after an engagement to avoid couter strikes.

Defined in:

ARTY

Convert time in seconds to hours, minutes and seconds.

Defined in:

ARTY

Parameter:

#number seconds

Time in seconds.

Return value:

#string:

Time in format Hours:minutes:seconds.

Sort array with respect to time.

Array elements must have a .time entry.

Defined in:

ARTY

Parameter:

#table queue

Array to sort. Should have elemnt .time.

Sort targets with respect to priority and number of times it was already engaged.

Defined in:

ARTY

After "Start" event.

Initialized ROE and alarm state. Starts the event handler.

Defined in:

ARTY

Parameter:

#boolean display

(Optional) If true, send message to coalition. Default false.

Check if target is in range.

Defined in:

ARTY

Parameters:

#table target

Target table.

#boolean message

(Optional) If true, send a message to the coalition if the target is not in range. Default is no message is send.

Return values:

#boolean:

True if target is in range, false otherwise.

#boolean:

True if ARTY group is too far away from the target, i.e. distance > max firing range.

#boolean:

True if ARTY group is too close to the target, i.e. distance < min finring range.

#boolean:

True if target should be removed since ARTY group is immobile and not cargo.

Returns the target parameters as formatted string.

Defined in:

ARTY

Parameter:

#ARTY.Target target

The target data.

Return value:

#string:

name, prio, radius, nshells, engaged, maxengage, time, weapontype

Find a random coordinate in the vicinity of another coordinate.

Defined in:

ARTY

Parameters:

Center coordinate.

#number rmin

(Optional) Minimum distance in meters from center coordinate. Default 20 m.

#number rmax

(Optional) Maximum distance in meters from center coordinate. Default 80 m.

Return value:

Random coordinate in a certain distance from center coordinate.

Get the weapon type name, which should be used to attack the target.

Defined in:

ARTY

Parameter:

#number tnumber

Number of weapon type ARTY.WeaponType.XXX

Return value:

#number:

tnumber of weapon type.

Tell ARTY group it has arrived at its destination after a delay.

Triggers the FSM event "Arrived".

Defined in:

ARTY

Parameter:

#number delay

Delay in seconds.

Order ARTY group to cease firing on a target after a delay.

Triggers the FSM event "CeaseFire".

Defined in:

ARTY

Parameters:

#number delay

Delay in seconds.

#table target

Array holding the target data.

Tell ARTY group it is combat ready after a delay.

Triggers the FSM event "CombatReady".

Defined in:

ARTY

Parameter:

#number delay

Delay in seconds.

Function called when a unit of the ARTY group died after a delay.

Triggers the FSM event "Dead".

Defined in:

ARTY

Parameters:

#number Delay

in seconds.

#string unitname

Name of the unit that died.

Order ARTY group to move to another location after a delay.

Triggers the FSM event "Move".

Defined in:

ARTY

Parameters:

#number delay

Delay in seconds.

#table move

Array holding the relocation move data.

Add a new relocation for the ARTY group after a delay.

Triggers the FSM event "NewMove".

Defined in:

ARTY

Parameters:

#number delay

Delay in seconds.

#table move

Array holding the relocation move data.

Add a new target for the ARTY group with a delay.

Triggers the FSM event "NewTarget".

Defined in:

ARTY

Parameters:

#number delay

Delay in seconds.

#table target

Array holding the target data.

Order ARTY group to open fire on a target with a delay.

Triggers the FSM event "Move".

Defined in:

ARTY

Parameters:

#number delay

Delay in seconds.

#table target

Array holding the target data.

Respawn ARTY group after a delay.

Defined in:

ARTY

Parameter:

#number delay

Delay in seconds.

Function to start the ARTY FSM process after a delay.

Defined in:

ARTY

Parameter:

#number Delay

before start in seconds.

Function to update the status of the ARTY group and tigger FSM events after a delay.

Triggers the FSM event "Status".

Defined in:

ARTY

Parameter:

#number Delay

in seconds.

Tell ARTY group it is out of ammo after a delay.

Triggers the FSM event "Winchester".

Defined in:

ARTY

Parameter:

#number delay

Delay in seconds.

Split string.

C.f. http://stackoverflow.com/questions/1426954/split-string-in-lua

Defined in:

ARTY

Parameters:

#string str

Sting to split.

#string sep

Speparator for split.

Return value:

#table:

Split text.

After "Start" event.

Initialized ROE and alarm state. Starts the event handler.

Defined in:

ARTY

Parameter:

#table Event

After "Arrived" event.

Group has reached its destination.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "CeaseFire" event.

Clears task of the group and removes the target if max engagement was reached.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table target

Array holding the target info.

After "Dead" event, when a unit has died.

When all units of a group are dead trigger "Stop" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#string Unitname

Name of the unit that died.

After "Move" event.

Route group to given coordinate.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table move

Table containing the move parameters.

After "NewMove" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table move

Array holding the move parameters.

After "NewTarget" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table target

Array holding the target parameters.

After "OpenFire" event.

Sets the current target and starts the fire at point task.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#ARTY.Target target

Array holding the target info.

After "Rearm" event.

Send message if reporting is on. Route rearming unit to ARTY group.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Rearmed" event.

Send ARTY and rearming group back to their inital positions.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Dead" event, when a unit has died.

When all units of a group are dead trigger "Stop" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Start" event.

Initialized ROE and alarm state. Starts the event handler.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Status" event.

Report status of group.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Stop" event.

Unhandle events and cease fire on current target.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "UnLoaded" event.

Group is combat ready again.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

If true, proceed to onafterLoaded.

After "Winchester" event.

Group is out of ammo. Trigger "Rearm" event.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Before "Loaded" event.

Checks if group is currently firing and removes the target by calling CeaseFire.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

If true, proceed to onafterLoaded.

Before "Move" event.

Check if a unit to rearm the ARTY group has been defined.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table move

Table containing the move parameters.

Coordinate to which the ARTY group should move.

#boolean OnRoad

If true group should move on road mainly.

Return value:

#boolean:

If true, proceed to onafterMove.

Before "OpenFire" event.

Checks if group already has a target. Checks for valid min/max range and removes the target if necessary.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

#table target

Array holding the target info.

Return value:

#boolean:

If true, proceed to onafterOpenfire.

Before "Rearm" event.

Check if a unit to rearm the ARTY group has been defined.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

If true, proceed to onafterRearm.

Enter "CombatReady" state.

Route the group back if necessary.

Defined in:

ARTY

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Field(s)

#string ARTY.ClassName

Name of the class.

ARTY.Controllable

Respawn group.

#table ARTY.DCSdesc

DCS descriptors of the ARTY group.

#boolean ARTY.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

#string ARTY.DisplayName

Extended type name of the ARTY group.

#number ARTY.IniGroupStrength

Inital number of units in the ARTY group.

Core.Point#COORDINATE ARTY.InitialCoord

Initial coordinates of the ARTY group.

#boolean ARTY.IsArtillery

If true, ARTY group has attribute "Artillery". This is automatically derived from the DCS descriptor table.

#number ARTY.Nammo0

Initial amount total ammunition (shells+rockets+missiles) of the whole group.

#number ARTY.Narty0

Initial amount of artillery shells of the whole group.

#number ARTY.Nillu

Number of illumination shells the group has available. Note that if normal shells are empty, firing illumination shells is also not possible any more.

#number ARTY.Nillu0

Initial amount of illumination shells of the whole group. Default is 0.

#number ARTY.Nmissiles0

Initial amount of missiles of the whole group.

#number ARTY.Nrockets0

Initial amount of rockets of the whole group.

#number ARTY.Nshells0

Initial amount of shells of the whole group.

#number ARTY.Nshots

Number of shots fired on current target.

#number ARTY.Nsmoke

Number of smoke shells the group has available. Note that if normal shells are empty, firing smoke shells is also not possible any more.

#number ARTY.Nsmoke0

Initial amount of smoke shells of the whole group. Default is 0.

#number ARTY.Nukes

Number of nuclear shells, the group has available. Note that if normal shells are empty, firing nukes is also not possible any more.

#number ARTY.Nukes0

Initial amount of tactical nukes of the whole group. Default is 0.

#boolean ARTY.RearmingArtyOnRoad

If true, ARTY group will move to rearming place using mainly roads. Default false.

#number ARTY.RearmingDistance

Safe distance in meters between ARTY group and rearming group or place at which rearming is possible. Default 100 m.

Wrapper.Group#GROUP ARTY.RearmingGroup

Unit designated to rearm the ARTY group.

Core.Point#COORDINATE ARTY.RearmingGroupCoord

Initial coordinates of the rearming unit. After rearming complete, the unit will return to this position.

#boolean ARTY.RearmingGroupOnRoad

If true, rearming group will move to ARTY group or rearming place using mainly roads. Default false.

#number ARTY.RearmingGroupSpeed

Speed in km/h the rearming unit moves at. Default is 50% of the max speed possible of the group.

Core.Point#COORDINATE ARTY.RearmingPlaceCoord

Coordinates of the rearming place. If the place is more than 100 m away from the ARTY group, the group will go there.

Utilities.Utils#SMOKECOLOR ARTY.Smoke

color of smoke shells. Default SMOKECOLOR.red.

#number ARTY.Speed

Default speed in km/h the ARTY group moves at. Maximum speed possible is 80% of maximum speed the group can do.

#number ARTY.SpeedMax

Maximum speed of ARTY group in km/h. This is determined from the DCS descriptor table.

#number ARTY.StatusInterval

Update interval in seconds between status updates. Default 10 seconds.

#string ARTY.Type

Type of the ARTY group.

#number ARTY.WaitForShotTime

Max time in seconds to wait until fist shot event occurs after target is assigned. If time is passed without shot, the target is deleted. Default is 300 seconds.

#string ARTY.alias

Name of the ARTY group.

#table ARTY.ammomissiles

Table holding names of the missile types which are included when counting the ammo. Default is {"weapons.missiles"} which includes some guided missiles.

#table ARTY.ammorockets

Table holding names of the rocket types which are included when counting the ammo. Default is {"weapons.nurs"} which includes most unguided rockets.

#table ARTY.ammoshells

Table holding names of the shell types which are included when counting the ammo. Default is {"weapons.shells"} which include most shells.

#boolean ARTY.autorelocate

ARTY group will automatically move to within the max/min firing range.

#number ARTY.autorelocatemaxdist

Max distance [m] the ARTY group will travel to get within firing range. Default 50000 m = 50 km.

#boolean ARTY.autorelocateonroad

ARTY group will use mainly road to automatically get within firing range. Default is false.

Cargo.CargoGroup#CARGO_GROUP ARTY.cargogroup

Cargo group object if ARTY group is a cargo that will be transported to another place.

#table ARTY.clusters

Table of names of clusters the group belongs to. Can be used to address all groups within the cluster simultaniously.

#number ARTY.coalition

The coalition of the arty group.

#table ARTY.currentMove

Holds the current commanded move, if there is one assigned.

#ARTY.Target ARTY.currentTarget

Holds the current target, if there is one assigned.

#number ARTY.dtTrack

Time interval in seconds for weapon tracking.

#string ARTY.groupname

Name of the ARTY group as defined in the mission editor.

#number ARTY.illuMaxalt

Maximum altitude in meters the illumination warhead will detonate.

#number ARTY.illuMinalt

Minimum altitude in meters the illumination warhead will detonate.

#number ARTY.illuPower

Power of illumination warhead in mega candela. Default 1 mcd.

#boolean ARTY.iscargo

If true, ARTY group is defined as possible cargo. If it is immobile, targets out of range are not deleted from the queue.

#boolean ARTY.ismobile

If true, ARTY group can move.

#string ARTY.lid

Log id for DCS.log file.

#boolean ARTY.markallow

If true, Players are allowed to assign targets and moves for ARTY group by placing markers on the F10 map. Default is false.

#number ARTY.markkey

Authorization key. Only player who know this key can assign targets and moves via markers on the F10 map. Default no authorization required.

#boolean ARTY.markreadonly

Marks for targets are readonly and cannot be removed by players. Default is false.

#number ARTY.maxrange

Maximum firing range in kilometers. Targets further away than this distance are not engaged. Default 10000 km.

#number ARTY.minrange

Minimum firing range in kilometers. Targets closer than this distance are not engaged. Default 0.1 km.

#table ARTY.moves

All moves assigned.

#boolean ARTY.nukefire

Ignite additional fires and smoke for nuclear explosions Default true.

#number ARTY.nukefires

Number of nuclear fires and subexplosions.

#number ARTY.nukerange

Demolition range of tactical nuclear explostions.

#number ARTY.nukewarhead

Explosion strength of tactical nuclear warhead in kg TNT. Default 75000.

#number ARTY.relocateRmax

Maximum distance in meters the group will look for places to relocate.

#number ARTY.relocateRmin

Minimum distance in meters the group will look for places to relocate.

#boolean ARTY.relocateafterfire

Group will relocate after each firing task. Default false.

#boolean ARTY.report

Arty group sends messages about their current state or target to its coalition.

#boolean ARTY.respawnafterdeath

Respawn arty group after all units are dead.

#number ARTY.respawndelay

Respawn delay in seconds.

#boolean ARTY.respawning
#table ARTY.targets

All targets assigned.

#string ARTY.version

Arty script version.

Function(s)

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Creates a new FSM_CONTROLLABLE object.

Defined in:

Parameters:

#table FSMT

Finite State Machine Table

(optional) The CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Return value:

OnAfter Transition Handler for Event Stop.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnBefore Transition Handler for Event Stop.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnEnter Transition Handler for State Stopped.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnLeave Transition Handler for State Stopped.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Defined in:

Parameter:

Return value:

Synchronous Event Trigger for Event Stop.

Asynchronous Event Trigger for Event Stop.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Defined in:

Parameters:

step

trigger

params

EventName

Field(s)

#string ARTY.ClassName

Name of the class.

ARTY.Controllable

Respawn group.

#table ARTY.DCSdesc

DCS descriptors of the ARTY group.

#boolean ARTY.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

#string ARTY.DisplayName

Extended type name of the ARTY group.

#number ARTY.IniGroupStrength

Inital number of units in the ARTY group.

Core.Point#COORDINATE ARTY.InitialCoord

Initial coordinates of the ARTY group.

#boolean ARTY.IsArtillery

If true, ARTY group has attribute "Artillery". This is automatically derived from the DCS descriptor table.

#number ARTY.Nammo0

Initial amount total ammunition (shells+rockets+missiles) of the whole group.

#number ARTY.Narty0

Initial amount of artillery shells of the whole group.

#number ARTY.Nillu

Number of illumination shells the group has available. Note that if normal shells are empty, firing illumination shells is also not possible any more.

#number ARTY.Nillu0

Initial amount of illumination shells of the whole group. Default is 0.

#number ARTY.Nmissiles0

Initial amount of missiles of the whole group.

#number ARTY.Nrockets0

Initial amount of rockets of the whole group.

#number ARTY.Nshells0

Initial amount of shells of the whole group.

#number ARTY.Nshots

Number of shots fired on current target.

#number ARTY.Nsmoke

Number of smoke shells the group has available. Note that if normal shells are empty, firing smoke shells is also not possible any more.

#number ARTY.Nsmoke0

Initial amount of smoke shells of the whole group. Default is 0.

#number ARTY.Nukes

Number of nuclear shells, the group has available. Note that if normal shells are empty, firing nukes is also not possible any more.

#number ARTY.Nukes0

Initial amount of tactical nukes of the whole group. Default is 0.

#boolean ARTY.RearmingArtyOnRoad

If true, ARTY group will move to rearming place using mainly roads. Default false.

#number ARTY.RearmingDistance

Safe distance in meters between ARTY group and rearming group or place at which rearming is possible. Default 100 m.

Wrapper.Group#GROUP ARTY.RearmingGroup

Unit designated to rearm the ARTY group.

Core.Point#COORDINATE ARTY.RearmingGroupCoord

Initial coordinates of the rearming unit. After rearming complete, the unit will return to this position.

#boolean ARTY.RearmingGroupOnRoad

If true, rearming group will move to ARTY group or rearming place using mainly roads. Default false.

#number ARTY.RearmingGroupSpeed

Speed in km/h the rearming unit moves at. Default is 50% of the max speed possible of the group.

Core.Point#COORDINATE ARTY.RearmingPlaceCoord

Coordinates of the rearming place. If the place is more than 100 m away from the ARTY group, the group will go there.

Utilities.Utils#SMOKECOLOR ARTY.Smoke

color of smoke shells. Default SMOKECOLOR.red.

#number ARTY.Speed

Default speed in km/h the ARTY group moves at. Maximum speed possible is 80% of maximum speed the group can do.

#number ARTY.SpeedMax

Maximum speed of ARTY group in km/h. This is determined from the DCS descriptor table.

#number ARTY.StatusInterval

Update interval in seconds between status updates. Default 10 seconds.

#string ARTY.Type

Type of the ARTY group.

#number ARTY.WaitForShotTime

Max time in seconds to wait until fist shot event occurs after target is assigned. If time is passed without shot, the target is deleted. Default is 300 seconds.

#string ARTY.alias

Name of the ARTY group.

#table ARTY.ammomissiles

Table holding names of the missile types which are included when counting the ammo. Default is {"weapons.missiles"} which includes some guided missiles.

#table ARTY.ammorockets

Table holding names of the rocket types which are included when counting the ammo. Default is {"weapons.nurs"} which includes most unguided rockets.

#table ARTY.ammoshells

Table holding names of the shell types which are included when counting the ammo. Default is {"weapons.shells"} which include most shells.

#boolean ARTY.autorelocate

ARTY group will automatically move to within the max/min firing range.

#number ARTY.autorelocatemaxdist

Max distance [m] the ARTY group will travel to get within firing range. Default 50000 m = 50 km.

#boolean ARTY.autorelocateonroad

ARTY group will use mainly road to automatically get within firing range. Default is false.

Cargo.CargoGroup#CARGO_GROUP ARTY.cargogroup

Cargo group object if ARTY group is a cargo that will be transported to another place.

#table ARTY.clusters

Table of names of clusters the group belongs to. Can be used to address all groups within the cluster simultaniously.

#number ARTY.coalition

The coalition of the arty group.

#table ARTY.currentMove

Holds the current commanded move, if there is one assigned.

#ARTY.Target ARTY.currentTarget

Holds the current target, if there is one assigned.

#number ARTY.dtTrack

Time interval in seconds for weapon tracking.

#string ARTY.groupname

Name of the ARTY group as defined in the mission editor.

#number ARTY.illuMaxalt

Maximum altitude in meters the illumination warhead will detonate.

#number ARTY.illuMinalt

Minimum altitude in meters the illumination warhead will detonate.

#number ARTY.illuPower

Power of illumination warhead in mega candela. Default 1 mcd.

#boolean ARTY.iscargo

If true, ARTY group is defined as possible cargo. If it is immobile, targets out of range are not deleted from the queue.

#boolean ARTY.ismobile

If true, ARTY group can move.

#string ARTY.lid

Log id for DCS.log file.

#boolean ARTY.markallow

If true, Players are allowed to assign targets and moves for ARTY group by placing markers on the F10 map. Default is false.

#number ARTY.markkey

Authorization key. Only player who know this key can assign targets and moves via markers on the F10 map. Default no authorization required.

#boolean ARTY.markreadonly

Marks for targets are readonly and cannot be removed by players. Default is false.

#number ARTY.maxrange

Maximum firing range in kilometers. Targets further away than this distance are not engaged. Default 10000 km.

#number ARTY.minrange

Minimum firing range in kilometers. Targets closer than this distance are not engaged. Default 0.1 km.

#table ARTY.moves

All moves assigned.

#boolean ARTY.nukefire

Ignite additional fires and smoke for nuclear explosions Default true.

#number ARTY.nukefires

Number of nuclear fires and subexplosions.

#number ARTY.nukerange

Demolition range of tactical nuclear explostions.

#number ARTY.nukewarhead

Explosion strength of tactical nuclear warhead in kg TNT. Default 75000.

#number ARTY.relocateRmax

Maximum distance in meters the group will look for places to relocate.

#number ARTY.relocateRmin

Minimum distance in meters the group will look for places to relocate.

#boolean ARTY.relocateafterfire

Group will relocate after each firing task. Default false.

#boolean ARTY.report

Arty group sends messages about their current state or target to its coalition.

#boolean ARTY.respawnafterdeath

Respawn arty group after all units are dead.

#number ARTY.respawndelay

Respawn delay in seconds.

#boolean ARTY.respawning
#table ARTY.targets

All targets assigned.

#string ARTY.version

Arty 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)

#string ARTY.ClassName

Name of the class.

ARTY.Controllable

Respawn group.

#table ARTY.DCSdesc

DCS descriptors of the ARTY group.

#boolean ARTY.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

#string ARTY.DisplayName

Extended type name of the ARTY group.

#number ARTY.IniGroupStrength

Inital number of units in the ARTY group.

Core.Point#COORDINATE ARTY.InitialCoord

Initial coordinates of the ARTY group.

#boolean ARTY.IsArtillery

If true, ARTY group has attribute "Artillery". This is automatically derived from the DCS descriptor table.

#number ARTY.Nammo0

Initial amount total ammunition (shells+rockets+missiles) of the whole group.

#number ARTY.Narty0

Initial amount of artillery shells of the whole group.

#number ARTY.Nillu

Number of illumination shells the group has available. Note that if normal shells are empty, firing illumination shells is also not possible any more.

#number ARTY.Nillu0

Initial amount of illumination shells of the whole group. Default is 0.

#number ARTY.Nmissiles0

Initial amount of missiles of the whole group.

#number ARTY.Nrockets0

Initial amount of rockets of the whole group.

#number ARTY.Nshells0

Initial amount of shells of the whole group.

#number ARTY.Nshots

Number of shots fired on current target.

#number ARTY.Nsmoke

Number of smoke shells the group has available. Note that if normal shells are empty, firing smoke shells is also not possible any more.

#number ARTY.Nsmoke0

Initial amount of smoke shells of the whole group. Default is 0.

#number ARTY.Nukes

Number of nuclear shells, the group has available. Note that if normal shells are empty, firing nukes is also not possible any more.

#number ARTY.Nukes0

Initial amount of tactical nukes of the whole group. Default is 0.

#boolean ARTY.RearmingArtyOnRoad

If true, ARTY group will move to rearming place using mainly roads. Default false.

#number ARTY.RearmingDistance

Safe distance in meters between ARTY group and rearming group or place at which rearming is possible. Default 100 m.

Wrapper.Group#GROUP ARTY.RearmingGroup

Unit designated to rearm the ARTY group.

Core.Point#COORDINATE ARTY.RearmingGroupCoord

Initial coordinates of the rearming unit. After rearming complete, the unit will return to this position.

#boolean ARTY.RearmingGroupOnRoad

If true, rearming group will move to ARTY group or rearming place using mainly roads. Default false.

#number ARTY.RearmingGroupSpeed

Speed in km/h the rearming unit moves at. Default is 50% of the max speed possible of the group.

Core.Point#COORDINATE ARTY.RearmingPlaceCoord

Coordinates of the rearming place. If the place is more than 100 m away from the ARTY group, the group will go there.

Utilities.Utils#SMOKECOLOR ARTY.Smoke

color of smoke shells. Default SMOKECOLOR.red.

#number ARTY.Speed

Default speed in km/h the ARTY group moves at. Maximum speed possible is 80% of maximum speed the group can do.

#number ARTY.SpeedMax

Maximum speed of ARTY group in km/h. This is determined from the DCS descriptor table.

#number ARTY.StatusInterval

Update interval in seconds between status updates. Default 10 seconds.

#string ARTY.Type

Type of the ARTY group.

#number ARTY.WaitForShotTime

Max time in seconds to wait until fist shot event occurs after target is assigned. If time is passed without shot, the target is deleted. Default is 300 seconds.

#string ARTY.alias

Name of the ARTY group.

#table ARTY.ammomissiles

Table holding names of the missile types which are included when counting the ammo. Default is {"weapons.missiles"} which includes some guided missiles.

#table ARTY.ammorockets

Table holding names of the rocket types which are included when counting the ammo. Default is {"weapons.nurs"} which includes most unguided rockets.

#table ARTY.ammoshells

Table holding names of the shell types which are included when counting the ammo. Default is {"weapons.shells"} which include most shells.

#boolean ARTY.autorelocate

ARTY group will automatically move to within the max/min firing range.

#number ARTY.autorelocatemaxdist

Max distance [m] the ARTY group will travel to get within firing range. Default 50000 m = 50 km.

#boolean ARTY.autorelocateonroad

ARTY group will use mainly road to automatically get within firing range. Default is false.

Cargo.CargoGroup#CARGO_GROUP ARTY.cargogroup

Cargo group object if ARTY group is a cargo that will be transported to another place.

#table ARTY.clusters

Table of names of clusters the group belongs to. Can be used to address all groups within the cluster simultaniously.

#number ARTY.coalition

The coalition of the arty group.

#table ARTY.currentMove

Holds the current commanded move, if there is one assigned.

#ARTY.Target ARTY.currentTarget

Holds the current target, if there is one assigned.

#number ARTY.dtTrack

Time interval in seconds for weapon tracking.

#string ARTY.groupname

Name of the ARTY group as defined in the mission editor.

#number ARTY.illuMaxalt

Maximum altitude in meters the illumination warhead will detonate.

#number ARTY.illuMinalt

Minimum altitude in meters the illumination warhead will detonate.

#number ARTY.illuPower

Power of illumination warhead in mega candela. Default 1 mcd.

#boolean ARTY.iscargo

If true, ARTY group is defined as possible cargo. If it is immobile, targets out of range are not deleted from the queue.

#boolean ARTY.ismobile

If true, ARTY group can move.

#string ARTY.lid

Log id for DCS.log file.

#boolean ARTY.markallow

If true, Players are allowed to assign targets and moves for ARTY group by placing markers on the F10 map. Default is false.

#number ARTY.markkey

Authorization key. Only player who know this key can assign targets and moves via markers on the F10 map. Default no authorization required.

#boolean ARTY.markreadonly

Marks for targets are readonly and cannot be removed by players. Default is false.

#number ARTY.maxrange

Maximum firing range in kilometers. Targets further away than this distance are not engaged. Default 10000 km.

#number ARTY.minrange

Minimum firing range in kilometers. Targets closer than this distance are not engaged. Default 0.1 km.

#table ARTY.moves

All moves assigned.

#boolean ARTY.nukefire

Ignite additional fires and smoke for nuclear explosions Default true.

#number ARTY.nukefires

Number of nuclear fires and subexplosions.

#number ARTY.nukerange

Demolition range of tactical nuclear explostions.

#number ARTY.nukewarhead

Explosion strength of tactical nuclear warhead in kg TNT. Default 75000.

#number ARTY.relocateRmax

Maximum distance in meters the group will look for places to relocate.

#number ARTY.relocateRmin

Minimum distance in meters the group will look for places to relocate.

#boolean ARTY.relocateafterfire

Group will relocate after each firing task. Default false.

#boolean ARTY.report

Arty group sends messages about their current state or target to its coalition.

#boolean ARTY.respawnafterdeath

Respawn arty group after all units are dead.

#number ARTY.respawndelay

Respawn delay in seconds.

#boolean ARTY.respawning
#table ARTY.targets

All targets assigned.

#string ARTY.version

Arty 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

Target.

Field(s)

#number ARTY.Target.Tassigned

Abs. mission time when target was assigned.

#boolean ARTY.Target.attackgroup

If true, use task attack group rather than fire at point for engagement.

#number ARTY.Target.engaged

Number of times this target was engaged.

#number ARTY.Target.maxengage

Max number of times, the target will be engaged.

#string ARTY.Target.name

Name of target.

#number ARTY.Target.nshells

Number of shells (or other weapon types) fired upon target.

#number ARTY.Target.prio

Priority of target.

#number ARTY.Target.radius

Shelling radius in meters.

#number ARTY.Target.time

Abs. mission time in seconds, when the target is scheduled to be attacked.

#boolean ARTY.Target.underfire

If true, target is currently under fire.

#number ARTY.Target.weapontype

Type of weapon used for engagement. See #ARTY.WeaponType.

Function(s)

Weapong type ID.

See here.

Field(s)

#number ARTY.WeaponType.Auto

Automatic selection of weapon type.

#number ARTY.WeaponType.Cannon

Cannons using conventional shells.

#number ARTY.WeaponType.CruiseMissile

Cruise missiles.

#number ARTY.WeaponType.IlluminationShells

Illumination shells (simulated).

#number ARTY.WeaponType.Rockets

Unguided rockets.

#number ARTY.WeaponType.SmokeShells

Smoke shells (simulated).

#number ARTY.WeaponType.TacticalNukes

Tactical nuclear shells (simulated).

Function(s)