mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into 562-AI-A2A-Dispatcher
This commit is contained in:
commit
ce397d0a4e
1
.gitignore
vendored
1
.gitignore
vendored
@ -221,4 +221,3 @@ _gsdata_/
|
||||
.gitattributes
|
||||
.gitignore
|
||||
Moose Test Missions/MOOSE_Test_Template.miz
|
||||
Moose.lua
|
||||
|
||||
@ -229,6 +229,8 @@ function AI_A2A:New( AIGroup )
|
||||
self:AddTransition( "*", "Crash", "Crashed" )
|
||||
self:AddTransition( "*", "PilotDead", "*" )
|
||||
|
||||
self.IdleCount = 0
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@ -402,24 +404,26 @@ function AI_A2A:onafterStatus()
|
||||
RTB = true
|
||||
end
|
||||
|
||||
-- Check if planes went RTB
|
||||
local TargetDistance = self.TargetDistance
|
||||
local ClosestTargetDistance = self.ClosestTargetDistance
|
||||
if TargetDistance then
|
||||
if ClosestTargetDistance <= 40000 then
|
||||
if TargetDistance > 40000 then
|
||||
self:E( "Lost control of group " .. self.Controllable:GetName() .. " ... RTB!" )
|
||||
-- Check if planes went RTB and are out of control.
|
||||
if self.Controllable:HasTask() == false then
|
||||
if not self:Is( "Started" ) and
|
||||
not self:Is( "Stopped" ) then
|
||||
if self.IdleCount >= 2 then
|
||||
self:E( self.Controllable:GetName() .. " control lost! " )
|
||||
self:LostControl()
|
||||
RTB = true
|
||||
else
|
||||
self.IdleCount = self.IdleCount + 1
|
||||
end
|
||||
end
|
||||
else
|
||||
self.IdleCount = 0
|
||||
end
|
||||
|
||||
if RTB == true then
|
||||
self:__RTB( 0.5 )
|
||||
else
|
||||
self:__Status( 10 ) -- Execute the Patrol event after 30 seconds.
|
||||
end
|
||||
|
||||
self:__Status( 10 )
|
||||
end
|
||||
end
|
||||
|
||||
@ -432,20 +436,22 @@ function AI_A2A.RTBRoute( AIGroup )
|
||||
_AI_A2A:__RTB( 0.5 )
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- @param #AI_A2A self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function AI_A2A:onafterRTB( AIGroup, From, Event, To )
|
||||
self:F( { AIGroup, From, Event, To } )
|
||||
|
||||
self:E( "Group " .. self.Controllable:GetName() .. " ... RTB! ( " .. self:GetState() .. " )" )
|
||||
|
||||
if AIGroup and AIGroup:IsAlive() then
|
||||
|
||||
self:E( "Group " .. AIGroup:GetName() .. " ... RTB! ( " .. self:GetState() .. " )" )
|
||||
|
||||
self.CheckStatus = false
|
||||
|
||||
self:ClearTargetDistance()
|
||||
AIGroup:ClearTasks()
|
||||
AIGroup:ClearTasks()
|
||||
|
||||
local EngageRoute = {}
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ do -- AI_A2A_DISPATCHER
|
||||
-- It all depends on what the desired effect is.
|
||||
--
|
||||
-- EWR networks are **dynamically constructed**, that is, they form part of the @{Set#SET_GROUP} object that is given as the input parameter of the AI\_A2A\_DISPATCHER class.
|
||||
-- By defining in a **smart way the names or name prefixes of the groups** of EWR capable units, these units will be **automatically added or deleted** from the EWR network,
|
||||
-- By defining in a **smart way the names or name prefixes of the groups** with EWR capable units, these groups will be **automatically added or deleted** from the EWR network,
|
||||
-- increasing or decreasing the radar coverage of the Early Warning System.
|
||||
--
|
||||
-- See the following example to setup an EWR network containing EWR stations and AWACS.
|
||||
@ -127,7 +127,9 @@ do -- AI_A2A_DISPATCHER
|
||||
-- 
|
||||
--
|
||||
-- If it’s a cold war then the **borders of red and blue territory** need to be defined using a @{zone} object derived from @{Zone#ZONE_BASE}.
|
||||
-- If a hot war is chosen then **no borders** actually need to be defined using the helicopter units other than it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are. In a hot war the borders are effectively defined by the ground based radar coverage of a coalition. Set the noborders parameter to 1
|
||||
-- If a hot war is chosen then **no borders** actually need to be defined using the helicopter units other than
|
||||
-- it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are.
|
||||
-- In a hot war the borders are effectively defined by the ground based radar coverage of a coalition.
|
||||
--
|
||||
-- ## 4. Squadrons:
|
||||
--
|
||||
@ -377,76 +379,76 @@ do -- AI_A2A_DISPATCHER
|
||||
--
|
||||
-- Find the following mission script as an example:
|
||||
--
|
||||
-- -- Define a SET_GROUP object that builds a collection of groups that define the EWR network.
|
||||
-- -- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR.
|
||||
-- DetectionSetGroup = SET_GROUP:New()
|
||||
-- DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
|
||||
-- DetectionSetGroup:FilterStart()
|
||||
--
|
||||
-- -- Setup the A2A dispatcher, and initialize it.
|
||||
-- A2ADispatcher = AI_A2A_DISPATCHER:New( DetectionSetGroup, 30000 )
|
||||
--
|
||||
-- -- Initialize the dispatcher, setting up a border zone. This is a polygon,
|
||||
-- -- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area.
|
||||
-- -- Any enemy crossing this border will be engaged.
|
||||
-- CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) )
|
||||
-- A2ADispatcher:SetBorderZone( { CCCPBorderZone } )
|
||||
--
|
||||
-- -- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly
|
||||
-- -- without an assignment within 100km radius from a detected target, will engage that target.
|
||||
-- A2ADispatcher:SetEngageRadius( 300000 )
|
||||
--
|
||||
-- -- Setup the squadrons.
|
||||
-- A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 )
|
||||
-- A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 )
|
||||
-- A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 )
|
||||
-- A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 )
|
||||
-- A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 )
|
||||
--
|
||||
-- -- Setup the overhead
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 )
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Maykop", 1 )
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Mozdok", 1.5 )
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Sochi", 1 )
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Novo", 1 )
|
||||
--
|
||||
-- -- Setup the Grouping
|
||||
-- A2ADispatcher:SetSquadronGrouping( "Mineralnye", 2 )
|
||||
-- A2ADispatcher:SetSquadronGrouping( "Sochi", 2 )
|
||||
-- A2ADispatcher:SetSquadronGrouping( "Novo", 3 )
|
||||
--
|
||||
-- -- Setup the Takeoff methods
|
||||
-- A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air )
|
||||
-- A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" )
|
||||
-- A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" )
|
||||
-- A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" )
|
||||
-- A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" )
|
||||
--
|
||||
-- -- Setup the Landing methods
|
||||
-- A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" )
|
||||
-- A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" )
|
||||
-- A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" )
|
||||
-- A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" )
|
||||
-- A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway )
|
||||
--
|
||||
--
|
||||
-- -- CAP Squadron execution.
|
||||
-- CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
|
||||
-- A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
|
||||
--
|
||||
-- CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
|
||||
-- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
--
|
||||
-- CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
|
||||
-- A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
--
|
||||
-- -- GCI Squadron execution.
|
||||
-- A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
|
||||
-- A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
|
||||
-- A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
|
||||
-- -- Define a SET_GROUP object that builds a collection of groups that define the EWR network.
|
||||
-- -- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR.
|
||||
-- DetectionSetGroup = SET_GROUP:New()
|
||||
-- DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
|
||||
-- DetectionSetGroup:FilterStart()
|
||||
--
|
||||
-- -- Setup the A2A dispatcher, and initialize it.
|
||||
-- A2ADispatcher = AI_A2A_DISPATCHER:New( DetectionSetGroup, 30000 )
|
||||
--
|
||||
-- -- Initialize the dispatcher, setting up a border zone. This is a polygon,
|
||||
-- -- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area.
|
||||
-- -- Any enemy crossing this border will be engaged.
|
||||
-- CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) )
|
||||
-- A2ADispatcher:SetBorderZone( { CCCPBorderZone } )
|
||||
--
|
||||
-- -- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly
|
||||
-- -- without an assignment within 100km radius from a detected target, will engage that target.
|
||||
-- A2ADispatcher:SetEngageRadius( 300000 )
|
||||
--
|
||||
-- -- Setup the squadrons.
|
||||
-- A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 )
|
||||
-- A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 )
|
||||
-- A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 )
|
||||
-- A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 )
|
||||
-- A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 )
|
||||
--
|
||||
-- -- Setup the overhead
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 )
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Maykop", 1 )
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Mozdok", 1.5 )
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Sochi", 1 )
|
||||
-- A2ADispatcher:SetSquadronOverhead( "Novo", 1 )
|
||||
--
|
||||
-- -- Setup the Grouping
|
||||
-- A2ADispatcher:SetSquadronGrouping( "Mineralnye", 2 )
|
||||
-- A2ADispatcher:SetSquadronGrouping( "Sochi", 2 )
|
||||
-- A2ADispatcher:SetSquadronGrouping( "Novo", 3 )
|
||||
--
|
||||
-- -- Setup the Takeoff methods
|
||||
-- A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air )
|
||||
-- A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" )
|
||||
-- A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" )
|
||||
-- A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" )
|
||||
-- A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" )
|
||||
--
|
||||
-- -- Setup the Landing methods
|
||||
-- A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" )
|
||||
-- A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" )
|
||||
-- A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" )
|
||||
-- A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" )
|
||||
-- A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway )
|
||||
--
|
||||
--
|
||||
-- -- CAP Squadron execution.
|
||||
-- CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
|
||||
-- A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
|
||||
--
|
||||
-- CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
|
||||
-- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
--
|
||||
-- CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
|
||||
-- A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
--
|
||||
-- -- GCI Squadron execution.
|
||||
-- A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
|
||||
-- A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
|
||||
-- A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
|
||||
--
|
||||
-- #### 8.5.1. Script the EWR network
|
||||
--
|
||||
@ -903,24 +905,23 @@ do -- AI_A2A_DISPATCHER
|
||||
-- @return #AI_A2A_DISPATCHER
|
||||
function AI_A2A_DISPATCHER:SetSquadron( SquadronName, AirbaseName, SpawnTemplates, Resources )
|
||||
|
||||
self:E( { SquadronName = SquadronName, AirbaseName = AirbaseName, SpawnTemplates = SpawnTemplates, Resources = Resources } )
|
||||
|
||||
self.DefenderSquadrons[SquadronName] = self.DefenderSquadrons[SquadronName] or {}
|
||||
|
||||
local DefenderSquadron = self.DefenderSquadrons[SquadronName]
|
||||
|
||||
self:E( { AirbaseName = AirbaseName } )
|
||||
DefenderSquadron.Name = SquadronName
|
||||
DefenderSquadron.Airbase = AIRBASE:FindByName( AirbaseName )
|
||||
self:E( { Airbase = DefenderSquadron.Airbase } )
|
||||
self:E( { AirbaseObject = DefenderSquadron.Airbase:GetDCSObject() } )
|
||||
|
||||
DefenderSquadron.Spawn = {}
|
||||
if type( SpawnTemplates ) == "string" then
|
||||
local SpawnTemplate = SpawnTemplates
|
||||
self.DefenderSpawns[SpawnTemplate] = self.DefenderSpawns[SpawnTemplate] or SPAWN:New( SpawnTemplate ):InitCleanUp( 30 )
|
||||
self.DefenderSpawns[SpawnTemplate] = self.DefenderSpawns[SpawnTemplate] or SPAWN:New( SpawnTemplate ) -- :InitCleanUp( 180 )
|
||||
DefenderSquadron.Spawn[1] = self.DefenderSpawns[SpawnTemplate]
|
||||
else
|
||||
for TemplateID, SpawnTemplate in pairs( SpawnTemplates ) do
|
||||
self.DefenderSpawns[SpawnTemplate] = self.DefenderSpawns[SpawnTemplate] or SPAWN:New( SpawnTemplate ):InitCleanUp( 30 )
|
||||
self.DefenderSpawns[SpawnTemplate] = self.DefenderSpawns[SpawnTemplate] or SPAWN:New( SpawnTemplate ) -- :InitCleanUp( 180 )
|
||||
DefenderSquadron.Spawn[#DefenderSquadron.Spawn+1] = self.DefenderSpawns[SpawnTemplate]
|
||||
end
|
||||
end
|
||||
@ -958,6 +959,21 @@ do -- AI_A2A_DISPATCHER
|
||||
-- @param #number EngageMaxSpeed The maximum speed at which the engage can be executed.
|
||||
-- @param #number AltType The altitude type, which is a string "BARO" defining Barometric or "RADIO" defining radio controlled altitude.
|
||||
-- @return #AI_A2A_DISPATCHER
|
||||
-- @usage
|
||||
--
|
||||
-- -- CAP Squadron execution.
|
||||
-- CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
|
||||
-- A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
|
||||
--
|
||||
-- CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
|
||||
-- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
--
|
||||
-- CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
|
||||
-- A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
--
|
||||
function AI_A2A_DISPATCHER:SetSquadronCap( SquadronName, Zone, FloorAltitude, CeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, AltType )
|
||||
|
||||
self.DefenderSquadrons[SquadronName] = self.DefenderSquadrons[SquadronName] or {}
|
||||
@ -985,6 +1001,21 @@ do -- AI_A2A_DISPATCHER
|
||||
-- @param #AI_A2A_DISPATCHER self
|
||||
-- @param #string SquadronName The squadron name.
|
||||
-- @return #AI_A2A_DISPATCHER
|
||||
-- @usage
|
||||
--
|
||||
-- -- CAP Squadron execution.
|
||||
-- CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
|
||||
-- A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
|
||||
--
|
||||
-- CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
|
||||
-- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
--
|
||||
-- CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
|
||||
-- A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
|
||||
-- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
--
|
||||
function AI_A2A_DISPATCHER:SetSquadronCapInterval( SquadronName, CapLimit, LowInterval, HighInterval, Probability )
|
||||
|
||||
self.DefenderSquadrons[SquadronName] = self.DefenderSquadrons[SquadronName] or {}
|
||||
@ -1085,6 +1116,13 @@ do -- AI_A2A_DISPATCHER
|
||||
-- @param #string SquadronName The squadron name.
|
||||
-- @param #number EngageMinSpeed The minimum speed at which the gci can be executed.
|
||||
-- @param #number EngageMaxSpeed The maximum speed at which the gci can be executed.
|
||||
-- @usage
|
||||
--
|
||||
-- -- GCI Squadron execution.
|
||||
-- A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
|
||||
-- A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
|
||||
-- A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
|
||||
--
|
||||
-- @return #AI_A2A_DISPATCHER
|
||||
function AI_A2A_DISPATCHER:SetSquadronGci( SquadronName, EngageMinSpeed, EngageMaxSpeed )
|
||||
|
||||
@ -1846,11 +1884,11 @@ do -- AI_A2A_DISPATCHER
|
||||
|
||||
if self.TacticalDisplay then
|
||||
-- Show tactical situation
|
||||
Report:Add( string.format( "\n - Target %s ( %s ): %s" , DetectedItem.ItemID, DetectedItem.Index, DetectedItem.Set:GetObjectNames() ) )
|
||||
Report:Add( string.format( "\n - Target %s ( %s ): ( #%d ) %s" , DetectedItem.ItemID, DetectedItem.Index, DetectedItem.Set:Count(), DetectedItem.Set:GetObjectNames() ) )
|
||||
for Defender, DefenderTask in pairs( self:GetDefenderTasks() ) do
|
||||
local Defender = Defender -- Wrapper.Group#GROUP
|
||||
if DefenderTask.Target and DefenderTask.Target.Index == DetectedItem.Index then
|
||||
Report:Add( string.format( " - %s ( %s - %s ) %s", Defender:GetName(), DefenderTask.Type, DefenderTask.Fsm:GetState(), Defender:HasTask() == true and "Executing" or "Idle" ) )
|
||||
Report:Add( string.format( " - %s ( %s - %s ): ( #%d ) %s", Defender:GetName(), DefenderTask.Type, DefenderTask.Fsm:GetState(), Defender:GetSize(), Defender:HasTask() == true and "Executing" or "Idle" ) )
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1864,7 +1902,7 @@ do -- AI_A2A_DISPATCHER
|
||||
local Defender = Defender -- Wrapper.Group#GROUP
|
||||
if not DefenderTask.Target then
|
||||
local DefenderHasTask = Defender:HasTask()
|
||||
Report:Add( string.format( " - %s ( %s - %s ) %s", Defender:GetName(), DefenderTask.Type, DefenderTask.Fsm:GetState(), Defender:HasTask() == true and "Executing" or "Idle" ) )
|
||||
Report:Add( string.format( " - %s ( %s - %s ): ( #%d ) %s", Defender:GetName(), DefenderTask.Type, DefenderTask.Fsm:GetState(), Defender:GetSize(), Defender:HasTask() == true and "Executing" or "Idle" ) )
|
||||
end
|
||||
end
|
||||
Report:Add( string.format( "\n - %d Tasks", TaskCount ) )
|
||||
|
||||
@ -347,6 +347,7 @@ function AI_A2A_PATROL:onafterRoute( AIGroup, From, Event, To )
|
||||
local CurrentCoord = AIGroup:GetCoordinate()
|
||||
|
||||
local ToTargetCoord = self.PatrolZone:GetRandomPointVec2()
|
||||
ToTargetCoord:SetAlt(math.random( self.PatrolFloorAltitude,self.PatrolCeilingAltitude ) )
|
||||
self:SetTargetDistance( ToTargetCoord ) -- For RTB status check
|
||||
|
||||
local ToTargetSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )
|
||||
|
||||
@ -789,7 +789,7 @@ function EVENT:onEvent( Event )
|
||||
Event.IniUnitName = Event.IniDCSUnitName
|
||||
Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator )
|
||||
Event.IniCategory = Event.IniDCSUnit:getDesc().category
|
||||
Event.IniTypeName = Event.IniDCSUnit:getTypeName()
|
||||
Event.IniTypeName = Event.initiator:isExist() and Event.IniDCSUnit:getTypeName() or "SCENERY" -- TODO: Bug fix for 2.1!
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -648,7 +648,7 @@ therefore less CAP and GCI flights will spawn and this will tend to make just th
|
||||
It all depends on what the desired effect is. </p>
|
||||
|
||||
<p>EWR networks are <strong>dynamically constructed</strong>, that is, they form part of the <a href="Set.html##(SET_GROUP)">Set#SET_GROUP</a> object that is given as the input parameter of the AI_A2A_DISPATCHER class.
|
||||
By defining in a <strong>smart way the names or name prefixes of the groups</strong> of EWR capable units, these units will be <strong>automatically added or deleted</strong> from the EWR network,
|
||||
By defining in a <strong>smart way the names or name prefixes of the groups</strong> with EWR capable units, these groups will be <strong>automatically added or deleted</strong> from the EWR network,
|
||||
increasing or decreasing the radar coverage of the Early Warning System.</p>
|
||||
|
||||
<p>See the following example to setup an EWR network containing EWR stations and AWACS.</p>
|
||||
@ -708,7 +708,9 @@ A <strong>hot war</strong> is one where CAP aircraft will intercept any detected
|
||||
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia9.JPG" alt="Banner Image"/></p>
|
||||
|
||||
<p>If it’s a cold war then the <strong>borders of red and blue territory</strong> need to be defined using a <a href="zone.html">zone</a> object derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>.
|
||||
If a hot war is chosen then <strong>no borders</strong> actually need to be defined using the helicopter units other than it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are. In a hot war the borders are effectively defined by the ground based radar coverage of a coalition. Set the noborders parameter to 1</p>
|
||||
If a hot war is chosen then <strong>no borders</strong> actually need to be defined using the helicopter units other than
|
||||
it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are.
|
||||
In a hot war the borders are effectively defined by the ground based radar coverage of a coalition.</p>
|
||||
|
||||
<h2>4. Squadrons:</h2>
|
||||
|
||||
@ -974,76 +976,77 @@ But you can also define other zone types instead, like moving zones.</p>
|
||||
|
||||
<p>Find the following mission script as an example:</p>
|
||||
|
||||
<p> -- Define a SET<em>GROUP object that builds a collection of groups that define the EWR network.
|
||||
<pre><code> -- Define a SET_GROUP object that builds a collection of groups that define the EWR network.
|
||||
-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR.
|
||||
DetectionSetGroup = SET</em>GROUP:New()
|
||||
DetectionSetGroup = SET_GROUP:New()
|
||||
DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
|
||||
DetectionSetGroup:FilterStart()</p>
|
||||
DetectionSetGroup:FilterStart()
|
||||
|
||||
<p> -- Setup the A2A dispatcher, and initialize it.
|
||||
A2ADispatcher = AI<em>A2A</em>DISPATCHER:New( DetectionSetGroup, 30000 )</p>
|
||||
-- Setup the A2A dispatcher, and initialize it.
|
||||
A2ADispatcher = AI_A2A_DISPATCHER:New( DetectionSetGroup, 30000 )
|
||||
|
||||
<p> -- Initialize the dispatcher, setting up a border zone. This is a polygon,
|
||||
-- Initialize the dispatcher, setting up a border zone. This is a polygon,
|
||||
-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area.
|
||||
-- Any enemy crossing this border will be engaged.
|
||||
CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) )
|
||||
A2ADispatcher:SetBorderZone( { CCCPBorderZone } )</p>
|
||||
A2ADispatcher:SetBorderZone( { CCCPBorderZone } )
|
||||
|
||||
<p> -- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly
|
||||
-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly
|
||||
-- without an assignment within 100km radius from a detected target, will engage that target.
|
||||
A2ADispatcher:SetEngageRadius( 300000 )</p>
|
||||
A2ADispatcher:SetEngageRadius( 300000 )
|
||||
|
||||
<p> -- Setup the squadrons.
|
||||
A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye<em>Vody, { "SQ CCCP SU-27" }, 20 )
|
||||
A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop</em>Khanskaya, { "SQ CCCP MIG-31" }, 20 )
|
||||
-- Setup the squadrons.
|
||||
A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 )
|
||||
A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 )
|
||||
A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 )
|
||||
A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 )
|
||||
A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 )</p>
|
||||
A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 )
|
||||
|
||||
<p> -- Setup the overhead
|
||||
-- Setup the overhead
|
||||
A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 )
|
||||
A2ADispatcher:SetSquadronOverhead( "Maykop", 1 )
|
||||
A2ADispatcher:SetSquadronOverhead( "Mozdok", 1.5 )
|
||||
A2ADispatcher:SetSquadronOverhead( "Sochi", 1 )
|
||||
A2ADispatcher:SetSquadronOverhead( "Novo", 1 )</p>
|
||||
A2ADispatcher:SetSquadronOverhead( "Novo", 1 )
|
||||
|
||||
<p> -- Setup the Grouping
|
||||
-- Setup the Grouping
|
||||
A2ADispatcher:SetSquadronGrouping( "Mineralnye", 2 )
|
||||
A2ADispatcher:SetSquadronGrouping( "Sochi", 2 )
|
||||
A2ADispatcher:SetSquadronGrouping( "Novo", 3 )</p>
|
||||
A2ADispatcher:SetSquadronGrouping( "Novo", 3 )
|
||||
|
||||
<p> -- Setup the Takeoff methods
|
||||
A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI<em>A2A</em>DISPATCHER.Takeoff.Air )
|
||||
-- Setup the Takeoff methods
|
||||
A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air )
|
||||
A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" )
|
||||
A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" )
|
||||
A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" )
|
||||
A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" )</p>
|
||||
A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" )
|
||||
|
||||
<p> -- Setup the Landing methods
|
||||
-- Setup the Landing methods
|
||||
A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" )
|
||||
A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" )
|
||||
A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" )
|
||||
A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" )
|
||||
A2ADispatcher:SetSquadronLanding( "Novo", AI<em>A2A</em>DISPATCHER.Landing.AtRunway )</p>
|
||||
A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway )
|
||||
|
||||
|
||||
<p> -- CAP Squadron execution.
|
||||
-- CAP Squadron execution.
|
||||
CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
|
||||
A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )</p>
|
||||
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
|
||||
|
||||
<p> CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
|
||||
CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
|
||||
A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )</p>
|
||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
|
||||
<p> CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
|
||||
CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
|
||||
A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )</p>
|
||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
|
||||
<p> -- GCI Squadron execution.
|
||||
-- GCI Squadron execution.
|
||||
A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
|
||||
A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
|
||||
A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )</p>
|
||||
A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
|
||||
</code></pre>
|
||||
|
||||
<h4>8.5.1. Script the EWR network</h4>
|
||||
|
||||
@ -2557,6 +2560,22 @@ The altitude type, which is a string "BARO" defining Barometric or "RADIO" defin
|
||||
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>
|
||||
-- CAP Squadron execution.
|
||||
CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
|
||||
A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
|
||||
|
||||
CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
|
||||
A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
|
||||
CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
|
||||
A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2604,6 +2623,22 @@ The squadron name.</p>
|
||||
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>
|
||||
-- CAP Squadron execution.
|
||||
CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
|
||||
A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
|
||||
|
||||
CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
|
||||
A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
|
||||
CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
|
||||
A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
|
||||
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
|
||||
</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2643,6 +2678,15 @@ The maximum speed at which the gci can be executed.</p>
|
||||
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>
|
||||
|
||||
-- GCI Squadron execution.
|
||||
A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
|
||||
A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
|
||||
A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
|
||||
</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -926,9 +926,6 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
|
||||
|
||||
|
||||
|
||||
<p> This table contains the targets detected during patrol.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -2934,6 +2934,7 @@ The range till cargo will board.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CARGO_UNIT).CargoCarrier" >
|
||||
<strong>CARGO_UNIT.CargoCarrier</strong>
|
||||
</a>
|
||||
|
||||
@ -900,6 +900,7 @@ function below will use the range 1-7 just in case</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DESIGNATE).LaserCodes" >
|
||||
<strong>DESIGNATE.LaserCodes</strong>
|
||||
</a>
|
||||
|
||||
@ -2387,7 +2387,6 @@ The index of the DetectedItem.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemCount" >
|
||||
<strong>DETECTION_BASE.DetectedItemCount</strong>
|
||||
</a>
|
||||
|
||||
@ -227,6 +227,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(MOVEMENT).AliveUnits" >
|
||||
<strong>MOVEMENT.AliveUnits</strong>
|
||||
</a>
|
||||
@ -235,6 +236,9 @@ on defined intervals (currently every minute).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Contains the counter how many units are currently alive</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -1073,7 +1073,7 @@ true if metric.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#boolean</em>
|
||||
<em></em>
|
||||
<a id="#(SETTINGS).Metric" >
|
||||
<strong>SETTINGS.Metric</strong>
|
||||
</a>
|
||||
|
||||
@ -822,12 +822,6 @@ and any spaces before and after the resulting name are removed.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -3150,7 +3144,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
|
||||
|
||||
|
||||
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -3730,20 +3724,6 @@ True = Continue Scheduler</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).uncontrolled" >
|
||||
<strong>SPAWN.uncontrolled</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -436,7 +436,6 @@ ptional) The name of the new static.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWNSTATIC).SpawnIndex" >
|
||||
<strong>SPAWNSTATIC.SpawnIndex</strong>
|
||||
</a>
|
||||
|
||||
@ -510,7 +510,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
|
||||
<a id="#(FSM_PROCESS).Cargo" >
|
||||
<strong>FSM_PROCESS.Cargo</strong>
|
||||
</a>
|
||||
|
||||
262
docs/README.md
262
docs/README.md
@ -1,4 +1,4 @@
|
||||
# 1) MOOSE framework
|
||||
# 1. MOOSE framework
|
||||
|
||||
MOOSE is a **M**ission **O**bject **O**riented **S**cripting **E**nvironment, and is meant for mission designers and mission hosters.
|
||||
It allows to quickly setup complex missions using pre-scripted scenarios using the available classes within the MOOSE Framework.
|
||||
@ -17,55 +17,7 @@ Within the community, key users will start supporting, documenting, explaining a
|
||||
It is the ambition to grow this framework as a de-facto standard for mission designers to use.
|
||||
|
||||
|
||||
|
||||
|
||||
# 2) MOOSE usage
|
||||
|
||||
The delivery of MOOSE follows a structured release process. Over time, new features are added that can be used in your mission.
|
||||
|
||||
### The latest release of MOOSE can be downloaded **[here](https://github.com/FlightControl-Master/MOOSE/releases)**.
|
||||
|
||||
There are 3 different ways how you can use MOOSE, each with a different engagement and complexity level:
|
||||
|
||||
|
||||
|
||||
## 2.1) Use MOOSE as a Mission Designer
|
||||
|
||||
Refer to the detailed **[Usage Guide](Usage_Guide.html)** for more information.
|
||||
|
||||
|
||||
|
||||
## 2.2) Beta test MOOSE
|
||||
|
||||
Beta testers of MOOSE are requested to install additional software.
|
||||
|
||||
As a return or as a reward, testers get:
|
||||
|
||||
* Newly developed features planned for the next MOOSE release can be tested and incorporated in your missions early.
|
||||
* You can evaluate and contribute to the stability of the next release.
|
||||
* Your mission creation workflow becomes very flexible. New features are dynamically added to you missions.
|
||||
|
||||
Please read the detailed **[Beta Test Guide](Beta_Test_Guide.html)** for more information.
|
||||
|
||||
|
||||
|
||||
## 2.3) Contribute on the MOOSE development
|
||||
|
||||
Those people who have experience in lua development or are excited to contribute to the MOOSE project are welcome.
|
||||
|
||||
Please consult the **[Contribution Guide](Contribution_Guide.html)** for more information.
|
||||
|
||||
|
||||
|
||||
# 3) MOOSE Support Channels
|
||||
|
||||
MOOSE is broadcasted, documented and supported through various social media channels.
|
||||
|
||||
Click here for the **[communities guide](Communities.html)** of the MOOSE framework.
|
||||
|
||||
|
||||
|
||||
# 4) MOOSE Framework
|
||||
# 2. MOOSE Framework
|
||||
|
||||
The following classes are currently embedded within MOOSE framework and can be included within your mission scripts:
|
||||
|
||||
@ -92,7 +44,7 @@ You'll need to browse to the right MOOSE Class within the inheritance tree struc
|
||||
|
||||
|
||||
|
||||
## 4.1) MOOSE Demonstration Missions
|
||||
## MOOSE Demonstration Missions
|
||||
|
||||
The framework comes with demonstration missions which can be downloaded [here](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases), that you can try out and helps you to code.
|
||||
These missions provide examples of defined use cases how the MOOSE framework can be utilized. Each test mission is located in a separate directory, which contains at least one .lua file and .miz file.
|
||||
@ -104,8 +56,92 @@ more complex mission scenarios by combining these MOOSE classes into a complex b
|
||||
Some of these exact test missions are also demonstrated in a video format on the [YouTube channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg).
|
||||
|
||||
|
||||
## 2.1. MOOSE Human Tasking Classes
|
||||
|
||||
## 4.2) MOOSE Core Classes
|
||||
MOOSE Tasking Classes provide a comprehensive Mission Orchestration System.
|
||||
Through COMMANDCENTERs, multiple logical MISSIONs can be orchestrated for coalitions.
|
||||
Within each MISSION, various TASKs can be defined.
|
||||
Each TASK has a TASK ACTION flow, which is the flow that a player (hosted by a UNIT) within the simulator needs to follow and accomplish.
|
||||
|
||||
* [COMMANDCENTER](Documentation/CommandCenter.html): Orchestrates various logical MISSIONs for a coalition.
|
||||
|
||||
* [MISSION](Documentation/Mission.html): Each MISSION has various TASKs to be executed and accomplished by players.
|
||||
|
||||
* [TASK_A2A_DISPATCHER](Documentation/Task_A2A_Dispatcher.html): Automatically and dynamically dispatch A2A tasks to be executed by human players, as a result of the detection of airborne targets within a Mission scope.
|
||||
|
||||
* [TASK_A2G_DISPATCHER](Documentation/Task_A2G_Dispatcher.html): Automatically and dynamically dispatch A2G tasks to be executed by human players, as a result of the detection of ground targets within a Mission scope.
|
||||
|
||||
* [TASK_A2A](Documentation/Task_A2A.html): Models a A2A CAP, INTERCEPT and SWEEP tasks where a Player is routed towards an attack zone without enemies nearby, and various ground targets need to be eliminated.
|
||||
|
||||
* [TASK_A2G](Documentation/Task_A2G.html): Models a A2G SEAD, CAS and BAI tasks where a Player is routed towards an attack zone with enemies nearby, and various ground targets need to be eliminated.
|
||||
|
||||
|
||||
## 2.2. MOOSE AI Controlling Classes
|
||||
|
||||
MOOSE AI Controlling Classes provide mechanisms to control AI over long lasting processes.
|
||||
These AI Controlling Classes are based on FSM (Finite State Machine) Classes, and provided an encapsulated way to make AI behave or execute an activity.
|
||||
|
||||
* [AI_A2A_DISPATCHER](Documentation/AI_A2A_Dispatcher.html): Create an automatic and dynamic A2A defense system, executed by AI units, as a result of detected A2A airborne targets executing CAP and GCI. This script replaces the GCICAP script.
|
||||
|
||||
* [AI_BALANCER](Documentation/AI_Balancer.html): Compensate in a multi player mission the abscence of players with dynamically spawned AI air units. When players join CLIENTS, the AI will either be destroyed, or will fly back to the home or nearest friendly airbase.
|
||||
|
||||
* [AI_PATROL_ZONE](Documentation/AI_Patrol_Zone.html): Make an alive AI Group patrol a zone derived from the ZONE_BASE class. Manage out-of-fuel events and set altitude and speed ranges for the patrol.
|
||||
|
||||
* [AI_CAP](Documentation/AI_Cap.html): Make an alive AI Group perform Combat Air Patrol as a dynamic process.
|
||||
|
||||
* [AI_CAS](Documentation/AI_Cas.html): Make an alive AI Group perform Close Air Support as a dynamic process.
|
||||
|
||||
* [AI_BAI](Documentation/AI_Bai.html): Make an alive AI Group perform Battlefield Air Interdiction as a dynamic process.
|
||||
|
||||
|
||||
## 2.3. MOOSE Functional Classes
|
||||
|
||||
MOOSE Functional Classes provide various functions that are useful in mission design.
|
||||
|
||||
* [SPAWN](Documentation/Spawn.html): Spawn new groups (and units) during mission execution.
|
||||
|
||||
* [ESCORT](Documentation/Escort.html): Makes groups consisting of helicopters, airplanes, ground troops or ships within a mission joining your flight. You can control these groups through the ratio menu during your flight. Available commands are around: Navigation, Position Hold, Reporting (Target Detection), Attacking, Assisted Attacks, ROE, Evasion, Mission Execution and more ...
|
||||
|
||||
* [MISSILETRAINER](Documentation/MissileTrainer.html): Missile trainer, it destroys missiles when they are within a certain range of player airplanes, displays tracking and alert messages of missile launches; approach; destruction, and configure with radio menu commands. Various APIs available to configure the trainer.
|
||||
|
||||
* [DETECTION](Documentation/Detection.html): Detect other units using the available sensors of the detection unit. The DETECTION_BASE derived classes will provide different methods how the sets of detected objects are built.
|
||||
|
||||
* [SCORING](Documentation/Scoring.html): Administer the scoring of player achievements, and create a CSV file logging the scoring events for use at team or squadron websites.
|
||||
|
||||
* [SEAD](Documentation/Sead.html): Make SAM sites avoid SEAD missiles being fired at.
|
||||
|
||||
* [DESIGNATE](Documentation/Designate.html): Make AI automatically designate detected targets, and provide menu options for players to give instructions to the AI how to designate (by laser, smoke or illumination).
|
||||
|
||||
* [AIRBASEPOLICE](Documentation/AirbasePolice.html): Control the speed of players at the airbases. Speeding players are eliminated (does not work due to a bug in the DCS).
|
||||
|
||||
* [CLEANUP](Documentation/Cleanup.html): Keeps the airbases clean from clutter. (Only partly functional due to a bug in DCS, destroyed objects cannot be removed).
|
||||
|
||||
|
||||
## 2.4. MOOSE Wrapper Classes
|
||||
|
||||
MOOSE Wrapper Classes provide an object oriented hierarchical mechanism to manage the DCS objects within the simulator.
|
||||
Wrapper classes provide another easier mechanism to control Groups, Units, Statics, Airbases and other objects.
|
||||
|
||||
* [OBJECT](Documentation/Object.html): This class provides the base for MOOSE objects.
|
||||
|
||||
* [IDENTIFIABLE](Documentation/Identifiable.html): This class provides the base for MOOSE identifiable objects, which is every object within the simulator :-).
|
||||
|
||||
* [POSITIONABLE](Documentation/Positionable.html): This class provides the base for MOOSE positionable objects. These are AIRBASEs, STATICs, GROUPs, UNITs ...
|
||||
|
||||
* [CONTROLLABLE](Documentation/Controllable.html): This class provides the base for MOOSE controllable objects. These are GROUPs, UNITs, CLIENTs.
|
||||
|
||||
* [AIRBASE](Documentation/Airbase.html): This class wraps a DCS Airbase object within the simulator.
|
||||
|
||||
* [GROUP](Documentation/Group.html): This class wraps a DCS Group objects within the simulator.
|
||||
|
||||
* [UNIT](Documentation/Unit.html): This class wraps a DCS Unit object within the simulator.
|
||||
|
||||
* [CLIENT](Documentation/Client.html): This class wraps a DCS Unit object within the simulator, which has a skill Client or Player.
|
||||
|
||||
* [STATIC](Documentation/Static.html): This class wraps a DCS StaticObject object within the simulator.
|
||||
|
||||
|
||||
## 2.5. MOOSE Core Classes
|
||||
|
||||
These classes define the base building blocks of the MOOSE framework. These classes are heavily used within the MOOSE framework.
|
||||
|
||||
@ -141,109 +177,51 @@ The POINT_VEC3 class manages the 3D simulation space, while the POINT_VEC2 class
|
||||
* [RADIO](Documentation/Radio.html): Create radio communication.
|
||||
|
||||
|
||||
## 4.3) MOOSE Wrapper Classes
|
||||
|
||||
MOOSE Wrapper Classes provide an object oriented hierarchical mechanism to manage the DCS objects within the simulator.
|
||||
Wrapper classes provide another easier mechanism to control Groups, Units, Statics, Airbases and other objects.
|
||||
# 3. MOOSE usage
|
||||
|
||||
* **[OBJECT](Documentation/Object.html)**: This class provides the base for MOOSE objects.
|
||||
The delivery of MOOSE follows a structured release process. Over time, new features are added that can be used in your mission.
|
||||
|
||||
* **[IDENTIFIABLE](Documentation/Identifiable.html)**: This class provides the base for MOOSE identifiable objects, which is every object within the simulator :-).
|
||||
### The latest release of MOOSE can be downloaded **[here](https://github.com/FlightControl-Master/MOOSE/releases)**.
|
||||
|
||||
* **[POSITIONABLE](Documentation/Positionable.html)**: This class provides the base for MOOSE positionable objects. These are AIRBASEs, STATICs, GROUPs, UNITs ...
|
||||
There are 3 different ways how you can use MOOSE, each with a different engagement and complexity level:
|
||||
|
||||
* **[CONTROLLABLE](Documentation/Controllable.html)**: This class provides the base for MOOSE controllable objects. These are GROUPs, UNITs, CLIENTs.
|
||||
|
||||
* **[AIRBASE](Documentation/Airbase.html)**: This class wraps a DCS Airbase object within the simulator.
|
||||
## 3.1. Use MOOSE as a Mission Designer
|
||||
|
||||
* **[GROUP](Documentation/Group.html)**: This class wraps a DCS Group objects within the simulator.
|
||||
Refer to the detailed **[Usage Guide](Usage_Guide.html)** for more information.
|
||||
|
||||
* **[UNIT](Documentation/Unit.html)**: This class wraps a DCS Unit object within the simulator.
|
||||
|
||||
* **[CLIENT](Documentation/Client.html)**: This class wraps a DCS Unit object within the simulator, which has a skill Client or Player.
|
||||
## 3.2. Beta test MOOSE
|
||||
|
||||
* **[STATIC](Documentation/Static.html)**: This class wraps a DCS StaticObject object within the simulator.
|
||||
Beta testers of MOOSE are requested to install additional software.
|
||||
|
||||
As a return or as a reward, testers get:
|
||||
|
||||
* Newly developed features planned for the next MOOSE release can be tested and incorporated in your missions early.
|
||||
* You can evaluate and contribute to the stability of the next release.
|
||||
* Your mission creation workflow becomes very flexible. New features are dynamically added to you missions.
|
||||
|
||||
Please read the detailed **[Beta Test Guide](Beta_Test_Guide.html)** for more information.
|
||||
|
||||
|
||||
## 3.3. Contribute on the MOOSE development
|
||||
|
||||
Those people who have experience in lua development or are excited to contribute to the MOOSE project are welcome.
|
||||
|
||||
Please consult the **[Contribution Guide](Contribution_Guide.html)** for more information.
|
||||
|
||||
|
||||
|
||||
# 4. MOOSE Support Channels
|
||||
|
||||
MOOSE is broadcasted, documented and supported through various social media channels.
|
||||
|
||||
Click here for the **[communities guide](Communities.html)** of the MOOSE framework.
|
||||
|
||||
|
||||
|
||||
## 4.4) MOOSE Functional Classes
|
||||
|
||||
MOOSE Functional Classes provide various functions that are useful in mission design.
|
||||
|
||||
* [SPAWN](Documentation/Spawn.html): Spawn new groups (and units) during mission execution.
|
||||
|
||||
* [ESCORT](Documentation/Escort.html): Makes groups consisting of helicopters, airplanes, ground troops or ships within a mission joining your flight. You can control these groups through the ratio menu during your flight. Available commands are around: Navigation, Position Hold, Reporting (Target Detection), Attacking, Assisted Attacks, ROE, Evasion, Mission Execution and more ...
|
||||
|
||||
* [MISSILETRAINER](Documentation/MissileTrainer.html): Missile trainer, it destroys missiles when they are within a certain range of player airplanes, displays tracking and alert messages of missile launches; approach; destruction, and configure with radio menu commands. Various APIs available to configure the trainer.
|
||||
|
||||
* [DETECTION](Documentation/Detection.html): Detect other units using the available sensors of the detection unit. The DETECTION_BASE derived classes will provide different methods how the sets of detected objects are built.
|
||||
|
||||
* [SCORING](Documentation/Scoring.html): Administer the scoring of player achievements, and create a CSV file logging the scoring events for use at team or squadron websites.
|
||||
|
||||
* [SEAD](Documentation/Sead.html): Make SAM sites avoid SEAD missiles being fired at.
|
||||
|
||||
* [DESIGNATE](Documentation/Designate.html): Make AI automatically designate detected targets, and provide menu options for players to give instructions to the AI how to designate (by laser, smoke or illumination).
|
||||
|
||||
* [AIRBASEPOLICE](Documentation/AirbasePolice.html): Control the speed of players at the airbases. Speeding players are eliminated (does not work due to a bug in the DCS).
|
||||
|
||||
* [CLEANUP](Documentation/Cleanup.html): Keeps the airbases clean from clutter. (Only partly functional due to a bug in DCS, destroyed objects cannot be removed).
|
||||
|
||||
## 4.5) MOOSE AI Controlling Classes
|
||||
|
||||
MOOSE AI Controlling Classes provide mechanisms to control AI over long lasting processes.
|
||||
These AI Controlling Classes are based on FSM (Finite State Machine) Classes, and provided an encapsulated way to make AI behave or execute an activity.
|
||||
|
||||
* [AI_BALANCER](Documentation/AI_Balancer.html): Compensate in a multi player mission the abscence of players with dynamically spawned AI air units. When players join CLIENTS, the AI will either be destroyed, or will fly back to the home or nearest friendly airbase.
|
||||
|
||||
* [AI_PATROL_ZONE](Documentation/AI_Patrol_Zone.html): Make an alive AI Group patrol a zone derived from the ZONE_BASE class. Manage out-of-fuel events and set altitude and speed ranges for the patrol.
|
||||
|
||||
* [AI_CAP](Documentation/AI_Cap.html): Make an alive AI Group perform Combat Air Patrol as a dynamic process.
|
||||
|
||||
* [AI_CAS](Documentation/AI_Cas.html): Make an alive AI Group perform Close Air Support as a dynamic process.
|
||||
|
||||
* [AI_BAI](Documentation/AI_Bai.html): Make an alive AI Group perform Battlefield Air Interdiction as a dynamic process.
|
||||
|
||||
|
||||
|
||||
## 4.6) MOOSE Human Tasking Classes
|
||||
|
||||
MOOSE Tasking Classes provide a comprehensive Mission Orchestration System.
|
||||
Through COMMANDCENTERs, multiple logical MISSIONs can be orchestrated for coalitions.
|
||||
Within each MISSION, various TASKs can be defined.
|
||||
Each TASK has a TASK ACTION flow, which is the flow that a player (hosted by a UNIT) within the simulator needs to follow and accomplish.
|
||||
|
||||
* [COMMANDCENTER](Documentation/CommandCenter.html): Orchestrates various logical MISSIONs for a coalition.
|
||||
|
||||
* [MISSION](Documentation/Mission.html): Each MISSION has various TASKs to be executed and accomplished by players.
|
||||
|
||||
* [TASK](Documentation/Task.html): Each TASK has a status, and has a TASK ACTION flow for each Player acting and executing the TASK.
|
||||
|
||||
* [TASK_SEAD](Documentation/Task_SEAD.html): Models a SEAD Task, where a Player is routed towards an attack zone, and various SEADing targets need to be eliminated.
|
||||
|
||||
* [TASK_BAI](Documentation/Task_A2G.html): Models a CAP Task, where a Player is routed towards an attack zone without enemies nearby, and various ground targets need to be eliminated.
|
||||
|
||||
* [TASK_CAS](Documentation/Task_A2G.html): Models a CAS Task, where a Player is routed towards an attack zone with enemies nearby, and various ground targets need to be eliminated.
|
||||
|
||||
|
||||
|
||||
## 4.7) MOOSE Action Classes
|
||||
|
||||
MOOSE Action Classes are task action sub-flows, that can be used and combined, to quickly define a comprehensive end-to-end task action flow.
|
||||
For example, for the SEAD Task, the task action flow combines the actions ASSIGN, ROUTE, ACCOUNT and ASSIST task action sub-flows.
|
||||
|
||||
* [ACT_ASSIGN](Documentation/Assign.html): Mechanism to accept a TASK by a player. For example, assign the task only after the player accepts the task using the menu.
|
||||
|
||||
* [ACT_ROUTE](Documentation/Route.html): Mechanisms to route players to zones or any other positionable coordinate. For example, route a player towards a zone.
|
||||
|
||||
* [ACT_ACCOUNT](Documentation/Account.html): Mechanisms to account various events within the simulator. For example, account the dead events, accounting dead units within a Target SET within a ZONE.
|
||||
|
||||
* [ACT_ASSIST](Documentation/Assist.html): Mechanisms to assist players executing a task. For example, acquire targets through smoking them.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 5) Credits
|
||||
# 5. Credits
|
||||
|
||||
Note that most of the framework is based on code i've written myself,
|
||||
but some code of it is also based on code that i've seen as great scripting code and ideas,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user