diff --git a/Moose Development/Moose/AI/AI_Cargo.lua b/Moose Development/Moose/AI/AI_Cargo.lua index bd379f299..81be2f8e3 100644 --- a/Moose Development/Moose/AI/AI_Cargo.lua +++ b/Moose Development/Moose/AI/AI_Cargo.lua @@ -1,4 +1,4 @@ ---- **AI** -- (R2.3) - Models the intelligent transportation of infantry and other cargo. +--- **AI** -- (R2.4) - Models the intelligent transportation of infantry and other cargo. -- -- === -- @@ -7,69 +7,25 @@ -- === -- -- @module AI.AI_Cargo --- @image AI_Cargo_Dispatching.JPG +-- @image Cargo.JPG --- @type AI_CARGO -- @extends Core.Fsm#FSM_CONTROLLABLE ---- Brings a dynamic cargo handling capability for AI groups. +--- Base class for the dynamic cargo handling capability for AI groups. -- --- Armoured Personnel Carriers (Carrier), Trucks, Jeeps and other ground based carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation. --- The AI\_CARGO\Carrier module uses the @{Cargo} capabilities within the MOOSE framework. --- CARGO derived objects must be declared within the mission to make the AI\_CARGO\Carrier object recognize the cargo. +-- Carriers can be mobilized to intelligently transport infantry and other cargo within the simulation. +-- The AI_CARGO module uses the @{Cargo} capabilities within the MOOSE framework. +-- CARGO derived objects must be declared within the mission to make the AI_CARGO object recognize the cargo. -- Please consult the @{Cargo} module for more information. -- --- ## Cargo loading. --- --- The module will load automatically cargo when the Carriers are within boarding or loading range. --- The boarding or loading range is specified when the cargo is created in the simulation, and therefore, this range depends on the type of cargo --- and the specified boarding range. --- --- ## Enemies nearby. --- --- When the Carriers are approaching enemy units, something special is happening. --- The Carriers will stop moving, and the loaded infantry will unboard and follow the Carriers and will help to defend the group. --- The carrier will hold the route once the unboarded infantry is further than 50 meters from the Carriers, --- to ensure that the Carriers are not too far away from the following running infantry. --- Once all enemies are cleared, the infantry will board again automatically into the Carriers. Once boarded, the Carriers will follow its pre-defined route. --- --- A combat range needs to be specified in meters at the @{#AI_CARGO.New}() method. --- This combat range will trigger the unboarding of troops when enemies are within the combat range around the Carriers. --- During my tests, I've noticed that there is a balance between ensuring that the infantry is within sufficient hit range (effectiveness) versus --- vulnerability of the infantry. It all depends on the kind of enemies that are expected to be encountered. --- A combat range of 350 meters to 500 meters has been proven to be the most effective and efficient. --- --- ## Infantry health. --- --- When infantry is unboarded from the Carriers, the infantry is actually respawned into the battlefield. --- As a result, the unboarding infantry is very _healthy_ every time it unboards. --- This is due to the limitation of the DCS simulator, which is not able to specify the health of new spawned units as a parameter. --- However, infantry that was destroyed when unboarded and following the Carriers, won't be respawned again. Destroyed is destroyed. --- As a result, there is some additional strength that is gained when an unboarding action happens, but in terms of simulation balance this has --- marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every --- time is not so much of an issue ... --- --- ## Control the Carriers on the map. --- --- It is possible also as a human ground commander to influence the path of the Carriers, by pointing a new path using the DCS user interface on the map. --- In this case, the Carriers will change the direction towards its new indicated route. However, there is a catch! --- Once the Carriers are near the enemy, and infantry is unboarded, the Carriers won't be able to hold the route until the infantry could catch up. --- The Carriers will simply drive on and won't stop! This is a limitation in ED that prevents user actions being controlled by the scripting engine. --- No workaround is possible on this. --- --- ## Cargo deployment. --- --- Using the @{#AI_CARGO.Deploy}() method, you are able to direct the Carriers towards a point on the battlefield to unboard/unload the cargo at the specific coordinate. --- The Carriers will follow nearby roads as much as possible, to ensure fast and clean cargo transportation between the objects and villages in the simulation environment. --- --- ## Cargo pickup. --- --- Using the @{#AI_CARGO.Pickup}() method, you are able to direct the Carriers towards a point on the battlefield to board/load the cargo at the specific coordinate. --- The Carriers will follow nearby roads as much as possible, to ensure fast and clean cargo transportation between the objects and villages in the simulation environment. --- --- +-- The derived classes from this module are: -- +-- * @{AI.AI_Cargo_APC} - Cargo transportation using APCs and other vehicles between zones. +-- * @{AI.AI_Cargo_Helicopter} - Cargo transportation using helicopters between zones. +-- * @{AI.AI_Cargo_Airplane} - Cargo transportation using airplanes to and from airbases. +-- -- @field #AI_CARGO AI_CARGO = { ClassName = "AI_CARGO", diff --git a/Moose Development/Moose/AI/AI_Cargo_APC.lua b/Moose Development/Moose/AI/AI_Cargo_APC.lua index f991346a9..9404c448a 100644 --- a/Moose Development/Moose/AI/AI_Cargo_APC.lua +++ b/Moose Development/Moose/AI/AI_Cargo_APC.lua @@ -1,4 +1,4 @@ ---- **AI** -- (R2.3) - Models the intelligent transportation of infantry and other cargo. +--- **AI** -- (R2.4) - Models the intelligent transportation of infantry and other cargo. -- -- === -- @@ -13,11 +13,12 @@ -- @extends AI.AI_Cargo#AI_CARGO ---- Brings a dynamic cargo handling capability for AI groups. +--- Brings a dynamic cargo handling capability for an AI vehicle group. -- -- Armoured Personnel Carriers (APC), Trucks, Jeeps and other ground based carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation. --- The AI\_CARGO\APC module uses the @{Cargo} capabilities within the MOOSE framework. --- CARGO derived objects must be declared within the mission to make the AI\_CARGO\APC object recognize the cargo. +-- +-- The AI_CARGO_APC class uses the @{Cargo} capabilities within the MOOSE framework. +-- @{Cargo} must be declared within the mission to make the AI_CARGO_APC object recognize the cargo. -- Please consult the @{Cargo} module for more information. -- -- ## Cargo loading. diff --git a/Moose Development/Moose/AI/AI_Cargo_Airplane.lua b/Moose Development/Moose/AI/AI_Cargo_Airplane.lua index 882ea6d36..d19de0cb1 100644 --- a/Moose Development/Moose/AI/AI_Cargo_Airplane.lua +++ b/Moose Development/Moose/AI/AI_Cargo_Airplane.lua @@ -1,4 +1,4 @@ ---- **AI** -- (R2.3) - Models the intelligent transportation of infantry (cargo). +--- **AI** -- (R2.4) - Models the intelligent transportation of infantry (cargo). -- -- === -- @@ -13,7 +13,34 @@ -- @extends Core.Fsm#FSM_CONTROLLABLE ---- Implements the transportation of cargo by airplanes. +--- Brings a dynamic cargo handling capability for an AI airplane group. +-- +-- Airplane carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation between airbases. +-- +-- The AI_CARGO_AIRPLANE module uses the @{Cargo} capabilities within the MOOSE framework. +-- @{Cargo} must be declared within the mission to make AI_CARGO_AIRPLANE recognize the cargo. +-- Please consult the @{Cargo} module for more information. +-- +-- ## Cargo pickup. +-- +-- Using the @{#AI_CARGO_AIRPLANE.Pickup}() method, you are able to direct the helicopters towards a point on the battlefield to board/load the cargo at the specific coordinate. +-- Ensure that the landing zone is horizontally flat, and that trees cannot be found in the landing vicinity, or the helicopters won't land or will even crash! +-- +-- ## Cargo deployment. +-- +-- Using the @{#AI_CARGO_AIRPLANE.Deploy}() method, you are able to direct the helicopters towards a point on the battlefield to unboard/unload the cargo at the specific coordinate. +-- Ensure that the landing zone is horizontally flat, and that trees cannot be found in the landing vicinity, or the helicopters won't land or will even crash! +-- +-- ## Infantry health. +-- +-- When infantry is unboarded from the APCs, the infantry is actually respawned into the battlefield. +-- As a result, the unboarding infantry is very _healthy_ every time it unboards. +-- This is due to the limitation of the DCS simulator, which is not able to specify the health of new spawned units as a parameter. +-- However, infantry that was destroyed when unboarded, won't be respawned again. Destroyed is destroyed. +-- As a result, there is some additional strength that is gained when an unboarding action happens, but in terms of simulation balance this has +-- marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every +-- time is not so much of an issue ... +-- -- -- @field #AI_CARGO_AIRPLANE AI_CARGO_AIRPLANE = { @@ -30,8 +57,6 @@ function AI_CARGO_AIRPLANE:New( Airplane, CargoSet ) local self = BASE:Inherit( self, AI_CARGO:New( Airplane, CargoSet ) ) -- #AI_CARGO_AIRPLANE - self.CargoSet = CargoSet -- Cargo.CargoGroup#CARGO_GROUP - self:AddTransition( "*", "Landed", "*" ) self:AddTransition( "*", "Home" , "*" ) diff --git a/Moose Development/Moose/AI/AI_Cargo_Dispatcher.lua b/Moose Development/Moose/AI/AI_Cargo_Dispatcher.lua index 1ffc9b9b9..3ee909975 100644 --- a/Moose Development/Moose/AI/AI_Cargo_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_Cargo_Dispatcher.lua @@ -16,25 +16,25 @@ --- A dynamic cargo handling capability for AI groups. -- -- Carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation. --- The AI\_CARGO\_DISPATCHER module uses the @{Cargo} capabilities within the MOOSE framework, to enable Carrier GROUP objects +-- The AI_CARGO_DISPATCHER module uses the @{Cargo} capabilities within the MOOSE framework, to enable Carrier GROUP objects -- to transport @{Cargo} towards several deploy zones. --- CARGO derived objects must be declared within the mission to make the AI\_CARGO\_DISPATCHER object recognize the cargo. +-- @{Cargo} must be declared within the mission to make the AI_CARGO_DISPATCHER object recognize the cargo. -- Please consult the @{Cargo} module for more information. -- --- # 1) AI\_CARGO\_DISPATCHER constructor +-- # 1) AI_CARGO_DISPATCHER constructor -- -- * @{#AI_CARGO_DISPATCHER.New}(): Creates a new AI\_CARGO\_DISPATCHER object. -- --- # 2) AI\_CARGO\_DISPATCHER is a FSM +-- # 2) AI_CARGO_DISPATCHER is a FSM -- -- ![Process](..\Presentations\AI_PATROL\Dia2.JPG) -- --- ## 2.1) AI\_CARGO\_DISPATCHER States +-- ## 2.1) AI_CARGO_DISPATCHER States -- -- * **Monitoring**: The process is dispatching. -- * **Idle**: The process is idle. -- --- ## 2.2) AI\_CARGO\_DISPATCHER Events +-- ## 2.2) AI_CARGO_DISPATCHER Events -- -- * **Monitor**: Monitor and take action. -- * **Start**: Start the transport process. @@ -47,6 +47,7 @@ -- * **Deploy**: Deploy cargo to a location. -- * **Unload**: Unload the cargo. -- * **Unloaded**: Flag that the cargo is unloaded. +-- * **Deployed**: All cargo is unloaded from the carriers in the group. -- * **Home**: A Carrier is going home. -- -- # 3) Enhance your mission scripts with **Tailored** Event Handling! diff --git a/Moose Development/Moose/AI/AI_Cargo_Dispatcher_APC.lua b/Moose Development/Moose/AI/AI_Cargo_Dispatcher_APC.lua index 0f63f2f94..78fe76f31 100644 --- a/Moose Development/Moose/AI/AI_Cargo_Dispatcher_APC.lua +++ b/Moose Development/Moose/AI/AI_Cargo_Dispatcher_APC.lua @@ -1,4 +1,4 @@ ---- **AI** -- Models the intelligent transportation of infantry and other cargo using APCs. +--- **AI** -- (2.4) - Models the intelligent transportation of infantry and other cargo using APCs. -- -- **Features:** -- diff --git a/Moose Development/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua b/Moose Development/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua index 61705d84d..5c64ef549 100644 --- a/Moose Development/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua +++ b/Moose Development/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua @@ -1,4 +1,4 @@ ---- **AI** -- Models the intelligent transportation of infantry and other cargo using Helicopters. +--- **AI** -- (2.4) - Models the intelligent transportation of infantry and other cargo using Helicopters. -- -- **Features:** -- diff --git a/Moose Development/Moose/AI/AI_Cargo_Helicopter.lua b/Moose Development/Moose/AI/AI_Cargo_Helicopter.lua index b05c75dfe..7e32c9495 100644 --- a/Moose Development/Moose/AI/AI_Cargo_Helicopter.lua +++ b/Moose Development/Moose/AI/AI_Cargo_Helicopter.lua @@ -1,4 +1,4 @@ ---- **AI** -- (R2.3) - Models the intelligent transportation of infantry (cargo). +--- **AI** -- (R2.4) - Models the intelligent transportation of infantry (cargo). -- -- === -- @@ -13,7 +13,34 @@ -- @extends Core.Fsm#FSM_CONTROLLABLE ---- # AI\_CARGO\_TROOPS class, extends @{Core.Fsm#FSM_CONTROLLABLE} +--- Brings a dynamic cargo handling capability for an AI helicopter group. +-- +-- Helicopter carriers can be mobilized to intelligently transport infantry and other cargo within the simulation. +-- +-- The AI_CARGO_HELICOPTER class uses the @{Cargo} capabilities within the MOOSE framework. +-- @{Cargo} must be declared within the mission to make the AI_CARGO_HELICOPTER object recognize the cargo. +-- Please consult the @{Cargo} module for more information. +-- +-- ## Cargo pickup. +-- +-- Using the @{#AI_CARGO_HELICOPTER.Pickup}() method, you are able to direct the helicopters towards a point on the battlefield to board/load the cargo at the specific coordinate. +-- Ensure that the landing zone is horizontally flat, and that trees cannot be found in the landing vicinity, or the helicopters won't land or will even crash! +-- +-- ## Cargo deployment. +-- +-- Using the @{#AI_CARGO_HELICOPTER.Deploy}() method, you are able to direct the helicopters towards a point on the battlefield to unboard/unload the cargo at the specific coordinate. +-- Ensure that the landing zone is horizontally flat, and that trees cannot be found in the landing vicinity, or the helicopters won't land or will even crash! +-- +-- ## Infantry health. +-- +-- When infantry is unboarded from the APCs, the infantry is actually respawned into the battlefield. +-- As a result, the unboarding infantry is very _healthy_ every time it unboards. +-- This is due to the limitation of the DCS simulator, which is not able to specify the health of new spawned units as a parameter. +-- However, infantry that was destroyed when unboarded, won't be respawned again. Destroyed is destroyed. +-- As a result, there is some additional strength that is gained when an unboarding action happens, but in terms of simulation balance this has +-- marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every +-- time is not so much of an issue ... +-- -- -- === -- @@ -34,8 +61,6 @@ function AI_CARGO_HELICOPTER:New( Helicopter, CargoSet ) local self = BASE:Inherit( self, AI_CARGO:New( Helicopter, CargoSet ) ) -- #AI_CARGO_HELICOPTER - self.CargoSet = CargoSet -- Cargo.CargoGroup#CARGO_GROUP - self.Zone = ZONE_GROUP:New( Helicopter:GetName(), Helicopter, 300 ) self:SetStartState( "Unloaded" )