Banner Image

Module Functional.Suppression

Functional - Suppress fire of ground units when they get hit.


Features:

  • Hold fire of attacked units when being fired upon.
  • Retreat to a user defined zone.
  • Fall back on hits.
  • Take cover on hits.
  • Gaussian distribution of suppression time.

Missions:

MOOSE - ALL Demo Missions


When ground units get hit by (suppressive) enemy fire, they will not be able to shoot back for a certain amount of time.

The implementation is based on an idea and script by MBot. See the DCS forum threat for details.

In addition to suppressing the fire, conditions can be specified, which let the group retreat to a defined zone, move away from the attacker or hide at a nearby scenery object.


YouTube Channel

MOOSE YouTube Channel


Author: funkyfranky

Contributions: FlightControl


Global(s)

Global SUPPRESSION

Mimic suppressive enemy fire and let groups flee or retreat.

#SUPPRESSION SUPPRESSION

Mimic suppressive enemy fire and let groups flee or retreat.

Suppression Process

Process

The suppression process can be described as follows.

CombatReady

A group starts in the state CombatReady. In this state the group is ready to fight. The ROE is set to either "Weapon Free" or "Return Fire". The alarm state is set to either "Auto" or "Red".

Event Hit

The most important event in this scenario is the Hit event. This is an event of the FSM and triggered by the DCS event hit.

Suppressed

After the Hit event the group changes its state to Suppressed. Technically, the ROE of the group is changed to "Weapon Hold". The suppression of the group will last a certain amount of time. It is randomized an will vary each time the group is hit. The expected suppression time is set to 15 seconds by default. But the actual value is sampled from a Gaussian distribution.

Process

The graph shows the distribution of suppression times if a group would be hit 100,000 times. As can be seen, on most hits the group gets suppressed for around 15 seconds. Other values are also possible but they become less likely the further away from the "expected" suppression time they are. Minimal and maximal suppression times can also be specified. By default these are set to 5 and 25 seconds, respectively. This can also be seen in the graph because the tails of the Gaussian distribution are cut off at these values.

Event Recovered

After the suppression time is over, the event Recovered is initiated and the group becomes CombatReady again. The ROE of the group will be set to "Weapon Free".

Of course, it can also happen that a group is hit again while it is still suppressed. In that case a new random suppression time is calculated. If the new suppression time is longer than the remaining suppression of the previous hit, then the group recovers when the suppression time of the last hit has passed. If the new suppression time is shorter than the remaining suppression, the group will recover after the longer time of the first suppression has passed.

For example:

  • A group gets hit the first time and is suppressed for - let's say - 15 seconds.
  • After 10 seconds, i.e. when 5 seconds of the old suppression are left, the group gets hit a again.
  • A new suppression time is calculated which can be smaller or larger than the remaining 5 seconds.
  • If the new suppression time is smaller, e.g. three seconds, than five seconds, the group will recover after the 5 remaining seconds of the first suppression have passed.
  • If the new suppression time is longer than last suppression time, e.g. 10 seconds, then the group will recover after the 10 seconds of the new hit have passed.

Generally speaking, the suppression times are not just added on top of each other. Because this could easily lead to the situation that a group never becomes CombatReady again before it gets destroyed.

The mission designer can capture the event Recovered by the function SUPPRESSION.OnAfterRecovered().

Flee Events and States

Apart from being suppressed the groups can also flee from the enemy under certain conditions.

Event Retreat

The first option is a retreat. This can be enabled by setting a retreat zone, i.e. a trigger zone defined in the mission editor.

If the group takes a certain amount of damage, the event Retreat will be called and the group will start to move to the retreat zone. The group will be in the state Retreating, which means that its ROE is set to "Weapon Hold" and the alarm state is set to "Green". Setting the alarm state to green is necessary to enable the group to move under fire.

When the group has reached the retreat zone, the event Retreated is triggered and the state will change to Retreated (note that both the event and the state of the same name in this case). ROE and alarm state are set to "Return Fire" and "Auto", respectively. The group will stay in the retreat zone and not actively participate in the combat any more.

If no option retreat zone has been specified, the option retreat is not available.

The mission designer can capture the events Retreat and Retreated by the functions SUPPRESSION.OnAfterRetreat() and SUPPRESSION.OnAfterRetreated().

Fallback

If a group is attacked by another ground group, it has the option to fall back, i.e. move away from the enemy. The probability of the event FallBack to happen depends on the damage of the group that was hit. The more a group gets damaged, the more likely FallBack event becomes.

If the group enters the state FallingBack it will move 100 meters in the opposite direction of the attacking unit. ROE and alarmstate are set to "Weapon Hold" and "Green", respectively.

At the fallback point the group will wait for 60 seconds before it resumes its normal mission.

