From 2ab00d22a6530e5a276273035c45894d7a007f42 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Fri, 14 Apr 2017 09:43:29 +0200 Subject: [PATCH] Rename Task_Cargo --- docs/Documentation/AI_Patrol.html | 3 + docs/Documentation/Cargo.html | 1 + docs/Documentation/Detection.html | 2 +- docs/Documentation/MOVEMENT.html | 4 + docs/Documentation/Point.html | 1 + docs/Documentation/SpawnStatic.html | 1 + docs/Documentation/Task_Cargo.html | 943 ++++++++++++++++++++++++++++ 7 files changed, 954 insertions(+), 1 deletion(-) create mode 100644 docs/Documentation/Task_Cargo.html diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html index e21b9498f..b6fa99328 100644 --- a/docs/Documentation/AI_Patrol.html +++ b/docs/Documentation/AI_Patrol.html @@ -933,6 +933,9 @@ Use the method AIPATROLZONE.M + +

This table contains the targets detected during patrol.

+
diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index b6abf92f7..19046ba83 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -2797,6 +2797,7 @@ The range till cargo will board.

+ CARGO_UNIT.CargoCarrier diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index dc52c4036..c17360e5a 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -2298,7 +2298,7 @@ self

- #number + DETECTION_BASE.DetectionInterval diff --git a/docs/Documentation/MOVEMENT.html b/docs/Documentation/MOVEMENT.html index d3966610d..1a64cbb26 100644 --- a/docs/Documentation/MOVEMENT.html +++ b/docs/Documentation/MOVEMENT.html @@ -211,6 +211,7 @@ on defined intervals (currently every minute).

+ #number MOVEMENT.AliveUnits @@ -219,6 +220,9 @@ on defined intervals (currently every minute).

+ +

Contains the counter how many units are currently alive

+
diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index 8eade306d..b321acabb 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -1367,6 +1367,7 @@ The new calculated POINT_VEC2.

+ POINT_VEC2.z diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html index 5413f9a2e..99a7e20af 100644 --- a/docs/Documentation/SpawnStatic.html +++ b/docs/Documentation/SpawnStatic.html @@ -442,6 +442,7 @@ ptional) The name of the new static.

+ #number SPAWNSTATIC.SpawnIndex diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html new file mode 100644 index 000000000..d6a95cfc8 --- /dev/null +++ b/docs/Documentation/Task_Cargo.html @@ -0,0 +1,943 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Task_Cargo

+ +

Tasking (Release 2.1) -- The TASK_CARGO models tasks for players to transport Cargo.

+ + + +

Banner Image

+ +
+ +

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.

+ +

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.

+ +

The following classes are important to consider:

+ +
    +
  • #TASKCARGOTRANSPORT: Defines a task for a human player to transport a set of cargo between various zones.
  • +
+ +

==

+ +

API CHANGE HISTORY

+ +

The underlying change log documents the API changes. Please read this carefully. The following notation is used:

+ +
    +
  • Added parts are expressed in bold type face.
  • +
  • Removed parts are expressed in italic type face.
  • +
+ +

Hereby the change log:

+ +

2017-03-09: Revised version.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming. +
  • +
+ +

Global(s)

+ + + + + + + + + +
TASK_CARGO +

TASK_CARGO class, extends Task#TASK

+ +

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.

+
TASK_CARGO_TRANSPORT + +
+

Type FSM_PROCESS

+ + + + + + + + + +
FSM_PROCESS.Cargo + +
FSM_PROCESS.DeployZone + +
+ +

Type TASK_CARGO

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO.DeployZones + +
TASK_CARGO:GetPlannedMenuText() + +
TASK_CARGO:GetTargetZone(TaskUnit) + +
TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) +

Instantiates a new TASK_CARGO.

+
TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO.SetCargo + +
TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) + +
TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) + +
TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) +

Set a penalty when the A2G attack has failed.

+
TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) +

Set a score when a target in scope of the A2G attack, has been destroyed .

+
TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) +

Set a score when all the targets in scope of the A2G attack, have been destroyed.

+
TASK_CARGO.TaskType + +
+ +

Type TASK_CARGO_TRANSPORT

+ + + + + + + + + +
TASK_CARGO_TRANSPORT.ClassName + +
TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) +

Instantiates a new TASKCARGOTRANSPORT.

+
+ +

Global(s)

+
+
+ + #TASK_CARGO + +TASK_CARGO + +
+
+ +

TASK_CARGO class, extends Task#TASK

+ +

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 TASKCARGO classes must be explicitly given, and is of type SETCARGO. +The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission.

+ + +

Task execution experience from the 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 radio menus.

+ +

Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain +an extra Cargo Handling Radio Menu that contains the CARGO objects that need to be transported.

+ +

Each 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 Zones**.

+ +

The Cargo Handling Radio Menu system allows to execute various actions to handle 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.

+ + +

Cargo Pickup and Boarding

+ +

For cargo boarding, a cargo 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, +so that boarding actions can be executed on the cargo. +To Pickup and Board cargo, the following menu items will be shown in your carrier radio menu:

+ +

Board Cargo

+ +

