From 3c2ff2d7a11bf738bcc6df980dba8eac7175c7fa Mon Sep 17 00:00:00 2001 From: Van De Velde Date: Sat, 30 Jun 2018 09:37:28 +0200 Subject: [PATCH] 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", }