The mission designer can capture the event FallBack by the function SUPPRESSION.OnAfterFallBack().

TakeCover

If a group is hit by either another ground or air unit, it has the option to "take cover" or "hide". This means that the group will move to a random scenery object in it vicinity.

Analogously to the fall back case, the probability of a TakeCover event to occur, depends on the damage of the group. The more a group is damaged, the more likely it becomes that a group takes cover.

When a TakeCover event occurs an area with a radius of 300 meters around the hit group is searched for an arbitrary scenery object. If at least one scenery object is found, the group will move there. One it has reached its "hideout", it will wait there for two minutes before it resumes its normal mission.

If more than one scenery object is found, the group will move to a random one. If no scenery object is near the group the TakeCover event is rejected and the group will not move.

The mission designer can capture the event TakeCover by the function SUPPRESSION.OnAfterTakeCover().

Choice of FallBack or TakeCover if both are enabled?

If both FallBack and TakeCover events are enabled by the functions SUPPRESSION.Fallback() and SUPPRESSION.Takecover() the algorithm does the following:

  • If the attacking unit is a ground unit, then the FallBack event is executed.
  • Otherwise, i.e. if the attacker is not a ground unit, then the TakeCover event is triggered.

FightBack

When a group leaves the states TakingCover or FallingBack the event FightBack is triggered. This changes the ROE and the alarm state back to their default values.

The mission designer can capture the event FightBack by the function SUPPRESSION.OnAfterFightBack()

Examples

Simple Suppression

This example shows the basic steps to use suppressive fire for a group.

Process

Customization and Fine Tuning

The following user functions can be used to change the default values

Type(s)

Fields and Methods inherited from SUPPRESSION Description

SUPPRESSION.AlarmState

SUPPRESSION.AutoEngage

SUPPRESSION.BattleZone

SUPPRESSION.ClassName

Name of the class.

SUPPRESSION.Controllable

Controllable of the FSM. Must be a ground group.

SUPPRESSION.CurrentAlarmState

Alam state the group is currently in.

SUPPRESSION.CurrentROE

ROE the group currently has.

SUPPRESSION.DCSdesc

SUPPRESSION:Dead()

Trigger "Dead" event.

SUPPRESSION.Debug

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

SUPPRESSION:DebugOn()

Turn Debug mode on.

SUPPRESSION.DefaultAlarmState

Alarm state the group will go to when it is changed back from another state. Default is "Auto".

SUPPRESSION.DefaultROE

ROE the group will get once suppression is over. Default is "Free".

SUPPRESSION:FallBack(AttackUnit)

Trigger "FallBack" event.

SUPPRESSION:Fallback(switch)

Enable fall back if a group is hit.

SUPPRESSION.FallbackDist

Distance in meters the unit will fall back.

SUPPRESSION.FallbackHeading

Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.

SUPPRESSION.FallbackON

If true, group can fall back, i.e. move away from the attacking unit.

SUPPRESSION.FallbackWait

Time in seconds the unit will wait at the fall back point before it resumes its mission.

SUPPRESSION:FightBack()

Trigger "FightBack" event.

SUPPRESSION:FlareOn()

Flare units when they are hit, die or recover from suppression.

SUPPRESSION.Formation

Formation which will be used when falling back, taking cover or retreating. Default "Vee".

SUPPRESSION:Hit(Unit, AttackUnit)

Trigger "Hit" event.

SUPPRESSION.IniGroupStrength

Number of units in a group at start.

SUPPRESSION.IsInfantry

True if group has attribute Infantry.

SUPPRESSION.MenuF10

Main F10 menu for suppresion, i.e.

SUPPRESSION.MenuON

If true creates a entry in the F10 menu.

SUPPRESSION:MenuOn(switch)

Create an F10 menu entry for the suppressed group.

SUPPRESSION:New(group)

Creates a new AI_suppression object.

SUPPRESSION.Nhit

Number of times the group was hit.

SUPPRESSION:OnAfterDead(Controllable, From, Event, To)

User function for OnAfter "Dead" event.

SUPPRESSION:OnAfterFallBack(Controllable, From, Event, To, AttackUnit)

User function for OnAfter "FallBack" event.

SUPPRESSION:OnAfterFightBack(Controllable, From, Event, To)

User function for OnAfter "FlightBack" event.

SUPPRESSION:OnAfterHit(Controllable, From, Event, To, Unit, AttackUnit)

User function for OnAfter "Hit" event.

SUPPRESSION:OnAfterOutOfAmmo(Controllable, From, Event, To)

User function for OnAfter "OutOfAmmo" event.

SUPPRESSION:OnAfterRecovered(Controllable, From, Event, To)

User function for OnAfter "Recovered" event.

SUPPRESSION:OnAfterRetreat(Controllable, From, Event, To)

