Module Ops.Chief
Ops - Chief of Staff.
Main Features:
- Automatic target engagement based on detection network
- Define multiple border, conflict and attack zones
- Define strategic "capture" zones
- Set strategy of chief from passive to agressive
- Manual target engagement via AUFTRAG and TARGET classes
- Add AIRWINGS, BRIGADES and FLEETS as resources
- Seamless air-to-air, air-to-ground, ground-to-ground dispatching
Author: funkyfranky
Global(s)
Global CHIEF |
In preparing for battle I have always found that plans are useless, but planning is indispensable -- Dwight D Eisenhower The CHIEF ConceptThe Chief of staff gathers INTEL and assigns missions (AUFTRAG) to the airforce, army and/or navy. |
In preparing for battle I have always found that plans are useless, but planning is indispensable -- Dwight D Eisenhower
The CHIEF Concept
The Chief of staff gathers INTEL and assigns missions (AUFTRAG) to the airforce, army and/or navy.
The distinguished feature here is that this class combines all three forces under one hood. Therefore, this class be used as an air-to-air, air-to-ground, ground-to-ground, air-to-sea, sea-to-ground, etc. dispachter.
Territory
The chief class allows you to define boarder zones, conflict zones and attack zones.
Border Zones
Border zones define your own territory. They can be set via the CHIEF.SetBorderZones() function as a set or added zone by zone via the CHIEF.AddBorderZone() function.
Conflict Zones
Conflict zones define areas, which usually are under dispute of different coalitions. They can be set via the CHIEF.SetConflictZones() function as a set or added zone by zone via the CHIEF.AddConflictZone() function.
Attack Zones
Attack zones are zones that usually lie within the enemy territory. They are only enganged with an agressive strategy. They can be set via the CHIEF.SetAttackZones() function as a set or added zone by zone via the CHIEF.AddAttackZone() function.
Defense Condition
The defence condition (DEFCON) depends on enemy activity detected in the different zone types and is set automatically.
CHIEF.Defcon.GREEN
: No enemy activities detected.CHIEF.Defcon.YELLOW
: Enemy activity detected in conflict zones.CHIEF.Defcon.RED
: Enemy activity detected in border zones.
The current DEFCON can be retrieved with the @(#CHIEF.GetDefcon)() function.
When the DEFCON changed, an FSM event CHIEF.DefconChange is triggered. Mission designers can hook into this event via the CHIEF.OnAfterDefconChange() function:
--- Function called when the DEFCON changes.
function myChief:OnAfterDefconChange(From, Event, To, Defcon)
local text=string.format("Changed DEFCON to %s", Defcon)
MESSAGE:New(text, 120):ToAll()
end
Strategy
The strategy of the chief determines, in which areas targets are engaged automatically.
CHIEF.Strategy.PASSIVE
: Chief is completely passive. No targets at all are engaged automatically.CHIEF.Strategy.DEFENSIVE
: Chief acts defensively. Only targets in his own territory are engaged.CHIEF.Strategy.OFFENSIVE
: Chief behaves offensively. Targets in his own territory and in conflict zones are enganged.CHIEF.Strategy.AGGRESSIVE
: Chief is aggressive. Targets in his own territory, in conflict zones and in attack zones are enganged.CHIEF.Strategy.TOTALWAR
: Anything anywhere is enganged.
The strategy can be set by the @(#CHIEF.SetStrategy)() and retrieved with the @(#CHIEF.GetStrategy)() function.
When the strategy is changed, the FSM event CHIEF.StrategyChange is triggered and customized code can be added to the CHIEF.OnAfterStrategyChange() function:
--- Function called when the STRATEGY changes.
function myChief:OnAfterStrategyChange(From, Event, To, Strategy)
local text=string.format("Strategy changd to %s", Strategy)
MESSAGE:New(text, 120):ToAll()
end
Resources
A chief needs resources such as air, ground and naval assets. These can be added in form of AIRWINGs, BRIGADEs and FLEETs.
Whenever the chief detects a target or receives a mission, he will select the best available assets and assign them to the mission. The best assets are determined by their mission performance, payload performance (in case of air), distance to the target, skill level, etc.
Adding Airwings
Airwings can be added via the CHIEF.AddAirwing() function.
Adding Brigades
Brigades can be added via the CHIEF.AddBrigade() function.
Adding Fleets
Fleets can be added via the CHIEF.AddFleet() function.
Response on Target
When the chief detects a valid target, he will launch a certain number of selected assets. Only whole groups from SQUADRONs, PLATOONs or FLOTILLAs can be selected. In other words, it is not possible to specify the abount of individual units.
By default, one group is selected for any detected target. This can, however, be customized with the CHIEF.SetResponseOnTarget() function. The number of min and max asset groups can be specified depending on threatlevel, category, mission type, number of units, defcon and strategy.
For example:
-- One group for aircraft targets of threat level 0 or higher.
myChief:SetResponseOnTarget(1, 1, 0, TARGET.Category.AIRCRAFT)
-- At least one and up to two groups for aircraft targets of threat level 8 or higher. This will overrule the previous response!
myChief:SetResponseOnTarget(1, 2, 8, TARGET.Category.AIRCRAFT)
-- At least one and up to three groups for ground targets of threat level 0 or higher if current strategy is aggressive.
myChief:SetResponseOnTarget(1, 1, 0, TARGET.Category.GROUND, nil ,nil, nil, CHIEF.Strategy.DEFENSIVE)
-- One group for BAI missions if current defcon is green.
myChief:SetResponseOnTarget(1, 1, 0, nil, AUFTRAG.Type.BAI, nil, CHIEF.DEFCON.GREEN)
-- At least one and up to four groups for BAI missions if current defcon is red.
myChief:SetResponseOnTarget(1, 2, 0, nil, AUFTRAG.Type.BAI, nil, CHIEF.DEFCON.YELLOW)
-- At least one and up to four groups for BAI missions if current defcon is red.
myChief:SetResponseOnTarget(1, 3, 0, nil, AUFTRAG.Type.BAI, nil, CHIEF.DEFCON.RED)
Strategic (Capture) Zones
Strategically important zones, which should be captured can be added via the CHIEF.AddStrategicZone(OpsZone, Prio, Importance) function.
The first parameter OpsZone is an Ops.OpsZone#OPSZONE specifying the zone. This has to be a circular zone due to DCS API restrictions.
The second parameter Prio is the priority. The zone queue is sorted wrt to lower prio values. By default this is set to 50.
The third parameter Importance is the importance of the zone. By default this is nil
. If you specify one zone with importance 2 and a second zone with
importance 3, then the zone of importance 2 is attacked first and only if that zone has been captured, zones that have importances with higher values are attacked.
For example:
local myStratZone=myChief:AddStrategicZone(myOpsZone, nil , 2)
Will at a strategic zone with importance 2.
If the zone is currently owned by another coalition and enemy ground troops are present in the zone, a CAS and an ARTY mission are lauchned:
- A mission of type
AUFTRAG.Type.CASENHANCED
is started if assets are available that can carry out this mission type. - A mission of type
AUFTRAG.Type.ARTY
is started provided assets are available.
The CAS flight(s) will patrol the zone randomly and take out enemy ground units they detect. It can always be possible that the enemies cannot be detected however. The assets will shell the zone. However, it is unlikely that they hit anything as they do not have any information about the location of the enemies.
Once the zone is cleaned of enemy forces, ground troops are send there. By default, two missions are launched:
- First mission is of type
AUFTRAG.Type.ONGUARD
and will send infantry groups. These are transported by helicopters. Therefore, helo assets withAUFTRAG.Type.OPSTRANSPORT
need to be available. - The second mission is also of type
AUFTRAG.Type.ONGUARD
but will send tanks if these are available.
Customized Reaction
The default mission types and number of assets can be customized for the two scenarious (zone empty or zone occupied by the enemy).
In order to do this, you need to create resource lists (one for each scenario) via the CHIEF.CreateResource() function. These lists can than passed as additional parameters to the CHIEF.AddStrategicZone function.
For example:
--- Create a resource list of mission types and required assets for the case that the zone is OCCUPIED.
--
-- Here, we create an enhanced CAS mission and employ at least on and at most two asset groups.
-- NOTE that two objects are returned, the resource list (ResourceOccupied) and the first resource of that list (resourceCAS).
local ResourceOccupied, resourceCAS=myChief:CreateResource(AUFTRAG.Type.CASENHANCED, 1, 2)
-- We also add ARTY missions with at least one and at most two assets. We additionally require these to be MLRS groups (and not howitzers).
myChief:AddToResource(ResourceOccupied, AUFTRAG.Type.ARTY, 1, 2, nil, "MLRS")
-- Add at least one RECON mission that uses UAV type assets.
myChief:AddToResource(ResourceOccupied, AUFTRAG.Type.RECON, 1, nil, GROUP.Attribute.AIR_UAV)
-- Add at least one but at most two BOMBCARPET missions.
myChief:AddToResource(ResourceOccupied, AUFTRAG.Type.BOMBCARPET, 1, 2)
--- Create a resource list of mission types and required assets for the case that the zone is EMPTY.
-- NOTE that two objects are returned, the resource list (ResourceEmpty) and the first resource of that list (resourceInf).
-- Here, we create an ONGUARD mission and employ at least on and at most five infantry assets.
local ResourceEmpty, resourceInf=myChief:CreateResource(AUFTRAG.Type.ONGUARD, 1, 5, GROUP.Attribute.GROUND_INFANTRY)
-- Additionally, we send up to three tank groups.
myChief:AddToResource(ResourceEmpty, AUFTRAG.Type.ONGUARD, 1, 3, GROUP.Attribute.GROUND_TANK)
-- Finally, we send two groups that patrol the zone.
myChief:AddToResource(ResourceEmpty, AUFTRAG.Type.PATROLZONE, 2)
-- Add a transport to the infantry resource. We want at least one and up to two transport helicopters.
myChief:AddTransportToResource(resourceInf, 1, 2, GROUP.Attribute.AIR_TRANSPORTHELO)
-- Add stratetic zone with customized reaction.
myChief:AddStrategicZone(myOpsZone, nil , 2, ResourceOccupied, ResourceEmpty)
As the location of the enemies is not known, only mission types that don't require an explicit target group are possible. These are
AUFTRAG.Type.CASENHANCED
AUFTRAG.Type.ARTY
AUFTRAG.Type.PATROLZONE
AUFTRAG.Type.ONGUARD
AUFTRAG.Type.CAPTUREZONE
AUFTRAG.Type.RECON
AUFTRAG.Type.AMMOSUPPLY
AUFTRAG.Type.BOMBING
AUFTRAG.Type.BOMBCARPET
AUFTRAG.Type.BARRAGE
Events
Whenever a strategic zone is captured by us the FSM event CHIEF.ZoneCaptured is triggered and customized further actions can be executed with the CHIEF.OnAfterZoneCaptured() function.
Whenever a strategic zone is lost (captured by the enemy), the FSM event CHIEF.ZoneLost is triggered and customized further actions can be executed with the CHIEF.OnAfterZoneLost() function.
Further events are
- CHIEF.ZoneEmpty, once the zone is completely empty of ground troops. Code can be added to the CHIEF.OnAfterZoneEmpty() function.
- CHIEF.ZoneAttacked, once the zone is under attack. Code can be added to the CHIEF.OnAfterZoneAttacked() function.
Note that the ownership of a zone is determined via zone scans, i.e. not via the detection network. In other words, there is an all knowing eye. Think of it as the local population providing the intel. It's not totally realistic but the best compromise within the limits of DCS.
Type(s)
Fields and Methods inherited from CHIEF | Description |
---|---|
Add an AIRWING to the chief's commander. |
|
Add an attack zone. |
|
Add an AWACS zone. |
|
Add a zone defining your territory. |
|
Add a BRIGADE to the chief's commander. |
|
Add a CAP zone. |
|
Add a conflict zone. |
|
Add a FLEET to the chief's commander. |
|
Add a GCI CAP. |
|
Add a LEGION to the chief's commander. |
|
Add mission to mission queue of the COMMANDER. |
|
Add transport to transport queue of the COMMANDER. |
|
Add a rearming zone. |
|
Add a refuelling zone. |
|
CHIEF:AddStrategicZone(OpsZone, Priority, Importance, ResourceOccupied, ResourceEmpty) |
Add strategically important zone. |
CHIEF:AddTankerZone(Zone, Altitude, Speed, Heading, Leg, RefuelSystem) |
Add a refuelling tanker zone. |
Add target. |
|
CHIEF:AddToResource(Resource, MissionType, Nmin, Nmax, Attributes, Properties, Categories) |
Add mission type and number of required assets to resource list. |
Define which assets will be transported and define the number and attributes/properties of the cargo carrier assets. |
|
Allow chief to use GROUND units for transport tasks. |
|
Check if group is in a attack zone. |
|
Check if group is inside our border. |
|
Check if group is in a conflict zone. |
|
Check if group is inside a zone. |
|
Check strategic zone queue. |
|
Check if group is inside a zone. |
|
Check target queue and assign ONE valid target by adding it to the mission queue of the COMMANDER. |
|
Name of the class. |
|
CHIEF:CreateResource(MissionType, Nmin, Nmax, Attributes, Properties, Categories) |
Create a new resource list of required assets. |
Defence condition. |
|
Triggers the FSM event "DefconChange". |
|
Delete mission type from resource list. |
|
Forbid chief to use GROUND units for transport tasks. |
|
Get the commander. |
|
Get defence condition. |
|
Get mission limit. |
|
Get the resource list of missions and assets employed when the zone is empty. |
|
Get the resource list of missions and assets employed when the zone is occupied by the enemy. |
|
Check if current strategy is aggressive. |
|
Check if current strategy is defensive. |
|
Check if current strategy is offensive. |
|
Check if current strategy is passive. |
|
Check if a TARGET is already in the queue. |
|
Check if current strategy is total war. |
|
Triggers the FSM event "LegionLost". |
|
Triggers the FSM event "MissionAssign". |
|
Triggers the FSM event "MissionCancel". |
|
Create a new CHIEF object and start the FSM. |
|
Number of failed mission. |
|
Number of successful missions. |
|
On after "DefconChange" event. |
|
CHIEF:OnAfterLegionLost(From, Event, To, Legion, Coalition, Country) |
On after "LegionLost" event. |
CHIEF:OnAfterMissionAssign(From, Event, To, Mission, Legions) |
On after "MissionAssign" event. |
On after "MissionCancel" event. |
|
CHIEF:OnAfterOpsOnMission(From, Event, To, OpsGroup, Mission) |
On after "OpsOnMission" event. |
On after "StrategyChange" event. |
|
On after "TransportCancel" event. |
|
On after "ZoneAttacked" event. |
|
On after "ZoneCaptured" event. |
|
On after "ZoneEmpty" event. |
|
On after "ZoneLost" event. |
|
Triggers the FSM event "OpsOnMission". |
|
Recruit assets for a given OPS zone. |
|
Remove an attack zone. |
|
Remove a AWACS zone. |
|
Remove a border zone defining your territory. |
|
Remove a conflict zone. |
|
Remove a GCI CAP |
|
Remove a LEGION to the chief's commander. |
|
Remove mission from queue. |
|
Remove strategically important zone. |
|
Remove a refuelling tanker zone. |
|
Remove target from queue. |
|
Remove transport from queue. |
|
Set this to be an air-to-air dispatcher. |
|
Set this to be an air-to-any dispatcher, i.e. |
|
Set this to be an air-to-ground dispatcher, i.e. |
|
Set this to be an air-to-sea dispatcher, i.e. |
|
Set this to be an air-to-surface dispatcher, i.e. |
|
Set attack zone set. |
|
Set border zone set, defining your territory. |
|
Set conflict zone set. |
|
Set defence condition. |
|
Set limit for number of total or specific missions to be executed simultaniously. |
|
Set number of assets requested for detected targets. |
|
CHIEF:SetStrategicZoneResourceEmpty(StrategicZone, Resource, NoCopy) |
Set the resource list of missions and assets employed when the zone is empty. |
CHIEF:SetStrategicZoneResourceOccupied(StrategicZone, Resource, NoCopy) |
Set the resource list of missions and assets employed when the zone is occupied by the enemy. |
Set strategy. |
|
Set tactical overview off. |
|
Set tactical overview on. |
|
Set a threat level range that will be engaged. |
|
Triggers the FSM event "Start". |
|
Triggers the FSM event "Status". |
|
Triggers the FSM event "StrategyChange". |
|
Triggers the FSM event "TransportCancel". |
|
Triggers the FSM event "ZoneAttacked". |
|
Triggers the FSM event "ZoneCaptured". |
|
Triggers the FSM event "ZoneEmpty". |
|
Triggers the FSM event "ZoneLost". |
|
Check if a given asset has certain attribute(s). |
|
Check if a given asset has certain categories. |
|
Check if a given asset has certain properties. |
|
Check if limit of missions has been reached. |
|
Create a mission performance table. |
|
CHIEF._FilterAssets(Assets, Categories, Attributes, Properties) |
Filter assets, which have certain categories, attributes and/or properties. |
Add mission type and number of required assets to resource. |
|
Get mission performance for a given TARGET. |
|
Get mission performances for a given Group Attribute. |
|
Display tactical overview. |
|
Triggers the FSM event "DefconChange" after a delay. |
|
Triggers the FSM event "LegionLost". |
|
Triggers the FSM event "MissionAssign" after a delay. |
|
Triggers the FSM event "MissionCancel" after a delay. |
|
Triggers the FSM event "OpsOnMission" after a delay. |
|
Triggers the FSM event "Start" after a delay. |
|
Triggers the FSM event "Status" after a delay. |
|
Triggers the FSM event "Stop" after a delay. |
|
Triggers the FSM event "StrategyChange" after a delay. |
|
Triggers the FSM event "TransportCancel" after a delay. |
|
Triggers the FSM event "ZoneAttacked" after a delay. |
|
Triggers the FSM event "ZoneCaptured" after a delay. |
|
Triggers the FSM event "ZoneEmpty" after a delay. |
|
Triggers the FSM event "ZoneLost" after a delay. |
|
Set of zones defining the border of our territory. |
|
Commander of assigned legions. |
|
Set of zones where enemies are actively engaged. |
|
Class id string for output to DCS log file. |
|
On after "DefconChange" event. |
|
CHIEF:onafterMissionAssign(From, Event, To, Mission, Legions) |
On after "MissionAssignToAny" event. |
On after "MissionCancel" event. |
|
CHIEF:onafterOpsOnMission(From, Event, To, OpsGroup, Mission) |
On after "OpsOnMission". |
On after Start event. |
|
On after "Status" event. |
|
On after "StrategyChange" event. |
|
On after "TransportCancel" event. |
|
On after "ZoneAttacked". |
|
On after "ZoneCaptured". |
|
On after "ZoneEmpty". |
|
On after "ZoneLost". |
|
Strategy of the CHIEF. |
|
Target queue. |
|
Highest threat level of targets to attack. |
|
Lowest threat level of targets to attack. |
|
Verbosity level. |
|
CHIEF class version. |
|
Set of zones defining the extended border. Defcon is set to YELLOW if enemy activity is detected. |
|
Strategic zone queue. |
Fields and Methods inherited from CHIEF.AssetNumber | Description |
---|---|
Defense condition. |
|
Mission type. |
|
Max number of assets. |
|
Min number of assets. |
|
Number of enemy units. |
|
Strategy. |
|
Target category. |
|
Threat level. |
Fields and Methods inherited from CHIEF.DEFCON | Description |
---|---|
No enemy activities detected in our terretory or conflict zones. |
|
Enemy within our border. |
|
Enemy in conflict zones. |
Fields and Methods inherited from CHIEF.MissionPerformance | Description |
---|---|
Mission Type. |
|
Performance: a number between 0 and 100, where 100 is best performance. |
Fields and Methods inherited from CHIEF.Resource | Description |
---|---|
Generalized attribute, e.g. |
|
Categories Group categories. |
|
Mission type, e.g. |
|
Max number of assets. |
|
Min number of assets. |
|
Properties (DCS attributes), e.g. |
|
Generalized attribute, e.g. |
|
Group categories. |
|
Max number of assets. |
|
Min number of assets. |
|
Properties (DCS attributes), e.g. |
|
Attached mission. |
Fields and Methods inherited from CHIEF.Resources | Description |
---|---|
List of resources. |
Fields and Methods inherited from CHIEF.StrategicZone | Description |
---|---|
Importance. |
|
Mission. |
|
OPS zone. |
|
Priority. |
|
List of resources employed when the zone is empty. |
|
List of resources employed when the zone is occupied by an enemy. |
Fields and Methods inherited from CHIEF.Strategy | Description |
---|---|
Targets in own terretory, conflict zones and attack zones are engaged. |
|
Only target in our own terretory are engaged. |
|
Targets in own terretory and yellow zones are engaged. |
|
No targets at all are engaged. |
|
Anything is engaged anywhere. |
CHIEF class.
Field(s)
Name of the class.
Defence condition.
Create TARGETs for all new contacts.
Number of failed mission.
Number of successful missions.
Class id string for output to DCS log file.
Strategy of the CHIEF.
Target queue.
Highest threat level of targets to attack.
Lowest threat level of targets to attack.
Verbosity level.
CHIEF class version.
Set of zones defining the extended border. Defcon is set to YELLOW if enemy activity is detected.
Strategic zone queue.
Function(s)
Add an AIRWING to the chief's commander.
Add an attack zone.
- Enemies in these zones will only be engaged if strategy is at least
CHIEF.STRATEGY.AGGRESSIVE
.
Add an AWACS zone.
Defined in:
CHIEF
Parameters:
Core.Zone#ZONE Zone
Zone.
#number Altitude
Orbit altitude in feet. Default is 12,0000 feet.
#number Speed
Orbit speed in KIAS. Default 350 kts.
#number Heading
Heading of race-track pattern in degrees. Default 270 (East to West).
#number Leg
Length of race-track in NM. Default 30 NM.
Return value:
The AWACS zone data.
Add a zone defining your territory.
- Detected enemy troops in these zones will trigger defence condition
RED
. - Enemies in these zones will only be engaged if strategy is at least
CHIEF.STRATEGY.DEFENSIVE
.
Add a BRIGADE to the chief's commander.
Add a CAP zone.
Flights will engage detected targets inside this zone.
Defined in:
CHIEF
Parameters:
Core.Zone#ZONE Zone
CAP Zone. Has to be a circular zone.
#number Altitude
Orbit altitude in feet. Default is 12,0000 feet.
#number Speed
Orbit speed in KIAS. Default 350 kts.
#number Heading
Heading of race-track pattern in degrees. Default 270 (East to West).
#number Leg
Length of race-track in NM. Default 30 NM.
Return value:
The CAP zone data.
Add a conflict zone.
- Detected enemy troops in these zones will trigger defence condition
YELLOW
. - Enemies in these zones will only be engaged if strategy is at least
CHIEF.STRATEGY.OFFENSIVE
.
Add a FLEET to the chief's commander.
Add a GCI CAP.
Defined in:
CHIEF
Parameters:
Core.Zone#ZONE Zone
Zone, where the flight orbits.
#number Altitude
Orbit altitude in feet. Default is 12,0000 feet.
#number Speed
Orbit speed in KIAS. Default 350 kts.
#number Heading
Heading of race-track pattern in degrees. Default 270 (East to West).
#number Leg
Length of race-track in NM. Default 30 NM.
Return value:
The CAP zone data.
Add a LEGION to the chief's commander.
Add mission to mission queue of the COMMANDER.
Add transport to transport queue of the COMMANDER.
Defined in:
CHIEF
Parameter:
Ops.OpsTransport#OPSTRANSPORT Transport
Transport to be added.
Return value:
self
Add a rearming zone.
Defined in:
CHIEF
Parameter:
Core.Zone#ZONE RearmingZone
Rearming zone.
Return value:
The rearming zone data.
Add a refuelling zone.
Defined in:
CHIEF
Parameter:
Core.Zone#ZONE RefuellingZone
Refuelling zone.
Return value:
The refuelling zone data.
Add strategically important zone.
By default two resource lists are created. One for the case that the zone is empty and the other for the case that the zone is occupied.
Occupied:
AUFTRAG.Type.ARTY
with Nmin=1, Nmax=2AUFTRAG.Type.CASENHANCED
with Nmin=1, Nmax=2
Empty:
AUFTRAG.Type.ONGURAD
with Nmin=1 and Nmax=1 assets, Attribute=GROUP.Attribute.GROUND_TANK
.AUFTRAG.Type.ONGUARD
with Nmin=1 and Nmax=3 assets, Attribute=GROUP.Attribute.GROUND_INFANTRY
.
Resources can be created with the CHIEF.CreateResource and CHIEF.AddToResource functions.
Defined in:
CHIEF
Parameters:
Ops.OpsZone#OPSZONE OpsZone
OPS zone object.
#number Priority
Priority. Default 50.
#number Importance
Importance. Default #nil
.
#CHIEF.Resources ResourceOccupied
(Optional) Resources used then zone is occupied by the enemy.
#CHIEF.Resources ResourceEmpty
(Optional) Resources used then zone is empty.
Return value:
The strategic zone.
Add a refuelling tanker zone.
Defined in:
CHIEF
Parameters:
Core.Zone#ZONE Zone
Zone.
#number Altitude
Orbit altitude in feet. Default is 12,0000 feet.
#number Speed
Orbit speed in KIAS. Default 350 kts.
#number Heading
Heading of race-track pattern in degrees. Default 270 (East to West).
#number Leg
Length of race-track in NM. Default 30 NM.
#number RefuelSystem
Refuelling system.
Return value:
The tanker zone data.
Add target.
Add mission type and number of required assets to resource list.
Defined in:
CHIEF
Parameters:
#CHIEF.Resources Resource
List of resources.
#string MissionType
Mission Type.
#number Nmin
Min number of required assets. Default 1.
#number Nmax
Max number of requried assets. Default equal Nmin
.
#table Attributes
Generalized attribute(s).
#table Properties
DCS attribute(s). Default nil
.
#table Categories
Group categories.
Return value:
Resource table.
Define which assets will be transported and define the number and attributes/properties of the cargo carrier assets.
Defined in:
CHIEF
Parameters:
#CHIEF.Resource Resource
Resource table.
#number Nmin
Min number of required assets. Default 1.
#number Nmax
Max number of requried assets. Default is equal to Nmin
.
#table CarrierAttributes
Generalized attribute(s) of the carrier assets.
#table CarrierProperties
DCS attribute(s) of the carrier assets.
#table CarrierCategories
Group categories of the carrier assets.
Return value:
self
Allow chief to use GROUND units for transport tasks.
Helicopters are still preferred, and be aware there's no check as of now if a destination can be reached on land.
Check if group is in a attack zone.
Defined in:
CHIEF
Parameter:
Wrapper.Group#GROUP group
The group.
Return value:
#boolean:
If true, group is in any attack zone.
Check if group is inside our border.
Defined in:
CHIEF
Parameter:
Wrapper.Group#GROUP group
The group.
Return value:
#boolean:
If true, group is in any border zone.
Check if group is in a conflict zone.
Defined in:
CHIEF
Parameter:
Wrapper.Group#GROUP group
The group.
Return value:
#boolean:
If true, group is in any conflict zone.
Check if group is inside a zone.
Defined in:
CHIEF
Parameters:
Wrapper.Group#GROUP group
The group.
Core.Set#SET_ZONE zoneset
Set of zones.
Return value:
#boolean:
If true, group is in any zone.
Check if group is inside a zone.
Defined in:
CHIEF
Parameters:
Ops.Target#TARGET target
The target.
Core.Set#SET_ZONE zoneset
Set of zones.
Return value:
#boolean:
If true, group is in any zone.
Check target queue and assign ONE valid target by adding it to the mission queue of the COMMANDER.
Defined in:
CHIEF
Create a new resource list of required assets.
Defined in:
CHIEF
Parameters:
#string MissionType
The mission type.
#number Nmin
Min number of required assets. Default 1.
#number Nmax
Max number of requried assets. Default 1.
#table Attributes
Generalized attribute(s). Default nil
.
#table Properties
DCS attribute(s). Default nil
.
#table Categories
Group categories.
Return values:
The newly created resource list table.
The resource object that was added.
Triggers the FSM event "DefconChange".
Defined in:
CHIEF
Parameter:
#string Defcon
New Defence Condition.
Delete mission type from resource list.
All running missions are cancelled.
Defined in:
CHIEF
Parameters:
#table Resource
Resource table.
#string MissionType
Mission Type.
Return value:
self
Forbid chief to use GROUND units for transport tasks.
Restrict to Helicopters. This is the default
Get the commander.
Get defence condition.
Defined in:
CHIEF
Parameters:
#string Current
Defence condition. See CHIEF.DEFCON, e.g. CHIEF.DEFCON.RED
.
Defcon
Get mission limit.
Defined in:
CHIEF
Parameter:
#string MissionType
Type of mission.
Return value:
#number:
Limit. Unlimited mission types are returned as 999.
Get the resource list of missions and assets employed when the zone is empty.
Defined in:
CHIEF
Parameter:
#CHIEF.StrategicZone StrategicZone
The strategic zone.
Return value:
Resource list of missions and assets.
Get the resource list of missions and assets employed when the zone is occupied by the enemy.
Defined in:
CHIEF
Parameter:
#CHIEF.StrategicZone StrategicZone
The strategic zone.
Return value:
Resource list of missions and assets.
Check if current strategy is aggressive.
Defined in:
CHIEF
Return value:
#boolean:
If true
, strategy is agressive.
Check if current strategy is defensive.
Defined in:
CHIEF
Return value:
#boolean:
If true
, strategy is defensive.
Check if current strategy is offensive.
Defined in:
CHIEF
Return value:
#boolean:
If true
, strategy is offensive.
Check if current strategy is passive.
Defined in:
CHIEF
Return value:
#boolean:
If true
, strategy is passive.
Check if a TARGET is already in the queue.
Defined in:
CHIEF
Parameter:
Ops.Target#TARGET Target
Target object to be added.
Return value:
#boolean:
If true
, target exists in the target queue.
Check if current strategy is total war.
Defined in:
CHIEF
Return value:
#boolean:
If true
, strategy is total war.
Triggers the FSM event "LegionLost".
Defined in:
CHIEF
Parameters:
Ops.Legion#LEGION Legion
The legion that was lost.
DCS#coalition.side Coalition
which captured the warehouse.
DCS#country.id Country
which has captured the warehouse.
Triggers the FSM event "MissionAssign".
Defined in:
CHIEF
Parameters:
Ops.Auftrag#AUFTRAG Mission
The mission.
#table Legions
The Legion(s) to which the mission is assigned.
Triggers the FSM event "MissionCancel".
Create a new CHIEF object and start the FSM.
Defined in:
CHIEF
Parameters:
#number Coalition
Coalition side, e.g. coaliton.side.BLUE
. Can also be passed as a string "red", "blue" or "neutral".
Core.Set#SET_GROUP AgentSet
Set of agents (groups) providing intel. Default is an empty set.
#string Alias
An optional alias how this object is called in the logs etc.
Return value:
self
On after "DefconChange" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#string Defcon
New Defence Condition.
On after "LegionLost" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.Legion#LEGION Legion
The legion that was lost.
DCS#coalition.side Coalition
which captured the warehouse.
DCS#country.id Country
which has captured the warehouse.
On after "MissionAssign" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.Auftrag#AUFTRAG Mission
The mission.
#table Legions
The Legion(s) to which the mission is assigned.
On after "MissionCancel" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.Auftrag#AUFTRAG Mission
The mission.
On after "OpsOnMission" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsGroup#OPSGROUP OpsGroup
The OPS group on mission.
Ops.Auftrag#AUFTRAG Mission
The mission.
On after "StrategyChange" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#string Strategy
New strategy.
On after "TransportCancel" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsTransport#OPSTRANSPORT Transport
The transport.
On after "ZoneAttacked" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsZone#OPSZONE OpsZone
Zone that is being attacked.
On after "ZoneCaptured" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsZone#OPSZONE OpsZone
Zone that was captured.
On after "ZoneEmpty" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsZone#OPSZONE OpsZone
Zone that is empty now.
On after "ZoneLost" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsZone#OPSZONE OpsZone
Zone that was lost.
Triggers the FSM event "OpsOnMission".
Defined in:
CHIEF
Parameters:
Ops.OpsGroup#OPSGROUP OpsGroup
The OPS group on mission.
Ops.Auftrag#AUFTRAG Mission
The mission.
Recruit assets for a given OPS zone.
Defined in:
CHIEF
Parameters:
#CHIEF.StrategicZone StratZone
The strategic zone.
#CHIEF.Resource Resource
The required resources.
Return value:
#boolean:
If true
enough assets could be recruited.
Remove an attack zone.
Remove a AWACS zone.
Remove a border zone defining your territory.
Remove a conflict zone.
Remove a GCI CAP
Remove a LEGION to the chief's commander.
Remove mission from queue.
Remove strategically important zone.
All runing missions are cancelled.
Defined in:
CHIEF
Parameters:
Ops.OpsZone#OPSZONE OpsZone
OPS zone object.
#number Delay
Delay in seconds before the zone is removed. Default immidiately.
Return value:
self
Remove a refuelling tanker zone.
Remove target from queue.
Remove transport from queue.
Defined in:
CHIEF
Parameter:
Ops.OpsTransport#OPSTRANSPORT Transport
Transport to be removed.
Return value:
self
Set this to be an air-to-air dispatcher.
Set this to be an air-to-any dispatcher, i.e.
engaging air, ground and naval targets. This is the default anyway.
Set this to be an air-to-ground dispatcher, i.e.
engage only ground units
Set this to be an air-to-sea dispatcher, i.e.
engage only naval units.
Set this to be an air-to-surface dispatcher, i.e.
engaging ground and naval groups.
Set attack zone set.
- Enemies in these zones will only be engaged if strategy is at least
CHIEF.STRATEGY.AGGRESSIVE
.
Set border zone set, defining your territory.
- Detected enemy troops in these zones will trigger defence condition
RED
. - Enemies in these zones will only be engaged if strategy is at least
CHIEF.STRATEGY.DEFENSIVE
.
Defined in:
CHIEF
Parameter:
Core.Set#SET_ZONE BorderZoneSet
Set of zones defining our borders.
Return value:
self
Set conflict zone set.
- Detected enemy troops in these zones will trigger defence condition
YELLOW
. - Enemies in these zones will only be engaged if strategy is at least
CHIEF.STRATEGY.OFFENSIVE
.
Set defence condition.
Defined in:
CHIEF
Parameter:
#string Defcon
Defence condition. See CHIEF.DEFCON, e.g. CHIEF.DEFCON.RED
.
Return value:
self
Set limit for number of total or specific missions to be executed simultaniously.
Defined in:
CHIEF
Parameters:
#number Limit
Number of max. mission of this type. Default 10.
#string MissionType
Type of mission, e.g. AUFTRAG.Type.BAI
. Default "Total"
for total number of missions.
Return value:
self
Set number of assets requested for detected targets.
Defined in:
CHIEF
Parameters:
#number NassetsMin
Min number of assets. Should be at least 1. Default 1.
#number NassetsMax
Max number of assets. Default is same as NassetsMin
.
#number ThreatLevel
Only apply this setting if the target threat level is greater or equal this number. Default 0.
#string TargetCategory
Only apply this setting if the target is of this category, e.g. TARGET.Category.AIRCRAFT
.
#string MissionType
Only apply this setting for this mission type, e.g. AUFTRAG.Type.INTERCEPT
.
#string Nunits
Only apply this setting if the number of enemy units is greater or equal this number.
#string Defcon
Only apply this setting if this defense condition is in place.
#string Strategy
Only apply this setting if this strategy is in currently. place.
Return value:
self
Set the resource list of missions and assets employed when the zone is empty.
Defined in:
CHIEF
Parameters:
#CHIEF.StrategicZone StrategicZone
The strategic zone.
#CHIEF.Resource Resource
Resource list of missions and assets.
#boolean NoCopy
If true
, do not create a deep copy of the resource.
Return value:
self
Set the resource list of missions and assets employed when the zone is occupied by the enemy.
Defined in:
CHIEF
Parameters:
#CHIEF.StrategicZone StrategicZone
The strategic zone.
#CHIEF.Resource Resource
Resource list of missions and assets.
#boolean NoCopy
If true
, do not create a deep copy of the resource.
Return value:
self
Set strategy.
Defined in:
CHIEF
Parameter:
#string Strategy
Strategy. See CHIEF.strategy, e.g. CHIEF.Strategy.DEFENSIVE
(default).
Return value:
self
Set tactical overview off.
Set tactical overview on.
Set a threat level range that will be engaged.
Threat level is a number between 0 and 10, where 10 is a very dangerous threat. Targets with threat level 0 are usually harmless.
Defined in:
CHIEF
Parameters:
#number ThreatLevelMin
Min threat level. Default 1.
#number ThreatLevelMax
Max threat level. Default 10.
Return value:
self
Triggers the FSM event "StrategyChange".
Defined in:
CHIEF
Parameter:
#string Strategy
New strategy.
Triggers the FSM event "TransportCancel".
Triggers the FSM event "ZoneAttacked".
Triggers the FSM event "ZoneCaptured".
Triggers the FSM event "ZoneEmpty".
Triggers the FSM event "ZoneLost".
Check if a given asset has certain attribute(s).
Defined in:
CHIEF
Parameters:
The asset item.
#table Attributes
The required attributes. See WAREHOUSE.Attribute
enum. Can also be passed as a single attribute #string
.
Return value:
#boolean:
Returns true
, the asset has at least one requested attribute.
Check if a given asset has certain categories.
Defined in:
CHIEF
Parameters:
The asset item.
#table Categories
DCS group categories.
Return value:
#boolean:
Returns true
, the asset has at least one requested category.
Check if a given asset has certain properties.
Defined in:
CHIEF
Parameters:
The asset item.
#table Categories
DCS group categories.
Properties
Return value:
#boolean:
Returns true
, the asset has at least one requested property.
Check if limit of missions has been reached.
Defined in:
CHIEF
Parameter:
#string MissionType
Type of mission.
Return value:
#boolean:
If true
, mission limit has not been reached. If false
, limit has been reached.
Create a mission performance table.
Defined in:
CHIEF
Parameters:
#string MissionType
Mission type.
#number Performance
Performance.
Return value:
Mission performance.
Filter assets, which have certain categories, attributes and/or properties.
Defined in:
CHIEF
Parameters:
#table Assets
The assets to be filtered.
#table Categories
Group categories.
#table Attributes
Generalized attributes.
#table Properties
DCS attributes
Return value:
#table:
Table of filtered assets.
Add mission type and number of required assets to resource.
Defined in:
CHIEF
Parameters:
Ops.Target#TARGET Target
The target.
#string MissionType
Mission type.
Return values:
#number:
Number of min assets.
#number:
Number of max assets.
Get mission performance for a given TARGET.
Defined in:
CHIEF
Parameter:
Ops.Target#TARGET Target
The target.
Return value:
#table:
Mission performances of type #CHIEF.MissionPerformance
.
Get mission performances for a given Group Attribute.
Defined in:
CHIEF
Parameter:
#string Attribute
Group attibute.
Return value:
#table:
Mission performances of type #CHIEF.MissionPerformance
.
Triggers the FSM event "DefconChange" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
#string Defcon
New Defence Condition.
Triggers the FSM event "LegionLost".
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.Legion#LEGION Legion
The legion that was lost.
DCS#coalition.side Coalition
which captured the warehouse.
DCS#country.id Country
which has captured the warehouse.
Triggers the FSM event "MissionAssign" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.Auftrag#AUFTRAG Mission
The mission.
#table Legions
The Legion(s) to which the mission is assigned.
Triggers the FSM event "MissionCancel" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.Auftrag#AUFTRAG Mission
The mission.
Triggers the FSM event "OpsOnMission" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.OpsGroup#OPSGROUP OpsGroup
The OPS group on mission.
Ops.Auftrag#AUFTRAG Mission
The mission.
Triggers the FSM event "Start" after a delay.
Defined in:
CHIEF
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Status" after a delay.
Defined in:
CHIEF
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Stop" after a delay.
Defined in:
CHIEF
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "StrategyChange" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
#string Strategy
New strategy.
Triggers the FSM event "TransportCancel" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.OpsTransport#OPSTRANSPORT Transport
The transport.
Triggers the FSM event "ZoneAttacked" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.OpsZone#OPSZONE OpsZone
Zone that is being attacked.
Triggers the FSM event "ZoneCaptured" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.OpsZone#OPSZONE OpsZone
Zone that was captured.
Triggers the FSM event "ZoneEmpty" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.OpsZone#OPSZONE OpsZone
Zone that is empty now.
Triggers the FSM event "ZoneLost" after a delay.
Defined in:
CHIEF
Parameters:
#number delay
Delay in seconds.
Ops.OpsZone#OPSZONE OpsZone
Zone that was lost.
On after "DefconChange" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#string Defcon
New defence condition.
On after "MissionAssignToAny" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.Auftrag#AUFTRAG Mission
The mission.
#table Legions
The Legion(s) to which the mission is assigned.
On after "MissionCancel" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.Auftrag#AUFTRAG Mission
The mission.
On after "OpsOnMission".
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsGroup#OPSGROUP OpsGroup
Ops group on mission
Ops.Auftrag#AUFTRAG Mission
The requested mission.
On after Start event.
Defined in:
CHIEF
Parameters:
Wrapper.Group#GROUP Group
Flight group.
#string From
From state.
#string Event
Event.
#string To
To state.
On after "Status" event.
Defined in:
CHIEF
Parameters:
Wrapper.Group#GROUP Group
Flight group.
#string From
From state.
#string Event
Event.
#string To
To state.
On after "StrategyChange" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#string Strategy
On after "TransportCancel" event.
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsTransport#OPSTRANSPORT Transport
The transport.
On after "ZoneAttacked".
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsZone#OPSZONE OpsZone
The zone that being attacked.
On after "ZoneCaptured".
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsZone#OPSZONE OpsZone
The zone that was captured by us.
On after "ZoneEmpty".
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsZone#OPSZONE OpsZone
The zone that is empty now.
On after "ZoneLost".
Defined in:
CHIEF
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Ops.OpsZone#OPSZONE OpsZone
The zone that was lost.
Asset numbers for detected targets.
Field(s)
Defense condition.
Mission type.
Max number of assets.
Min number of assets.
Number of enemy units.
Strategy.
Target category.
Threat level.
Function(s)
Defence condition.
Field(s)
No enemy activities detected in our terretory or conflict zones.
Enemy within our border.
Enemy in conflict zones.
Function(s)
Mission performance.
Field(s)
Mission Type.
Performance: a number between 0 and 100, where 100 is best performance.
Function(s)
Resource.
Field(s)
Generalized attribute, e.g. {GROUP.Attribute.GROUND_INFANTRY}
.
Categories Group categories.
Mission type, e.g. AUFTRAG.Type.BAI
.
Max number of assets.
Min number of assets.
Properties (DCS attributes), e.g. "Attack helicopters"
or "Mobile AAA"
.
Generalized attribute, e.g. {GROUP.Attribute.GROUND_INFANTRY}
.
Group categories.
Max number of assets.
Min number of assets.
Properties (DCS attributes), e.g. "Attack helicopters"
or "Mobile AAA"
.
Function(s)
Strategic zone.
Field(s)
Importance.
Mission.
Priority.
List of resources employed when the zone is empty.
List of resources employed when the zone is occupied by an enemy.
Function(s)
Strategy.
Field(s)
Targets in own terretory, conflict zones and attack zones are engaged.
Only target in our own terretory are engaged.
Targets in own terretory and yellow zones are engaged.
No targets at all are engaged.
Anything is engaged anywhere.