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. |
Mimic suppressive enemy fire and let groups flee or retreat.
Suppression 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.
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.
Customization and Fine Tuning
The following user functions can be used to change the default values
- SUPPRESSION.SetSuppressionTime() can be used to set the time a goup gets suppressed.
- SUPPRESSION.SetRetreatZone() sets the retreat zone and enables the possiblity for the group to retreat.
- SUPPRESSION.SetFallbackDistance() sets a value how far the unit moves away from the attacker after the fallback event.
- SUPPRESSION.SetFallbackWait() sets the time after which the group resumes its mission after a FallBack event.
- SUPPRESSION.SetTakecoverWait() sets the time after which the group resumes its mission after a TakeCover event.
- SUPPRESSION.SetTakecoverRange() sets the radius in which hideouts are searched.
- SUPPRESSION.SetTakecoverPlace() explicitly sets the place where the group will run at a TakeCover event.
- SUPPRESSION.SetMinimumFleeProbability() sets the minimum probability that a group flees (FallBack or TakeCover) after a hit. Note taht the probability increases with damage.
- SUPPRESSION.SetMaximumFleeProbability() sets the maximum probability that a group flees (FallBack or TakeCover) after a hit. Default is 90%.
- SUPPRESSION.SetRetreatDamage() sets the damage a group/unit can take before it is ordered to retreat.
- SUPPRESSION.SetRetreatWait() sets the time a group waits in the retreat zone after a retreat.
- SUPPRESSION.SetDefaultAlarmState() sets the alarm state a group gets after it becomes CombatReady again.
- SUPPRESSION.SetDefaultROE() set the rules of engagement a group gets after it becomes CombatReady again.
- SUPPRESSION.FlareOn() is mainly for debugging. A flare is fired when a unit is hit, gets suppressed, recovers, dies.
- SUPPRESSION.SmokeOn() is mainly for debugging. Puts smoke on retreat zone, hideouts etc.
- SUPPRESSION.MenuON() is mainly for debugging. Activates a radio menu item where certain functions like retreat etc. can be triggered manually.
Type(s)
Fields and Methods inherited from SUPPRESSION | Description |
---|---|
Name of the class. |
|
Controllable of the FSM. Must be a ground group. |
|
Alam state the group is currently in. |
|
ROE the group currently has. |
|
Trigger "Dead" event. |
|
Write Debug messages to DCS log file and send Debug messages to all players. |
|
Turn Debug mode on. |
|
Alarm state the group will go to when it is changed back from another state. Default is "Auto". |
|
ROE the group will get once suppression is over. Default is "Free". |
|
Trigger "FallBack" event. |
|
Enable fall back if a group is hit. |
|
Distance in meters the unit will fall back. |
|
Heading in degrees to which the group should fall back. Default is directly away from the attacking unit. |
|
If true, group can fall back, i.e. move away from the attacking unit. |
|
Time in seconds the unit will wait at the fall back point before it resumes its mission. |
|
Trigger "FightBack" event. |
|
Flare units when they are hit, die or recover from suppression. |
|
Formation which will be used when falling back, taking cover or retreating. Default "Vee". |
|
Trigger "Hit" event. |
|
Number of units in a group at start. |
|
True if group has attribute Infantry. |
|
Main F10 menu for suppresion, i.e. |
|
If true creates a entry in the F10 menu. |
|
Create an F10 menu entry for the suppressed group. |
|
Creates a new AI_suppression object. |
|
Number of times the group was hit. |
|
User function for OnAfter "Dead" event. |
|
SUPPRESSION:OnAfterFallBack(Controllable, From, Event, To, AttackUnit) |
User function for OnAfter "FallBack" event. |
User function for OnAfter "FlightBack" event. |
|
SUPPRESSION:OnAfterHit(Controllable, From, Event, To, Unit, AttackUnit) |
User function for OnAfter "Hit" event. |
User function for OnAfter "OutOfAmmo" event. |
|
User function for OnAfter "Recovered" event. |
|
User function for OnAfter "Retreat" event. |
|
User function for OnAfter "Retreated" event. |
|
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. |
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. |
Order group to fall back between 100 and 150 meters in a random direction. |
|
Order group to retreat to a pre-defined zone. |
|
Order group to take cover at a nearby scenery object. |
|
Trigger "OutOfAmmo" event. |
|
Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %. |
|
Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %. |
|
Trigger "Recovered" event after a delay. |
|
Trigger "Retreat" event. |
|
Damage in percent at which the group will be ordered to retreat. |
|
Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours. |
|
Zone to which a group retreats. |
|
Trigger "Retreated" event. |
|
Set alarm state a group will get after it returns from a fall back or take cover. |
|
Set Rules of Engagement (ROE) a group will get when it recovers from suppression. |
|
Set distance a group will fall back when it gets hit. |
|
Set time a group waits at its fall back position before it resumes its normal mission. |
|
Set the formation a group uses for fall back, hide or retreat. |
|
Set maximum probability that a group flees (falls back or takes cover) after a hit event. |
|
Set minimum probability that a group flees (falls back or takes cover) after a hit event. |
|
Set damage threshold before a group is ordered to retreat if a retreat zone was defined. |
|
Set time a group waits in the retreat zone before it resumes its mission. |
|
Set the zone to which a group retreats after being damaged too much. |
|
Set speed a group moves at for fall back, hide or retreat. |
|
Set average, minimum and maximum time a unit is suppressed each time it gets hit. |
|
Set hideout place explicitly. |
|
Set distance a group searches for hideout places. |
|
Set time a group waits at its hideout position before it resumes its normal mission. |
|
Smoke positions where units fall back to, hide or retreat. |
|
Speed the unit will use when falling back, taking cover or retreating. Default 999. |
|
Maximum speed of group in km/h. |
|
Trigger "Status" event. |
|
Status of group. |
|
Trigger "TakeCover" event. |
|
Enable take cover option if a unit is hit. |
|
If true, group can hide at a nearby scenery object. |
|
Range in which the group will search for scenery objects to hide at. |
|
Time in seconds the group will hide before it will resume its mission. |
|
Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution. |
|
Maximum time in seconds the group gets suppressed. |
|
Minimum time in seconds the group gets suppressed. |
|
Time at which the suppression will be over. |
|
Type of the group. |
|
Create F10 main menu, i.e. |
|
Print event-from-to string to DCS log file. |
|
Get (relative) life in percent of a group. |
|
Heading from point a to point b in degrees. |
|
Event handler for Dead event of suppressed groups. |
|
Event handler for Dead event of suppressed groups. |
|
Function called when group is passing a waypoint. |
|
Generate Gaussian pseudo-random numbers. |
|
Make group run/drive to a certain point. |
|
Search a place to hide. |
|
Sets the alarm state of the group and updates the current alarm state variable. |
|
Sets the ROE for the group and updates the current ROE variable. |
|
Suppress fire of a unit by setting its ROE to "Weapon Hold". |
|
Trigger "Dead" event after a delay. |
|
Trigger "FallBack" event after a delay. |
|
Trigger "FightBack" event after a delay. |
|
Trigger "Hit" event after a delay. |
|
Trigger "OutOfAmmo" event after a delay. |
|
Trigger "Retreat" event after a delay. |
|
Trigger "Retreated" event after a delay. |
|
Trigger "Status" event after a delay. |
|
Trigger "TakeCover" event after a delay. |
|
If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true. |
|
Flare units when they get hit or die. |
|
Coordinate/place where the group will try to take cover. |
|
String for DCS log file. |
|
Event handler for suppressed groups. |
|
After "Dead" event, when a unit has died. |
|
SUPPRESSION:onafterFallBack(Controllable, From, Event, To, AttackUnit) |
After "FallBack" event. |
After "FightBack" event. |
|
SUPPRESSION:onafterHit(Controllable, From, Event, To, Unit, AttackUnit) |
After "Hit" event. |
After "OutOfAmmo" event. |
|
After "Recovered" event. |
|
After "Retreat" event. |
|
After "Retreateded" event. |
|
After "Start" event. |
|
After "Status" event. |
|
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. |
Before "Retreat" event. |
|
SUPPRESSION:onbeforeRetreated(Controllable, From, Event, To) |
Before "Retreateded" event. |
SUPPRESSION:onbeforeTakeCover(Controllable, From, Event, To, Hideout) |
Before "TakeCover" event. |
Smoke places to which the group retreats, falls back or hides. |
|
PSEUDOATC version. |
|
Waypoints of the group as defined in the ME. |
Fields and Methods inherited from FSM_CONTROLLABLE | Description |
---|---|
Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs. |
|
Creates a new FSM_CONTROLLABLE object. |
|
OnAfter Transition Handler for Event Stop. |
|
OnBefore Transition Handler for Event Stop. |
|
OnEnter Transition Handler for State Stopped. |
|
OnLeave Transition Handler for State Stopped. |
|
Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs. |
|
Synchronous Event Trigger for Event Stop. |
|
Asynchronous Event Trigger for Event Stop. |
|
Fields and Methods inherited from SUPPRESSION.AlarmState | Description |
---|---|
Automatic. |
|
Green. |
|
Red. |
Fields and Methods inherited from SUPPRESSION.ROE | Description |
---|---|
Weapon fire. |
|
Hold fire. |
|
Return fire. |
SUPPRESSION class
Field(s)
Name of the class.
Controllable of the FSM. Must be a ground group.
Alam state the group is currently in.
ROE the group currently has.
Get DCS descriptors of group.
Write Debug messages to DCS log file and send Debug messages to all players.
Alarm state the group will go to when it is changed back from another state. Default is "Auto".
ROE the group will get once suppression is over. Default is "Free".
Distance in meters the unit will fall back.
Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.
If true, group can fall back, i.e. move away from the attacking unit.
Time in seconds the unit will wait at the fall back point before it resumes its mission.
Formation which will be used when falling back, taking cover or retreating. Default "Vee".
Number of units in a group at start.
True if group has attribute Infantry.
If true creates a entry in the F10 menu.
Number of times the group was hit.
Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.
Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.
Damage in percent at which the group will be ordered to retreat.
Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.
Speed the unit will use when falling back, taking cover or retreating. Default 999.
Maximum speed of group in km/h.
If true, group can hide at a nearby scenery object.
Range in which the group will search for scenery objects to hide at.
Time in seconds the group will hide before it will resume its mission.
Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.
Maximum time in seconds the group gets suppressed.
Minimum time in seconds the group gets suppressed.
Time at which the suppression will be over.
Type of the group.
If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.
Flare units when they get hit or die.
String for DCS log file.
Smoke places to which the group retreats, falls back or hides.
PSEUDOATC version.
Waypoints of the group as defined in the ME.
Function(s)
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.
Flare units when they are hit, die or recover from suppression.
Defined in:
SUPPRESSION
Trigger "Hit" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Unit#UNIT Unit
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:
Wrapper.Group#GROUP group
The GROUP object for which suppression should be applied.
Return value:
self
User function for OnAfter "Dead" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
Wrapper.Unit#UNIT Unit
Unit that was hit.
Wrapper.Unit#UNIT AttackUnit
Unit that attacked.
User function for OnAfter "OutOfAmmo" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
User function for OnAfter "Retreat" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
Core.Point#COORDINATE Hideout
Place where the group will hide.
User function for OnBefore "FallBack" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
Wrapper.Unit#UNIT Unit
Unit that was hit.
Wrapper.Unit#UNIT AttackUnit
Unit that attacked.
Return value:
#boolean:
User function for OnBefore "Recovered" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
Core.Point#COORDINATE Hideout
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 take cover at a nearby scenery object.
Defined in:
SUPPRESSION
Trigger "Recovered" event after a delay.
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.
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:
Core.Point#COORDINATE Hideout
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
Status of group.
Current ROE, alarm state, life.
Defined in:
SUPPRESSION
Parameter:
#boolean message
Send message to all players.
Trigger "TakeCover" event.
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.
Event handler for Dead event of suppressed groups.
Function called when group is passing a waypoint.
At the last waypoint we set the group back to CombatReady.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Group#GROUP group
Group which is passing a waypoint.
#SUPPRESSION Fsm
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.
Wrapper.Unit#UNIT Unit
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.
Core.Point#COORDINATE Hideout
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
After "Hit" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
Wrapper.Unit#UNIT Unit
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
After "Status" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
After "Stop" event.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
Core.Point#COORDINATE Hideout
Place where the group will hide.
Before "FallBack" event.
We check that group is not already falling back.
Defined in:
SUPPRESSION
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
Controllable of the group.
#string From
From state.
#string Event
Event.
#string To
To state.
Core.Point#COORDINATE Hideout
Place where the group will hide.
Return value:
#boolean:
Field(s)
Name of the class.
Controllable of the FSM. Must be a ground group.
Alam state the group is currently in.
ROE the group currently has.
Get DCS descriptors of group.
Write Debug messages to DCS log file and send Debug messages to all players.
Alarm state the group will go to when it is changed back from another state. Default is "Auto".
ROE the group will get once suppression is over. Default is "Free".
Distance in meters the unit will fall back.
Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.
If true, group can fall back, i.e. move away from the attacking unit.
Time in seconds the unit will wait at the fall back point before it resumes its mission.
Formation which will be used when falling back, taking cover or retreating. Default "Vee".
Number of units in a group at start.
True if group has attribute Infantry.
If true creates a entry in the F10 menu.
Number of times the group was hit.
Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.
Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.
Damage in percent at which the group will be ordered to retreat.
Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.
Speed the unit will use when falling back, taking cover or retreating. Default 999.
Maximum speed of group in km/h.
If true, group can hide at a nearby scenery object.
Range in which the group will search for scenery objects to hide at.
Time in seconds the group will hide before it will resume its mission.
Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.
Maximum time in seconds the group gets suppressed.
Minimum time in seconds the group gets suppressed.
Time at which the suppression will be over.
Type of the group.
If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.
Flare units when they get hit or die.
String for DCS log file.
Smoke places to which the group retreats, falls back or hides.
PSEUDOATC version.
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
Wrapper.Controllable#CONTROLLABLE Controllable
(optional) The CONTROLLABLE object that the FSM_CONTROLLABLE governs.
Return value:
OnAfter Transition Handler for Event Stop.
Defined in:
Parameters:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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:
Wrapper.Controllable#CONTROLLABLE Controllable
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.
Asynchronous Event Trigger for Event Stop.
Enumerator of possible alarm states.
Field(s)
Automatic.
Green.
Red.
Function(s)
Enumerator of possible rules of engagement.
Field(s)
Weapon fire.
Hold fire.
Return fire.