User function for OnAfter "Retreat" event.

SUPPRESSION:OnAfterRetreated(Controllable, From, Event, To)

User function for OnAfter "Retreated" event.

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

User function for OnAfter "Status" event.

SUPPRESSION:OnAfterTakeCover(Controllable, From, Event, To, Hideout)

User function for OnAfter "TakeCover" event.

SUPPRESSION:OnBeforeFallBack(Controllable, From, Event, To, AttackUnit)

User function for OnBefore "FallBack" event.

SUPPRESSION:OnBeforeFightBack(Controllable, From, Event, To)

User function for OnBefore "FlightBack" event.

SUPPRESSION:OnBeforeHit(Controllable, From, Event, To, Unit, AttackUnit)

User function for OnBefore "Hit" event.

SUPPRESSION:OnBeforeRecovered(Controllable, From, Event, To)

User function for OnBefore "Recovered" event.

SUPPRESSION:OnBeforeRetreat(Controllable, From, Event, To)

User function for OnBefore "Retreat" event.

SUPPRESSION:OnBeforeRetreated(Controllable, From, Event, To)

User function for OnBefore "Retreated" event.

SUPPRESSION:OnBeforeTakeCover(Controllable, From, Event, To, Hideout)

User function for OnBefore "TakeCover" event.

SUPPRESSION:OrderFallBack()

Order group to fall back between 100 and 150 meters in a random direction.

SUPPRESSION:OrderRetreat()

Order group to retreat to a pre-defined zone.

SUPPRESSION:OrderTakeCover()

Order group to take cover at a nearby scenery object.

SUPPRESSION:OutOfAmmo()

Trigger "OutOfAmmo" event.

SUPPRESSION.PmaxFlee

Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.

SUPPRESSION.PminFlee

Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.

SUPPRESSION.ROE

SUPPRESSION.Recovered(Delay, self)

Trigger "Recovered" event after a delay.

SUPPRESSION:Retreat()

Trigger "Retreat" event.

SUPPRESSION.RetreatDamage

Damage in percent at which the group will be ordered to retreat.

SUPPRESSION.RetreatWait

Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.

SUPPRESSION.RetreatZone

Zone to which a group retreats.

SUPPRESSION:Retreated()

Trigger "Retreated" event.

SUPPRESSION:SetDefaultAlarmState(alarmstate)

Set alarm state a group will get after it returns from a fall back or take cover.

SUPPRESSION:SetDefaultROE(roe)

Set Rules of Engagement (ROE) a group will get when it recovers from suppression.

SUPPRESSION:SetFallbackDistance(distance)

Set distance a group will fall back when it gets hit.

SUPPRESSION:SetFallbackWait(time)

Set time a group waits at its fall back position before it resumes its normal mission.

SUPPRESSION:SetFormation(formation)

Set the formation a group uses for fall back, hide or retreat.

SUPPRESSION:SetMaximumFleeProbability(probability)

Set maximum probability that a group flees (falls back or takes cover) after a hit event.

SUPPRESSION:SetMinimumFleeProbability(probability)

Set minimum probability that a group flees (falls back or takes cover) after a hit event.

SUPPRESSION:SetRetreatDamage(damage)

Set damage threshold before a group is ordered to retreat if a retreat zone was defined.

SUPPRESSION:SetRetreatWait(time)

Set time a group waits in the retreat zone before it resumes its mission.

SUPPRESSION:SetRetreatZone(zone)

Set the zone to which a group retreats after being damaged too much.

SUPPRESSION:SetSpeed(speed)

Set speed a group moves at for fall back, hide or retreat.

SUPPRESSION:SetSuppressionTime(Tave, Tmin, Tmax)

Set average, minimum and maximum time a unit is suppressed each time it gets hit.

SUPPRESSION:SetTakecoverPlace(Hideout)

Set hideout place explicitly.

SUPPRESSION:SetTakecoverRange(range)

Set distance a group searches for hideout places.

SUPPRESSION:SetTakecoverWait(time)

Set time a group waits at its hideout position before it resumes its normal mission.

SUPPRESSION:SmokeOn()

Smoke positions where units fall back to, hide or retreat.

SUPPRESSION.Speed

Speed the unit will use when falling back, taking cover or retreating. Default 999.

SUPPRESSION.SpeedMax

Maximum speed of group in km/h.

SUPPRESSION:Status()

Trigger "Status" event.

SUPPRESSION:StatusReport(message)

Status of group.

SUPPRESSION:TakeCover(Hideout)

Trigger "TakeCover" event.

SUPPRESSION:Takecover(switch)

Enable take cover option if a unit is hit.

SUPPRESSION.TakecoverON

If true, group can hide at a nearby scenery object.

SUPPRESSION.TakecoverRange