If your Carrier is within the Reporting Range of the cargo, it will allow to pickup the cargo by selecting this menu option. +Depending on the Cargo type, the cargo will either move to your Carrier or you will receive instructions how to handle the cargo +pickup. If the cargo moves to your carrier, it will indicate the boarding status. +Note that multiple units 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.

+ +

Pickup Cargo

+ +

If your Carrier is not within the Reporting Range of the cargo, the HQ will guide you to its location. +Routing information is shown in flight that directs you to the cargo within Reporting Range. +Upon arrival, 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.

+ + +

Cargo Deploy and UnBoarding

+ +

Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying Zone type. +The Cargo Handling Radio Menu provides with menu options to execute an action to steer your Carrier to a specific Zone.

+ +

UnBoard Cargo

+ +

If your Carrier is already within a Deployment Zone, +then the Cargo Handling Radio Menu allows to UnBoard a specific cargo that is +loaded within your Carrier group into the Deployment Zone. +Note that the Unboarding process takes a while, as the cargo units (infantry or vehicles) must unload from your Carrier. +Ensure that you stay at the position or stay on the ground while Unboarding. +If any unforeseen manoeuvre is done by the Carrier, then the Unboarding will be cancelled.

+ +

Deploy Cargo

+ +

If your Carrier is not within a Deployment Zone, you'll need to fly towards one. +Fortunately, the Cargo Handling Radio Menu provides you with menu options to select a specific Deployment Zone to fly towards. +Once a Deployment Zone has been selected, your Carrier will receive routing information from HQ towards the Deployment Zone center. +Upon arrival, the HQ will provide you with further instructions. +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!

+ +

Handle TASK_CARGO Events ...

+ +

The TASK_CARGO classes define Cargo transport tasks, +based on the tasking capabilities defined in Task#TASK.

+ +

Specific TASK_CARGO Events

+ +

Specific Cargo Handling 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

+ +

The TASK_CARGO is implemented using a Statemachine#FSM_TASK, and has the following standard statuses:

+ +
    +
  • None: Start of the process.
  • +
  • Planned: The cargo task is planned.
  • +
  • Assigned: The cargo task is assigned to a Group#GROUP.
  • +
  • Success: The cargo task is successfully completed.
  • +
  • Failed: The cargo task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • +
+ +
+ + +
+
+
+
+ + #TASK_CARGO_TRANSPORT + +TASK_CARGO_TRANSPORT + +
+
+ + + +
+
+

Type Task_Cargo

+ +

Type FSM_PROCESS

+

Field(s)

+
+
+ + + +FSM_PROCESS.Cargo + +
+
+ + + +
+
+
+
+ + + +FSM_PROCESS.DeployZone + +
+
+ + + +
+
+ +

Type TASK_CARGO

+

Field(s)

+
+
+ + +TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.DeployZones + +
+
+ + + + +

setmetatable( {}, { __mode = "v" } ) -- weak table on value

+ +
+
+
+
+ + +TASK_CARGO:GetPlannedMenuText() + +
+
+ + + +
+
+
+
+ + +TASK_CARGO:GetTargetZone(TaskUnit) + +
+
+ + + +

Parameter

+ +

Return value

+ +

Core.Zone#ZONE_BASE: +The Zone object where the Target is located on the map.

+ +
+
+
+
+ + +TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) + +
+
+ +

Instantiates a new TASK_CARGO.

+ +

Parameters

+
    +
  • + +

    Tasking.Mission#MISSION Mission :

    + +
  • +
  • + +

    Set#SET_GROUP SetGroup : +The set of groups for which the Task can be assigned.

    + +
  • +
  • + +

    #string TaskName : +The name of the Task.

    + +
  • +
  • + +

    Core.Set#SET_CARGO SetCargo : +The scope of the cargo to be transported.

    + +
  • +
  • + +

    #string TaskType : +The type of Cargo task.

    + +
  • +
+

Return value

+ +

#TASK_CARGO: +self

+ +
+
+
+
+ + +TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.SetCargo + +
+
+ + + +
+
+
+
+ + +TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) + +
+
+ + + +

Parameters

+
    +
  • + +

    @ : +ist DeployZones

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
  • + +

    DeployZones :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) + +
+
+ +

Set a penalty when the A2G attack has failed.

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when the A2G attack has failed.

    + +
  • +
  • + +

    #number Penalty : +The penalty in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) + +
+
+ +

Set a score when a target in scope of the A2G attack, has been destroyed .

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when the target has been destroyed.

    + +
  • +
  • + +

    #number Score : +The score in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) + +
+
+ +

Set a score when all the targets in scope of the A2G attack, have been destroyed.

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when all targets hav been destroyed.

    + +
  • +
  • + +

    #number Score : +The score in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.TaskType + +
+
+ + + +
+
+ +

Type TASK_CARGO_TRANSPORT

+ +

The TASKCARGOTRANSPORT class

+ +

Field(s)

+
+
+ + #string + +TASK_CARGO_TRANSPORT.ClassName + +
+
+ + + +
+
+
+
+ + +TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) + +
+
+ +

Instantiates a new TASKCARGOTRANSPORT.

+ +

Parameters

+ +

Return value

+ +

#TASKCARGOTRANSPORT: +self

+ +
+
+ +
+ +
+ +