From 87634969b3f2450d36e28ba7d4038cb72873016f Mon Sep 17 00:00:00 2001
From: FlightControl_Master
Date: Sun, 30 Jul 2017 20:54:24 +0200
Subject: [PATCH] Added default CAP methods
* Added method :SetDefaultCapTimeInterval( CapMinSeconds, CapMaxSeconds
) for AI_A2A_DISPATCHER and AI_A2A_GCICAP.
* Added method :SetDefaultCapLimit( CapLimit ) for AI_A2A_DISPATCHER and
AI_A2A_GCICAP.
Added documentation in chapter 10.7 and chapter 1.8.
Changed Treshold to Threshold
---
Moose Development/Moose/AI/AI_A2A.lua | 22 +--
.../Moose/AI/AI_A2A_Dispatcher.lua | 101 ++++++++++---
Moose Development/Moose/AI/AI_Balancer.lua | 18 +--
Moose Development/Moose/AI/AI_Patrol.lua | 16 +-
docs/Documentation/AI_A2A.html | 28 ++--
docs/Documentation/AI_A2A_Dispatcher.html | 141 ++++++++++++++++--
docs/Documentation/AI_Balancer.html | 56 +++----
docs/Documentation/AI_Patrol.html | 24 +--
docs/Documentation/Cargo.html | 1 +
docs/Documentation/Detection.html | 2 +-
docs/Documentation/Fsm.html | 3 +-
docs/Documentation/Positionable.html | 1 -
docs/Documentation/Spawn.html | 26 ++++
docs/Documentation/Task_Cargo.html | 1 +
14 files changed, 321 insertions(+), 119 deletions(-)
diff --git a/Moose Development/Moose/AI/AI_A2A.lua b/Moose Development/Moose/AI/AI_A2A.lua
index 174dcceb3..ca31c31ec 100644
--- a/Moose Development/Moose/AI/AI_A2A.lua
+++ b/Moose Development/Moose/AI/AI_A2A.lua
@@ -70,8 +70,8 @@ function AI_A2A:New( AIGroup )
self:SetControllable( AIGroup )
- self:SetFuelTreshold( .2, 60 )
- self:SetDamageTreshold( 0.4 )
+ self:SetFuelThreshold( .2, 60 )
+ self:SetDamageThreshold( 0.4 )
self:SetStartState( "Stopped" )
@@ -311,13 +311,13 @@ end
-- When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_A2A.
-- Once the time is finished, the old AI will return to the base.
-- @param #AI_A2A self
--- @param #number PatrolFuelTresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.
+-- @param #number PatrolFuelThresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.
-- @param #number PatrolOutOfFuelOrbitTime The amount of seconds the out of fuel AIControllable will orbit before returning to the base.
-- @return #AI_A2A self
-function AI_A2A:SetFuelTreshold( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime )
+function AI_A2A:SetFuelThreshold( PatrolFuelThresholdPercentage, PatrolOutOfFuelOrbitTime )
self.PatrolManageFuel = true
- self.PatrolFuelTresholdPercentage = PatrolFuelTresholdPercentage
+ self.PatrolFuelThresholdPercentage = PatrolFuelThresholdPercentage
self.PatrolOutOfFuelOrbitTime = PatrolOutOfFuelOrbitTime
self.Controllable:OptionRTBBingoFuel( false )
@@ -332,12 +332,12 @@ end
-- Note that for groups, the average damage of the complete group will be calculated.
-- So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.
-- @param #AI_A2A self
--- @param #number PatrolDamageTreshold The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.
+-- @param #number PatrolDamageThreshold The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.
-- @return #AI_A2A self
-function AI_A2A:SetDamageTreshold( PatrolDamageTreshold )
+function AI_A2A:SetDamageThreshold( PatrolDamageThreshold )
self.PatrolManageDamage = true
- self.PatrolDamageTreshold = PatrolDamageTreshold
+ self.PatrolDamageThreshold = PatrolDamageThreshold
return self
end
@@ -380,7 +380,7 @@ function AI_A2A:onafterStatus()
local Fuel = self.Controllable:GetUnit(1):GetFuel()
self:F({Fuel=Fuel})
- if Fuel < self.PatrolFuelTresholdPercentage then
+ if Fuel < self.PatrolFuelThresholdPercentage then
self:E( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... RTB!" )
local OldAIControllable = self.Controllable
local AIControllableTemplate = self.Controllable:GetTemplate()
@@ -397,8 +397,8 @@ function AI_A2A:onafterStatus()
-- TODO: Check GROUP damage function.
local Damage = self.Controllable:GetLife()
local InitialLife = self.Controllable:GetLife0()
- self:F( { Damage = Damage, InitialLife = InitialLife, DamageTreshold = self.PatrolDamageTreshold } )
- if ( Damage / InitialLife ) < self.PatrolDamageTreshold then
+ self:F( { Damage = Damage, InitialLife = InitialLife, DamageThreshold = self.PatrolDamageThreshold } )
+ if ( Damage / InitialLife ) < self.PatrolDamageThreshold then
self:E( self.Controllable:GetName() .. " is damaged: " .. Damage .. " ... RTB!" )
self:Damaged()
RTB = true
diff --git a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua
index 4faadc52e..d85c59508 100644
--- a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua
+++ b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua
@@ -629,18 +629,35 @@ do -- AI_A2A_DISPATCHER
--
-- Use the method @{#AI_A2A_DISPATCHER.SetDefaultGrouping}() to set the **default grouping** of spawned airplanes for all squadrons.
--
- -- ## 10.5. RTB fuel treshold.
+ -- ## 10.5. Default RTB fuel treshold.
--
-- When an airplane gets **out of fuel** to a certain %-tage, which is **15% (0.15)**, it will go RTB, and will be replaced with a new airplane when applicable.
--
- -- Use the method @{#AI_A2A_DISPATCHER.SetDefaultFuelTreshold}() to set the **default fuel treshold** of spawned airplanes for all squadrons.
+ -- Use the method @{#AI_A2A_DISPATCHER.SetDefaultFuelThreshold}() to set the **default fuel treshold** of spawned airplanes for all squadrons.
--
- -- ## 10.6. RTB damage treshold.
+ -- ## 10.6. Default RTB damage treshold.
--
-- When an airplane is **damaged** to a certain %-tage, which is **40% (0.40)**, it will go RTB, and will be replaced with a new airplane when applicable.
--
- -- Use the method @{#AI_A2A_DISPATCHER.SetDefaultDamageTreshold}() to set the **default damage treshold** of spawned airplanes for all squadrons.
+ -- Use the method @{#AI_A2A_DISPATCHER.SetDefaultDamageThreshold}() to set the **default damage treshold** of spawned airplanes for all squadrons.
--
+ -- ## 10.7. Default CAP Time Interval.
+ --
+ -- CAP is time driven, and will evaluate in random time intervals if a new CAP needs to be spawned.
+ -- The **default CAP time interval** is between **180** and **600** seconds.
+ --
+ -- Use the method @{#AI_A2A_DISPATCHER.SetDefaultCapTimeInterval}() to set the **default CAP time interval** of spawned airplanes for all squadrons.
+ -- Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the @{#AI_A2A_DISPATCHER.SetSquadronCapTimeInterval}() method.
+ --
+ -- ## 10.8. Default CAP limit.
+ --
+ -- Multiple CAP can be airborne at the same time for one squadron, which is controlled by the **CAP limit**.
+ -- The **default CAP limit** is 1 CAP per squadron to be airborne at the same time.
+ -- Note that the default CAP limit is used when a Squadron CAP is defined, and cannot be changed afterwards.
+ -- So, ensure that you set the default CAP limit **before** you spawn the Squadron CAP.
+ --
+ -- Use the method @{#AI_A2A_DISPATCHER.SetDefaultCapTimeInterval}() to set the **default CAP time interval** of spawned airplanes for all squadrons.
+ -- Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the @{#AI_A2A_DISPATCHER.SetSquadronCapTimeInterval}() method.
--
-- ## 11. Q & A:
--
@@ -730,8 +747,10 @@ do -- AI_A2A_DISPATCHER
self:SetDefaultLanding( AI_A2A_DISPATCHER.Landing.NearAirbase )
self:SetDefaultOverhead( 1 )
self:SetDefaultGrouping( 1 )
- self:SetDefaultFuelTreshold( 0.15, 0 ) -- 15% of fuel remaining in the tank will trigger the airplane to return to base or refuel.
- self:SetDefaultDamageTreshold( 0.4 ) -- When 40% of damage, go RTB.
+ self:SetDefaultFuelThreshold( 0.15, 0 ) -- 15% of fuel remaining in the tank will trigger the airplane to return to base or refuel.
+ self:SetDefaultDamageThreshold( 0.4 ) -- When 40% of damage, go RTB.
+ self:SetDefaultCapTimeInterval( 180, 600 ) -- Between 180 and 600 seconds.
+ self:SetDefaultCapLimit( 1 ) -- Maximum one CAP per squadron.
self:AddTransition( "Started", "Assign", "Started" )
@@ -1014,7 +1033,7 @@ do -- AI_A2A_DISPATCHER
--- Set the default fuel treshold when defenders will RTB or Refuel in the air.
-- The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.
-- @param #AI_A2A_DISPATCHER self
- -- @param #number FuelTreshold A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.
+ -- @param #number FuelThreshold A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.
-- @return #AI_A2A_DISPATCHER
-- @usage
--
@@ -1022,11 +1041,11 @@ do -- AI_A2A_DISPATCHER
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
--
-- -- Now Setup the default fuel treshold.
- -- A2ADispatcher:SetDefaultRefuelTreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
+ -- A2ADispatcher:SetDefaultRefuelThreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
--
- function AI_A2A_DISPATCHER:SetDefaultFuelTreshold( FuelTreshold )
+ function AI_A2A_DISPATCHER:SetDefaultFuelThreshold( FuelThreshold )
- self.DefenderDefault.FuelTreshold = FuelTreshold
+ self.DefenderDefault.FuelThreshold = FuelThreshold
return self
end
@@ -1035,7 +1054,7 @@ do -- AI_A2A_DISPATCHER
--- Set the default damage treshold when defenders will RTB.
-- The default damage treshold is by default set to 40%, which means that when the airplane is 40% damaged, it will go RTB.
-- @param #AI_A2A_DISPATCHER self
- -- @param #number DamageTreshold A decimal number between 0 and 1, that expresses the %-tage of the damage treshold before going RTB.
+ -- @param #number DamageThreshold A decimal number between 0 and 1, that expresses the %-tage of the damage treshold before going RTB.
-- @return #AI_A2A_DISPATCHER
-- @usage
--
@@ -1043,11 +1062,55 @@ do -- AI_A2A_DISPATCHER
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
--
-- -- Now Setup the default damage treshold.
- -- A2ADispatcher:SetDefaultDamageTreshold( 0.90 ) -- Go RTB when the airplane 90% damaged.
+ -- A2ADispatcher:SetDefaultDamageThreshold( 0.90 ) -- Go RTB when the airplane 90% damaged.
--
- function AI_A2A_DISPATCHER:SetDefaultDamageTreshold( DamageTreshold )
+ function AI_A2A_DISPATCHER:SetDefaultDamageThreshold( DamageThreshold )
- self.DefenderDefault.DamageTreshold = DamageTreshold
+ self.DefenderDefault.DamageThreshold = DamageThreshold
+
+ return self
+ end
+
+
+ --- Set the default CAP time interval for squadrons, which will be used to determine a random CAP timing.
+ -- The default CAP time interval is between 180 and 600 seconds.
+ -- @param #AI_A2A_DISPATCHER self
+ -- @param #number CapMinSeconds The minimum amount of seconds for the random time interval.
+ -- @param #number CapMaxSeconds The maximum amount of seconds for the random time interval.
+ -- @return #AI_A2A_DISPATCHER
+ -- @usage
+ --
+ -- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
+ -- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
+ --
+ -- -- Now Setup the default CAP time interval.
+ -- A2ADispatcher:SetDefaultCapTimeInterval( 300, 1200 ) -- Between 300 and 1200 seconds.
+ --
+ function AI_A2A_DISPATCHER:SetDefaultCapTimeInterval( CapMinSeconds, CapMaxSeconds )
+
+ self.DefenderDefault.CapMinSeconds = CapMinSeconds
+ self.DefenderDefault.CapMaxSeconds = CapMaxSeconds
+
+ return self
+ end
+
+
+ --- Set the default CAP limit for squadrons, which will be used to determine how many CAP can be airborne at the same time for the squadron.
+ -- The default CAP time interval is 1 CAP.
+ -- @param #AI_A2A_DISPATCHER self
+ -- @param #number CapLimit The maximum amount of CAP that can be airborne at the same time for the squadron.
+ -- @return #AI_A2A_DISPATCHER
+ -- @usage
+ --
+ -- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
+ -- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
+ --
+ -- -- Now Setup the default CAP limit.
+ -- A2ADispatcher:SetDefaultCapLimit( 2 ) -- Maximum 2 CAP per squadron.
+ --
+ function AI_A2A_DISPATCHER:SetDefaultCapLimit( CapLimit )
+
+ self.DefenderDefault.CapLimit = CapLimit
return self
end
@@ -1313,7 +1376,7 @@ do -- AI_A2A_DISPATCHER
Cap.EngageMaxSpeed = EngageMaxSpeed
Cap.AltType = AltType
- self:SetSquadronCapInterval( SquadronName, 2, 180, 600, 1 )
+ self:SetSquadronCapInterval( SquadronName, self.DefenderDefault.CapLimit, self.DefenderDefault.CapMinSeconds, self.DefenderDefault.CapMaxSeconds, 1 )
return self
end
@@ -2205,8 +2268,8 @@ do -- AI_A2A_DISPATCHER
local Fsm = AI_A2A_CAP:New( DefenderCAP, Cap.Zone, Cap.FloorAltitude, Cap.CeilingAltitude, Cap.PatrolMinSpeed, Cap.PatrolMaxSpeed, Cap.EngageMinSpeed, Cap.EngageMaxSpeed, Cap.AltType )
Fsm:SetDispatcher( self )
Fsm:SetHomeAirbase( DefenderSquadron.Airbase )
- Fsm:SetFuelTreshold( self.DefenderDefault.FuelTreshold, 60 )
- Fsm:SetDamageTreshold( self.DefenderDefault.DamageTreshold )
+ Fsm:SetFuelThreshold( self.DefenderDefault.FuelThreshold, 60 )
+ Fsm:SetDamageThreshold( self.DefenderDefault.DamageThreshold )
Fsm:Start()
Fsm:__Patrol( 2 )
@@ -2337,8 +2400,8 @@ do -- AI_A2A_DISPATCHER
local Fsm = AI_A2A_GCI:New( DefenderGCI, Gci.EngageMinSpeed, Gci.EngageMaxSpeed )
Fsm:SetDispatcher( self )
Fsm:SetHomeAirbase( DefenderSquadron.Airbase )
- Fsm:SetFuelTreshold( self.DefenderDefault.FuelTreshold, 60 )
- Fsm:SetDamageTreshold( self.DefenderDefault.DamageTreshold )
+ Fsm:SetFuelThreshold( self.DefenderDefault.FuelThreshold, 60 )
+ Fsm:SetDamageThreshold( self.DefenderDefault.DamageThreshold )
Fsm:Start()
Fsm:__Engage( 2, Target.Set ) -- Engage on the TargetSetUnit
diff --git a/Moose Development/Moose/AI/AI_Balancer.lua b/Moose Development/Moose/AI/AI_Balancer.lua
index 1f8212f4d..643dfc5b7 100644
--- a/Moose Development/Moose/AI/AI_Balancer.lua
+++ b/Moose Development/Moose/AI/AI_Balancer.lua
@@ -151,22 +151,22 @@ end
--- Returns the AI to the nearest friendly @{Airbase#AIRBASE}.
-- @param #AI_BALANCER self
--- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Airbase#AIRBASE}.
+-- @param Dcs.DCSTypes#Distance ReturnThresholdRange If there is an enemy @{Client#CLIENT} within the ReturnThresholdRange given in meters, the AI will not return to the nearest @{Airbase#AIRBASE}.
-- @param Core.Set#SET_AIRBASE ReturnAirbaseSet The SET of @{Set#SET_AIRBASE}s to evaluate where to return to.
-function AI_BALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet )
+function AI_BALANCER:ReturnToNearestAirbases( ReturnThresholdRange, ReturnAirbaseSet )
self.ToNearestAirbase = true
- self.ReturnTresholdRange = ReturnTresholdRange
+ self.ReturnThresholdRange = ReturnThresholdRange
self.ReturnAirbaseSet = ReturnAirbaseSet
end
--- Returns the AI to the home @{Airbase#AIRBASE}.
-- @param #AI_BALANCER self
--- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Airbase#AIRBASE}.
-function AI_BALANCER:ReturnToHomeAirbase( ReturnTresholdRange )
+-- @param Dcs.DCSTypes#Distance ReturnThresholdRange If there is an enemy @{Client#CLIENT} within the ReturnThresholdRange given in meters, the AI will not return to the nearest @{Airbase#AIRBASE}.
+function AI_BALANCER:ReturnToHomeAirbase( ReturnThresholdRange )
self.ToHomeAirbase = true
- self.ReturnTresholdRange = ReturnTresholdRange
+ self.ReturnThresholdRange = ReturnThresholdRange
end
--- @param #AI_BALANCER self
@@ -246,12 +246,12 @@ function AI_BALANCER:onenterMonitoring( SetGroup )
if self.ToNearestAirbase == false and self.ToHomeAirbase == false then
self:Destroy( Client.UnitName, AIGroup )
else
- -- We test if there is no other CLIENT within the self.ReturnTresholdRange of the first unit of the AI group.
+ -- We test if there is no other CLIENT within the self.ReturnThresholdRange of the first unit of the AI group.
-- If there is a CLIENT, the AI stays engaged and will not return.
- -- If there is no CLIENT within the self.ReturnTresholdRange, then the unit will return to the Airbase return method selected.
+ -- If there is no CLIENT within the self.ReturnThresholdRange, then the unit will return to the Airbase return method selected.
local PlayerInRange = { Value = false }
- local RangeZone = ZONE_RADIUS:New( 'RangeZone', AIGroup:GetVec2(), self.ReturnTresholdRange )
+ local RangeZone = ZONE_RADIUS:New( 'RangeZone', AIGroup:GetVec2(), self.ReturnThresholdRange )
self:T2( RangeZone )
diff --git a/Moose Development/Moose/AI/AI_Patrol.lua b/Moose Development/Moose/AI/AI_Patrol.lua
index 286332c87..60ec7c2a4 100644
--- a/Moose Development/Moose/AI/AI_Patrol.lua
+++ b/Moose Development/Moose/AI/AI_Patrol.lua
@@ -591,13 +591,13 @@ end
-- When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROL_ZONE.
-- Once the time is finished, the old AI will return to the base.
-- @param #AI_PATROL_ZONE self
--- @param #number PatrolFuelTresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.
+-- @param #number PatrolFuelThresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.
-- @param #number PatrolOutOfFuelOrbitTime The amount of seconds the out of fuel AIControllable will orbit before returning to the base.
-- @return #AI_PATROL_ZONE self
-function AI_PATROL_ZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime )
+function AI_PATROL_ZONE:ManageFuel( PatrolFuelThresholdPercentage, PatrolOutOfFuelOrbitTime )
self.PatrolManageFuel = true
- self.PatrolFuelTresholdPercentage = PatrolFuelTresholdPercentage
+ self.PatrolFuelThresholdPercentage = PatrolFuelThresholdPercentage
self.PatrolOutOfFuelOrbitTime = PatrolOutOfFuelOrbitTime
return self
@@ -610,12 +610,12 @@ end
-- Note that for groups, the average damage of the complete group will be calculated.
-- So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.
-- @param #AI_PATROL_ZONE self
--- @param #number PatrolDamageTreshold The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.
+-- @param #number PatrolDamageThreshold The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.
-- @return #AI_PATROL_ZONE self
-function AI_PATROL_ZONE:ManageDamage( PatrolDamageTreshold )
+function AI_PATROL_ZONE:ManageDamage( PatrolDamageThreshold )
self.PatrolManageDamage = true
- self.PatrolDamageTreshold = PatrolDamageTreshold
+ self.PatrolDamageThreshold = PatrolDamageThreshold
return self
end
@@ -831,7 +831,7 @@ function AI_PATROL_ZONE:onafterStatus()
local RTB = false
local Fuel = self.Controllable:GetUnit(1):GetFuel()
- if Fuel < self.PatrolFuelTresholdPercentage then
+ if Fuel < self.PatrolFuelThresholdPercentage then
self:E( self.Controllable:GetName() .. " is out of fuel:" .. Fuel .. ", RTB!" )
local OldAIControllable = self.Controllable
local AIControllableTemplate = self.Controllable:GetTemplate()
@@ -846,7 +846,7 @@ function AI_PATROL_ZONE:onafterStatus()
-- TODO: Check GROUP damage function.
local Damage = self.Controllable:GetLife()
- if Damage <= self.PatrolDamageTreshold then
+ if Damage <= self.PatrolDamageThreshold then
self:E( self.Controllable:GetName() .. " is damaged:" .. Damage .. ", RTB!" )
RTB = true
end
diff --git a/docs/Documentation/AI_A2A.html b/docs/Documentation/AI_A2A.html
index 21f9d9ca1..321285023 100644
--- a/docs/Documentation/AI_A2A.html
+++ b/docs/Documentation/AI_A2A.html
@@ -269,7 +269,7 @@
- | AI_A2A.PatrolDamageTreshold |
+ AI_A2A.PatrolDamageThreshold |
|
@@ -281,7 +281,7 @@
- | AI_A2A.PatrolFuelTresholdPercentage |
+ AI_A2A.PatrolFuelThresholdPercentage |
|
@@ -335,7 +335,7 @@
- | AI_A2A:SetDamageTreshold(PatrolDamageTreshold) |
+ AI_A2A:SetDamageThreshold(PatrolDamageThreshold) |
When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.
|
@@ -347,7 +347,7 @@
- | AI_A2A:SetFuelTreshold(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) |
+ AI_A2A:SetFuelThreshold(PatrolFuelThresholdPercentage, PatrolOutOfFuelOrbitTime) |
When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.
|
@@ -1185,8 +1185,8 @@ Return false to cancel Transition.
-
-AI_A2A.PatrolDamageTreshold
+
+AI_A2A.PatrolDamageThreshold
@@ -1213,8 +1213,8 @@ Return false to cancel Transition.
-
-AI_A2A.PatrolFuelTresholdPercentage
+
+AI_A2A.PatrolFuelThresholdPercentage
@@ -1363,8 +1363,8 @@ self
-
-
-AI_A2A:SetDamageTreshold(PatrolDamageTreshold)
+
+AI_A2A:SetDamageThreshold(PatrolDamageThreshold)
-
@@ -1382,7 +1382,7 @@ So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold
- | AI_A2A_DISPATCHER:SetDefaultDamageTreshold(DamageTreshold) |
+ AI_A2A_DISPATCHER:SetDefaultCapLimit(CapLimit) |
+
+ Set the default CAP limit for squadrons, which will be used to determine how many CAP can be airborne at the same time for the squadron.
+ |
+
+
+ | AI_A2A_DISPATCHER:SetDefaultCapTimeInterval(CapMinSeconds, CapMaxSeconds) |
+
+ Set the default CAP time interval for squadrons, which will be used to determine a random CAP timing.
+ |
+
+
+ | AI_A2A_DISPATCHER:SetDefaultDamageThreshold(DamageThreshold) |
Set the default damage treshold when defenders will RTB.
|
- | AI_A2A_DISPATCHER:SetDefaultFuelTreshold(FuelTreshold) |
+ AI_A2A_DISPATCHER:SetDefaultFuelThreshold(FuelThreshold) |
Set the default fuel treshold when defenders will RTB or Refuel in the air.
|
@@ -1395,18 +1407,35 @@ For some default settings, a method is available that allows you to tweak the de
Use the method AIA2ADISPATCHER.SetDefaultGrouping() to set the default grouping of spawned airplanes for all squadrons.
-10.5. RTB fuel treshold.
+10.5. Default RTB fuel treshold.
When an airplane gets out of fuel to a certain %-tage, which is 15% (0.15), it will go RTB, and will be replaced with a new airplane when applicable.
-Use the method AIA2ADISPATCHER.SetDefaultFuelTreshold() to set the default fuel treshold of spawned airplanes for all squadrons.
+Use the method AIA2ADISPATCHER.SetDefaultFuelThreshold() to set the default fuel treshold of spawned airplanes for all squadrons.
-10.6. RTB damage treshold.
+10.6. Default RTB damage treshold.
When an airplane is damaged to a certain %-tage, which is 40% (0.40), it will go RTB, and will be replaced with a new airplane when applicable.
-Use the method AIA2ADISPATCHER.SetDefaultDamageTreshold() to set the default damage treshold of spawned airplanes for all squadrons.
+Use the method AIA2ADISPATCHER.SetDefaultDamageThreshold() to set the default damage treshold of spawned airplanes for all squadrons.
+10.7. Default CAP Time Interval.
+
+CAP is time driven, and will evaluate in random time intervals if a new CAP needs to be spawned.
+The default CAP time interval is between 180 and 600 seconds.
+
+Use the method AIA2ADISPATCHER.SetDefaultCapTimeInterval() to set the default CAP time interval of spawned airplanes for all squadrons.
+Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the AIA2ADISPATCHER.SetSquadronCapTimeInterval() method.
+
+10.8. Default CAP limit.
+
+Multiple CAP can be airborne at the same time for one squadron, which is controlled by the CAP limit.
+The default CAP limit is 1 CAP per squadron to be airborne at the same time.
+Note that the default CAP limit is used when a Squadron CAP is defined, and cannot be changed afterwards.
+So, ensure that you set the default CAP limit before you spawn the Squadron CAP.
+
+Use the method AIA2ADISPATCHER.SetDefaultCapTimeInterval() to set the default CAP time interval of spawned airplanes for all squadrons.
+Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the AIA2ADISPATCHER.SetSquadronCapTimeInterval() method.
11. Q & A:
@@ -3060,8 +3089,92 @@ or
-
-
-AI_A2A_DISPATCHER:SetDefaultDamageTreshold(DamageTreshold)
+
+AI_A2A_DISPATCHER:SetDefaultCapLimit(CapLimit)
+
+
+-
+
+
Set the default CAP limit for squadrons, which will be used to determine how many CAP can be airborne at the same time for the squadron.
+
+
+The default CAP time interval is 1 CAP.
+
+ Parameter
+
+ Return value
+
+#AIA2ADISPATCHER:
+
+
+ Usage:
+
+ -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
+ A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
+
+ -- Now Setup the default CAP limit.
+ A2ADispatcher:SetDefaultCapLimit( 2 ) -- Maximum 2 CAP per squadron.
+
+
+
+
+
+-
+
+
+AI_A2A_DISPATCHER:SetDefaultCapTimeInterval(CapMinSeconds, CapMaxSeconds)
+
+
+-
+
+
Set the default CAP time interval for squadrons, which will be used to determine a random CAP timing.
+
+
+The default CAP time interval is between 180 and 600 seconds.
+
+ Parameters
+
+ Return value
+
+#AIA2ADISPATCHER:
+
+
+ Usage:
+
+ -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
+ A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
+
+ -- Now Setup the default CAP time interval.
+ A2ADispatcher:SetDefaultCapTimeInterval( 300, 1200 ) -- Between 300 and 1200 seconds.
+
+
+
+
+
+-
+
+
+AI_A2A_DISPATCHER:SetDefaultDamageThreshold(DamageThreshold)
-
@@ -3075,7 +3188,7 @@ or
-
-
#number DamageTreshold :
+
#number DamageThreshold :
A decimal number between 0 and 1, that expresses the %-tage of the damage treshold before going RTB.
@@ -3091,7 +3204,7 @@ A decimal number between 0 and 1, that expresses the %-tage of the damage tresho
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
-- Now Setup the default damage treshold.
- A2ADispatcher:SetDefaultDamageTreshold( 0.90 ) -- Go RTB when the airplane 90% damaged.
+ A2ADispatcher:SetDefaultDamageThreshold( 0.90 ) -- Go RTB when the airplane 90% damaged.
@@ -3099,8 +3212,8 @@ A decimal number between 0 and 1, that expresses the %-tage of the damage tresho
-
-
-AI_A2A_DISPATCHER:SetDefaultFuelTreshold(FuelTreshold)
+
+AI_A2A_DISPATCHER:SetDefaultFuelThreshold(FuelThreshold)
-
@@ -3114,7 +3227,7 @@ A decimal number between 0 and 1, that expresses the %-tage of the damage tresho
diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html
index 265d04d3e..2f53c4846 100644
--- a/docs/Documentation/AI_Balancer.html
+++ b/docs/Documentation/AI_Balancer.html
@@ -187,21 +187,21 @@ CLIENTS in a SETCLIENT collection, which are not occupied by human players.
- | AI_BALANCER:ReturnToHomeAirbase(ReturnTresholdRange) |
+ AI_BALANCER.ReturnThresholdRange |
+
+
+ |
+
+
+ | AI_BALANCER:ReturnToHomeAirbase(ReturnThresholdRange) |
Returns the AI to the home Airbase#AIRBASE.
|
- | AI_BALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet) |
+ AI_BALANCER:ReturnToNearestAirbases(ReturnThresholdRange, ReturnAirbaseSet) |
Returns the AI to the nearest friendly Airbase#AIRBASE.
- |
-
-
- | AI_BALANCER.ReturnTresholdRange |
-
-
|
@@ -451,13 +451,27 @@ The default Spawn object to spawn new AI Groups when needed.
+
+
+
+-
+
+
+
+AI_BALANCER.ReturnThresholdRange
+
+
+-
+
+
+
-
-AI_BALANCER:ReturnToHomeAirbase(ReturnTresholdRange)
+AI_BALANCER:ReturnToHomeAirbase(ReturnThresholdRange)
-
@@ -468,8 +482,8 @@ The default Spawn object to spawn new AI Groups when needed.
@@ -479,7 +493,7 @@ If there is an enemy Client#CLIENT within th
-
-AI_BALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet)
+AI_BALANCER:ReturnToNearestAirbases(ReturnThresholdRange, ReturnAirbaseSet)
-
@@ -490,8 +504,8 @@ If there is an enemy Client#CLIENT within th
-
-
-
--
-
-
-
-AI_BALANCER.ReturnTresholdRange
-
-
--
-
-
-
diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html
index 43392b308..1e25ded90 100644
--- a/docs/Documentation/AI_Patrol.html
+++ b/docs/Documentation/AI_Patrol.html
@@ -236,13 +236,13 @@
- | AI_PATROL_ZONE:ManageDamage(PatrolDamageTreshold) |
+ AI_PATROL_ZONE:ManageDamage(PatrolDamageThreshold) |
When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.
|
- | AI_PATROL_ZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) |
+ AI_PATROL_ZONE:ManageFuel(PatrolFuelThresholdPercentage, PatrolOutOfFuelOrbitTime) |
When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.
|
@@ -404,7 +404,7 @@
- | AI_PATROL_ZONE.PatrolDamageTreshold |
+ AI_PATROL_ZONE.PatrolDamageThreshold |
|
@@ -416,7 +416,7 @@
- | AI_PATROL_ZONE.PatrolFuelTresholdPercentage |
+ AI_PATROL_ZONE.PatrolFuelThresholdPercentage |
|
@@ -957,7 +957,7 @@ The list of Unit#UNITs
-AI_PATROL_ZONE:ManageDamage(PatrolDamageTreshold)
+AI_PATROL_ZONE:ManageDamage(PatrolDamageThreshold)
@@ -975,7 +975,7 @@ So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold
+
+ | SPAWN.uncontrolled |
+
+
|
@@ -2194,6 +2200,9 @@ The group that was spawned. You can use this group for further actions.
+
+ Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.
+
@@ -2726,6 +2735,9 @@ when nothing was spawned.
+
+ Overwrite unit names by default with group name.
+
@@ -3727,6 +3739,20 @@ True = Continue Scheduler
+
+
+
+-
+
+
+
+SPAWN.uncontrolled
+
+
+-
+
+
+
diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html
index 1f1e13d4f..a0ddfc083 100644
--- a/docs/Documentation/Task_Cargo.html
+++ b/docs/Documentation/Task_Cargo.html
@@ -566,6 +566,7 @@ based on the tasking capabilities defined in Task#TA
-
+
FSM_PROCESS.DeployZone