Range in which the group will search for scenery objects to hide at.

SUPPRESSION.TakecoverWait

Time in seconds the group will hide before it will resume its mission.

SUPPRESSION.Tsuppress_ave

Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.

SUPPRESSION.Tsuppress_max

Maximum time in seconds the group gets suppressed.

SUPPRESSION.Tsuppress_min

Minimum time in seconds the group gets suppressed.

SUPPRESSION.TsuppressionOver

Time at which the suppression will be over.

SUPPRESSION.Type

Type of the group.

SUPPRESSION:_CreateMenuGroup()

Create F10 main menu, i.e.

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

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

SUPPRESSION:_GetLife()

Get (relative) life in percent of a group.

SUPPRESSION:_Heading(a, b)

Heading from point a to point b in degrees.

SUPPRESSION:_OnEventDead(EventData)

Event handler for Dead event of suppressed groups.

SUPPRESSION:_OnEventHit(EventData)

Event handler for Dead event of suppressed groups.

SUPPRESSION._Passing_Waypoint(group, Fsm, i, final)

Function called when group is passing a waypoint.

SUPPRESSION:_Random_Gaussian(x0, sigma, xmin, xmax)

Generate Gaussian pseudo-random numbers.

SUPPRESSION:_Run(fin, speed, formation, wait)

Make group run/drive to a certain point.

SUPPRESSION:_SearchHideout()

Search a place to hide.

SUPPRESSION:_SetAlarmState(state)

Sets the alarm state of the group and updates the current alarm state variable.

SUPPRESSION:_SetROE(roe)

Sets the ROE for the group and updates the current ROE variable.

SUPPRESSION:_Suppress()

Suppress fire of a unit by setting its ROE to "Weapon Hold".

SUPPRESSION:__Dead(Delay)

Trigger "Dead" event after a delay.

SUPPRESSION:__FallBack(Delay, AttackUnit)

Trigger "FallBack" event after a delay.

SUPPRESSION:__FightBack(Delay)

Trigger "FightBack" event after a delay.

SUPPRESSION:__Hit(Delay, Unit, AttackUnit)

Trigger "Hit" event after a delay.

SUPPRESSION:__OutOfAmmo(Delay)

Trigger "OutOfAmmo" event after a delay.

SUPPRESSION:__Retreat(Delay)

Trigger "Retreat" event after a delay.

SUPPRESSION:__Retreated(Delay)

Trigger "Retreated" event after a delay.

SUPPRESSION:__Status(Delay)

Trigger "Status" event after a delay.

SUPPRESSION:__TakeCover(Delay, Hideout)

Trigger "TakeCover" event after a delay.

SUPPRESSION.eventmoose

If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.

SUPPRESSION.flare

Flare units when they get hit or die.

SUPPRESSION.hideout

Coordinate/place where the group will try to take cover.

SUPPRESSION.lid

String for DCS log file.

SUPPRESSION:onEvent(Event)

Event handler for suppressed groups.

SUPPRESSION:onafterDead(Controllable, From, Event, To)

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

SUPPRESSION:onafterFallBack(Controllable, From, Event, To, AttackUnit)

After "FallBack" event.

SUPPRESSION:onafterFightBack(Controllable, From, Event, To)

After "FightBack" event.

SUPPRESSION:onafterHit(Controllable, From, Event, To, Unit, AttackUnit)

After "Hit" event.

SUPPRESSION:onafterOutOfAmmo(Controllable, From, Event, To)

After "OutOfAmmo" event.

SUPPRESSION:onafterRecovered(Controllable, From, Event, To)

After "Recovered" event.

SUPPRESSION:onafterRetreat(Controllable, From, Event, To)

After "Retreat" event.

SUPPRESSION:onafterRetreated(Controllable, From, Event, To)

After "Retreateded" event.

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

After "Start" event.

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

After "Status" event.

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

After "Stop" event.

SUPPRESSION:onafterTakeCover(Controllable, From, Event, To, Hideout)

After "TakeCover" event.

SUPPRESSION:onbeforeFallBack(Controllable, From, Event, To, AttackUnit)

Before "FallBack" event.

SUPPRESSION:onbeforeRecovered(Controllable, From, Event, To)

Before "Recovered" event.

SUPPRESSION:onbeforeRetreat(Controllable, From, Event, To)

Before "Retreat" event.

SUPPRESSION:onbeforeRetreated(Controllable, From, Event, To)

Before "Retreateded" event.

SUPPRESSION:onbeforeTakeCover(Controllable, From, Event, To, Hideout)

Before "TakeCover" event.

SUPPRESSION.smoke

Smoke places to which the group retreats, falls back or hides.

SUPPRESSION.version

PSEUDOATC version.

SUPPRESSION.waypoints

