From 169dcfe3f6dcb1e32b93cb215eeabfc0a96782a5 Mon Sep 17 00:00:00 2001 From: Jonathan Toppins Date: Thu, 28 Jun 2018 00:17:26 -0400 Subject: [PATCH 1/6] a2a-dispatcher: add check for not in air in OnEventEngineShutdown This fixes the problem of planes owned by gcicap would immediately despawn when shot causing their engine to quit. While not ultimately satisfying as planes shot while taxiing will still immediately despawn. One is now able to see their air victories in all their glory, including the fiery crash into the ground. Bug: 932 Signed-off-by: Jonathan Toppins --- Moose Development/Moose/AI/AI_A2A_Dispatcher.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua index d8018b2fe..a85366d77 100644 --- a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua @@ -1049,7 +1049,8 @@ do -- AI_A2A_DISPATCHER if Squadron then self:F( { SquadronName = Squadron.Name } ) local LandingMethod = self:GetSquadronLanding( Squadron.Name ) - if LandingMethod == AI_A2A_DISPATCHER.Landing.AtEngineShutdown then + if LandingMethod == AI_A2A_DISPATCHER.Landing.AtEngineShutdown and + not DefenderUnit:InAir() then local DefenderSize = Defender:GetSize() if DefenderSize == 1 then self:RemoveDefenderFromSquadron( Squadron, Defender ) From c952f134d86574c63a0aa2e6b286a8739a39ee05 Mon Sep 17 00:00:00 2001 From: Jonathan Toppins Date: Wed, 27 Jun 2018 21:32:11 -0400 Subject: [PATCH 2/6] a2a-dispatcher: remove fuel check in OnEventLand() handler This effectivally reverts the change made in commit ea96a5e0a38b ("Planes remaining at airfield fixed") to declutter airbases of aircraft which land at incorrect bases. The problem with the logic is an RTB command will not be issued until the fuel threshold is reached. Therefore the check will always be true resulting the the unit always being deleted. Bug: 875 Signed-off-by: Jonathan Toppins --- Moose Development/Moose/AI/AI_A2A_Dispatcher.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua index d8018b2fe..1bb841b15 100644 --- a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua @@ -1033,10 +1033,6 @@ do -- AI_A2A_DISPATCHER DefenderUnit:Destroy() return end - if DefenderUnit:GetFuel() <= self.DefenderDefault.FuelThreshold then - DefenderUnit:Destroy() - return - end end end From 4452cbd2abf9a167add6fea9acd280c515e44825 Mon Sep 17 00:00:00 2001 From: Van De Velde Date: Fri, 29 Jun 2018 05:05:31 +0200 Subject: [PATCH 3/6] Documentation --- Moose Development/Moose/Core/Point.lua | 116 ++++++++++++++++------- Moose Development/Moose/Tasking/Task.lua | 39 +++++--- 2 files changed, 109 insertions(+), 46 deletions(-) diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index b98159460..191fbc050 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -1,5 +1,11 @@ ---- **Core** -- **POINT\_VEC** classes define an **extensive API** to **manage 3D points** in the simulation space. +--- **Core** -- Defines an **extensive API** to **manage 3D points** in the DCS World 3D simulation space. -- +-- **Features:** +-- +-- * Provides a COORDINATE class, which allows to manage points in 3D space and perform various operations on it. +-- * Provides a POINT\_VEC2 class, which is derived from COORDINATE, and allows to manage points in 3D space, but from a Lat/Lon and Altitude perspective. +-- * Provides a POINT\_VEC3 class, which is derived from COORDINATE, and allows to manage points in 3D space, but from a X, Z and Y vector perspective. +-- -- === -- -- # Demo Missions @@ -38,29 +44,20 @@ do -- COORDINATE --- Defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space. -- - -- ## COORDINATE constructor + -- # 1) Create a COORDINATE object. -- - -- A new COORDINATE object can be created with: + -- A new COORDINATE object can be created with 3 various methods: -- - -- * @{#COORDINATE.New}(): a 3D point. - -- * @{#COORDINATE.NewFromVec2}(): a 2D point created from a @{DCS#Vec2}. - -- * @{#COORDINATE.NewFromVec3}(): a 3D point created from a @{DCS#Vec3}. - -- - -- ## Create waypoints for routes - -- - -- A COORDINATE can prepare waypoints for Ground and Air groups to be embedded into a Route. - -- - -- * @{#COORDINATE.WaypointAir}(): Build an air route point. - -- * @{#COORDINATE.WaypointGround}(): Build a ground route point. - -- - -- Route points can be used in the Route methods of the @{Wrapper.Group#GROUP} class. + -- * @{#COORDINATE.New}(): from a 3D point. + -- * @{#COORDINATE.NewFromVec2}(): from a @{DCS#Vec2} and possible altitude. + -- * @{#COORDINATE.NewFromVec3}(): from a @{DCS#Vec3}. -- -- - -- ## Smoke, flare, explode, illuminate + -- # 2) Smoke, flare, explode, illuminate at the coordinate. -- -- At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods: -- - -- ### Smoke + -- ## 2.1) Smoke -- -- * @{#COORDINATE.Smoke}(): To smoke the point in a certain color. -- * @{#COORDINATE.SmokeBlue}(): To smoke the point in blue. @@ -69,7 +66,7 @@ do -- COORDINATE -- * @{#COORDINATE.SmokeWhite}(): To smoke the point in white. -- * @{#COORDINATE.SmokeGreen}(): To smoke the point in green. -- - -- ### Flare + -- ## 2.2) Flare -- -- * @{#COORDINATE.Flare}(): To flare the point in a certain color. -- * @{#COORDINATE.FlareRed}(): To flare the point in red. @@ -77,18 +74,19 @@ do -- COORDINATE -- * @{#COORDINATE.FlareWhite}(): To flare the point in white. -- * @{#COORDINATE.FlareGreen}(): To flare the point in green. -- - -- ### Explode + -- ## 2.3) Explode -- -- * @{#COORDINATE.Explosion}(): To explode the point with a certain intensity. -- - -- ### Illuminate + -- ## 2.4) Illuminate -- -- * @{#COORDINATE.IlluminationBomb}(): To illuminate the point. -- -- - -- ## Markings + -- # 3) Create markings on the map. -- - -- Place markers (text boxes with clarifications for briefings, target locations or any other reference point) on the map for all players, coalitions or specific groups: + -- Place markers (text boxes with clarifications for briefings, target locations or any other reference point) + -- on the map for all players, coalitions or specific groups: -- -- * @{#COORDINATE.MarkToAll}(): Place a mark to all players. -- * @{#COORDINATE.MarkToCoalition}(): Place a mark to a coalition. @@ -96,47 +94,99 @@ do -- COORDINATE -- * @{#COORDINATE.MarkToCoalitionBlue}(): Place a mark to the blue coalition. -- * @{#COORDINATE.MarkToGroup}(): Place a mark to a group (needs to have a client in it or a CA group (CA group is bugged)). -- * @{#COORDINATE.RemoveMark}(): Removes a mark from the map. - -- - -- - -- ## 3D calculation methods + -- + -- # 4) Coordinate calculation methods. -- -- Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method: -- - -- ### Distance + -- ## 4.1) Get the distance between 2 points. -- -- * @{#COORDINATE.Get3DDistance}(): Obtain the distance from the current 3D point to the provided 3D point in 3D space. -- * @{#COORDINATE.Get2DDistance}(): Obtain the distance from the current 3D point to the provided 3D point in 2D space. -- - -- ### Angle + -- ## 4.2) Get the angle. -- -- * @{#COORDINATE.GetAngleDegrees}(): Obtain the angle in degrees from the current 3D point with the provided 3D direction vector. -- * @{#COORDINATE.GetAngleRadians}(): Obtain the angle in radians from the current 3D point with the provided 3D direction vector. -- * @{#COORDINATE.GetDirectionVec3}(): Obtain the 3D direction vector from the current 3D point to the provided 3D point. -- - -- ### Translation + -- ## 4.3) Coordinate translation. -- -- * @{#COORDINATE.Translate}(): Translate the current 3D point towards an other 3D point using the given Distance and Angle. -- - -- ### Get the North correction of the current location + -- ## 4.4) Get the North correction of the current location. -- -- * @{#COORDINATE.GetNorthCorrection}(): Obtains the north correction at the current 3D point. -- - -- - -- ## Point Randomization + -- ## 4.5) Point Randomization -- -- Various methods exist to calculate random locations around a given 3D point. -- -- * @{#COORDINATE.GetRandomVec2InRadius}(): Provides a random 2D vector around the current 3D point, in the given inner to outer band. -- * @{#COORDINATE.GetRandomVec3InRadius}(): Provides a random 3D vector around the current 3D point, in the given inner to outer band. + -- + -- ## 4.6) LOS between coordinates. + -- + -- Calculate if the coordinate has Line of Sight (LOS) with the other given coordinate. + -- Mountains, trees and other objects can be positioned between the two 3D points, preventing visibilty in a straight continuous line. + -- The method @{#COORDINATE.IsLOS}() returns if the two coodinates have LOS. + -- + -- ## 4.7) Check the coordinate position. + -- + -- Various methods are available that allow to check if a coordinate is: + -- + -- * @{#COORDINATE.IsInRadius}(): in a give radius. + -- * @{#COORDINATE.IsInSphere}(): is in a given sphere. + -- * @{#COORDINATE.IsAtCoordinate2D}(): is in a given coordinate within a specific precision. + -- + -- + -- + -- # 5) Measure the simulation environment at the coordinate. + -- + -- ## 5.1) Weather specific. + -- + -- Within the DCS simulator, a coordinate has specific environmental properties, like wind, temperature, humidity etc. + -- + -- * @{#COORDINATE.GetWind}(): Retrieve the wind at the specific coordinate within the DCS simulator. + -- * @{#COORDINATE.GetTemperature}(): Retrieve the temperature at the specific height within the DCS simulator. + -- * @{#COORDINATE.GetPressure}(): Retrieve the pressure at the specific height within the DCS simulator. + -- + -- ## 5.2) Surface specific. + -- + -- Within the DCS simulator, the surface can have various objects placed at the coordinate, and the surface height will vary. + -- + -- * @{#COORDINATE.GetLandHeight}(): Retrieve the height of the surface (on the ground) within the DCS simulator. + -- * @{#COORDINATE.GetSurfaceType}(): Retrieve the surface type (on the ground) within the DCS simulator. + -- + -- # 6) Create waypoints for routes. + -- + -- A COORDINATE can prepare waypoints for Ground and Air groups to be embedded into a Route. + -- + -- * @{#COORDINATE.WaypointAir}(): Build an air route point. + -- * @{#COORDINATE.WaypointGround}(): Build a ground route point. + -- + -- Route points can be used in the Route methods of the @{Wrapper.Group#GROUP} class. + -- + -- ## 7) Manage the roads. + -- + -- Important for ground vehicle transportation and movement, the method @{#COORDINATE.GetClosestPointToRoad}() will calculate + -- the closest point on the nearest road. + -- + -- In order to use the most optimal road system to transport vehicles, the method @{#COORDINATE.GetPathOnRoad}() will calculate + -- the most optimal path following the road between two coordinates. + -- -- -- - -- ## Metric system + -- + -- + -- ## 8) Metric or imperial system -- -- * @{#COORDINATE.IsMetric}(): Returns if the 3D point is Metric or Nautical Miles. -- * @{#COORDINATE.SetMetric}(): Sets the 3D point to Metric or Nautical Miles. -- -- - -- ## Coorinate text generation + -- ## 9) Coordinate text generation + -- -- -- * @{#COORDINATE.ToStringBR}(): Generates a Bearing & Range text in the format of DDD for DI where DDD is degrees and DI is distance. -- * @{#COORDINATE.ToStringLL}(): Generates a Latutude & Longutude text. diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index 3835621a3..7b645c2ad 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -80,9 +80,9 @@ -- Depending on the task progress, a **scoring** can be allocated to award pilots of the achievements made. -- The scoring is fully flexible, and different levels of awarding can be provided depending on the task type and complexity. -- --- ## 1. Task Statuses +-- # 1) Task Statuses -- --- ### 1.1. Task status overview. +-- ## 1.1) Task status overview. -- -- A task has a state, reflecting the progress and completion of the task: -- @@ -93,12 +93,18 @@ -- - **Abort**: Expresses that the task is aborted by by the player using the abort menu. -- - **Cancelled**: Expresses that the task is cancelled by HQ or through a logical situation where a cancellation of the task is required. -- +-- -- A normal flow of task status would evolve from the **Planned** state, to the **Assigned** state ending either in a **Success** or a **Failed** state. +-- +-- Planned -> Assigned -> Success +-- -> Failed +-- -- The state completion is by default set to **Success**, if the goals of the task have been reached, but can be overruled by a goal method. -- --- Depending on the tactical situation, a task can be **Rejected** or **Cancelled** by the mission governer. +-- Depending on the tactical situation, a task can be **Cancelled** by the mission governer. -- It is actually the mission designer who has the flexibility to decide at which conditions a task would be set to **Success**, **Failed** or **Cancelled**. --- It all depends on the task goals, and the phase/evolution of the task conditions that would accomplish the goals. +-- This decision all depends on the task goals, and the phase/evolution of the task conditions that would accomplish the goals. +-- -- For example, if the task goal is to merely destroy a target, and the target is mid-mission destroyed by another event than the pilot destroying the target, -- the task goal could be set to **Failed**, or .. **Cancelled** ... -- However, it could very well be also acceptable that the task would be flagged as **Success**. @@ -106,7 +112,7 @@ -- The tasking mechanism governs beside the progress also a scoring mechanism, and in case of goal completion without any active pilot involved -- in the execution of the task, could result in a **Success** task completion status, but no score would be awared, as there were no players involved. -- --- ### 1.2. Task status events. +-- ## 1.2) Task status events. -- -- The task statuses can be set by using the following methods: -- @@ -119,12 +125,12 @@ -- The mentioned derived TASK_ classes are implementing the task status transitions out of the box. -- So no extra logic needs to be written. -- --- ## 2. Goal conditions for a task. +-- # 2) Goal conditions for a task. -- -- Every 30 seconds, a @{#Task.Goal} trigger method is fired. -- You as a mission designer, can capture the **Goal** event trigger to check your own task goal conditions and take action! -- --- ### 2.1. Goal event handler `OnAfterGoal()`. +-- ## 2.1) Goal event handler `OnAfterGoal()`. -- -- And this is a really great feature! Imagine a task which has **several conditions to check** before the task can move into **Success** state. -- You can do this with the OnAfterGoal method. @@ -141,23 +147,30 @@ -- end -- end -- --- So the @{#TASK.OnAfterGoal}() event handler would be called every 30 seconds automatically, and within this method, you can now check the conditions and take respective action. +-- So the @{#TASK.OnAfterGoal}() event handler would be called every 30 seconds automatically, +-- and within this method, you can now check the conditions and take respective action. -- --- ### 2.2. Goal event trigger `Goal()`. +-- ## 2.2) Goal event trigger `Goal()`. -- -- If you would need to check a goal at your own defined event timing, then just call the @{#TASK.Goal}() method within your logic. -- The @{#TASK.OnAfterGoal}() event handler would then directly be called and would execute the logic. --- Note that you can also delay the goal check by using the delayed event trigger syntax `:__Goal( Dalay )`. +-- Note that you can also delay the goal check by using the delayed event trigger syntax `:__Goal( Delay )`. -- -- --- ## 3) Add scoring when reaching a certain task status: +-- # 3) Add scoring when reaching a certain task status: -- -- Upon reaching a certain task status in a task, additional scoring can be given. If the Mission has a scoring system attached, the scores will be added to the mission scoring. -- Use the method @{#TASK.AddScore}() to add scores when a status is reached. -- --- ## 1.4) Task briefing: +-- # 4) Task briefing: +-- +-- A task briefing is a text that is shown to the player when he is assigned to the task. +-- The briefing is broadcasted by the command center owning the mission. +-- +-- The briefing is part of the parameters in the @{#TASK.New}() constructor, +-- but can separately be modified later in your mission using the +-- @{#TASK.SetBriefing}() method. -- --- A task briefing can be given that is shown to the player when he is assigned to the task. -- -- @field #TASK TASK -- From 3c2ff2d7a11bf738bcc6df980dba8eac7175c7fa Mon Sep 17 00:00:00 2001 From: Van De Velde Date: Sat, 30 Jun 2018 09:37:28 +0200 Subject: [PATCH 4/6] Updated documentation --- Moose Development/Moose/Tasking/Task.lua | 262 +++++++-- .../Moose/Tasking/Task_CARGO.lua | 508 +++++++++--------- .../Moose/Tasking/Task_Cargo_CSAR.lua | 150 +++++- .../Moose/Tasking/Task_Cargo_Transport.lua | 139 ++++- 4 files changed, 753 insertions(+), 306 deletions(-) diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index 7b645c2ad..84f8158d0 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -2,6 +2,7 @@ -- -- **Features:** -- +-- * A base class for other task classes filling in the details and making a concrete task process. -- * Manage the overall task execution, following-up the progression made by the pilots and actors. -- * Provide a mechanism to set a task status, depending on the progress made within the task. -- * Manage a task briefing. @@ -11,6 +12,200 @@ -- -- === -- +-- # 1) Tasking from a player perspective. +-- +-- Tasking can be controlled by using the "other" menu in the radio menu of the player group. +-- +-- ![Other Menu](../Tasking/Menu_Main.JPG) +-- +-- ## 1.1) Command Centers govern multiple Missions. +-- +-- Depending on the tactical situation, your coalition may have one (or multiple) command center(s). +-- These command centers govern one (or multiple) mission(s). +-- +-- For each command center, there will be a separate **Command Center Menu** that focuses on the missions governed by that command center. +-- +-- ![Command Center](../Tasking/Menu_CommandCenter.JPG) +-- +-- In the above example menu structure, there is one command center with the name **`[Lima]`**. +-- The command center has one @{Tasking.Mission}, named **`"Overlord"`** with **`High`** priority. +-- +-- ## 1.2) Missions govern multiple Tasks. +-- +-- A mission has a mission goal to be achieved by the players within the coalition. +-- The mission goal is actually dependent on the tactical situation of the overall battlefield and the conditions set to achieve the goal. +-- So a mission can be much more than just shoot stuff ... It can be a combination of different conditions or events to complete a mission goal. +-- +-- A mission can be in a specific state during the simulation run. For more information about these states, please check the @{Tasking.Mission} section. +-- +-- To achieve the mission goal, a mission administers @{Tasking.Task}s that are set to achieve the mission goal by the human players. +-- Each of these tasks can be **dynamically created** using a task dispatcher, or **coded** by the mission designer. +-- Each mission has a separate **Mission Menu**, that focuses on the administration of these tasks. +-- +-- On top, a mission has a mission briefing, can help to allocate specific points of interest on the map, and provides various reports. +-- +-- ![Mission](../Tasking/Menu_Mission.JPG) +-- +-- The above shows a mission menu in detail of **`"Overlord"`**. +-- +-- The two other menus are related to task assignment. Which will be detailed later. +-- +-- ### 1.2.1) Mission briefing. +-- +-- The task briefing will show a message containing a description of the mission goal, and other tactical information. +-- +-- ![Mission](../Tasking/Report_Briefing.JPG) +-- +-- ### 1.2.2) Mission Map Locations. +-- +-- Various points of interest as part of the mission can be indicated on the map using the *Mark Task Locations on Map* menu. +-- As a result, the map will contain various points of interest for the player (group). +-- +-- ![Mission](../Tasking/Report_Mark_Task_Location.JPG) +-- +-- ### 1.2.3) Mission Task Reports. +-- +-- Various reports can be generated on the status of each task governed within the mission. +-- +-- ![Mission](../Tasking/Report_Task_Summary.JPG) +-- +-- The Task Overview Report will show each task, with its task status and a short coordinate information. +-- +-- ![Mission](../Tasking/Report_Tasks_Planned.JPG) +-- +-- The other Task Menus will show for each task more details, for example here the planned tasks report. +-- Note that the order of the tasks are shortest distance first to the unit position seated by the player. +-- +-- ### 1.2.4) Mission Statistics. +-- +-- Various statistics can be displayed regarding the mission. +-- +-- ![Mission](../Tasking/Report_Statistics_Progress.JPG) +-- +-- A statistic report on the progress of the mission. Each task achievement will increase the %-tage to 100% as a goal to complete the task. +-- +-- ## 1.3) Join a Task. +-- +-- The mission menu contains a very important option, that is to join a task governed within the mission. +-- In order to join a task, select the **Join Planned Task** menu, and a new menu will be given. +-- +-- ![Mission](../Tasking/Menu_Join_Planned_Tasks.JPG) +-- +-- A mission governs multiple tasks, as explained earlier. Each task is of a certain task type. +-- This task type was introduced to have some sort of task classification system in place for the player. +-- A short acronym is shown that indicates the task type. The meaning of each acronym can be found in the task types explanation. +-- +-- ![Mission](../Tasking/Menu_Join_Tasks.JPG) +-- +-- When the player selects a task type, a list of the available tasks of that type are listed... +-- In this case the **`SEAD`** task type was selected and a list of available **`SEAD`** tasks can be selected. +-- +-- ![Mission](../Tasking/Menu_Join_Planned_Task.JPG) +-- +-- A new list of menu options are now displayed that allow to join the task selected, but also to obtain first some more information on the task. +-- +-- ### 1.3.1) Report Task Details. +-- +-- ![Mission](../Tasking/Report_Task_Detailed.JPG) +-- +-- When selected, a message is displayed that shows detailed information on the task, like the coordinate, enemy target information, threat level etc. +-- +-- ### 1.3.2) Mark Task Location on Map. +-- +-- ![Mission](../Tasking/Report_Task_Detailed.JPG) +-- +-- When selected, the target location on the map is indicated with specific information on the task. +-- +-- ### 1.3.3) Join Task. +-- +-- ![Mission](../Tasking/Report_Task_Detailed.JPG) +-- +-- By joining a task, the player will indicate that the task is assigned to him, and the task is started. +-- The Command Center will communicate several task details to the player and the coalition of the player. +-- +-- ## 1.4) Task Control and Actions. +-- +-- ![Mission](../Tasking/Menu_Main_Task.JPG) +-- +-- When a player has joined a task, a **Task Action Menu** is available to be used by the player. +-- +-- ![Mission](../Tasking/Menu_Task.JPG) +-- +-- The task action menu contains now menu items specific to the task, but also one generic menu item, which is to control the task. +-- This **Task Control Menu** allows to display again the task details and the task map location information. +-- But it also allows to abort a task! +-- +-- Depending on the task type, the task action menu can contain more menu items which are specific to the task. +-- For example, cargo transportation tasks will contain various additional menu items to select relevant cargo coordinates, +-- or to load/unload cargo. +-- +-- ## 1.5) Automatic task assignment. +-- +-- ![Command Center](../Tasking/Menu_CommandCenter.JPG) +-- +-- When we take back the command center menu, you see two addtional **Assign Task** menu items. +-- The menu **Assign Task On** will automatically allocate a task to the player. +-- After the selection of this menu, the menu will change into **Assign Task Off**, +-- and will need to be selected again by the player to switch of the automatic task assignment. +-- +-- The other option is to select **Assign Task**, which will assign a new random task to the player. +-- +-- When a task is automatically assigned to a player, the task needs to be confirmed as accepted within 30 seconds. +-- If this is not the case, the task will be cancelled automatically, and a new random task will be assigned to the player. +-- This will continue to happen until the player accepts the task or switches off the automatic task assignment process. +-- +-- The player can accept the task using the menu **Confirm Task Acceptance** ... +-- +-- ## 1.6) Task states. +-- +-- A task has a state, reflecting the progress or completion status of the task: +-- +-- - **Planned**: Expresses that the task is created, but not yet in execution and is not assigned yet to a pilot. +-- - **Assigned**: Expresses that the task is assigned to a group of pilots, and that the task is in execution mode. +-- - **Success**: Expresses the successful execution and finalization of the task. +-- - **Failed**: Expresses the failure of a task. +-- - **Abort**: Expresses that the task is aborted by by the player using the abort menu. +-- - **Cancelled**: Expresses that the task is cancelled by HQ or through a logical situation where a cancellation of the task is required. +-- +-- ### 1.6.1) Task progress. +-- +-- The task governor takes care of the **progress** and **completion** of the task **goal(s)**. +-- Tasks are executed by **human pilots** and actors within a DCS simulation. +-- Pilots can use a **menu system** to engage or abort a task, and provides means to +-- understand the **task briefing** and goals, and the relevant **task locations** on the map and +-- obtain **various reports** related to the task. +-- +-- ### 1.6.2) Task completion. +-- +-- As the task progresses, the **task status** will change over time, from Planned state to Completed state. +-- **Multiple pilots** can execute the same task, as such, the tasking system provides a **co-operative model** for joint task execution. +-- Depending on the task progress, a **scoring** can be allocated to award pilots of the achievements made. +-- The scoring is fully flexible, and different levels of awarding can be provided depending on the task type and complexity. +-- +-- A normal flow of task status would evolve from the **Planned** state, to the **Assigned** state ending either in a **Success** or a **Failed** state. +-- +-- Planned -> Assigned -> Success +-- -> Failed +-- -> Cancelled +-- +-- The state completion is by default set to **Success**, if the goals of the task have been reached, but can be overruled by a goal method. +-- +-- Depending on the tactical situation, a task can be **Cancelled** by the mission governer. +-- It is actually the mission designer who has the flexibility to decide at which conditions a task would be set to **Success**, **Failed** or **Cancelled**. +-- This decision all depends on the task goals, and the phase/evolution of the task conditions that would accomplish the goals. +-- +-- For example, if the task goal is to merely destroy a target, and the target is mid-mission destroyed by another event than the pilot destroying the target, +-- the task goal could be set to **Failed**, or .. **Cancelled** ... +-- However, it could very well be also acceptable that the task would be flagged as **Success**. +-- +-- The tasking mechanism governs beside the progress also a scoring mechanism, and in case of goal completion without any active pilot involved +-- in the execution of the task, could result in a **Success** task completion status, but no score would be awared, as there were no players involved. +-- +-- These different completion states are important for the mission designer to reflect scoring to a player. +-- A success could mean a positive score to be given, while a failure could mean a negative score or penalties to be awarded. +-- +-- === +-- -- ### Author: **FlightControl** -- -- ### Contributions: @@ -34,8 +229,11 @@ -- -- A task is governed by a @{Tasking.Mission} object. Tasks are of different types. -- The @{#TASK} object is used or derived by more detailed tasking classes that will implement the task execution mechanisms --- and goals. The following TASK_ classes are derived from @{#TASK}. +-- and goals. -- +-- # 1) Derived task classes. +-- +-- The following TASK_ classes are derived from @{#TASK}. -- -- TASK -- TASK_A2A @@ -50,69 +248,25 @@ -- TASK_CARGO_TRANSPORT -- TASK_CARGO_CSAR -- --- --- --- #### A2A Tasks +-- ## 1.1) A2A Tasks -- -- - @{Tasking.Task_A2A#TASK_A2A_ENGAGE} - Models an A2A engage task of a target group of airborne intruders mid-air. -- - @{Tasking.Task_A2A#TASK_A2A_INTERCEPT} - Models an A2A ground intercept task of a target group of airborne intruders mid-air. -- - @{Tasking.Task_A2A#TASK_A2A_SWEEP} - Models an A2A sweep task to clean an area of previously detected intruders mid-air. -- --- #### A2G Tasks +-- ## 1.2) A2G Tasks -- -- - @{Tasking.Task_A2G#TASK_A2G_SEAD} - Models an A2G Suppression or Extermination of Air Defenses task to clean an area of air to ground defense threats. -- - @{Tasking.Task_A2G#TASK_A2G_CAS} - Models an A2G Close Air Support task to provide air support to nearby friendlies near the front-line. -- - @{Tasking.Task_A2G#TASK_A2G_BAI} - Models an A2G Battlefield Air Interdiction task to provide air support to nearby friendlies near the front-line. -- --- #### Cargo Tasks +-- ## 1.3) Cargo Tasks -- -- - @{Tasking.Task_Cargo#TASK_CARGO_TRANSPORT} - Models the transportation of cargo to deployment zones. -- - @{Tasking.Task_Cargo#TASK_CARGO_CSAR} - Models the rescue of downed friendly pilots from behind enemy lines. -- --- The above task objects take care of the **progress** and **completion** of the task **goal(s)**. --- Tasks are executed by **human pilots** and actors within a DCS simulation. --- Pilots can use a **menu system** to engage or abort a task, and provides means to --- understand the **task briefing** and goals, and the relevant **task locations** on the map and --- obtain **various reports** related to the task. -- --- As the task progresses, the **task status** will change over time, from Planned state to Completed state. --- **Multiple pilots** can execute the same task, as such, the tasking system provides a **co-operative model** for joint task execution. --- Depending on the task progress, a **scoring** can be allocated to award pilots of the achievements made. --- The scoring is fully flexible, and different levels of awarding can be provided depending on the task type and complexity. --- --- # 1) Task Statuses --- --- ## 1.1) Task status overview. --- --- A task has a state, reflecting the progress and completion of the task: --- --- - **Planned**: Expresses that the task is created, but not yet in execution and is not assigned yet to a pilot. --- - **Assigned**: Expresses that the task is assigned to a group of pilots, and that the task is in execution mode. --- - **Success**: Expresses the successful execution and finalization of the task. --- - **Failed**: Expresses the failure of a task. --- - **Abort**: Expresses that the task is aborted by by the player using the abort menu. --- - **Cancelled**: Expresses that the task is cancelled by HQ or through a logical situation where a cancellation of the task is required. --- --- --- A normal flow of task status would evolve from the **Planned** state, to the **Assigned** state ending either in a **Success** or a **Failed** state. --- --- Planned -> Assigned -> Success --- -> Failed --- --- The state completion is by default set to **Success**, if the goals of the task have been reached, but can be overruled by a goal method. --- --- Depending on the tactical situation, a task can be **Cancelled** by the mission governer. --- It is actually the mission designer who has the flexibility to decide at which conditions a task would be set to **Success**, **Failed** or **Cancelled**. --- This decision all depends on the task goals, and the phase/evolution of the task conditions that would accomplish the goals. --- --- For example, if the task goal is to merely destroy a target, and the target is mid-mission destroyed by another event than the pilot destroying the target, --- the task goal could be set to **Failed**, or .. **Cancelled** ... --- However, it could very well be also acceptable that the task would be flagged as **Success**. --- --- The tasking mechanism governs beside the progress also a scoring mechanism, and in case of goal completion without any active pilot involved --- in the execution of the task, could result in a **Success** task completion status, but no score would be awared, as there were no players involved. --- --- ## 1.2) Task status events. +-- # 2) Task status events. -- -- The task statuses can be set by using the following methods: -- @@ -125,12 +279,12 @@ -- The mentioned derived TASK_ classes are implementing the task status transitions out of the box. -- So no extra logic needs to be written. -- --- # 2) Goal conditions for a task. +-- # 3) Goal conditions for a task. -- -- Every 30 seconds, a @{#Task.Goal} trigger method is fired. -- You as a mission designer, can capture the **Goal** event trigger to check your own task goal conditions and take action! -- --- ## 2.1) Goal event handler `OnAfterGoal()`. +-- ## 3.1) Goal event handler `OnAfterGoal()`. -- -- And this is a really great feature! Imagine a task which has **several conditions to check** before the task can move into **Success** state. -- You can do this with the OnAfterGoal method. @@ -150,19 +304,19 @@ -- So the @{#TASK.OnAfterGoal}() event handler would be called every 30 seconds automatically, -- and within this method, you can now check the conditions and take respective action. -- --- ## 2.2) Goal event trigger `Goal()`. +-- ## 3.2) Goal event trigger `Goal()`. -- -- If you would need to check a goal at your own defined event timing, then just call the @{#TASK.Goal}() method within your logic. -- The @{#TASK.OnAfterGoal}() event handler would then directly be called and would execute the logic. -- Note that you can also delay the goal check by using the delayed event trigger syntax `:__Goal( Delay )`. -- -- --- # 3) Add scoring when reaching a certain task status: +-- # 4) Score task completion. -- -- Upon reaching a certain task status in a task, additional scoring can be given. If the Mission has a scoring system attached, the scores will be added to the mission scoring. -- Use the method @{#TASK.AddScore}() to add scores when a status is reached. -- --- # 4) Task briefing: +-- # 5) Task briefing. -- -- A task briefing is a text that is shown to the player when he is assigned to the task. -- The briefing is broadcasted by the command center owning the mission. diff --git a/Moose Development/Moose/Tasking/Task_CARGO.lua b/Moose Development/Moose/Tasking/Task_CARGO.lua index b10e9e1ab..c73114fac 100644 --- a/Moose Development/Moose/Tasking/Task_CARGO.lua +++ b/Moose Development/Moose/Tasking/Task_CARGO.lua @@ -1,17 +1,243 @@ ---- **Tasking** -- Base class to model tasks for players to transport @{Cargo}. +--- **Tasking** -- Base class to model tasks for players to transport @{Cargo.Cargo}. -- -- === -- --- The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers. --- The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units. +-- # 1) Tasking system. -- --- This collection of classes in this module define tasks for human players to handle these cargo objects. --- Cargo can be transported, picked-up, deployed and sling-loaded from and to other places. +-- If you are not yet aware what the MOOSE tasking system is about, read FIRST the explanation on tasking **@{Tasking.Task}**. -- --- The following classes are important to consider: +-- === -- --- * @{#TASK_CARGO_TRANSPORT}: Defines a task for a human player to transport a set of cargo between various zones. --- * @{#TASK_CARGO_CSAR}: Defines a task for a human player to Search and Rescue wounded pilots. +-- # 2) Context of cargo tasking. +-- +-- The Moose framework provides various CARGO classes that allow DCS physical or logical objects to be transported or sling loaded by Carriers. +-- The CARGO_ classes, as part of the MOOSE core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units. +-- +-- The TASK\_CARGO class is not meant to use within your missions as a mission designer. It is a base class, and other classes are derived from it. +-- +-- The following TASK_CARGO_ classes are important, as they implement the CONCRETE tasks: +-- +-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_TRANSPORT}: Defines a task for a human player to transport a set of cargo between various zones. +-- * @{Tasking.Task_Cargo_CSAR#TASK_CARGO_CSAR}: Defines a task for a human player to Search and Rescue wounded pilots. +-- +-- However! The menu system and basic usage of the TASK_CARGO classes is explained in the @{#TASK_CARGO} class description. +-- So please browse further below to understand how to use it from a player perspective! +-- +-- === +-- +-- # 3) Cargo tasking from a player perspective. +-- +-- A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J). +-- The player needs to accept the task from the task overview list within the mission, using the menus. +-- +-- Once the task is assigned to the player and accepted by the player, the player will obtain +-- an extra **Cargo (Radio) Menu** that contains the CARGO objects that need to be transported. +-- +-- Each @{Cargo.Cargo} object has a certain state: +-- +-- * **UnLoaded**: The cargo is located within the battlefield. It may still need to be transported. +-- * **Loaded**: The cargo is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle. +-- * **Boarding**: The cargo is running or moving towards your Carrier for loading. +-- * **UnBoarding**: The cargo is driving or jumping out of your Carrier and moves to a location in the Deployment Zone. +-- +-- Cargo must be transported towards different Deployment @{Core.Zone}s. +-- +-- The Cargo Menu system allows to execute **various actions** to transport the cargo. +-- In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed. +-- Depending on the location of your Carrier unit, the menu options will vary. +-- +-- ## 3.1) Joining a Cargo Transport Task +-- +-- If you are unfamiliar with the tasking menu mechanism, it is highly recommended to read through +-- chapter 1 of the @{Tasking} description from a player perspective. +-- +-- This chapter explains all the different menu items that are available to control the tasking as a player. +-- Using the menu structure, you can join tasks either manually or automatically, and various +-- menu options are available to obtain more information and various reports on the tasks and mission statistics. +-- +-- From this moment on, you can Pickup cargo from a pickup location and Deploy cargo in deployment zones, using the **Task Action Menu**. +-- +-- ## 3.2) Task Action Menu. +-- +-- When a player has joined a **`CARGO`** task (type), for that player only, +-- it's **Task Action Menu** will show an additional menu options. +-- The task action menu will have the name of the task you currently joined and **`@ player name`**. +-- +-- From within this menu, you will be able to route to a cargo location, deploy zone, and load/unload cargo. +-- +-- ## 3.3) Pickup cargo by Boarding, Loading and Sling Loading. +-- +-- There are three different ways how cargo can be picked up: +-- +-- - **Boarding**: Moveable cargo (like infantry or vehicles), can be boarded, that means, the cargo will move towards your carrier to board. +-- However, it can only execute the boarding actions if it is within the foreseen **Reporting Range**. +-- Therefore, it is important that you steer your Carrier within the Reporting Range around the cargo, +-- so that boarding actions can be executed on the cargo. The reporting range is set by the mission designer. +-- Fortunately, the cargo is reporting to you when it is within reporting range. +-- +-- - **Loading**: Stationary cargo (like crates), which are heavy, can only be loaded or sling loaded, meaning, +-- your carrier must be close enough to the cargo to be able to load the cargo within the carrier bays. +-- Moose provides you with an additional menu system to load stationary cargo into your carrier bays using the menu. +-- These menu options will become available, when the carrier is within loading range. +-- The Moose cargo will report to the carrier when the range is close enough. The load range is set by the mission designer. +-- +-- - **Sling Loading**: Stationary cargo (like crates), which are heavy, can only be loaded or sling loaded, meaning, +-- your carrier must be close enough to the cargo to be able to load the cargo within the carrier bays. +-- Sling loading cargo is done using the default DCS menu system. However, Moose cargo will report to the carrier that +-- it is within sling loading range. +-- +-- In order to be able to pickup cargo, you'll need to know where the cargo is located, right? +-- Fortunately, if your Carrier is not within the reporting range of the cargo, the HQ can help to route you to the locations of cargo. +-- Use the task action menu to receive HQ help for this. +-- +-- ![Task_Types](../Tasking/Task_Cargo_Actions.JPG) +-- +-- Depending on the location within the battlefield, the task action menu will contain **Route options** that can be selected +-- to start the HQ sending you routing messages. +-- +-- When selected, the HQ will send you routing messages. +-- +-- ![Task_Types](../Tasking/Task_Cargo_Routing_LL.JPG) +-- An example of routing in LL mode. +-- +-- ![Task_Types](../Tasking/Task_Cargo_Routing_BR.JPG) +-- An example of routing in BR mode. +-- +-- Possible coordinate formats are: Bearing Range (BR), Lattitude Longitude (LL) or Military Grid System (MGRS). +-- Note that for LL, there are two sub formats. +-- +-- The routing messages are formulated in the coordinate format that is currently active as configured in your settings profile. +-- ![Task_Types](../Tasking/Task_Cargo_Settings.JPG) +-- Use the **Settings Menu** to select the coordinate format that you would like to use for location determination. +-- +-- +-- ### 3.3.1) Pickup Cargo. +-- +-- In order to pickup cargo, use the **task action menu** to **route to a specific cargo**. +-- When a cargo route is selected, the HQ will send you routing messages indicating the location of the cargo. +-- +-- Upon arrival at the cargo, and when the cargo is within **reporting range**, the cargo will contact you and **further instructions will be given**. +-- +-- - When your Carrier is airborne, you will receive instructions to land your Carrier. +-- The action will not be completed until you've landed your Carrier. +-- +-- - For ground carriers, you can just drive to the optimal cargo board or load position. +-- +-- It takes a bit of skill to land a helicopter near a cargo to be loaded, but that is part of the game, isn't it? +-- Expecially when you are landing in a "hot" zone, so when cargo is under immediate threat of fire. +-- +-- ### 3.3.2) Board Cargo. +-- +-- If your Carrier is within the **Reporting Range of the cargo**, and the cargo is **moveable**, the **cargo can be boarded**! +-- +-- Select the task action menu and now a **Board or Load option** will be listed with the cargo name next to it! +-- Select the option from the action menu, and the cargo will start moving towards your carrier. +-- +-- The moveable cargo will run in formation to your carrier, and will board one by one, depending on the near range set by the mission designer. +-- The near range as added because carriers can be large or small, depending on the object size of the carrier. +-- Note that multiple units may need to board your Carrier, so it is required to await the full boarding process. +-- Once the cargo is fully boarded within your Carrier, you will be notified of this. +-- +-- Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated. +-- If during boarding the Carrier gets airborne, the boarding process will be cancelled. +-- +-- ### 3.3.3) Load Cargo. +-- +-- If your Carrier is within the **Loading Range of the cargo**, and the cargo is **stationary**, the **cargo can be loaded**, but not boarded! +-- +-- Select the task action menu and now a **Load option** will be listed with the cargo name next to it! +-- Select the option from the action menu, and the cargo will loaded into your carrier. +-- Once the cargo is loaded within your Carrier, you will be notified of this. +-- +-- Note that for airborne Carriers, it is required to land first right near the cargo, before the loading process can be initiated. +-- As stated, this requires some pilot skills :-) +-- +-- ### 3.3.4) Sling Load Cargo (helicopters only). +-- +-- If your Carrier is within the **Loading Range of the cargo**, and the cargo is **stationary**, the **cargo can also be sling loaded**! +-- Note that this is only possible for helicopters. +-- +-- To sling load cargo, there is no task action menu required. Just follow the normal sling loading procedure and the cargo will report. +-- Use the normal DCS sling loading menu system to hook the cargo you the cable attached on your helicopter. +-- +-- Again note that you may land firstly right next to the cargo, before the loading process can be initiated. +-- As stated, this requires some pilot skills :-) +-- +-- +-- ## 3.4) Deploy cargo by Unboarding, Unloading and Sling Deploying. +-- +-- There are two different ways how cargo can be deployed: +-- +-- - **Unboarding**: Moveable cargo (like infantry or vehicles), can be unboarded, that means, +-- the cargo will step out of the carrier and will run to a group location. +-- Moose provides you with an additional menu system to unload stationary cargo from the carrier bays, +-- using the menu. These menu options will become available, when the carrier is within the deploy zone. +-- +-- - **Unloading**: Stationary cargo (like crates), which are heavy, can only be unloaded or sling loaded. +-- Moose provides you with an additional menu system to unload stationary cargo from the carrier bays, +-- using the menu. These menu options will become available, when the carrier is within the deploy zone. +-- +-- - **Sling Deploying**: Stationary cargo (like crates), which are heavy, can also be sling deployed. +-- Once the cargo is within the deploy zone, the cargo can be deployed from the sling onto the ground. +-- +-- In order to be able to deploy cargo, you'll need to know where the deploy zone is located, right? +-- Fortunately, the HQ can help to route you to the locations of deploy zone. +-- Use the task action menu to receive HQ help for this. +-- +-- ![Task_Types](../Tasking/Task_Cargo_Actions.JPG) +-- +-- Depending on the location within the battlefield, the task action menu will contain **Route options** that can be selected +-- to start the HQ sending you routing messages. Also, if the carrier cargo bays contain cargo, +-- then beside **Route options** there will also be **Deploy options** listed. +-- These **Deploy options** are meant to route you to the deploy zone locations. +-- +-- Possible routing coordinate formats are: Bearing Range (BR), Lattitude Longitude (LL) or Military Grid System (MGRS). +-- Note that for LL, there are two sub formats. +-- +-- The routing messages are formulated in the coordinate format that is currently active as configured in your settings profile. +-- ![Task_Types](../Tasking/Task_Cargo_Settings.JPG) +-- Use the **Settings Menu** to select the coordinate format that you would like to use for location determination. +-- +-- ## 3.4) Deploy Cargo. +-- +-- Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying @{Zone} type. +-- The Cargo menu provides with menu options to execute an action to steer your Carrier to a specific Zone. +-- +-- In order to deploy cargo, use the task action menu to select a cargo to route to. +-- When selected, the HQ will send you routing messages indicating the location of the deploy zone. +-- +-- Upon arrival at the deploy zone, the HQ will contact you and further instructions will be given. +-- +-- ### 3.4.1) Unboard Cargo. +-- +-- If your Carrier is within the **deploy zone**, and the cargo is **moveable**, the **cargo can be unboarded**! +-- +-- Select the task action menu and now an **Unboard option** will be listed with the cargo name next to it! +-- Select the option from the action menu, and the cargo will step out of your carrier and will move towards a grouping point. +-- +-- The moveable cargo will unboard one by one, so note that multiple units may need to unboard your Carrier, +-- so it is required to await the full completion of the unboarding process. +-- Once the cargo is fully unboarded from your Carrier, you will be notified of this. +-- +-- Note that for airborne Carriers, it is required to land first before the unboarding process can be initiated. +-- If during unboarding the Carrier gets airborne, the unboarding process will be cancelled. +-- +-- ### 3.4.2) Unload Cargo. +-- +-- If your Carrier is within the **deploy zone**, and the cargo is **stationary**, the **cargo can be unloaded**, but not unboarded! +-- +-- Select the task action menu and now an **Unload option** will be listed with the cargo name next to it! +-- Select the option from the action menu, and the cargo will unloaded from your carrier. +-- Once the cargo is unloaded fom your Carrier, you will be notified of this. +-- +-- Note that for airborne Carriers, it is required to land first at the deploy zone, before the unloading process can be initiated. +-- +-- ### 3.4.3) Sling Deploy Cargo (helicopters only). +-- +-- If your Carrier is within the **deploy zone**, and the cargo is **stationary**, the **cargo can also be sling deploying**! +-- Note that this is only possible for helicopters. +-- +-- To sling deploy cargo, there is no task action menu required. Just follow the normal sling deploying procedure. -- -- === -- @@ -29,268 +255,59 @@ do -- TASK_CARGO --- @type TASK_CARGO -- @extends Tasking.Task#TASK - --- Base class to model tasks for players to transport @{Cargo}. + --- Model tasks for players to transport Cargo. -- - -- ## 1. A flexible tasking system + -- This models the process of a flexible transporation tasking system of cargo. + -- + -- # 1) A flexible tasking system. -- -- The TASK_CARGO classes provide you with a flexible tasking sytem, -- that allows you to transport cargo of various types between various locations -- and various dedicated deployment zones. -- - -- The cargo in scope of the TASK_CARGO classes must be explicitly given, and is of type SET_CARGO. + -- The cargo in scope of the TASK\_CARGO classes must be explicitly given, and is of type SET\_CARGO. -- The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission. -- + -- # 2) Cargo Tasking from a mission designer perspective. -- - -- ## 2. Task execution experience from the player perspective + -- A cargo task is governed by a @{Tasking.Mission} object. Tasks are of different types. + -- The @{#TASK} object is used or derived by more detailed tasking classes that will implement the task execution mechanisms + -- and goals. -- - -- A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J). - -- The player needs to accept the task from the task overview list within the mission, using the menus. + -- ## 2.1) Derived cargo task classes. -- - -- Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain - -- an extra **Cargo (Radio) Menu** that contains the CARGO objects that need to be transported. + -- The following TASK_CARGO classes are derived from @{#TASK}. -- - -- Each CARGO object has a certain state: + -- TASK + -- TASK_CARGO + -- TASK_CARGO_TRANSPORT + -- TASK_CARGO_CSAR -- - -- * **UnLoaded**: The CARGO is located within the battlefield. It may still need to be transported. - -- * **Loaded**: The CARGO is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle. - -- * **Boarding**: The CARGO is running or moving towards your Carrier for loading. - -- * **UnBoarding**: The CARGO is driving or jumping out of your Carrier and moves to a location in the Deployment Zone. + -- ### 2.1.1) Cargo Tasks -- - -- Cargo must be transported towards different Deployment @{Zone}s. - -- - -- The Cargo Menu system allows to execute **various actions** to transport the cargo. - -- In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed. - -- Depending on the location of your Carrier unit, the menu options will vary. - -- - -- ### 2.1. Joining a Cargo Transport Task - -- - -- Select __Join Tasks__, and you'll see a **Transport** task category. Select __Transport__ and you'll see the different tasks - -- listed. - -- - -- ![Task Types](../Tasking/###) - -- - -- Select one of the tasks ... - -- - -- ![Task_Types](../Tasking/###) - -- - -- Select Join Task ... - -- - -- After the menu "Join Task" selection, you are assigned to the Task. - -- - -- - ![Task_Types](../Tasking/Task_Briefing.JPG). - -- A briefing message is shown. - -- - The notification message is shown to all players, indicating that the cargo task is now assigned. - -- - When no task as part of the mission was assigned, the mission is set to **ONGOING**. - -- - -- From this moment on, you can Pickup cargo from a pickup location and Deploy cargo in deployment zones, using the **Task Action Menu**. - -- - -- ### 2.2. Task Action Menu. - -- - -- When a player has joined a task, for that player only, it's carrier Menu will show an additional menu option. - -- It has the name of the task you currently joined and @ player name. - -- - -- ![Task_Types](../Tasking/Task_Briefing.JPG). - -- For example, this shows the task __Transport Liquids.002@ Transport#013__. - -- - -- We call this menu option the **Task Action Menu**. - -- Under this menu option, there will be other menu options available which are specific to the task you just selected. - -- Depending on the task type, these menu options will vary. - -- - -- ### 2.2. Cancel a joined Cargo Transport Task. - -- - -- One more thing, it is possible to cancel a task that you joined. - -- ![Task_Types](../Tasking/###) - -- - -- When this option is selected, the player is removed to be assigned as part of the task. - -- If the player was the last player that was assigned to the task, the task is set to "Hold". - -- - -- ### 2.3. Pickup cargo by Boarding, Loading and Sling Loading. - -- - -- There are three different ways how cargo can be picked up: - -- - -- - **Boarding**: Moveable cargo (like infantry or vehicles), can be boarded, that means, the cargo will move towards your carrier to board. - -- However, it can only execute the boarding actions if it is within the foreseen **Reporting Range**. - -- Therefore, it is important that you steer your Carrier within the Reporting Range around the cargo, - -- so that boarding actions can be executed on the cargo. The reporting range is set by the mission designer. - -- Fortunately, the cargo is reporting to you when it is within reporting range. - -- - -- - **Loading**: Stationary cargo (like crates), which are heavy, can only be loaded or sling loaded, meaning, - -- your carrier must be close enough to the cargo to be able to load the cargo within the carrier bays. - -- Moose provides you with an additional menu system to load stationary cargo into your carrier bays using the menu. - -- These menu options will become available, when the carrier is within loading range. - -- The Moose cargo will report to the carrier when the range is close enough. The load range is set by the mission designer. + -- - @{Tasking.Task_Cargo#TASK_CARGO_TRANSPORT} - Models the transportation of cargo to deployment zones. + -- - @{Tasking.Task_Cargo#TASK_CARGO_CSAR} - Models the rescue of downed friendly pilots from behind enemy lines. -- - -- - **Sling Loading**: Stationary cargo (like crates), which are heavy, can only be loaded or sling loaded, meaning, - -- your carrier must be close enough to the cargo to be able to load the cargo within the carrier bays. - -- Sling loading cargo is done using the default DCS menu system. However, Moose cargo will report to the carrier that - -- it is within sling loading range. - -- - -- In order to be able to pickup cargo, you'll need to know where the cargo is located, right? - -- Fortunately, if your Carrier is not within the reporting range of the cargo, the HQ can help to route you to the locations of cargo. - -- Use the task action menu to receive HQ help for this. - -- - -- ![Task_Types](../Tasking/Task_Cargo_Actions.JPG) - -- - -- Depending on the location within the battlefield, the task action menu will contain **Route options** that can be selected - -- to start the HQ sending you routing messages. - -- - -- When selected, the HQ will send you routing messages. - -- - -- ![Task_Types](../Tasking/Task_Cargo_Routing_LL.JPG) - -- An example of routing in LL mode. - -- - -- ![Task_Types](../Tasking/Task_Cargo_Routing_BR.JPG) - -- An example of routing in BR mode. - -- - -- Possible coordinate formats are: Bearing Range (BR), Lattitude Longitude (LL) or Military Grid System (MGRS). - -- Note that for LL, there are two sub formats. - -- - -- The routing messages are formulated in the coordinate format that is currently active as configured in your settings profile. - -- ![Task_Types](../Tasking/Task_Cargo_Settings.JPG) - -- Use the **Settings Menu** to select the coordinate format that you would like to use for location determination. - -- - -- - -- #### 2.3.1. Pickup Cargo. - -- - -- In order to pickup cargo, use the **task action menu** to **route to a specific cargo**. - -- When a cargo route is selected, the HQ will send you routing messages indicating the location of the cargo. - -- - -- Upon arrival at the cargo, and when the cargo is within **reporting range**, the cargo will contact you and **further instructions will be given**. - -- - -- - When your Carrier is airborne, you will receive instructions to land your Carrier. - -- The action will not be completed until you've landed your Carrier. - -- - -- - For ground carriers, you can just drive to the optimal cargo board or load position. - -- - -- It takes a bit of skill to land a helicopter near a cargo to be loaded, but that is part of the game, isn't it? - -- Expecially when you are landing in a "hot" zone, so when cargo is under immediate threat of fire. - -- - -- #### 2.3.2. Board Cargo. - -- - -- If your Carrier is within the **Reporting Range of the cargo**, and the cargo is **moveable**, the **cargo can be boarded**! - -- - -- Select the task action menu and now a **Board or Load option** will be listed with the cargo name next to it! - -- Select the option from the action menu, and the cargo will start moving towards your carrier. - -- - -- The moveable cargo will run in formation to your carrier, and will board one by one, depending on the near range set by the mission designer. - -- The near range as added because carriers can be large or small, depending on the object size of the carrier. - -- Note that multiple units may need to board your Carrier, so it is required to await the full boarding process. - -- Once the cargo is fully boarded within your Carrier, you will be notified of this. - -- - -- Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated. - -- If during boarding the Carrier gets airborne, the boarding process will be cancelled. - -- - -- #### 2.3.3. Load Cargo. - -- - -- If your Carrier is within the **Loading Range of the cargo**, and the cargo is **stationary**, the **cargo can be loaded**, but not boarded! - -- - -- Select the task action menu and now a **Load option** will be listed with the cargo name next to it! - -- Select the option from the action menu, and the cargo will loaded into your carrier. - -- Once the cargo is loaded within your Carrier, you will be notified of this. - -- - -- Note that for airborne Carriers, it is required to land first right near the cargo, before the loading process can be initiated. - -- As stated, this requires some pilot skills :-) - -- - -- #### 2.3.4. Sling Load Cargo (helicopters only). - -- - -- If your Carrier is within the **Loading Range of the cargo**, and the cargo is **stationary**, the **cargo can also be sling loaded**! - -- Note that this is only possible for helicopters. - -- - -- To sling load cargo, there is no task action menu required. Just follow the normal sling loading procedure and the cargo will report. - -- Use the normal DCS sling loading menu system to hook the cargo you the cable attached on your helicopter. - -- - -- Again note that you may land firstly right next to the cargo, before the loading process can be initiated. - -- As stated, this requires some pilot skills :-) - -- - -- - -- ### 2.4. Deploy cargo by Unboarding, Unloading and Sling Deploying. - -- - -- There are two different ways how cargo can be deployed: - -- - -- - **Unboarding**: Moveable cargo (like infantry or vehicles), can be unboarded, that means, - -- the cargo will step out of the carrier and will run to a group location. - -- Moose provides you with an additional menu system to unload stationary cargo from the carrier bays, - -- using the menu. These menu options will become available, when the carrier is within the deploy zone. - -- - -- - **Unloading**: Stationary cargo (like crates), which are heavy, can only be unloaded or sling loaded. - -- Moose provides you with an additional menu system to unload stationary cargo from the carrier bays, - -- using the menu. These menu options will become available, when the carrier is within the deploy zone. - -- - -- - **Sling Deploying**: Stationary cargo (like crates), which are heavy, can also be sling deployed. - -- Once the cargo is within the deploy zone, the cargo can be deployed from the sling onto the ground. - -- - -- In order to be able to deploy cargo, you'll need to know where the deploy zone is located, right? - -- Fortunately, the HQ can help to route you to the locations of deploy zone. - -- Use the task action menu to receive HQ help for this. - -- - -- ![Task_Types](../Tasking/Task_Cargo_Actions.JPG) - -- - -- Depending on the location within the battlefield, the task action menu will contain **Route options** that can be selected - -- to start the HQ sending you routing messages. Also, if the carrier cargo bays contain cargo, - -- then beside **Route options** there will also be **Deploy options** listed. - -- These **Deploy options** are meant to route you to the deploy zone locations. - -- - -- Possible routing coordinate formats are: Bearing Range (BR), Lattitude Longitude (LL) or Military Grid System (MGRS). - -- Note that for LL, there are two sub formats. - -- - -- The routing messages are formulated in the coordinate format that is currently active as configured in your settings profile. - -- ![Task_Types](../Tasking/Task_Cargo_Settings.JPG) - -- Use the **Settings Menu** to select the coordinate format that you would like to use for location determination. - -- - -- ### 2.4. Deploy Cargo. - -- - -- Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying @{Zone} type. - -- The Cargo menu provides with menu options to execute an action to steer your Carrier to a specific Zone. - -- - -- In order to deploy cargo, use the task action menu to select a cargo to route to. - -- When selected, the HQ will send you routing messages indicating the location of the deploy zone. - -- - -- Upon arrival at the deploy zone, the HQ will contact you and further instructions will be given. - -- - -- #### 2.4.1. Unboard Cargo. - -- - -- If your Carrier is within the **deploy zone**, and the cargo is **moveable**, the **cargo can be unboarded**! - -- - -- Select the task action menu and now an **Unboard option** will be listed with the cargo name next to it! - -- Select the option from the action menu, and the cargo will step out of your carrier and will move towards a grouping point. - -- - -- The moveable cargo will unboard one by one, so note that multiple units may need to unboard your Carrier, - -- so it is required to await the full completion of the unboarding process. - -- Once the cargo is fully unboarded from your Carrier, you will be notified of this. - -- - -- Note that for airborne Carriers, it is required to land first before the unboarding process can be initiated. - -- If during unboarding the Carrier gets airborne, the unboarding process will be cancelled. - -- - -- #### 2.4.2. Unload Cargo. - -- - -- If your Carrier is within the **deploy zone**, and the cargo is **stationary**, the **cargo can be unloaded**, but not unboarded! - -- - -- Select the task action menu and now an **Unload option** will be listed with the cargo name next to it! - -- Select the option from the action menu, and the cargo will unloaded from your carrier. - -- Once the cargo is unloaded fom your Carrier, you will be notified of this. - -- - -- Note that for airborne Carriers, it is required to land first at the deploy zone, before the unloading process can be initiated. - -- - -- #### 2.4.3. Sling Deploy Cargo (helicopters only). - -- - -- If your Carrier is within the **deploy zone**, and the cargo is **stationary**, the **cargo can also be sling deploying**! - -- Note that this is only possible for helicopters. - -- - -- To sling deploy cargo, there is no task action menu required. Just follow the normal sling deploying procedure. - -- - -- ## Handle TASK_CARGO Events ... + -- ## 2.2) Handle TASK_CARGO Events ... -- -- The TASK_CARGO classes define @{Cargo} transport tasks, -- based on the tasking capabilities defined in @{Tasking.Task#TASK}. -- - -- ### Specific TASK_CARGO Events + -- ### 2.2.1) Boarding events. -- -- Specific Cargo event can be captured, that allow to trigger specific actions! -- -- * **Boarded**: Triggered when the Cargo has been Boarded into your Carrier. -- * **UnBoarded**: Triggered when the cargo has been Unboarded from your Carrier and has arrived at the Deployment Zone. -- - -- ### Standard TASK_CARGO Events + -- ### 2.2.2) Loading events. + -- + -- Specific Cargo event can be captured, that allow to trigger specific actions! + -- + -- * **Loaded**: Triggered when the Cargo has been Loaded into your Carrier. + -- * **UnLoaded**: Triggered when the cargo has been Unloaded from your Carrier and has arrived at the Deployment Zone. + -- + -- ### 2.2.2) Standard TASK_CARGO Events -- -- The TASK_CARGO is implemented using a @{Core.Fsm#FSM_TASK}, and has the following standard statuses: -- @@ -303,7 +320,6 @@ do -- TASK_CARGO -- === -- -- @field #TASK_CARGO - -- TASK_CARGO = { ClassName = "TASK_CARGO", } diff --git a/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua b/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua index 616f8a89b..1710a2866 100644 --- a/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua +++ b/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua @@ -1,4 +1,63 @@ ---- **Tasking** -- Models tasks for players to execute CSAR @{Cargo} downed pilots. +--- **Tasking** -- Orchestrates the task for players to execute CSAR for downed pilots @{Cargo.Cargo}. +-- +-- **Specific features:** +-- +-- * Creates a task to retrieve a pilot @{Cargo.Cargo} from behind enemy lines. +-- * Derived from the TASK_CARGO class, which is derived from the TASK class. +-- * Orchestrate the task flow, so go from Planned to Assigned to Success, Failed or Cancelled. +-- * Co-operation tasking, so a player joins a group of players executing the same task. +-- +-- +-- **A complete task menu system to allow players to:** +-- +-- * Join the task, abort the task. +-- * Mark the task location on the map. +-- * Provide details of the target. +-- * Route to the cargo. +-- * Route to the deploy zones. +-- * Load/Unload cargo. +-- * Board/Unboard cargo. +-- * Slingload cargo. +-- * Display the task briefing. +-- +-- +-- **A complete mission menu system to allow players to:** +-- +-- * Join a task, abort the task. +-- * Display task reports. +-- * Display mission statistics. +-- * Mark the task locations on the map. +-- * Provide details of the targets. +-- * Display the mission briefing. +-- * Provide status updates as retrieved from the command center. +-- * Automatically assign a random task as part of a mission. +-- * Manually assign a specific task as part of a mission. +-- +-- +-- **A settings system, using the settings menu:** +-- +-- * Tweak the duration of the display of messages. +-- * Switch between metric and imperial measurement system. +-- * Switch between coordinate formats used in messages: BR, BRA, LL DMS, LL DDM, MGRS. +-- * Different settings modes for A2G and A2A operations. +-- * Various other options. +-- +-- === +-- +-- Please read through the @{Tasking.Task_Cargo} process to understand the mechanisms of tasking and cargo tasking and handling. +-- +-- The cargo will be a downed pilot, which is located somwhere on the battlefield. Use the menus system and facilities to +-- join the CSAR task, and retrieve the pilot from behind enemy lines. The menu system is generic, there is nothing +-- specific on a CSAR task that requires further explanation, than reading the generic TASK_CARGO explanations. +-- +-- Enjoy! +-- FC +-- +-- === +-- +-- ### Author: **FlightControl** +-- +-- ### Contributions: -- -- === -- @@ -8,9 +67,94 @@ do -- TASK_CARGO_CSAR - --- The TASK_CARGO_CSAR class - -- @type TASK_CARGO_CSAR + --- @type TASK_CARGO_CSAR -- @extends Tasking.Task_Cargo#TASK_CARGO + + --- Orchestrates the task for players to execute CSAR for downed pilots. + -- + -- CSAR tasks are suited to govern the process of return downed pilots behind enemy lines back to safetly. + -- Typically, this task is executed by helicopter pilots, but it can also be executed by ground forces! + -- + -- === + -- + -- A CSAR task can be created manually, but actually, it is better to **GENERATE** these tasks using the + -- @{Tasking.Task_Cargo_Dispatcher} module. + -- + -- Using the dispatcher, CSAR tasks will be created **automatically** when a pilot ejects from a damaged AI aircraft. + -- When this happens, the pilot actually will survive, but needs to be retrieved from behind enemy lines. + -- + -- # 1) Create a CSAR task manually (code it). + -- + -- Although it is recommended to use the dispatcher, you can create a CSAR task yourself as a mission designer. + -- It is easy, as it works just like any other task setup. + -- + -- ## 1.1) Create a command center. + -- + -- First you need to create a command center using the @{Tasking.CommandCenter#COMMANDCENTER.New}() constructor. + -- + -- local CommandCenter = COMMANDCENTER + -- :New( HQ, "Lima" ) -- Create the CommandCenter. + -- + -- ## 1.2) Create a mission. + -- + -- Tasks work in a mission, which groups these tasks to achieve a joint mission goal. + -- A command center can govern multiple missions. + -- Create a new mission, using the @{Tasking.Mission#MISSION.New}() constructor. + -- + -- -- Declare the Mission for the Command Center. + -- local Mission = MISSION + -- :New( CommandCenter, + -- "Overlord", + -- "High", + -- "Retrieve the downed pilots.", + -- coalition.side.RED + -- ) + -- + -- ## 1.3) Create the CSAR cargo task. + -- + -- So, now that we have a command center and a mission, we now create the CSAR task. + -- We create the CSAR task using the @{#TASK_CARGO_CSAR.New}() constructor. + -- + -- Because a CSAR task will not generate the cargo itself, you'll need to create it first. + -- The cargo in this case will be the downed pilot! + -- + -- -- Here we define the "cargo set", which is a collection of cargo objects. + -- -- The cargo set will be the input for the cargo transportation task. + -- -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + -- local CargoSet = SET_CARGO:New():FilterTypes( "Pilots" ):FilterStart() + -- + -- -- Now we add cargo into the battle scene. + -- local PilotGroup = GROUP:FindByName( "Pilot" ) + -- + -- -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- -- We name this group Engineers. + -- -- Note that the name of the cargo is "Engineers". + -- -- The cargoset "CargoSet" will embed all defined cargo of type "Pilots" (prefix) into its set. + -- local CargoGroup = CARGO_GROUP:New( PilotGroup, "Pilots", "Downed Pilot", 500 ) + -- + -- What is also needed, is to have a set of @{Core.Group}s defined that contains the clients of the players. + -- + -- -- Allocate the Transport, which are the helicopter to retrieve the pilot, that can be manned by players. + -- local GroupSet = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + -- + -- Now that we have a CargoSet and a GroupSet, we can now create the CSARTask manually. + -- + -- -- Declare the CSAR task. + -- local CSARTask = TASK_CARGO_CSAR + -- :New( Mission, + -- GroupSet, + -- "CSAR Pilot", + -- CargoSet, + -- "Fly behind enemy lines, and retrieve the downed pilot." + -- ) + -- + -- So you can see, setting up a CSAR task manually is a lot of work. + -- It is better you use the cargo dispatcher to generate CSAR tasks and it will work as it is intended. + -- By doing this, CSAR tasking will become a dynamic experience. + -- + -- === + -- + -- @field #TASK_CARGO_CSAR TASK_CARGO_CSAR = { ClassName = "TASK_CARGO_CSAR", } diff --git a/Moose Development/Moose/Tasking/Task_Cargo_Transport.lua b/Moose Development/Moose/Tasking/Task_Cargo_Transport.lua index 88bcb0ecb..57b5e04ec 100644 --- a/Moose Development/Moose/Tasking/Task_Cargo_Transport.lua +++ b/Moose Development/Moose/Tasking/Task_Cargo_Transport.lua @@ -1,4 +1,53 @@ ---- **Tasking** -- The TASK_CARGO models tasks for players to transport @{Cargo}. +--- **Tasking** -- Models tasks for players to transport @{Cargo.Cargo}. +-- +-- **Specific features:** +-- +-- * Creates a task to transport @{Cargo.Cargo} to and between deployment zones. +-- * Derived from the TASK_CARGO class, which is derived from the TASK class. +-- * Orchestrate the task flow, so go from Planned to Assigned to Success, Failed or Cancelled. +-- * Co-operation tasking, so a player joins a group of players executing the same task. +-- +-- +-- **A complete task menu system to allow players to:** +-- +-- * Join the task, abort the task. +-- * Mark the task location on the map. +-- * Provide details of the target. +-- * Route to the cargo. +-- * Route to the deploy zones. +-- * Load/Unload cargo. +-- * Board/Unboard cargo. +-- * Slingload cargo. +-- * Display the task briefing. +-- +-- +-- **A complete mission menu system to allow players to:** +-- +-- * Join a task, abort the task. +-- * Display task reports. +-- * Display mission statistics. +-- * Mark the task locations on the map. +-- * Provide details of the targets. +-- * Display the mission briefing. +-- * Provide status updates as retrieved from the command center. +-- * Automatically assign a random task as part of a mission. +-- * Manually assign a specific task as part of a mission. +-- +-- +-- **A settings system, using the settings menu:** +-- +-- * Tweak the duration of the display of messages. +-- * Switch between metric and imperial measurement system. +-- * Switch between coordinate formats used in messages: BR, BRA, LL DMS, LL DDM, MGRS. +-- * Different settings modes for A2G and A2A operations. +-- * Various other options. +-- +-- === +-- +-- Please read through the @{Tasking.Task_Cargo} process to understand the mechanisms of tasking and cargo tasking and handling. +-- +-- Enjoy! +-- FC -- -- === -- @@ -8,9 +57,93 @@ do -- TASK_CARGO_TRANSPORT - --- The TASK_CARGO_TRANSPORT class - -- @type TASK_CARGO_TRANSPORT + --- @type TASK_CARGO_TRANSPORT -- @extends Tasking.Task_CARGO#TASK_CARGO + + --- Orchestrates the task for players to transport cargo to or between deployment zones. + -- + -- Transport tasks are suited to govern the process of transporting cargo to specific deployment zones. + -- Typically, this task is executed by helicopter pilots, but it can also be executed by ground forces! + -- + -- === + -- + -- A transport task can be created manually, but actually, it is better to **GENERATE** these tasks using the + -- @{Tasking.Task_Cargo_Dispatcher} module. + -- + -- Using the dispatcher, transport tasks can be created much more easy. + -- + -- # 1) Create a transport task manually (code it). + -- + -- Although it is recommended to use the dispatcher, you can create a transport task yourself as a mission designer. + -- It is easy, as it works just like any other task setup. + -- + -- ## 1.1) Create a command center. + -- + -- First you need to create a command center using the @{Tasking.CommandCenter#COMMANDCENTER.New}() constructor. + -- + -- local CommandCenter = COMMANDCENTER + -- :New( HQ, "Lima" ) -- Create the CommandCenter. + -- + -- ## 1.2) Create a mission. + -- + -- Tasks work in a mission, which groups these tasks to achieve a joint mission goal. + -- A command center can govern multiple missions. + -- Create a new mission, using the @{Tasking.Mission#MISSION.New}() constructor. + -- + -- -- Declare the Mission for the Command Center. + -- local Mission = MISSION + -- :New( CommandCenter, + -- "Overlord", + -- "High", + -- "Transport the cargo to the deploy zones.", + -- coalition.side.RED + -- ) + -- + -- ## 1.3) Create the transport cargo task. + -- + -- So, now that we have a command center and a mission, we now create the transport task. + -- We create the transport task using the @{#TASK_CARGO_TRANSPORT.New}() constructor. + -- + -- Because a transport task will not generate the cargo itself, you'll need to create it first. + -- The cargo in this case will be the downed pilot! + -- + -- -- Here we define the "cargo set", which is a collection of cargo objects. + -- -- The cargo set will be the input for the cargo transportation task. + -- -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + -- local CargoSet = SET_CARGO:New():FilterTypes( "Cargo" ):FilterStart() + -- + -- -- Now we add cargo into the battle scene. + -- local PilotGroup = GROUP:FindByName( "Engineers" ) + -- + -- -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- -- We name this group Engineers. + -- -- Note that the name of the cargo is "Engineers". + -- -- The cargoset "CargoSet" will embed all defined cargo of type "Pilots" (prefix) into its set. + -- local CargoGroup = CARGO_GROUP:New( PilotGroup, "Cargo", "Engineer Team 1", 500 ) + -- + -- What is also needed, is to have a set of @{Core.Group}s defined that contains the clients of the players. + -- + -- -- Allocate the Transport, which are the helicopter to retrieve the pilot, that can be manned by players. + -- local GroupSet = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + -- + -- Now that we have a CargoSet and a GroupSet, we can now create the TransportTask manually. + -- + -- -- Declare the transport task. + -- local TransportTask = TASK_CARGO_TRANSPORT + -- :New( Mission, + -- GroupSet, + -- "Transport Engineers", + -- CargoSet, + -- "Fly behind enemy lines, and retrieve the downed pilot." + -- ) + -- + -- So you can see, setting up a transport task manually is a lot of work. + -- It is better you use the cargo dispatcher to create transport tasks and it will work as it is intended. + -- By doing this, cargo transport tasking will become a dynamic experience. + -- + -- === + -- + -- @field #TASK_CARGO_TRANSPORT TASK_CARGO_TRANSPORT = { ClassName = "TASK_CARGO_TRANSPORT", } From 8bee670bc991c61c74efa16e00fb49c586e09648 Mon Sep 17 00:00:00 2001 From: Van De Velde Date: Sun, 1 Jul 2018 08:54:46 +0200 Subject: [PATCH 5/6] Added first boarding cargo manual --- .../Moose/Tasking/Task_CARGO.lua | 94 ++++++++++++++----- .../Moose/Tasking/Task_Cargo_CSAR.lua | 2 +- .../Moose/Tasking/Task_Cargo_Transport.lua | 2 +- 3 files changed, 72 insertions(+), 26 deletions(-) diff --git a/Moose Development/Moose/Tasking/Task_CARGO.lua b/Moose Development/Moose/Tasking/Task_CARGO.lua index c73114fac..c2ffac9b3 100644 --- a/Moose Development/Moose/Tasking/Task_CARGO.lua +++ b/Moose Development/Moose/Tasking/Task_CARGO.lua @@ -1,10 +1,10 @@ ---- **Tasking** -- Base class to model tasks for players to transport @{Cargo.Cargo}. +--- **Tasking** -- Base class to model tasks for players to transport cargo. -- -- === -- -- # 1) Tasking system. -- --- If you are not yet aware what the MOOSE tasking system is about, read FIRST the explanation on tasking **@{Tasking.Task}**. +-- #### If you are not yet aware what the MOOSE tasking system is about, read FIRST the explanation on tasking **@{Tasking.Task}**. -- -- === -- @@ -48,20 +48,13 @@ -- -- ## 3.1) Joining a Cargo Transport Task -- --- If you are unfamiliar with the tasking menu mechanism, it is highly recommended to read through --- chapter 1 of the @{Tasking} description from a player perspective. --- --- This chapter explains all the different menu items that are available to control the tasking as a player. --- Using the menu structure, you can join tasks either manually or automatically, and various --- menu options are available to obtain more information and various reports on the tasks and mission statistics. --- --- From this moment on, you can Pickup cargo from a pickup location and Deploy cargo in deployment zones, using the **Task Action Menu**. +-- Once you've joined a task, using the **Join Planned Task Menu**, +-- you can Pickup cargo from a pickup location and Deploy cargo in deployment zones, using the **Task Action Menu**. -- -- ## 3.2) Task Action Menu. -- -- When a player has joined a **`CARGO`** task (type), for that player only, -- it's **Task Action Menu** will show an additional menu options. --- The task action menu will have the name of the task you currently joined and **`@ player name`**. -- -- From within this menu, you will be able to route to a cargo location, deploy zone, and load/unload cargo. -- @@ -87,29 +80,65 @@ -- it is within sling loading range. -- -- In order to be able to pickup cargo, you'll need to know where the cargo is located, right? --- Fortunately, if your Carrier is not within the reporting range of the cargo, the HQ can help to route you to the locations of cargo. +-- +-- Fortunately, if your Carrier is not within the reporting range of the cargo, +-- **the HQ can help to route you to the locations of cargo**. +-- +-- ![Task_Types](../Tasking/Task_Cargo_Main_Menu.JPG) +-- -- Use the task action menu to receive HQ help for this. -- --- ![Task_Types](../Tasking/Task_Cargo_Actions.JPG) +-- ![Task_Types](../Tasking/Task_Cargo_Action_Menu.JPG) -- -- Depending on the location within the battlefield, the task action menu will contain **Route options** that can be selected -- to start the HQ sending you routing messages. +-- The **route options will vary**, depending on the position of your carrier, and the location of the cargo and the deploy zones. +-- Note that the route options will **only be created** for cargo that is **in scope of your cargo transportation task**, +-- so there may be other cargo objects within the DCS simulation, but if those belong to other cargo transportations tasks, +-- then no routing options will be shown for these cargo. +-- This is done to ensure that **different teams** have a **defined scope** for defined cargo, and that **multiple teams** can join +-- **multiple tasks**, transporting cargo **simultaneously** in a **cooperation**. +-- +-- In this example, there is a menu option to **Route to pickup cargo...". +-- Use this menu to route towards cargo locations for pickup into your carrier. +-- +-- ![Task_Types](../Tasking/Task_Cargo_Types_Menu.JPG) +-- +-- When you select this menu, you'll see a new menu listing the different cargo types that are out there in the dcs simulator. +-- These cargo types are symbolic names that are assigned by the mission designer, like oil, liquid, engineers, food, workers etc. +-- MOOSE has introduced this concept to allow mission designers to make different cargo types for different purposes. +-- Only the creativity of the mission designer limits now the things that can be done with cargo ... +-- Okay, let's continue ..., and let's select Oil ... -- -- When selected, the HQ will send you routing messages. -- --- ![Task_Types](../Tasking/Task_Cargo_Routing_LL.JPG) --- An example of routing in LL mode. --- -- ![Task_Types](../Tasking/Task_Cargo_Routing_BR.JPG) +-- -- An example of routing in BR mode. -- --- Possible coordinate formats are: Bearing Range (BR), Lattitude Longitude (LL) or Military Grid System (MGRS). --- Note that for LL, there are two sub formats. +-- Note that the coordinate display format in the message can be switched between LL DMS, LL DDM, MGRS and BR. -- --- The routing messages are formulated in the coordinate format that is currently active as configured in your settings profile. --- ![Task_Types](../Tasking/Task_Cargo_Settings.JPG) --- Use the **Settings Menu** to select the coordinate format that you would like to use for location determination. +-- ![Task_Types](../Tasking/Main_Settings.JPG) +-- +-- Use the @{Core.Settings} menu to change your display format preferences. -- +-- ![Task_Types](../Tasking/Settings_A2G_Coordinate.JPG) +-- +-- There you can change the display format to another format that suits your need. +-- Because cargo transportation is Air 2 Ground oriented, you need to select the A2G coordinate format display options. +-- Note that the main settings menu contains much more +-- options to control your display formats, like switch to metric and imperial, or change the duration of the display messages. +-- +-- ![Task_Types](../Tasking/Task_Cargo_Routing_LL.JPG) +-- +-- Here I changed the routing display format to LL DMS. +-- +-- One important thing to know, is that the routing messages will flash at regular time intervals. +-- When using BR coordinate display format, the **distance and angle will change accordingly** from your carrier position and the location of the cargo. +-- +-- Another important note is the routing towards deploy zones. +-- These routing options will only be shown, when your carrier bays have cargo loaded. +-- So, only when there is something to be deployed from your carrier, the deploy options will be shown. -- -- ### 3.3.1) Pickup Cargo. -- @@ -126,16 +155,33 @@ -- It takes a bit of skill to land a helicopter near a cargo to be loaded, but that is part of the game, isn't it? -- Expecially when you are landing in a "hot" zone, so when cargo is under immediate threat of fire. -- --- ### 3.3.2) Board Cargo. +-- ### 3.3.2) Board Cargo (infantry). +-- +-- ![Task_Types](../Tasking/Boarding_Ready.JPG) -- -- If your Carrier is within the **Reporting Range of the cargo**, and the cargo is **moveable**, the **cargo can be boarded**! +-- This type of cargo will be most of the time be infantry. -- --- Select the task action menu and now a **Board or Load option** will be listed with the cargo name next to it! --- Select the option from the action menu, and the cargo will start moving towards your carrier. +-- ![Boarding](../Tasking/Boarding_Menu.JPG) +-- +-- A board menu has appeared, because your carrier is in boarding range of the cargo (infantry). +-- +-- ![Boarding](../Tasking/Boarding_Started.JPG) +-- +-- Select the option from the action menu, then select the cargo to be boarded, and the cargo will start moving towards your carrier. +-- Note that a message is displayed by the infantry cargo that boarding has started. +-- +-- ![Boarding](../Tasking/Boarding_Ongoing.JPG) -- -- The moveable cargo will run in formation to your carrier, and will board one by one, depending on the near range set by the mission designer. -- The near range as added because carriers can be large or small, depending on the object size of the carrier. +-- +-- ![Boarding](../Tasking/Boarding_Almost_Done.JPG) +-- -- Note that multiple units may need to board your Carrier, so it is required to await the full boarding process. +-- +-- ![Boarding](../Tasking/Boarding_Done.JPG) +-- -- Once the cargo is fully boarded within your Carrier, you will be notified of this. -- -- Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated. diff --git a/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua b/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua index 1710a2866..9d74b0743 100644 --- a/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua +++ b/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua @@ -1,4 +1,4 @@ ---- **Tasking** -- Orchestrates the task for players to execute CSAR for downed pilots @{Cargo.Cargo}. +--- **Tasking** -- Orchestrates the task for players to execute CSAR for downed pilots. -- -- **Specific features:** -- diff --git a/Moose Development/Moose/Tasking/Task_Cargo_Transport.lua b/Moose Development/Moose/Tasking/Task_Cargo_Transport.lua index 57b5e04ec..621be319d 100644 --- a/Moose Development/Moose/Tasking/Task_Cargo_Transport.lua +++ b/Moose Development/Moose/Tasking/Task_Cargo_Transport.lua @@ -1,4 +1,4 @@ ---- **Tasking** -- Models tasks for players to transport @{Cargo.Cargo}. +--- **Tasking** -- Models tasks for players to transport cargo. -- -- **Specific features:** -- From 8fb6fc8c6d4e90572996069a4b2f995fb4bb3c59 Mon Sep 17 00:00:00 2001 From: Van De Velde Date: Sun, 1 Jul 2018 09:07:31 +0200 Subject: [PATCH 6/6] Small change --- Moose Development/Moose/Tasking/Task_CARGO.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Moose Development/Moose/Tasking/Task_CARGO.lua b/Moose Development/Moose/Tasking/Task_CARGO.lua index c2ffac9b3..c78d6a69d 100644 --- a/Moose Development/Moose/Tasking/Task_CARGO.lua +++ b/Moose Development/Moose/Tasking/Task_CARGO.lua @@ -168,6 +168,7 @@ -- -- ![Boarding](../Tasking/Boarding_Started.JPG) -- +-- -- Select the option from the action menu, then select the cargo to be boarded, and the cargo will start moving towards your carrier. -- Note that a message is displayed by the infantry cargo that boarding has started. --