Waypoints of the group as defined in the ME.

Fields and Methods inherited from FSM_CONTROLLABLE Description

SUPPRESSION.Controllable

SUPPRESSION:GetControllable()

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

SUPPRESSION:New(FSMT, Controllable)

Creates a new FSM_CONTROLLABLE object.

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

OnAfter Transition Handler for Event Stop.

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

OnBefore Transition Handler for Event Stop.

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

OnEnter Transition Handler for State Stopped.

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

OnLeave Transition Handler for State Stopped.

SUPPRESSION:SetControllable(FSMControllable)

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

SUPPRESSION:Stop()

Synchronous Event Trigger for Event Stop.

SUPPRESSION:__Stop(Delay)

Asynchronous Event Trigger for Event Stop.

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

Fields and Methods inherited from SUPPRESSION.AlarmState Description

SUPPRESSION.AlarmState.Auto

Automatic.

SUPPRESSION.AlarmState.Green

Green.

SUPPRESSION.AlarmState.Red

Red.

Fields and Methods inherited from SUPPRESSION.ROE Description

SUPPRESSION.ROE.Free

Weapon fire.

SUPPRESSION.ROE.Hold

Hold fire.

SUPPRESSION.ROE.Return

Return fire.

SUPPRESSION class

Field(s)

#string SUPPRESSION.ClassName

Name of the class.

Wrapper.Controllable#CONTROLLABLE SUPPRESSION.Controllable

Controllable of the FSM. Must be a ground group.

#string SUPPRESSION.CurrentAlarmState

Alam state the group is currently in.

#string SUPPRESSION.CurrentROE

ROE the group currently has.

SUPPRESSION.DCSdesc

Get DCS descriptors of group.

#boolean SUPPRESSION.Debug

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

#string SUPPRESSION.DefaultAlarmState

Alarm state the group will go to when it is changed back from another state. Default is "Auto".

#string SUPPRESSION.DefaultROE

ROE the group will get once suppression is over. Default is "Free".

#number SUPPRESSION.FallbackDist

Distance in meters the unit will fall back.

#number SUPPRESSION.FallbackHeading

Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.

#boolean SUPPRESSION.FallbackON

If true, group can fall back, i.e. move away from the attacking unit.

#number SUPPRESSION.FallbackWait

Time in seconds the unit will wait at the fall back point before it resumes its mission.

#string SUPPRESSION.Formation

Formation which will be used when falling back, taking cover or retreating. Default "Vee".

#number SUPPRESSION.IniGroupStrength

Number of units in a group at start.

#boolean SUPPRESSION.IsInfantry

True if group has attribute Infantry.

#string SUPPRESSION.MenuF10

Main F10 menu for suppresion, i.e.

F10/Suppression.

#boolean SUPPRESSION.MenuON

If true creates a entry in the F10 menu.

#number SUPPRESSION.Nhit

Number of times the group was hit.

#number SUPPRESSION.PmaxFlee

Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.

#number SUPPRESSION.PminFlee

Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.

#number SUPPRESSION.RetreatDamage

Damage in percent at which the group will be ordered to retreat.

#number SUPPRESSION.RetreatWait

Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.

Core.Zone#ZONE SUPPRESSION.RetreatZone

Zone to which a group retreats.

#number SUPPRESSION.Speed

Speed the unit will use when falling back, taking cover or retreating. Default 999.

#number SUPPRESSION.SpeedMax

Maximum speed of group in km/h.

#boolean SUPPRESSION.TakecoverON

If true, group can hide at a nearby scenery object.

#number SUPPRESSION.TakecoverRange

Range in which the group will search for scenery objects to hide at.

#number SUPPRESSION.TakecoverWait

Time in seconds the group will hide before it will resume its mission.

#number SUPPRESSION.Tsuppress_ave

Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.

#number SUPPRESSION.Tsuppress_max

Maximum time in seconds the group gets suppressed.

#number SUPPRESSION.Tsuppress_min

Minimum time in seconds the group gets suppressed.

#number SUPPRESSION.TsuppressionOver

Time at which the suppression will be over.

#string SUPPRESSION.Type

Type of the group.

#boolean SUPPRESSION.eventmoose

If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.

#boolean SUPPRESSION.flare

Flare units when they get hit or die.

Core.Point#COORDINATE SUPPRESSION.hideout

Coordinate/place where the group will try to take cover.

#string SUPPRESSION.lid

String for DCS log file.

#boolean SUPPRESSION.smoke

Smoke places to which the group retreats, falls back or hides.

#number SUPPRESSION.version

PSEUDOATC version.

#table SUPPRESSION.waypoints

Waypoints of the group as defined in the ME.

Function(s)

Trigger "Dead" event.

Defined in:

SUPPRESSION

Turn Debug mode on.

Enables messages and more output to DCS log file.

Defined in:

SUPPRESSION

Trigger "FallBack" event.

Defined in:

SUPPRESSION

Parameter:

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

Enable fall back if a group is hit.

Defined in:

SUPPRESSION

Parameter:

#boolean switch

Enable=true or disable=false fall back of group.

Trigger "FightBack" event.

Defined in:

SUPPRESSION

Flare units when they are hit, die or recover from suppression.

Defined in:

SUPPRESSION

Trigger "Hit" event.

Defined in:

SUPPRESSION

Parameters:

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

Create an F10 menu entry for the suppressed group.

The menu is mainly for Debugging purposes.

Defined in:

SUPPRESSION

Parameter:

#boolean switch

Enable=true or disable=false menu group. Default is true.

Creates a new AI_suppression object.

Defined in:

SUPPRESSION

Parameter:

The GROUP object for which suppression should be applied.

Return value:

self

User function for OnAfter "Dead" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "FallBack" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

User function for OnAfter "FlightBack" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Hit" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

User function for OnAfter "OutOfAmmo" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Recovered" event.

Defined in:

SUPPRESSION

Parameters:

of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Retreat" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Retreated" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Status" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "TakeCover" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Place where the group will hide.

User function for OnBefore "FallBack" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

Return value:

#boolean:

User function for OnBefore "FlightBack" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

User function for OnBefore "Hit" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

Return value:

#boolean:

User function for OnBefore "Recovered" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

User function for OnBefore "Retreat" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

User function for OnBefore "Retreated" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

User function for OnBefore "TakeCover" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Place where the group will hide.

Return value:

#boolean:

Order group to fall back between 100 and 150 meters in a random direction.

Defined in:

SUPPRESSION

Order group to retreat to a pre-defined zone.

Defined in:

SUPPRESSION

Order group to take cover at a nearby scenery object.

Defined in:

SUPPRESSION

Trigger "OutOfAmmo" event.

Defined in:

SUPPRESSION

Trigger "Recovered" event after a delay.

Defined in:

SUPPRESSION

Parameters:

#number Delay

Delay in seconds.

Trigger "Retreat" event.

Defined in:

SUPPRESSION

Trigger "Retreated" event.

Defined in:

SUPPRESSION

Set alarm state a group will get after it returns from a fall back or take cover.

Defined in:

SUPPRESSION

Parameter:

#string alarmstate

Alarm state. Possible "Auto", "Green", "Red". Default is "Auto".

Set Rules of Engagement (ROE) a group will get when it recovers from suppression.

Defined in:

SUPPRESSION

Parameter:

#string roe

ROE after suppression. Possible "Free", "Hold" or "Return". Default "Free".

Set distance a group will fall back when it gets hit.

Defined in:

SUPPRESSION

Parameter:

#number distance

Distance in meters.

Set time a group waits at its fall back position before it resumes its normal mission.

Defined in:

SUPPRESSION

Parameter:

#number time

Time in seconds.

Set the formation a group uses for fall back, hide or retreat.

Defined in:

SUPPRESSION

Parameter:

#string formation

Formation of the group. Default "Vee".

Set maximum probability that a group flees (falls back or takes cover) after a hit event.

Default is 90%.

Defined in:

SUPPRESSION

Parameter:

#number probability

Probability in percent.

Set minimum probability that a group flees (falls back or takes cover) after a hit event.

Default is 10%.

Defined in:

SUPPRESSION

Parameter:

#number probability

Probability in percent.

Set damage threshold before a group is ordered to retreat if a retreat zone was defined.

If the group consists of only a singe unit, this referrs to the life of the unit. If the group consists of more than one unit, this referrs to the group strength relative to its initial strength.

Defined in:

SUPPRESSION

Parameter:

#number damage

Damage in percent. If group gets damaged above this value, the group will retreat. Default 50 %.

Set time a group waits in the retreat zone before it resumes its mission.

Default is two hours.

Defined in:

SUPPRESSION

Parameter:

#number time

Time in seconds. Default 7200 seconds = 2 hours.

Set the zone to which a group retreats after being damaged too much.

Defined in:

SUPPRESSION

Parameter:

MOOSE zone object.

Set speed a group moves at for fall back, hide or retreat.

Defined in:

SUPPRESSION

Parameter:

#number speed

Speed in km/h of group. Default max speed the group can do.

Set average, minimum and maximum time a unit is suppressed each time it gets hit.

Defined in:

SUPPRESSION

Parameters:

#number Tave

Average time [seconds] a group will be suppressed. Default is 15 seconds.

#number Tmin

(Optional) Minimum time [seconds] a group will be suppressed. Default is 5 seconds.

#number Tmax

(Optional) Maximum time a group will be suppressed. Default is 25 seconds.

Set hideout place explicitly.

Defined in:

SUPPRESSION

Parameter:

Place where the group will hide after the TakeCover event.

Set distance a group searches for hideout places.

Defined in:

SUPPRESSION

Parameter:

#number range

Search range in meters.

Set time a group waits at its hideout position before it resumes its normal mission.

Defined in:

SUPPRESSION

Parameter:

#number time

Time in seconds.

Smoke positions where units fall back to, hide or retreat.

Defined in:

SUPPRESSION

Trigger "Status" event.

Defined in:

SUPPRESSION

Status of group.

Current ROE, alarm state, life.

Defined in:

SUPPRESSION

Parameter:

#boolean message

Send message to all players.

Trigger "TakeCover" event.

Defined in:

SUPPRESSION

Parameter:

Place where the group will hide.

Enable take cover option if a unit is hit.

Defined in:

SUPPRESSION

Parameter:

#boolean switch

Enable=true or disable=false fall back of group.

Create F10 main menu, i.e.

F10/Suppression. The menu is mainly for Debugging purposes.

Defined in:

SUPPRESSION

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

Defined in:

SUPPRESSION

Parameters:

#string BA

Before/after info.

#string Event

Event.

#string From

From state.

#string To

To state.

Get (relative) life in percent of a group.

Function returns the value of the units with the smallest and largest life. Also the average value of all groups is returned.

Defined in:

SUPPRESSION

Return values:

#number:

Smallest life value of all units.

#number:

Largest life value of all units.

#number:

Average life value of all alife groups

#number:

Average life value of all groups including already dead ones.

#number:

Relative group strength.

Heading from point a to point b in degrees.

Defined in:

SUPPRESSION

Parameters:

Coordinate.

Coordinate.

Return value:

#number:

angle Angle from a to b in degrees.

Event handler for Dead event of suppressed groups.

Defined in:

SUPPRESSION

Parameter:

Event handler for Dead event of suppressed groups.

Defined in:

SUPPRESSION

Parameter:

Function called when group is passing a waypoint.

At the last waypoint we set the group back to CombatReady.

Defined in:

SUPPRESSION

Parameters:

Group which is passing a waypoint.

The suppression object.

#number i

Waypoint number that has been reached.

#boolean final

True if it is the final waypoint. Start Fightback.

Generate Gaussian pseudo-random numbers.

Defined in:

SUPPRESSION

Parameters:

#number x0

Expectation value of distribution.

#number sigma

(Optional) Standard deviation. Default 10.

#number xmin

(Optional) Lower cut-off value.

#number xmax

(Optional) Upper cut-off value.

Return value:

#number:

Gaussian random number.

Make group run/drive to a certain point.

We put in several intermediate waypoints because sometimes the group stops before it arrived at the desired point.

Defined in:

SUPPRESSION

Parameters:

Coordinate where we want to go.

#number speed

Speed of group. Default is 20.

#string formation

Formation of group. Default is "Vee".

#number wait

Time the group will wait/hold at final waypoint. Default is 30 seconds.

Search a place to hide.

This is any scenery object in the vicinity.

Defined in:

SUPPRESSION

Return values:

Coordinate of the hideout place.

nil If no scenery object is within search radius.

Sets the alarm state of the group and updates the current alarm state variable.

Defined in:

SUPPRESSION

Parameter:

#string state

Alarm state the group will get. Possible "Auto", "Green", "Red". Default is self.DefaultAlarmState.

Sets the ROE for the group and updates the current ROE variable.

Defined in:

SUPPRESSION

Parameter:

#string roe

ROE the group will get. Possible "Free", "Hold", "Return". Default is self.DefaultROE.

Suppress fire of a unit by setting its ROE to "Weapon Hold".

Defined in:

SUPPRESSION

Trigger "Dead" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "FallBack" event after a delay.

Defined in:

SUPPRESSION

Parameters:

#number Delay

Delay in seconds.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

Trigger "FightBack" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "Hit" event after a delay.

Defined in:

SUPPRESSION

Parameters:

#number Delay

Delay in seconds.

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

Trigger "OutOfAmmo" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "Retreat" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "Retreated" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "Status" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "TakeCover" event after a delay.

Defined in:

SUPPRESSION

Parameters:

#number Delay

Delay in seconds.

Place where the group will hide.

Event handler for suppressed groups.

Defined in:

SUPPRESSION

Parameter:

Event

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

When all units of a group are dead, FSM is stopped and eventhandler removed.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "FallBack" event.

We get the heading away from the attacker and route the group a certain distance in that direction.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

After "FightBack" event.

ROE and Alarm state are set back to default.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Hit" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

After "OutOfAmmo" event.

Triggered when group is completely out of ammo.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Recovered" event.

Group has recovered and its ROE is set back to the "normal" unsuppressed state. Optionally the group is flared green.

Defined in:

SUPPRESSION

Parameters:

of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Retreat" event.

Find a random point in the retreat zone and route the group there.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Retreateded" event.

Group has reached the retreat zone. Set ROE to return fire and alarm state to auto.

Defined in:

SUPPRESSION

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:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Status" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Stop" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "TakeCover" event.

Group will run to a nearby scenery object and "hide" there for a certain time.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Place where the group will hide.

Before "FallBack" event.

We check that group is not already falling back.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

Return value:

#boolean:

Before "Recovered" event.

Check if suppression time is over.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

Before "Retreat" event.

We check that the group is not already retreating.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

True if transition is allowed, False if transition is forbidden.

Before "Retreateded" event.

Check that the group is really in the retreat zone.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Before "TakeCover" event.

Search an area around the group for possible scenery objects where the group can hide.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Place where the group will hide.

Return value:

#boolean:

Field(s)

#string SUPPRESSION.ClassName

Name of the class.

Wrapper.Controllable#CONTROLLABLE SUPPRESSION.Controllable

Controllable of the FSM. Must be a ground group.

#string SUPPRESSION.CurrentAlarmState

Alam state the group is currently in.

#string SUPPRESSION.CurrentROE

ROE the group currently has.

SUPPRESSION.DCSdesc

Get DCS descriptors of group.

#boolean SUPPRESSION.Debug

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

#string SUPPRESSION.DefaultAlarmState

Alarm state the group will go to when it is changed back from another state. Default is "Auto".

#string SUPPRESSION.DefaultROE

ROE the group will get once suppression is over. Default is "Free".

#number SUPPRESSION.FallbackDist

Distance in meters the unit will fall back.

#number SUPPRESSION.FallbackHeading

Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.

#boolean SUPPRESSION.FallbackON

If true, group can fall back, i.e. move away from the attacking unit.

#number SUPPRESSION.FallbackWait

Time in seconds the unit will wait at the fall back point before it resumes its mission.

#string SUPPRESSION.Formation

Formation which will be used when falling back, taking cover or retreating. Default "Vee".

#number SUPPRESSION.IniGroupStrength

Number of units in a group at start.

#boolean SUPPRESSION.IsInfantry

True if group has attribute Infantry.

#string SUPPRESSION.MenuF10

Main F10 menu for suppresion, i.e.

F10/Suppression.

#boolean SUPPRESSION.MenuON

If true creates a entry in the F10 menu.

#number SUPPRESSION.Nhit

Number of times the group was hit.

#number SUPPRESSION.PmaxFlee

Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.

#number SUPPRESSION.PminFlee

Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.

#number SUPPRESSION.RetreatDamage

Damage in percent at which the group will be ordered to retreat.

#number SUPPRESSION.RetreatWait

Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.

Core.Zone#ZONE SUPPRESSION.RetreatZone

Zone to which a group retreats.

#number SUPPRESSION.Speed

Speed the unit will use when falling back, taking cover or retreating. Default 999.

#number SUPPRESSION.SpeedMax

Maximum speed of group in km/h.

#boolean SUPPRESSION.TakecoverON

If true, group can hide at a nearby scenery object.

#number SUPPRESSION.TakecoverRange

Range in which the group will search for scenery objects to hide at.

#number SUPPRESSION.TakecoverWait

Time in seconds the group will hide before it will resume its mission.

#number SUPPRESSION.Tsuppress_ave

Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.

#number SUPPRESSION.Tsuppress_max

Maximum time in seconds the group gets suppressed.

#number SUPPRESSION.Tsuppress_min

Minimum time in seconds the group gets suppressed.

#number SUPPRESSION.TsuppressionOver

Time at which the suppression will be over.

#string SUPPRESSION.Type

Type of the group.

#boolean SUPPRESSION.eventmoose

If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.

#boolean SUPPRESSION.flare

Flare units when they get hit or die.

Core.Point#COORDINATE SUPPRESSION.hideout

Coordinate/place where the group will try to take cover.

#string SUPPRESSION.lid

String for DCS log file.

#boolean SUPPRESSION.smoke

Smoke places to which the group retreats, falls back or hides.

#number SUPPRESSION.version

PSEUDOATC version.

#table SUPPRESSION.waypoints

Waypoints of the group as defined in the ME.

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

Enumerator of possible alarm states.

Field(s)

#string SUPPRESSION.AlarmState.Auto

Automatic.

Function(s)

Enumerator of possible rules of engagement.

Field(s)

#string SUPPRESSION.ROE.Free

Weapon fire.

#string SUPPRESSION.ROE.Hold

Hold fire.

#string SUPPRESSION.ROE.Return

Return fire.

Function(s)