From be839f3a3ba3592f22252c4d7447227a582edf10 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Mon, 8 Oct 2018 04:57:37 +0200 Subject: [PATCH 1/9] Fixing late activated HQs for command centers. --- Moose Development/Moose/Core/Menu.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Menu.lua b/Moose Development/Moose/Core/Menu.lua index 3e4b784a8..d6b68b87f 100644 --- a/Moose Development/Moose/Core/Menu.lua +++ b/Moose Development/Moose/Core/Menu.lua @@ -92,7 +92,7 @@ end --- -- @param Wrapper.Group#GROUP Group function MENU_INDEX:PrepareGroup( Group ) - if Group and Group:IsAlive() then + if Group and Group:IsAlive() ~= nil then -- something was changed here! local GroupName = Group:GetName() self.Group[GroupName] = self.Group[GroupName] or {} self.Group[GroupName].Menus = self.Group[GroupName].Menus or {} @@ -146,6 +146,7 @@ end function MENU_INDEX:SetGroupMenu( Group, Path, Menu ) local MenuGroupName = Group:GetName() + Group:F({MenuGroupName=MenuGroupName,Path=Path}) self.Group[MenuGroupName].Menus[Path] = Menu end From 7081a9eff59cf2825338be0103ca4b82241a2845 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Mon, 8 Oct 2018 05:42:18 +0200 Subject: [PATCH 2/9] ATC ground updates --- Moose Development/Moose/Functional/ATC_Ground.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/ATC_Ground.lua b/Moose Development/Moose/Functional/ATC_Ground.lua index af4ac91bf..42857c031 100644 --- a/Moose Development/Moose/Functional/ATC_Ground.lua +++ b/Moose Development/Moose/Functional/ATC_Ground.lua @@ -1,9 +1,18 @@ --- **Functional** -- The ATC\_GROUND classes monitor airbase traffic and regulate speed while taxiing. -- +-- +-- ### Features: +-- +-- * Monitor speed of the airplanes of players during taxi. +-- * Communicate ATC ground operations. +-- * Kick speeding players during taxi. +-- -- === -- --- ![Banner Image](..\Presentations\ATC_GROUND\Dia1.JPG) +-- ### Missions: -- +-- [](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ABP%20-%20Airbase%20Police) +-- -- === -- -- ### Contributions: Dutch Baron - Concept & Testing From 41aee35b5d4ed1e716ed99a6a71cb8392ec3358b Mon Sep 17 00:00:00 2001 From: FlightControl Date: Mon, 8 Oct 2018 05:56:14 +0200 Subject: [PATCH 3/9] Documentation --- .../Moose/Functional/ATC_Ground.lua | 3 +- .../Moose/Functional/CleanUp.lua | 54 ++- .../Moose/Functional/Designate.lua | 330 +++++++++--------- 3 files changed, 207 insertions(+), 180 deletions(-) diff --git a/Moose Development/Moose/Functional/ATC_Ground.lua b/Moose Development/Moose/Functional/ATC_Ground.lua index 42857c031..0c025b286 100644 --- a/Moose Development/Moose/Functional/ATC_Ground.lua +++ b/Moose Development/Moose/Functional/ATC_Ground.lua @@ -1,5 +1,6 @@ ---- **Functional** -- The ATC\_GROUND classes monitor airbase traffic and regulate speed while taxiing. +--- **Functional** -- Monitor airbase traffic and regulate speed while taxiing. -- +-- === -- -- ### Features: -- diff --git a/Moose Development/Moose/Functional/CleanUp.lua b/Moose Development/Moose/Functional/CleanUp.lua index c818a9f1b..fc6def74d 100644 --- a/Moose Development/Moose/Functional/CleanUp.lua +++ b/Moose Development/Moose/Functional/CleanUp.lua @@ -1,24 +1,17 @@ ---- **Functional** -- The CLEANUP_AIRBASE class keeps an area clean of crashing or colliding airplanes. It also prevents airplanes from firing within this area. +--- **Functional** -- Keep airbases clean of crashing or colliding airplanes, and kill missiles when being fired at airbases. -- -- === -- --- ### Author: **FlightControl** --- ### Contributions: +-- ### Features: +-- +-- +-- * Try to keep the airbase clean and operational. +-- * Prevent airplanes from crashing. +-- * Clean up obstructing airplanes from the runway that are standing still for a period of time. +-- * Prevent airplanes firing missiles within the airbase zone. -- -- === -- --- @module Functional.CleanUp --- @image CleanUp_Airbases.JPG - ---- @type CLEANUP_AIRBASE.__ Methods which are not intended for mission designers, but which are used interally by the moose designer :-) --- @field #map<#string,Wrapper.Airbase#AIRBASE> Airbases Map of Airbases. --- @extends Core.Base#BASE - ---- @type CLEANUP_AIRBASE --- @extends #CLEANUP_AIRBASE.__ - ---- Keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat. --- -- Specific airbases need to be provided that need to be guarded. Each airbase registered, will be guarded within a zone of 8 km around the airbase. -- Any unit that fires a missile, or shoots within the zone of an airbase, will be monitored by CLEANUP_AIRBASE. -- Within the 8km zone, units cannot fire any missile, which prevents the airbase runway to receive missile or bomb hits. @@ -43,7 +36,32 @@ -- -- By following the above guidelines, you can add airbase cleanup with acceptable CPU overhead. -- --- ## 1. CLEANUP_AIRBASE Constructor +-- === +-- +-- ### Missions: +-- +-- [](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CLA%20-%20CleanUp%20Airbase) +-- +-- === +-- +-- ### Author: **FlightControl** +-- ### Contributions: +-- +-- === +-- +-- @module Functional.CleanUp +-- @image CleanUp_Airbases.JPG + +--- @type CLEANUP_AIRBASE.__ Methods which are not intended for mission designers, but which are used interally by the moose designer :-) +-- @field #map<#string,Wrapper.Airbase#AIRBASE> Airbases Map of Airbases. +-- @extends Core.Base#BASE + +--- @type CLEANUP_AIRBASE +-- @extends #CLEANUP_AIRBASE.__ + +--- Keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat. +-- +-- # 1. CLEANUP_AIRBASE Constructor -- -- Creates the main object which is preventing the airbase to get polluted with debris on the runway, which halts the airbase. -- @@ -54,12 +72,12 @@ -- CleanUpTbilisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Tbilisi ) -- CleanUpKutaisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Kutaisi ) -- --- ## 2. Add or Remove airbases +-- # 2. Add or Remove airbases -- -- The method @{#CLEANUP_AIRBASE.AddAirbase}() to add an airbase to the cleanup validation process. -- The method @{#CLEANUP_AIRBASE.RemoveAirbase}() removes an airbase from the cleanup validation process. -- --- ## 3. Clean missiles and bombs within the airbase zone. +-- # 3. Clean missiles and bombs within the airbase zone. -- -- When missiles or bombs hit the runway, the airbase operations stop. -- Use the method @{#CLEANUP_AIRBASE.SetCleanMissiles}() to control the cleaning of missiles, which will prevent airbases to stop. diff --git a/Moose Development/Moose/Functional/Designate.lua b/Moose Development/Moose/Functional/Designate.lua index 3d120744b..92082a0ca 100644 --- a/Moose Development/Moose/Functional/Designate.lua +++ b/Moose Development/Moose/Functional/Designate.lua @@ -2,32 +2,181 @@ -- -- === -- --- Orchestrate the designation of potential targets executed by a Recce group, --- and communicates these to a dedicated attacking group of players, --- so that following a dynamically generated menu system, --- each detected set of potential targets can be lased or smoked... +-- ### Features: -- --- Targets can be: +-- * Faciliate the communication of detected targets to players. +-- * Designate targets using lasers, through a menu system. +-- * Designate targets using smoking, through a menu system. +-- * Designate targets using illumination, through a menu system. +-- * Auto lase targets. +-- * Refresh detection upon specified time intervals. +-- * Prioritization on threat levels. +-- * Reporting system of threats. +-- +-- === +-- +-- Targets detected by recce will be communicated to a group of attacking players. +-- A menu system is made available that allows to: -- -- * **Lased** for a period of time. -- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.) -- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready. -- +-- The following terminology is being used throughout this document: +-- +-- * The **DesignateObject** is the object of the DESIGNATE class, which is this class explained in the document. +-- * The **DetectionObject** is the object of a DETECTION_ class (DETECTION_TYPES, DETECTION_AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into _DetectionItems_. +-- * **TargetGroups** is the list of detected target groupings by the _DetectionObject_. Each _TargetGroup_ contains a _TargetSet_. +-- * **TargetGroup** is one element of the __TargetGroups__ list, and contains a _TargetSet_. +-- * The **TargetSet** is a SET_UNITS collection of _Targets_, that have been detected by the _DetectionObject_. +-- * A **Target** is a detected UNIT object by the _DetectionObject_. +-- * A **Threat Level** is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario. +-- * The **RecceSet** is a SET_GROUP collection that contains the **RecceGroups**. +-- * A **RecceGroup** is a GROUP object containing the **Recces**. +-- * A **Recce** is a UNIT object executing the reconnaissance as part the _DetectionObject_. A Recce can be of any UNIT type. +-- * An **AttackGroup** is a GROUP object that contain _Players_. +-- * A **Player** is an active CLIENT object containing a human player. +-- * A **Designate Menu** is the menu that is dynamically created during the designation process for each _AttackGroup_. +-- +-- # Player Manual +-- +-- ![Banner Image](..\Presentations\DESIGNATE\Dia3.JPG) +-- +-- A typical mission setup would require Recce (a @{Set} of Recce) to be detecting potential targets. +-- The DetectionObject will group the detected targets based on the detection method being used. +-- Possible detection methods could be by Area, by Type or by Unit. +-- Each grouping will result in a **TargetGroup**, for terminology and clarity we will use this term throughout the document. +-- +-- **Recce** require to have Line of Sight (LOS) towards the targets. +-- The **Recce** will report any detected targets to the Players (on the picture Observers). +-- When targets are detected, a menu will be made available that allows those **TargetGroups** to be designated. +-- Designation can be done by Lasing, Smoking and Illumination. +-- Smoking is useful during the day, while illumination is recommended to be used during the night. +-- Smoking can designate specific targets, but not very precise, while lasing is very accurate and allows to +-- players to attack the targets using laser guided bombs or rockets. +-- Illumination will lighten up the Target Area. +-- +-- **Recce** can be ground based or airborne. Airborne **Recce** (AFAC) can be really useful to designate a large amount of targets +-- in a wide open area, as airborne **Recce** has a large LOS. +-- However, ground based **Recce** are very useful to smoke or illuminate targets, as they can be much closer +-- to the Target Area. +-- +-- It is recommended to make the **Recce** invisible and immortal using the Mission Editor in DCS World. +-- This will ensure that the detection process won't be interrupted and that targets can be designated. +-- However, you don't have to, so to simulate a more real-word situation or simulation, **Recce can also be destroyed**! +-- +-- ## 1. Player View (Observer) +-- +-- ![Banner Image](..\Presentations\DESIGNATE\Dia4.JPG) +-- +-- The RecceSet is continuously detecting for potential Targets, +-- executing its task as part of the DetectionObject. +-- Once Targets have been detected, the DesignateObject will trigger the **Detect Event**. +-- +-- In order to prevent an overflow in the DesignateObject of detected targets, +-- there is a maximum amount of TargetGroups +-- that can be put in **scope** of the DesignateObject. +-- We call this the **MaximumDesignations** term. +-- +-- ## 2. Designate Menu +-- +-- ![Banner Image](..\Presentations\DESIGNATE\Dia5.JPG) +-- +-- For each detected TargetGroup, there is: +-- +-- * A **Designate Menu** are created and continuously refreshed, containing the **DesignationID** and the **Designation Status**. +-- * The RecceGroups are reporting to each AttackGroup, sending **Messages** containing the Threat Level and the TargetSet composition. +-- +-- A Player can then select an action from the **Designate Menu**. +-- The Designation Status is shown between the ( ). +-- +-- It indicates for each TargetGroup the current active designation action applied: +-- +-- * An "I" for Illumnation designation. +-- * An "S" for Smoking designation. +-- * An "L" for Lasing designation. +-- +-- Note that multiple designation methods can be active at the same time! +-- Note the **Auto Lase** option. When switched on, the available **Recce** will lase +-- Targets when detected. +-- +-- Targets are designated per **Threat Level**. +-- The most threatening targets from an Air to Ground perspective, are designated first! +-- This is for all designation methods. +-- +-- ![Banner Image](..\Presentations\DESIGNATE\Dia6.JPG) +-- +-- Each Designate Menu has a sub menu structure, which allows specific actions to be triggered: +-- +-- * Lase Targets using a specific laser code. +-- * Smoke Targets using a specific smoke color. +-- * Illuminate areas. +-- +-- ## 3. Lasing Targets +-- +-- ![Banner Image](..\Presentations\DESIGNATE\Dia7.JPG) +-- +-- Lasing targets is done as expected. Each available Recce can lase only ONE target through! +-- +-- ![Banner Image](..\Presentations\DESIGNATE\Dia8.JPG) +-- +-- Lasing can be done for specific laser codes. The Su-25T requires laser code 1113, while the A-10A requires laser code 1680. +-- For those, specific menu options can be made available for players to lase with these codes. +-- Auto Lase (as explained above), will ensure continuous lasing of available targets. +-- The status report shows which targets are being designated. +-- +-- The following logic is executed when a TargetGroup is selected to be *lased* from the Designation Menu: +-- +-- * The RecceSet is searched for any Recce that is within *designation distance* from a Target in the TargetGroup that is currently not being designated. +-- * If there is a Recce found that is currently no designating a target, and is within designation distance from the Target, then that Target will be designated. +-- * During designation, any Recce that does not have Line of Sight (LOS) and is not within disignation distance from the Target, will stop designating the Target, and a report is given. +-- * When a Recce is designating a Target, and that Target is destroyed, then the Recce will stop designating the Target, and will report the event. +-- * When a Recce is designating a Target, and that Recce is destroyed, then the Recce will be removed from the RecceSet and designation will stop without reporting. +-- * When all RecceGroups are destroyed from the RecceSet, then the DesignationObject will stop functioning, and nothing will be reported. +-- +-- In this way, DESIGNATE assists players to designate ground targets for a coordinated attack! +-- +-- ## 4. Illuminating Targets +-- +-- ![Banner Image](..\Presentations\DESIGNATE\Dia9.JPG) +-- +-- Illumination bombs are fired between 500 and 700 meters altitude and will burn about 2 minutes, while slowly decending. +-- Each available recce within range will fire an illumination bomb. +-- Illumination bombs can be fired in while lasing targets. +-- When illumination bombs are fired, it will take about 2 minutes until a sequent bomb run can be requested using the menus. +-- +-- ## 5. Smoking Targets +-- +-- ![Banner Image](..\Presentations\DESIGNATE\Dia10.JPG) +-- +-- Smoke will fire for 5 minutes. +-- Each available recce within range will smoke a target. +-- Smoking can be requested while lasing targets. +-- Smoke will appear "around" the targets, because of accuracy limitations. +-- +-- +-- Have FUN! +-- -- === -- --- # **AUTHORS and CONTRIBUTIONS** +-- ### Missions: +-- +-- [](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DES%20-%20Designation) +-- +-- === -- -- ### Contributions: -- -- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script. -- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing -- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing --- -- -- ### Authors: -- -- * **FlightControl**: Design & Programming -- +-- === +-- -- @module Functional.Designate -- @image Designation.JPG @@ -38,161 +187,20 @@ do -- DESIGNATE --- Manage the designation of detected targets. -- - -- Targets detected by recce will be communicated to a group of attacking players. - -- A menu system is made available that allows to: -- - -- * **Lased** for a period of time. - -- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.) - -- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready. - -- - -- The following terminology is being used throughout this document: - -- - -- * The **DesignateObject** is the object of the DESIGNATE class, which is this class explained in the document. - -- * The **DetectionObject** is the object of a DETECTION_ class (DETECTION_TYPES, DETECTION_AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into _DetectionItems_. - -- * **TargetGroups** is the list of detected target groupings by the _DetectionObject_. Each _TargetGroup_ contains a _TargetSet_. - -- * **TargetGroup** is one element of the __TargetGroups__ list, and contains a _TargetSet_. - -- * The **TargetSet** is a SET_UNITS collection of _Targets_, that have been detected by the _DetectionObject_. - -- * A **Target** is a detected UNIT object by the _DetectionObject_. - -- * A **Threat Level** is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario. - -- * The **RecceSet** is a SET_GROUP collection that contains the **RecceGroups**. - -- * A **RecceGroup** is a GROUP object containing the **Recces**. - -- * A **Recce** is a UNIT object executing the reconnaissance as part the _DetectionObject_. A Recce can be of any UNIT type. - -- * An **AttackGroup** is a GROUP object that contain _Players_. - -- * A **Player** is an active CLIENT object containing a human player. - -- * A **Designate Menu** is the menu that is dynamically created during the designation process for each _AttackGroup_. - -- - -- ## 0. Player Manual - -- - -- ![Banner Image](..\Presentations\DESIGNATE\Dia3.JPG) - -- - -- A typical mission setup would require Recce (a @{Set} of Recce) to be detecting potential targets. - -- The DetectionObject will group the detected targets based on the detection method being used. - -- Possible detection methods could be by Area, by Type or by Unit. - -- Each grouping will result in a **TargetGroup**, for terminology and clarity we will use this term throughout the document. - -- - -- **Recce** require to have Line of Sight (LOS) towards the targets. - -- The **Recce** will report any detected targets to the Players (on the picture Observers). - -- When targets are detected, a menu will be made available that allows those **TargetGroups** to be designated. - -- Designation can be done by Lasing, Smoking and Illumination. - -- Smoking is useful during the day, while illumination is recommended to be used during the night. - -- Smoking can designate specific targets, but not very precise, while lasing is very accurate and allows to - -- players to attack the targets using laser guided bombs or rockets. - -- Illumination will lighten up the Target Area. - -- - -- **Recce** can be ground based or airborne. Airborne **Recce** (AFAC) can be really useful to designate a large amount of targets - -- in a wide open area, as airborne **Recce** has a large LOS. - -- However, ground based **Recce** are very useful to smoke or illuminate targets, as they can be much closer - -- to the Target Area. - -- - -- It is recommended to make the **Recce** invisible and immortal using the Mission Editor in DCS World. - -- This will ensure that the detection process won't be interrupted and that targets can be designated. - -- However, you don't have to, so to simulate a more real-word situation or simulation, **Recce can also be destroyed**! - -- - -- ### 0.1. Player View (Observer) - -- - -- ![Banner Image](..\Presentations\DESIGNATE\Dia4.JPG) - -- - -- The RecceSet is continuously detecting for potential Targets, - -- executing its task as part of the DetectionObject. - -- Once Targets have been detected, the DesignateObject will trigger the **Detect Event**. - -- - -- In order to prevent an overflow in the DesignateObject of detected targets, - -- there is a maximum amount of TargetGroups - -- that can be put in **scope** of the DesignateObject. - -- We call this the **MaximumDesignations** term. - -- - -- ### 0.2. Designate Menu - -- - -- ![Banner Image](..\Presentations\DESIGNATE\Dia5.JPG) - -- - -- For each detected TargetGroup, there is: - -- - -- * A **Designate Menu** are created and continuously refreshed, containing the **DesignationID** and the **Designation Status**. - -- * The RecceGroups are reporting to each AttackGroup, sending **Messages** containing the Threat Level and the TargetSet composition. - -- - -- A Player can then select an action from the **Designate Menu**. - -- The Designation Status is shown between the ( ). - -- - -- It indicates for each TargetGroup the current active designation action applied: - -- - -- * An "I" for Illumnation designation. - -- * An "S" for Smoking designation. - -- * An "L" for Lasing designation. - -- - -- Note that multiple designation methods can be active at the same time! - -- Note the **Auto Lase** option. When switched on, the available **Recce** will lase - -- Targets when detected. - -- - -- Targets are designated per **Threat Level**. - -- The most threatening targets from an Air to Ground perspective, are designated first! - -- This is for all designation methods. - -- - -- ![Banner Image](..\Presentations\DESIGNATE\Dia6.JPG) - -- - -- Each Designate Menu has a sub menu structure, which allows specific actions to be triggered: - -- - -- * Lase Targets using a specific laser code. - -- * Smoke Targets using a specific smoke color. - -- * Illuminate areas. - -- - -- ### 0.3. Lasing Targets - -- - -- ![Banner Image](..\Presentations\DESIGNATE\Dia7.JPG) - -- - -- Lasing targets is done as expected. Each available Recce can lase only ONE target through! - -- - -- ![Banner Image](..\Presentations\DESIGNATE\Dia8.JPG) - -- - -- Lasing can be done for specific laser codes. The Su-25T requires laser code 1113, while the A-10A requires laser code 1680. - -- For those, specific menu options can be made available for players to lase with these codes. - -- Auto Lase (as explained above), will ensure continuous lasing of available targets. - -- The status report shows which targets are being designated. - -- - -- The following logic is executed when a TargetGroup is selected to be *lased* from the Designation Menu: - -- - -- * The RecceSet is searched for any Recce that is within *designation distance* from a Target in the TargetGroup that is currently not being designated. - -- * If there is a Recce found that is currently no designating a target, and is within designation distance from the Target, then that Target will be designated. - -- * During designation, any Recce that does not have Line of Sight (LOS) and is not within disignation distance from the Target, will stop designating the Target, and a report is given. - -- * When a Recce is designating a Target, and that Target is destroyed, then the Recce will stop designating the Target, and will report the event. - -- * When a Recce is designating a Target, and that Recce is destroyed, then the Recce will be removed from the RecceSet and designation will stop without reporting. - -- * When all RecceGroups are destroyed from the RecceSet, then the DesignationObject will stop functioning, and nothing will be reported. - -- - -- In this way, DESIGNATE assists players to designate ground targets for a coordinated attack! - -- - -- ### 0.4. Illuminating Targets - -- - -- ![Banner Image](..\Presentations\DESIGNATE\Dia9.JPG) - -- - -- Illumination bombs are fired between 500 and 700 meters altitude and will burn about 2 minutes, while slowly decending. - -- Each available recce within range will fire an illumination bomb. - -- Illumination bombs can be fired in while lasing targets. - -- When illumination bombs are fired, it will take about 2 minutes until a sequent bomb run can be requested using the menus. - -- - -- ### 0.5. Smoking Targets - -- - -- ![Banner Image](..\Presentations\DESIGNATE\Dia10.JPG) - -- - -- Smoke will fire for 5 minutes. - -- Each available recce within range will smoke a target. - -- Smoking can be requested while lasing targets. - -- Smoke will appear "around" the targets, because of accuracy limitations. - -- - -- - -- Have FUN! - -- - -- ## 1. DESIGNATE constructor + -- # 1. DESIGNATE constructor -- -- * @{#DESIGNATE.New}(): Creates a new DESIGNATE object. -- - -- ## 2. DESIGNATE is a FSM + -- # 2. DESIGNATE is a FSM -- -- Designate is a finite state machine, which allows for controlled transitions of states. -- - -- ### 2.1 DESIGNATE States + -- ## 2.1 DESIGNATE States -- -- * **Designating** ( Group ): The designation process. -- - -- ### 2.2 DESIGNATE Events + -- ## 2.2 DESIGNATE Events -- -- * **@{#DESIGNATE.Detect}**: Detect targets. -- * **@{#DESIGNATE.LaseOn}**: Lase the targets with the specified Index. @@ -200,7 +208,7 @@ do -- DESIGNATE -- * **@{#DESIGNATE.Smoke}**: Smoke the targets with the specified Index. -- * **@{#DESIGNATE.Status}**: Report designation status. -- - -- ## 3. Maximum Designations + -- # 3. Maximum Designations -- -- In order to prevent an overflow of designations due to many Detected Targets, there is a -- Maximum Designations scope that is set in the DesignationObject. @@ -208,9 +216,9 @@ do -- DESIGNATE -- The method @{#DESIGNATE.SetMaximumDesignations}() will put a limit on the amount of designations put in scope of the DesignationObject. -- Using the menu system, the player can "forget" a designation, so that gradually a new designation can be put in scope when detected. -- - -- ## 4. Laser codes + -- # 4. Laser codes -- - -- ### 4.1. Set possible laser codes + -- ## 4.1. Set possible laser codes -- -- An array of laser codes can be provided, that will be used by the DESIGNATE when lasing. -- The laser code is communicated by the Recce when it is lasing a larget. @@ -228,11 +236,11 @@ do -- DESIGNATE -- -- The above sets a collection of possible laser codes that can be assigned. **Note the { } notation!** -- - -- ### 4.2. Auto generate laser codes + -- ## 4.2. Auto generate laser codes -- -- Use the method @{#DESIGNATE.GenerateLaserCodes}() to generate all possible laser codes. Logic implemented and advised by Ciribob! -- - -- ### 4.3. Add specific lase codes to the lase menu + -- ## 4.3. Add specific lase codes to the lase menu -- -- Certain plane types can only drop laser guided ordonnance when targets are lased with specific laser codes. -- The SU-25T needs targets to be lased using laser code 1113. @@ -241,7 +249,7 @@ do -- DESIGNATE -- The method @{#DESIGNATE.AddMenuLaserCode}() to allow a player to lase a target using a specific laser code. -- Remove such a lase menu option using @{#DESIGNATE.RemoveMenuLaserCode}(). -- - -- ## 5. Autolase to automatically lase detected targets. + -- # 5. Autolase to automatically lase detected targets. -- -- DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu. -- The **auto lase** function can be activated through the Designation Menu. @@ -252,7 +260,7 @@ do -- DESIGNATE -- -- Activate the auto lasing. -- - -- ## 6. Target prioritization on threat level + -- # 6. Target prioritization on threat level -- -- Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context. -- SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first, @@ -265,12 +273,12 @@ do -- DESIGNATE -- -- The example will activate the threat level prioritization for this the Designate object. Threats will be marked based on the threat level of the Target. -- - -- ## 6. Designate Menu Location for a Mission + -- # 7. Designate Menu Location for a Mission -- -- You can make DESIGNATE work for a @{Tasking.Mission#MISSION} object. In this way, the designate menu will not appear in the root of the radio menu, but in the menu of the Mission. -- Use the method @{#DESIGNATE.SetMission}() to set the @{Mission} object for the designate function. -- - -- ## 7. Status Report + -- # 8. Status Report -- -- A status report is available that displays the current Targets detected, grouped per DetectionItem, and a list of which Targets are currently being marked. -- From e5e9bc2ef7c0f8d97144a9f7fe69813de9d57bdb Mon Sep 17 00:00:00 2001 From: FlightControl Date: Mon, 8 Oct 2018 06:01:49 +0200 Subject: [PATCH 4/9] docuemntation --- .../Moose/Functional/Detection.lua | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/Moose Development/Moose/Functional/Detection.lua b/Moose Development/Moose/Functional/Detection.lua index 0f556bf7c..ec1ffb629 100644 --- a/Moose Development/Moose/Functional/Detection.lua +++ b/Moose Development/Moose/Functional/Detection.lua @@ -2,18 +2,25 @@ -- -- === -- +-- ### Features: +-- +-- * Detection of targets by recce units. +-- * Group detected targets per unit, type or area (zone). +-- * Keep persistency of detected targets, if when detection is lost. +-- * Provide an indication of detected targets. +-- * Report detected targets. +-- * Refresh detection upon specified time intervals. +-- +-- === +-- -- Facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units). --- DETECTION uses the in-built detection capabilities of DCS World, but adds new functionalities. --- --- Find the DETECTION classes documentation further in this document in the globals section. +-- It uses the in-built detection capabilities of DCS World, but adds new functionalities. -- -- === -- --- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection) +-- ### Missions: -- --- === --- --- ### [YouTube Playlist](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3Cf5jpI6BS0sBOVWK__tji) +-- [](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection) -- -- === -- @@ -25,13 +32,11 @@ -- -- * FlightControl : Analysis, Design, Programming, Testing -- +-- === +-- -- @module Functional.Detection -- @image Detection.JPG -----BASE:TraceClass("DETECTION_BASE") -----BASE:TraceClass("DETECTION_AREAS") -----BASE:TraceClass("DETECTION_UNITS") -----BASE:TraceClass("DETECTION_TYPES") do -- DETECTION_BASE From a3e29a8d5cfb65a58f08470e4a3e3901363ff94c Mon Sep 17 00:00:00 2001 From: FlightControl Date: Mon, 8 Oct 2018 06:05:44 +0200 Subject: [PATCH 5/9] Documentation --- Moose Development/Moose/Functional/ATC_Ground.lua | 4 +--- Moose Development/Moose/Functional/CleanUp.lua | 4 +--- Moose Development/Moose/Functional/Designate.lua | 4 +--- Moose Development/Moose/Functional/Detection.lua | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Moose Development/Moose/Functional/ATC_Ground.lua b/Moose Development/Moose/Functional/ATC_Ground.lua index 0c025b286..efccc385d 100644 --- a/Moose Development/Moose/Functional/ATC_Ground.lua +++ b/Moose Development/Moose/Functional/ATC_Ground.lua @@ -10,9 +10,7 @@ -- -- === -- --- ### Missions: --- --- [](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ABP%20-%20Airbase%20Police) +-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ABP%20-%20Airbase%20Police) -- -- === -- diff --git a/Moose Development/Moose/Functional/CleanUp.lua b/Moose Development/Moose/Functional/CleanUp.lua index fc6def74d..52bc08408 100644 --- a/Moose Development/Moose/Functional/CleanUp.lua +++ b/Moose Development/Moose/Functional/CleanUp.lua @@ -38,9 +38,7 @@ -- -- === -- --- ### Missions: --- --- [](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CLA%20-%20CleanUp%20Airbase) +-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CLA%20-%20CleanUp%20Airbase) -- -- === -- diff --git a/Moose Development/Moose/Functional/Designate.lua b/Moose Development/Moose/Functional/Designate.lua index 92082a0ca..421a27c88 100644 --- a/Moose Development/Moose/Functional/Designate.lua +++ b/Moose Development/Moose/Functional/Designate.lua @@ -159,9 +159,7 @@ -- -- === -- --- ### Missions: --- --- [](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DES%20-%20Designation) +-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DES%20-%20Designation) -- -- === -- diff --git a/Moose Development/Moose/Functional/Detection.lua b/Moose Development/Moose/Functional/Detection.lua index ec1ffb629..69e080f98 100644 --- a/Moose Development/Moose/Functional/Detection.lua +++ b/Moose Development/Moose/Functional/Detection.lua @@ -18,9 +18,7 @@ -- -- === -- --- ### Missions: --- --- [](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection) +-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection) -- -- === -- From e6f51af34c368501db03282dd123c09008473067 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Tue, 9 Oct 2018 09:47:22 +0200 Subject: [PATCH 6/9] Documentation --- .../Moose/Functional/ATC_Ground.lua | 6 +- .../Moose/Functional/Artillery.lua | 36 ++-- .../Moose/Functional/CleanUp.lua | 12 +- .../Moose/Functional/Designate.lua | 12 +- .../Moose/Functional/Detection.lua | 10 +- Moose Development/Moose/Functional/Escort.lua | 82 ++++---- .../Moose/Functional/MissileTrainer.lua | 78 +++++--- .../Moose/Functional/Movement.lua | 8 +- .../Moose/Functional/PseudoATC.lua | 10 +- Moose Development/Moose/Functional/RAT.lua | 47 +++-- Moose Development/Moose/Functional/Range.lua | 30 ++- .../Moose/Functional/Scoring.lua | 107 ++++++----- Moose Development/Moose/Functional/Sead.lua | 34 +++- .../Moose/Functional/Suppression.lua | 26 ++- .../Moose/Functional/Warehouse.lua | 26 ++- .../Moose/Functional/ZoneCaptureCoalition.lua | 179 +++++++++++------- 16 files changed, 404 insertions(+), 299 deletions(-) diff --git a/Moose Development/Moose/Functional/ATC_Ground.lua b/Moose Development/Moose/Functional/ATC_Ground.lua index efccc385d..259bade99 100644 --- a/Moose Development/Moose/Functional/ATC_Ground.lua +++ b/Moose Development/Moose/Functional/ATC_Ground.lua @@ -2,7 +2,7 @@ -- -- === -- --- ### Features: +-- ## Features: -- -- * Monitor speed of the airplanes of players during taxi. -- * Communicate ATC ground operations. @@ -10,7 +10,9 @@ -- -- === -- --- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ABP%20-%20Airbase%20Police) +-- ## Missions: +-- +-- [ABP - Airbase Police](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ABP%20-%20Airbase%20Police) -- -- === -- diff --git a/Moose Development/Moose/Functional/Artillery.lua b/Moose Development/Moose/Functional/Artillery.lua index 36a84bfdd..8509928fb 100644 --- a/Moose Development/Moose/Functional/Artillery.lua +++ b/Moose Development/Moose/Functional/Artillery.lua @@ -1,4 +1,4 @@ ---- **Functional** - (R2.4) Control artillery units. +--- **Functional** - Control artillery units. -- -- === -- @@ -6,30 +6,22 @@ -- -- ## Features: -- --- * Multiple targets can be assigned. No restriction on number of targets. --- * Targets can be given a priority. Engagement of targets is executed a according to their priority. --- * Engagements can be scheduled, i.e. will be executed at a certain time of the day. --- * Multiple relocations of the group can be assigned and scheduled via queueing system. --- * Special weapon types can be selected for each attack, e.g. cruise missiles for Naval units. --- * Automatic rearming once the artillery is out of ammo (optional). --- * Automatic relocation after each firing engagement to prevent counter strikes (optional). --- * Automatic relocation movements to get the battery within firing range (optional). --- * Simulation of tactical nuclear shells as well as illumination and smoke shells. --- * New targets can be added during the mission, e.g. when they are detected by recon units. --- * Targets and relocations can be assigned by placing markers on the F10 map. --- * Finite state machine implementation. Mission designer can interact when certain events occur. +-- * Multiple targets can be assigned. No restriction on number of targets. +-- * Targets can be given a priority. Engagement of targets is executed a according to their priority. +-- * Engagements can be scheduled, i.e. will be executed at a certain time of the day. +-- * Multiple relocations of the group can be assigned and scheduled via queueing system. +-- * Special weapon types can be selected for each attack, e.g. cruise missiles for Naval units. +-- * Automatic rearming once the artillery is out of ammo (optional). +-- * Automatic relocation after each firing engagement to prevent counter strikes (optional). +-- * Automatic relocation movements to get the battery within firing range (optional). +-- * Simulation of tactical nuclear shells as well as illumination and smoke shells. +-- * New targets can be added during the mission, e.g. when they are detected by recon units. +-- * Targets and relocations can be assigned by placing markers on the F10 map. +-- * Finite state machine implementation. Mission designer can interact when certain events occur. -- -- ==== -- --- # Demo Missions --- --- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS) --- --- ==== --- --- # YouTube Channel --- --- ### [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg) +-- ## [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg) -- -- === -- diff --git a/Moose Development/Moose/Functional/CleanUp.lua b/Moose Development/Moose/Functional/CleanUp.lua index 52bc08408..daed34b02 100644 --- a/Moose Development/Moose/Functional/CleanUp.lua +++ b/Moose Development/Moose/Functional/CleanUp.lua @@ -2,7 +2,7 @@ -- -- === -- --- ### Features: +-- ## Features: -- -- -- * Try to keep the airbase clean and operational. @@ -12,6 +12,12 @@ -- -- === -- +-- ## Missions: +-- +-- [CLA - CleanUp Airbase](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CLA%20-%20CleanUp%20Airbase) +-- +-- === +-- -- Specific airbases need to be provided that need to be guarded. Each airbase registered, will be guarded within a zone of 8 km around the airbase. -- Any unit that fires a missile, or shoots within the zone of an airbase, will be monitored by CLEANUP_AIRBASE. -- Within the 8km zone, units cannot fire any missile, which prevents the airbase runway to receive missile or bomb hits. @@ -38,10 +44,6 @@ -- -- === -- --- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CLA%20-%20CleanUp%20Airbase) --- --- === --- -- ### Author: **FlightControl** -- ### Contributions: -- diff --git a/Moose Development/Moose/Functional/Designate.lua b/Moose Development/Moose/Functional/Designate.lua index 421a27c88..d917d1cd3 100644 --- a/Moose Development/Moose/Functional/Designate.lua +++ b/Moose Development/Moose/Functional/Designate.lua @@ -2,7 +2,7 @@ -- -- === -- --- ### Features: +-- ## Features: -- -- * Faciliate the communication of detected targets to players. -- * Designate targets using lasers, through a menu system. @@ -14,6 +14,12 @@ -- * Reporting system of threats. -- -- === +-- +-- ## Missions: +-- +-- [DES - Designation](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DES%20-%20Designation) +-- +-- === -- -- Targets detected by recce will be communicated to a group of attacking players. -- A menu system is made available that allows to: @@ -159,10 +165,6 @@ -- -- === -- --- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DES%20-%20Designation) --- --- === --- -- ### Contributions: -- -- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script. diff --git a/Moose Development/Moose/Functional/Detection.lua b/Moose Development/Moose/Functional/Detection.lua index 69e080f98..7402729ab 100644 --- a/Moose Development/Moose/Functional/Detection.lua +++ b/Moose Development/Moose/Functional/Detection.lua @@ -2,7 +2,7 @@ -- -- === -- --- ### Features: +-- ## Features: -- -- * Detection of targets by recce units. -- * Group detected targets per unit, type or area (zone). @@ -13,12 +13,14 @@ -- -- === -- --- Facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units). --- It uses the in-built detection capabilities of DCS World, but adds new functionalities. +-- ## Missions: +-- +-- [DET - Detection](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection) -- -- === -- --- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection) +-- Facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units). +-- It uses the in-built detection capabilities of DCS World, but adds new functionalities. -- -- === -- diff --git a/Moose Development/Moose/Functional/Escort.lua b/Moose Development/Moose/Functional/Escort.lua index c76742736..89d77425c 100644 --- a/Moose Development/Moose/Functional/Escort.lua +++ b/Moose Development/Moose/Functional/Escort.lua @@ -2,6 +2,27 @@ -- -- === -- +-- ## Features: +-- +-- * Escort navigation commands. +-- * Escort hold at position commands. +-- * Escorts reporting detected targets. +-- * Escorts scanning targets in advance. +-- * Escorts attacking specific targets. +-- * Request assistance from other groups for attack. +-- * Manage rule of engagement of escorts. +-- * Manage the allowed evasion techniques of escorts. +-- * Make escort to execute a defined mission or path. +-- * Escort tactical situation reporting. +-- +-- === +-- +-- ## Missions: +-- +-- [ESC - Escorting](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ESC%20-%20Escorting) +-- +-- === +-- -- Allows you to interact with escorting AI on your flight and take the lead. -- -- Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10). @@ -77,47 +98,18 @@ -- Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint. -- Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission. -- --- # ESCORT construction methods. +-- === -- --- Create a new SPAWN object with the @{#ESCORT.New} method: --- --- * @{#ESCORT.New}: Creates a new ESCORT object from a @{Wrapper.Group#GROUP} for a @{Wrapper.Client#CLIENT}, with an optional briefing text. --- --- # ESCORT initialization methods. +-- ### Authors: **FlightControl** -- --- The following menus are created within the RADIO MENU (F10) of an active unit hosted by a player: --- --- * @{#ESCORT.MenuFollowAt}: Creates a menu to make the escort follow the client. --- * @{#ESCORT.MenuHoldAtEscortPosition}: Creates a menu to hold the escort at its current position. --- * @{#ESCORT.MenuHoldAtLeaderPosition}: Creates a menu to hold the escort at the client position. --- * @{#ESCORT.MenuScanForTargets}: Creates a menu so that the escort scans targets. --- * @{#ESCORT.MenuFlare}: Creates a menu to disperse flares. --- * @{#ESCORT.MenuSmoke}: Creates a menu to disparse smoke. --- * @{#ESCORT.MenuReportTargets}: Creates a menu so that the escort reports targets. --- * @{#ESCORT.MenuReportPosition}: Creates a menu so that the escort reports its current position from bullseye. --- * @{#ESCORT.MenuAssistedAttack: Creates a menu so that the escort supportes assisted attack from other escorts with the client. --- * @{#ESCORT.MenuROE: Creates a menu structure to set the rules of engagement of the escort. --- * @{#ESCORT.MenuEvasion: Creates a menu structure to set the evasion techniques when the escort is under threat. --- * @{#ESCORT.MenuResumeMission}: Creates a menu structure so that the escort can resume from a waypoint. --- --- --- @usage --- -- Declare a new EscortPlanes object as follows: --- --- -- First find the GROUP object and the CLIENT object. --- local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor. --- local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client. --- --- -- Now use these 2 objects to construct the new EscortPlanes object. --- EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." ) --- --- +-- === -- -- @module Functional.Escort -- @image Escorting.JPG ---- ESCORT class --- @type ESCORT + + +--- @type ESCORT -- @extends Core.Base#BASE -- @field Wrapper.Client#CLIENT EscortClient -- @field Wrapper.Group#GROUP EscortGroup @@ -129,6 +121,26 @@ -- @Field DCS#AI.Option.Air.val.ROE OptionROE Which ROE is set to the EscortGroup. -- @field DCS#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the EscortGroup. -- @field FunctionalMENU_GROUPDETECTION_BASE Detection + +--- ESCORT class +-- +-- # ESCORT construction methods. +-- +-- Create a new SPAWN object with the @{#ESCORT.New} method: +-- +-- * @{#ESCORT.New}: Creates a new ESCORT object from a @{Wrapper.Group#GROUP} for a @{Wrapper.Client#CLIENT}, with an optional briefing text. +-- +-- @usage +-- -- Declare a new EscortPlanes object as follows: +-- +-- -- First find the GROUP object and the CLIENT object. +-- local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor. +-- local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client. +-- +-- -- Now use these 2 objects to construct the new EscortPlanes object. +-- EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." ) +-- +-- @field #ESCORT ESCORT = { ClassName = "ESCORT", EscortName = nil, -- The Escort Name diff --git a/Moose Development/Moose/Functional/MissileTrainer.lua b/Moose Development/Moose/Functional/MissileTrainer.lua index cc8830a14..eb9c50e86 100644 --- a/Moose Development/Moose/Functional/MissileTrainer.lua +++ b/Moose Development/Moose/Functional/MissileTrainer.lua @@ -1,18 +1,27 @@ ---- **Functional** -- MISSILETRAINER helps you to train missile avoidance. +--- **Functional** -- Train missile defence and deflection. -- -- === -- --- The @{#MISSILETRAINER} class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft, +-- ## Features: +-- +-- * Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes. +-- * Provide alerts of missile launches, including detailed information of the units launching, including bearing, range � +-- * Provide alerts when a missile would have killed your aircraft. +-- * Provide alerts when the missile self destructs. +-- * Enable / Disable and Configure the Missile Trainer using the various menu options. +-- +-- === +-- +-- ## Missions: +-- +-- [MIT - Missile Trainer](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/MIT%20-%20Missile%20Trainer) +-- +-- === +-- +-- Uses the MOOSE messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft, -- the class will destroy the missile within a certain range, to avoid damage to your aircraft. --- It suports the following functionality: --- --- * Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes. --- * Provide alerts of missile launches, including detailed information of the units launching, including bearing, range � --- * Provide alerts when a missile would have killed your aircraft. --- * Provide alerts when the missile self destructs. --- * Enable / Disable and Configure the Missile Trainer using the various menu options. -- --- When running a mission where MISSILETRAINER is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players: +-- When running a mission where the missile trainer is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players: -- -- * **Messages**: Menu to configure all messages. -- * **Messages On**: Show all messages. @@ -42,17 +51,40 @@ -- * **150 meter**: Destroys the missile when the distance to the aircraft is below or equal to 150 meter. -- * **200 meter**: Destroys the missile when the distance to the aircraft is below or equal to 200 meter. -- +-- === +-- +-- ### Authors: **FlightControl** +-- +-- ### Contributions: +-- +-- * **Stuka (Danny)**: Who you can search on the Eagle Dynamics Forums. Working together with Danny has resulted in the MISSILETRAINER class. +-- Danny has shared his ideas and together we made a design. +-- Together with the **476 virtual team**, we tested the MISSILETRAINER class, and got much positive feedback! +-- * **132nd Squadron**: Testing and optimizing the logic. +-- +-- === -- --- 1.1) MISSILETRAINER construction methods: --- ----------------------------------------- +-- @module Functional.MissileTrainer +-- @image Missile_Trainer.JPG + + +--- @type MISSILETRAINER +-- @field Core.Set#SET_CLIENT DBClients +-- @extends Core.Base#BASE + + +--- +-- +-- # Constructor: +-- -- Create a new MISSILETRAINER object with the @{#MISSILETRAINER.New} method: -- -- * @{#MISSILETRAINER.New}: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed. -- -- MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those. -- --- 1.2) MISSILETRAINER initialization methods: --- ------------------------------------------- +-- # Initialization: +-- -- A MISSILETRAINER object will behave differently based on the usage of initialization methods: -- -- * @{#MISSILETRAINER.InitMessagesOnOff}: Sets by default the display of any message to be ON or OFF. @@ -65,24 +97,8 @@ -- * @{#MISSILETRAINER.InitRangeOnOff}: Sets by default the display of range information of missiles ON of OFF. -- * @{#MISSILETRAINER.InitBearingOnOff}: Sets by default the display of bearing information of missiles ON of OFF. -- * @{#MISSILETRAINER.InitMenusOnOff}: Allows to configure the options through the radio menu. --- --- === -- --- CREDITS --- === --- **Stuka (Danny)** Who you can search on the Eagle Dynamics Forums. --- Working together with Danny has resulted in the MISSILETRAINER class. --- Danny has shared his ideas and together we made a design. --- Together with the **476 virtual team**, we tested the MISSILETRAINER class, and got much positive feedback! --- --- @module Functional.MissileTrainer --- @image Missile_Trainer.JPG - - ---- The MISSILETRAINER class --- @type MISSILETRAINER --- @field Core.Set#SET_CLIENT DBClients --- @extends Core.Base#BASE +-- @field #MISSILETRAINER MISSILETRAINER = { ClassName = "MISSILETRAINER", TrackingMissiles = {}, diff --git a/Moose Development/Moose/Functional/Movement.lua b/Moose Development/Moose/Functional/Movement.lua index f01dad139..7c004d4e2 100644 --- a/Moose Development/Moose/Functional/Movement.lua +++ b/Moose Development/Moose/Functional/Movement.lua @@ -1,4 +1,4 @@ ---- **Functional** -- Limit the MOVEMENT of simulaneous moving ground vehicles. +--- **Functional** -- Limit the movement of simulaneous moving ground vehicles. -- -- === -- @@ -10,9 +10,11 @@ -- @module Functional.Movement -- @image MOOSE.JPG ---- the MOVEMENT class --- @type MOVEMENT +--- @type MOVEMENT -- @extends Core.Base#BASE + +--- +--@field #MOVEMENT MOVEMENT = { ClassName = "MOVEMENT", } diff --git a/Moose Development/Moose/Functional/PseudoATC.lua b/Moose Development/Moose/Functional/PseudoATC.lua index a6b42d68f..08422cb1f 100644 --- a/Moose Development/Moose/Functional/PseudoATC.lua +++ b/Moose Development/Moose/Functional/PseudoATC.lua @@ -1,4 +1,4 @@ ---- **Functional** - (R2.4) Rudimentary ATC. +--- **Functional** - Rudimentary ATC. -- -- ![Banner Image](..\Presentations\PSEUDOATC\PSEUDOATC_Main.jpg) -- @@ -8,7 +8,7 @@ -- -- In particular, a menu entry "Pseudo ATC" is created in the "F10 Other..." radiomenu. -- --- ## Features +-- ## Features: -- -- * Weather report at nearby airbases and mission waypoints. -- * Report absolute bearing and range to nearest airports and mission waypoints. @@ -20,12 +20,6 @@ -- -- ==== -- --- # Demo Missions --- --- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS) --- --- ==== --- -- # YouTube Channel -- -- ### [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg) diff --git a/Moose Development/Moose/Functional/RAT.lua b/Moose Development/Moose/Functional/RAT.lua index 7b9213bde..5b1616c81 100644 --- a/Moose Development/Moose/Functional/RAT.lua +++ b/Moose Development/Moose/Functional/RAT.lua @@ -1,33 +1,31 @@ ---- **Functional** - (R2.2) - Create random airtraffic in your missions. +--- **Functional** - Create random airtraffic in your missions. -- -- === -- --- The aim of the RAT class is to fill the empty DCS world with randomized air traffic and bring more life to your airports. --- --- In particular, it is designed to spawn AI air units at random airports. These units will be assigned a random flight path to another random airport on the map. --- +-- The aim of the RAT class is to fill the empty DCS world with randomized air traffic and bring more life to your airports. +-- In particular, it is designed to spawn AI air units at random airports. These units will be assigned a random flight path to another random airport on the map. -- Even the mission designer will not know where aircraft will be spawned and which route they follow. -- --- ## Features +-- ## Features: -- --- * Very simple interface. Just one unit and two lines of Lua code needed to fill your map. --- * High degree of randomization. Aircraft will spawn at random airports, have random routes and random destinations. --- * Specific departure and/or destination airports can be chosen. --- * Departure and destination airports can be restricted by coalition. --- * Planes and helicopters supported. Helicopters can also be send to FARPs and ships. --- * Units can also be spawned in air within pre-defined zones of the map. --- * Aircraft will be removed when they arrive at their destination (or get stuck on the ground). --- * When a unit is removed a new unit with a different flight plan is respawned. --- * Aircraft can report their status during the route. --- * All of the above can be customized by the user if necessary. --- * All current (Caucasus, Nevada, Normandy, Persian Gulf) and future maps are supported. +-- * Very simple interface. Just one unit and two lines of Lua code needed to fill your map. +-- * High degree of randomization. Aircraft will spawn at random airports, have random routes and random destinations. +-- * Specific departure and/or destination airports can be chosen. +-- * Departure and destination airports can be restricted by coalition. +-- * Planes and helicopters supported. Helicopters can also be send to FARPs and ships. +-- * Units can also be spawned in air within pre-defined zones of the map. +-- * Aircraft will be removed when they arrive at their destination (or get stuck on the ground). +-- * When a unit is removed a new unit with a different flight plan is respawned. +-- * Aircraft can report their status during the route. +-- * All of the above can be customized by the user if necessary. +-- * All current (Caucasus, Nevada, Normandy, Persian Gulf) and future maps are supported. -- --- The RAT class creates an entry in the F10 radio menu which allows to +-- The RAT class creates an entry in the F10 radio menu which allows to: -- --- * Create new groups on-the-fly, i.e. at run time within the mission, --- * Destroy specific groups (e.g. if they get stuck or damaged and block a runway), --- * Request the status of all RAT aircraft or individual groups, --- * Place markers at waypoints on the F10 map for each group. +-- * Create new groups on-the-fly, i.e. at run time within the mission, +-- * Destroy specific groups (e.g. if they get stuck or damaged and block a runway), +-- * Request the status of all RAT aircraft or individual groups, +-- * Place markers at waypoints on the F10 map for each group. -- -- Note that by its very nature, this class is suited best for civil or transport aircraft. However, it also works perfectly fine for military aircraft of any kind. -- @@ -35,10 +33,9 @@ -- -- === -- --- # Demo Missions +-- ## Missions: -- --- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS) --- ### [MOOSE - RAT Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/RAT%20-%20Random%20Air%20Traffic) +-- ### [RAT - Random Air Traffic](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/RAT%20-%20Random%20Air%20Traffic) -- -- === -- diff --git a/Moose Development/Moose/Functional/Range.lua b/Moose Development/Moose/Functional/Range.lua index 6b45a2fb5..95b800521 100644 --- a/Moose Development/Moose/Functional/Range.lua +++ b/Moose Development/Moose/Functional/Range.lua @@ -1,4 +1,4 @@ ---- **Functional** - (R2.3) - Range Practice. +--- **Functional** - Range Practice. -- -- === -- @@ -9,30 +9,22 @@ -- -- [476th - Air Weapons Range Objects mod](http://www.476vfightergroup.com/downloads.php?do=file&id=287) is highly recommended for this class. -- --- ## Features +-- ## Features: -- --- * Impact points of bombs, rockets and missils are recorded and distance to closest range target is measured and reported to the player. --- * Number of hits on strafing passes are counted and reported. Also the percentage of hits w.r.t fired shots is evaluated. --- * Results of all bombing and strafing runs are stored and top 10 results can be displayed. --- * Range targets can be marked by smoke. --- * Range can be illuminated by illumination bombs for night practices. --- * Bomb, rocket and missile impact points can be marked by smoke. --- * Direct hits on targets can trigger flares. --- * Smoke and flare colors can be adjusted for each player via radio menu. --- * Range information and weather report at the range can be reported via radio menu. +-- * Impact points of bombs, rockets and missils are recorded and distance to closest range target is measured and reported to the player. +-- * Number of hits on strafing passes are counted and reported. Also the percentage of hits w.r.t fired shots is evaluated. +-- * Results of all bombing and strafing runs are stored and top 10 results can be displayed. +-- * Range targets can be marked by smoke. +-- * Range can be illuminated by illumination bombs for night practices. +-- * Bomb, rocket and missile impact points can be marked by smoke. +-- * Direct hits on targets can trigger flares. +-- * Smoke and flare colors can be adjusted for each player via radio menu. +-- * Range information and weather report at the range can be reported via radio menu. -- -- More information and examples can be found below. -- -- === -- --- # Demo Missions --- --- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS) --- --- === --- --- # YouTube Channel --- -- ### [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg) -- ### [MOOSE - On the Range - Demonstration Video](https://www.youtube.com/watch?v=kIXcxNB9_3M) -- diff --git a/Moose Development/Moose/Functional/Scoring.lua b/Moose Development/Moose/Functional/Scoring.lua index cea1f948b..af50957e6 100644 --- a/Moose Development/Moose/Functional/Scoring.lua +++ b/Moose Development/Moose/Functional/Scoring.lua @@ -1,4 +1,25 @@ ---- **Functional** -- (R2.0) - Administer the scoring of player achievements, and create a CSV file logging the scoring events for use at team or squadron websites. +--- **Functional** - Administer the scoring of player achievements, and create a CSV file logging the scoring events for use at team or squadron websites. +-- +-- === +-- +-- ## Features: +-- +-- * Set the scoring scales based on threat level. +-- * Positive scores and negative scores. +-- * A contribution model to score achievements. +-- * Score goals. +-- * Score specific achievements. +-- * Score the hits and destroys of units. +-- * Score the hits and destroys of statics. +-- * Score the hits and destroys of scenery. +-- * Log scores into a CSV file. +-- * Connect to a remote server using JSON and IP. +-- +-- === +-- +-- ## Missions: +-- +-- [SCO - Scoring](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SCO%20-%20Scoring) -- -- === -- @@ -52,9 +73,34 @@ -- Use the radio menu F10 to consult the scores while running the mission. -- Scores can be reported for your user, or an overall score can be reported of all players currently active in the mission. -- --- # 1) @{Functional.Scoring#SCORING} class, extends @{Core.Base#BASE} +-- === -- --- ## 1.1) Set the destroy score or penalty scale +-- ### Authors: **FlightControl** +-- +-- ### Contributions: +-- +-- * **Wingthor (TAW)**: Testing & Advice. +-- * **Dutch-Baron (TAW)**: Testing & Advice. +-- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing and Advice. +-- +-- === +-- +-- @module Functional.Scoring +-- @image Scoring.JPG + + +--- @type SCORING +-- @field Players A collection of the current players that have joined the game. +-- @extends Core.Base#BASE + +--- SCORING class +-- +-- # Constructor: +-- +-- local Scoring = SCORING:New( "Scoring File" ) +-- +-- +-- # Set the destroy score or penalty scale: -- -- Score scales can be set for scores granted when enemies or friendlies are destroyed. -- Use the method @{#SCORING.SetScaleDestroyScore}() to set the scale of enemy destroys (positive destroys). @@ -67,7 +113,7 @@ -- The above sets the scale for valid scores to 10. So scores will be given in a scale from 0 to 10. -- The penalties will be given in a scale from 0 to 40. -- --- ## 1.2) Define special targets that will give extra scores. +-- # Define special targets that will give extra scores: -- -- Special targets can be set that will give extra scores to the players when these are destroyed. -- Use the methods @{#SCORING.AddUnitScore}() and @{#SCORING.RemoveUnitScore}() to specify a special additional score for a specific @{Wrapper.Unit}s. @@ -84,7 +130,7 @@ -- -- Scoring:RemoveUnitScore( UNIT:FindByName( "Unit #001" ) ) -- --- ## 1.3) Define destruction zones that will give extra scores. +-- # Define destruction zones that will give extra scores: -- -- Define zones of destruction. Any object destroyed within the zone of the given category will give extra points. -- Use the method @{#SCORING.AddZoneScore}() to add a @{Zone} for additional scoring. @@ -94,12 +140,12 @@ -- The other implementation could be to designate a scenery target (a building) in the mission editor surrounded by a @{Zone}, -- just large enough around that building. -- --- ## 1.4) Add extra Goal scores upon an event or a condition. +-- # Add extra Goal scores upon an event or a condition: -- -- A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens. -- Use the method @{#SCORING.AddGoalScore}() to add a score for a Player at any time in your mission. -- --- ## 1.5) (Decommissioned) Configure fratricide level. +-- # (Decommissioned) Configure fratricide level. -- -- **This functionality is decomissioned until the DCS bug concerning Unit:destroy() not being functional in multi player for player units has been fixed by ED**. -- @@ -107,13 +153,13 @@ -- Use the method @{#SCORING.SetFratricide}() to define the level when a player gets kicked. -- By default, the fratricide level is the default penalty mutiplier * 2 for the penalty score. -- --- ## 1.6) Penalty score when a player changes the coalition. +-- # Penalty score when a player changes the coalition. -- -- When a player changes the coalition, he can receive a penalty score. -- Use the method @{#SCORING.SetCoalitionChangePenalty}() to define the penalty when a player changes coalition. -- By default, the penalty for changing coalition is the default penalty scale. -- --- ## 1.8) Define output CSV files. +-- # Define output CSV files. -- -- The CSV file is given the name of the string given in the @{#SCORING.New}{} constructor, followed by the .csv extension. -- The file is incrementally saved in the **\\Saved Games\\DCS\\Logs** folder, and has a time stamp indicating each mission run. @@ -150,7 +196,7 @@ -- The MOOSE designer cannot take any responsibility of any damage inflicted as a result of the de-sanitization. -- That being said, I hope that the SCORING class provides you with a great add-on to score your squad mates achievements. -- --- ## 1.9) Configure messages. +-- # Configure messages. -- -- When players hit or destroy targets, messages are sent. -- Various methods exist to configure: @@ -158,7 +204,7 @@ -- * Which messages are sent upon the event. -- * Which audience receives the message. -- --- ### 1.9.1) Configure the messages sent upon the event. +-- ## Configure the messages sent upon the event. -- -- Use the following methods to configure when to send messages. By default, all messages are sent. -- @@ -167,49 +213,16 @@ -- * @{#SCORING.SetMessagesAddon}(): Configure to send messages for additional score, after a target has been destroyed. -- * @{#SCORING.SetMessagesZone}(): Configure to send messages for additional score, after a target has been destroyed within a given zone. -- --- ### 1.9.2) Configure the audience of the messages. +-- ## Configure the audience of the messages. -- -- Use the following methods to configure the audience of the messages. By default, the messages are sent to all players in the mission. -- -- * @{#SCORING.SetMessagesToAll}(): Configure to send messages to all players. -- * @{#SCORING.SetMessagesToCoalition}(): Configure to send messages to only those players within the same coalition as the player. --- --- --- === --- --- # **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-02-26: Initial class and API. -- -- === --- --- # **AUTHORS and CONTRIBUTIONS** --- --- ### Contributions: --- --- * **Wingthor (TAW)**: Testing & Advice. --- * **Dutch-Baron (TAW)**: Testing & Advice. --- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing and Advice. --- --- ### Authors: --- --- * **FlightControl**: Concept, Design & Programming. -- --- @module Functional.Scoring --- @image Scoring.JPG - - ---- The Scoring class --- @type SCORING --- @field Players A collection of the current players that have joined the game. --- @extends Core.Base#BASE +-- @field #SCORING SCORING = { ClassName = "SCORING", ClassID = 0, @@ -236,8 +249,10 @@ local _SCORINGCategory = -- @param #string GameName The name of the game. This name is also logged in the CSV score file. -- @return #SCORING self -- @usage +-- -- -- Define a new scoring object for the mission Gori Valley. -- ScoringObject = SCORING:New( "Gori Valley" ) +-- function SCORING:New( GameName ) -- Inherits from BASE diff --git a/Moose Development/Moose/Functional/Sead.lua b/Moose Development/Moose/Functional/Sead.lua index db25b81e1..55a791023 100644 --- a/Moose Development/Moose/Functional/Sead.lua +++ b/Moose Development/Moose/Functional/Sead.lua @@ -1,13 +1,41 @@ ---- **Functional** -- Provides defensive behaviour to a set of SAM sites within a running Mission. +--- **Functional** -- Make SAM sites execute evasive and defensive behaviour when being fired upon. +-- +-- === +-- +-- ## Features: +-- +-- * When SAM sites are being fired upon, the SAMs will take evasive action will reposition themselves when possible. +-- * When SAM sites are being fired upon, the SAMs will take defensive action by shutting down their radars. +-- +-- === +-- +-- ## Missions: +-- +-- [SEV - SEAD Evasion](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SEV%20-%20SEAD%20Evasion) +-- +-- === +-- +-- ### Authors: **FlightControl** -- -- === -- -- @module Functional.Sead -- @image SEAD.JPG ---- The SEAD class --- @type SEAD +--- @type SEAD -- @extends Core.Base#BASE + +--- Make SAM sites execute evasive and defensive behaviour when being fired upon. +-- +-- This class is very easy to use. Just setup a SEAD object by using @{#SEAD.New}() and SAMs will evade and take defensive action when being fired upon. +-- +-- # Constructor: +-- +-- Use the @{#SEAD.New}() constructor to create a new SEAD object. +-- +-- SEAD_RU_SAM_Defenses = SEAD:New( { 'RU SA-6 Kub', 'RU SA-6 Defenses', 'RU MI-26 Troops', 'RU Attack Gori' } ) +-- +-- @field #SEAD SEAD = { ClassName = "SEAD", TargetSkill = { diff --git a/Moose Development/Moose/Functional/Suppression.lua b/Moose Development/Moose/Functional/Suppression.lua index 805008e45..3df26be6d 100644 --- a/Moose Development/Moose/Functional/Suppression.lua +++ b/Moose Development/Moose/Functional/Suppression.lua @@ -1,7 +1,18 @@ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---- **Functional** - (R2.4) Suppress fire of ground units when they get hit. +--- **Functional** - Suppress fire of ground units when they get hit. -- --- ==== +-- === +-- +-- ## Features: +-- +-- * Hold fire of attacked units when being fired upon. +-- +-- === +-- +-- ## Missions: +-- +-- ## [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS) +-- +-- === -- -- When ground units get hit by (suppressive) enemy fire, they will not be able to shoot back for a certain amount of time. -- @@ -12,12 +23,6 @@ -- -- ==== -- --- # Demo Missions --- --- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS) --- --- ==== --- -- # YouTube Channel -- -- ### [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg) @@ -28,7 +33,8 @@ -- -- ### Contributions: [FlightControl](https://forums.eagle.ru/member.php?u=89536) -- --- ==== +-- === +-- -- @module Functional.Suppression -- @image Suppression.JPG diff --git a/Moose Development/Moose/Functional/Warehouse.lua b/Moose Development/Moose/Functional/Warehouse.lua index d2e1216d3..455723317 100644 --- a/Moose Development/Moose/Functional/Warehouse.lua +++ b/Moose Development/Moose/Functional/Warehouse.lua @@ -1,10 +1,8 @@ ---- **Functional** - (R2.4) - Simulation of logistic operations. +--- **Functional** - Simulation of logistic operations. -- --- The MOOSE warehouse concept simulates the organization and implementation of complex operations regarding the flow of assets between the point of origin and the point of consumption --- in order to meet requirements of a potential conflict. In particular, this class is concerned with maintaining army supply lines while disrupting those of the enemy, since an armed --- force without resources and transportation is defenseless. --- --- Features: +-- === +-- +-- ## Features: -- -- * Holds (virtual) assests in stock and spawns them upon request. -- * Manages requests of assets from other warehouses. @@ -16,13 +14,25 @@ -- * Possibility to hook into events and customize actions. -- * Can be easily interfaced to other MOOSE classes. -- --- Please not that his class is work in progress and in an **alpha** stage. +-- === +-- +-- ## Missions: +-- +-- === +-- +-- The MOOSE warehouse concept simulates the organization and implementation of complex operations regarding the flow of assets between the point of origin and the point of consumption +-- in order to meet requirements of a potential conflict. In particular, this class is concerned with maintaining army supply lines while disrupting those of the enemy, since an armed +-- force without resources and transportation is defenseless. -- +-- Please note that his class is work in progress and in an **alpha** stage. +-- -- === -- -- ### Author: **funkyfranky** -- ### Co-author: FlightControl (cargo dispatcher classes) -- +-- === +-- -- @module Functional.Warehouse -- @image MOOSE.JPG @@ -61,8 +71,6 @@ -- -- === -- --- ![Banner Image](..\Presentations\WAREHOUSE\Warehouse_Main.png) --- -- # The Warehouse Concept -- -- The MOOSE warehouse adds a new logistic component to the DCS World. *Assets*, i.e. ground, airborne and naval units, can be transferred from one place diff --git a/Moose Development/Moose/Functional/ZoneCaptureCoalition.lua b/Moose Development/Moose/Functional/ZoneCaptureCoalition.lua index 767f2e634..02f83c679 100644 --- a/Moose Development/Moose/Functional/ZoneCaptureCoalition.lua +++ b/Moose Development/Moose/Functional/ZoneCaptureCoalition.lua @@ -1,14 +1,40 @@ ---- **Functional** -- (R2.3) Models the process to zone guarding and capturing. +--- **Functional** -- Models the process to zone guarding and capturing. -- -- === -- --- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAZ - Capture Zones) +-- ## Features: -- --- - CAZ-000 - Capture Zone: Demonstrates the basic concept of capturing a zone. +-- * Models the possible state transitions between the Guarded, Attacked, Empty and Captured states. +-- * A zone has an owning coalition, that means that at a specific point in time, a zone can be owned by the red or blue coalition. +-- * Provide event handlers to tailor the actions when a zone changes coalition or state. -- -- === -- --- ### [YouTube Playlist](https://www.youtube.com/watch?v=0m6K6Yxa-os&list=PL7ZUrU4zZUl0qqJsfa8DPvZWDY-OyDumE) +-- ## Missions: +-- +-- [CAZ - Capture Zones](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAZ%20-%20Capture%20Zones) +-- +-- === +-- +-- # Player Experience +-- +-- ![States](..\Presentations\ZONE_CAPTURE_COALITION\Dia3.JPG) +-- +-- The above models the possible state transitions between the **Guarded**, **Attacked**, **Empty** and **Captured** states. +-- A zone has an __owning coalition__, that means that at a specific point in time, a zone can be owned by the red or blue coalition. +-- +-- The Zone can be in the state **Guarded** by the __owning coalition__, which is the coalition that initially occupies the zone with units of its coalition. +-- Once units of an other coalition are entering the Zone, the state will change to **Attacked**. As long as these units remain in the zone, the state keeps set to Attacked. +-- When all units are destroyed in the Zone, the state will change to **Empty**, which expresses that the Zone is empty, and can be captured. +-- When units of the other coalition are in the Zone, and no other units of the owning coalition is in the Zone, the Zone is captured, and its state will change to **Captured**. +-- +-- The zone needs to be monitored regularly for the presence of units to interprete the correct state transition required. +-- This monitoring process MUST be started using the @{#ZONE_CAPTURE_COALITION.Start}() method. +-- Otherwise no monitoring will be active and the zone will stay in the current state forever. +-- +-- === +-- +-- ## [YouTube Playlist](https://www.youtube.com/watch?v=0m6K6Yxa-os&list=PL7ZUrU4zZUl0qqJsfa8DPvZWDY-OyDumE) -- -- === -- @@ -29,65 +55,76 @@ do -- ZONE_CAPTURE_COALITION --- Models the process to capture a Zone for a Coalition, which is guarded by another Coalition. -- This is a powerful concept that allows to create very dynamic missions based on the different state transitions of various zones. -- - -- --- - -- - -- ![Banner Image](..\Presentations\ZONE_CAPTURE_COALITION\Dia1.JPG) - -- - -- --- + -- === -- - -- # 0. Player Experience + -- In order to use ZONE_CAPTURE_COALITION, you need to: -- - -- ![States](..\Presentations\ZONE_CAPTURE_COALITION\Dia3.JPG) - -- - -- The above models the possible state transitions between the **Guarded**, **Attacked**, **Empty** and **Captured** states. - -- A zone has an __owning coalition__, that means that at a specific point in time, a zone can be owned by the red or blue coalition. - -- - -- The Zone can be in the state **Guarded** by the __owning coalition__, which is the coalition that initially occupies the zone with units of its coalition. - -- Once units of an other coalition are entering the Zone, the state will change to **Attacked**. As long as these units remain in the zone, the state keeps set to Attacked. - -- When all units are destroyed in the Zone, the state will change to **Empty**, which expresses that the Zone is empty, and can be captured. - -- When units of the other coalition are in the Zone, and no other units of the owning coalition is in the Zone, the Zone is captured, and its state will change to **Captured**. - -- - -- The zone needs to be monitored regularly for the presence of units to interprete the correct state transition required. - -- This monitoring process MUST be started using the @{#ZONE_CAPTURE_COALITION.Start}() method. - -- Otherwise no monitoring will be active and the zone will stay in the current state forever. - -- See further in chapter 3.3 for more information about this. - -- - -- ## 1. ZONE\_CAPTURE\_COALITION constructor - -- - -- * @{#ZONE_CAPTURE_COALITION.New}(): Creates a new ZONE\_CAPTURE\_COALITION object. - -- - -- In order to use ZONE\_CAPTURE\_COALITION, you need to: - -- - -- - Create a @{Zone} object from one of the ZONE\_ classes. Note that ZONE\_POLYGON\_ classes are not yet functional. The only functional ZONE\_ classses are those derived from a ZONE\_RADIUS. + -- * Create a @{Zone} object from one of the ZONE_ classes. + -- Note that ZONE_POLYGON_ classes are not yet functional. + -- The only functional ZONE_ classses are those derived from a ZONE_RADIUS. + -- * Set the state of the zone. Most of the time, Guarded would be the initial state. + -- * Start the zone capturing **monitoring process**. + -- This will check the presence of friendly and/or enemy units within the zone and will transition the state of the zone when the tactical situation changed. + -- The frequency of the monitoring must not be real-time, a 30 second interval to execute the checks is sufficient. -- -- ![New](..\Presentations\ZONE_CAPTURE_COALITION\Dia5.JPG) -- - -- Ensure that during the life cycle of the ZONE\_CAPTURE\_COALITION object, the object keeps alive. - -- It is best to declare the object globally within your script. + -- ### Important: -- - -- ## 2. ZONE\_CAPTURE\_COALITION is a finite state machine (FSM). + -- You must start the monitoring process within your code, or there won't be any state transition checks executed. + -- See further the start/stop monitoring process. + -- + -- ### Important: + -- + -- Ensure that the object containing the ZONE_CAPTURE_COALITION object is persistent. + -- Otherwise the garbage collector of lua will remove the object and the monitoring process will stop. + -- This will result in your object to be destroyed (removed) from internal memory and there won't be any zone state transitions anymore detected! + -- So use the `local` keyword in lua with thought! Most of the time, you can declare your object gobally. + -- + -- + -- + -- # Example: + -- + -- -- Define a new ZONE object, which is based on the trigger zone `CaptureZone`, which is defined within the mission editor. + -- CaptureZone = ZONE:New( "CaptureZone" ) + -- + -- -- Here we create a new ZONE_CAPTURE_COALITION object, using the :New constructor. + -- ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED ) + -- + -- -- Set the zone to Guarding state. + -- ZoneCaptureCoalition:__Guard( 1 ) + -- + -- -- Start the zone monitoring process in 30 seconds and check every 30 seconds. + -- ZoneCaptureCoalition:Start( 30, 30 ) + -- + -- + -- # Constructor: + -- + -- Use the @{#ZONE_CAPTURE_COALITION.New}() constructor to create a new ZONE_CAPTURE_COALITION object. + -- + -- # ZONE_CAPTURE_COALITION is a finite state machine (FSM). -- -- ![States](..\Presentations\ZONE_CAPTURE_COALITION\Dia4.JPG) -- - -- ### 2.1 ZONE\_CAPTURE\_COALITION States + -- ## ZONE_CAPTURE_COALITION States -- -- * **Captured**: The Zone has been captured by an other coalition. -- * **Attacked**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone. -- * **Guarded**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone. -- * **Empty**: The Zone is empty. There is not valid unit in the Zone. -- - -- ### 2.2 ZONE\_CAPTURE\_COALITION Events + -- ## 2.2 ZONE_CAPTURE_COALITION Events -- -- * **Capture**: The Zone has been captured by an other coalition. -- * **Attack**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone. -- * **Guard**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone. -- * **Empty**: The Zone is empty. There is not valid unit in the Zone. -- - -- ## 3. "Script It" + -- # "Script It" -- - -- ZONE\_CAPTURE\_COALITION allows to take action on the various state transitions and add your custom code and logic. + -- ZONE_CAPTURE_COALITION allows to take action on the various state transitions and add your custom code and logic. -- - -- ### 3.1. Take action using state- and event handlers. + -- ## Take action using state- and event handlers. -- -- ![States](..\Presentations\ZONE_CAPTURE_COALITION\Dia6.JPG) -- @@ -104,8 +141,6 @@ do -- ZONE_CAPTURE_COALITION -- - On Before the event is triggered. Return false to cancel the transition. -- - On After the event is triggered. -- - -- - -- -- ![States](..\Presentations\ZONE_CAPTURE_COALITION\Dia7.JPG) -- -- Each handler can receive optionally 3 parameters: @@ -126,7 +161,7 @@ do -- ZONE_CAPTURE_COALITION -- -- This code checks that when the __Guarded__ state has been reached, that if the **From** state was __Empty__, then display a message. -- - -- ### 3.2. Example Event Handler. + -- ## Example Event Handler. -- -- --- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) @@ -145,7 +180,7 @@ do -- ZONE_CAPTURE_COALITION -- end -- end -- - -- ### 3.3. Stop and Start the zone monitoring process. + -- ## Stop and Start the zone monitoring process. -- -- At regular intervals, the state of the zone needs to be monitored. -- The zone needs to be scanned for the presence of units within the zone boundaries. @@ -157,8 +192,8 @@ do -- ZONE_CAPTURE_COALITION -- -- Therefore, the mission designer is given 2 methods that allow to take control of the CPU utilization efficiency: -- - -- - @{#ZONE_CAPTURE_COALITION.Start()}(): This starts the monitoring process. - -- - @{#ZONE_CAPTURE_COALITION.Stop()}(): This stops the monitoring process. + -- * @{#ZONE_CAPTURE_COALITION.Start}(): This starts the monitoring process. + -- * @{#ZONE_CAPTURE_COALITION.Stop}(): This stops the monitoring process. -- -- ### IMPORTANT -- @@ -166,9 +201,9 @@ do -- ZONE_CAPTURE_COALITION -- The monitoring process is NOT started by default!!!** -- -- - -- ## 4. Full Example + -- # Full Example -- - -- The following annotated code shows a real example of how ZONE\_CAPTURE\_COALITION can be applied. + -- The following annotated code shows a real example of how ZONE_CAPTURE_COALITION can be applied. -- -- The concept is simple. -- @@ -329,7 +364,7 @@ do -- ZONE_CAPTURE_COALITION do - --- Captured State Handler OnLeave for ZONE\_CAPTURE\_COALITION + --- Captured State Handler OnLeave for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveCaptured -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -337,7 +372,7 @@ do -- ZONE_CAPTURE_COALITION -- @param #string To -- @return #boolean - --- Captured State Handler OnEnter for ZONE\_CAPTURE\_COALITION + --- Captured State Handler OnEnter for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterCaptured -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -349,7 +384,7 @@ do -- ZONE_CAPTURE_COALITION do - --- Attacked State Handler OnLeave for ZONE\_CAPTURE\_COALITION + --- Attacked State Handler OnLeave for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveAttacked -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -357,7 +392,7 @@ do -- ZONE_CAPTURE_COALITION -- @param #string To -- @return #boolean - --- Attacked State Handler OnEnter for ZONE\_CAPTURE\_COALITION + --- Attacked State Handler OnEnter for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterAttacked -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -368,7 +403,7 @@ do -- ZONE_CAPTURE_COALITION do - --- Guarded State Handler OnLeave for ZONE\_CAPTURE\_COALITION + --- Guarded State Handler OnLeave for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveGuarded -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -376,7 +411,7 @@ do -- ZONE_CAPTURE_COALITION -- @param #string To -- @return #boolean - --- Guarded State Handler OnEnter for ZONE\_CAPTURE\_COALITION + --- Guarded State Handler OnEnter for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterGuarded -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -388,7 +423,7 @@ do -- ZONE_CAPTURE_COALITION do - --- Empty State Handler OnLeave for ZONE\_CAPTURE\_COALITION + --- Empty State Handler OnLeave for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveEmpty -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -396,7 +431,7 @@ do -- ZONE_CAPTURE_COALITION -- @param #string To -- @return #boolean - --- Empty State Handler OnEnter for ZONE\_CAPTURE\_COALITION + --- Empty State Handler OnEnter for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterEmpty -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -407,7 +442,7 @@ do -- ZONE_CAPTURE_COALITION self:AddTransition( "*", "Guard", "Guarded" ) - --- Guard Handler OnBefore for ZONE\_CAPTURE\_COALITION + --- Guard Handler OnBefore for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeGuard -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -415,25 +450,25 @@ do -- ZONE_CAPTURE_COALITION -- @param #string To -- @return #boolean - --- Guard Handler OnAfter for ZONE\_CAPTURE\_COALITION + --- Guard Handler OnAfter for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterGuard -- @param #ZONE_CAPTURE_COALITION self -- @param #string From -- @param #string Event -- @param #string To - --- Guard Trigger for ZONE\_CAPTURE\_COALITION + --- Guard Trigger for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] Guard -- @param #ZONE_CAPTURE_COALITION self - --- Guard Asynchronous Trigger for ZONE\_CAPTURE\_COALITION + --- Guard Asynchronous Trigger for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] __Guard -- @param #ZONE_CAPTURE_COALITION self -- @param #number Delay self:AddTransition( "*", "Empty", "Empty" ) - --- Empty Handler OnBefore for ZONE\_CAPTURE\_COALITION + --- Empty Handler OnBefore for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeEmpty -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -441,18 +476,18 @@ do -- ZONE_CAPTURE_COALITION -- @param #string To -- @return #boolean - --- Empty Handler OnAfter for ZONE\_CAPTURE\_COALITION + --- Empty Handler OnAfter for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterEmpty -- @param #ZONE_CAPTURE_COALITION self -- @param #string From -- @param #string Event -- @param #string To - --- Empty Trigger for ZONE\_CAPTURE\_COALITION + --- Empty Trigger for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] Empty -- @param #ZONE_CAPTURE_COALITION self - --- Empty Asynchronous Trigger for ZONE\_CAPTURE\_COALITION + --- Empty Asynchronous Trigger for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] __Empty -- @param #ZONE_CAPTURE_COALITION self -- @param #number Delay @@ -460,7 +495,7 @@ do -- ZONE_CAPTURE_COALITION self:AddTransition( { "Guarded", "Empty" }, "Attack", "Attacked" ) - --- Attack Handler OnBefore for ZONE\_CAPTURE\_COALITION + --- Attack Handler OnBefore for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeAttack -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -468,25 +503,25 @@ do -- ZONE_CAPTURE_COALITION -- @param #string To -- @return #boolean - --- Attack Handler OnAfter for ZONE\_CAPTURE\_COALITION + --- Attack Handler OnAfter for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterAttack -- @param #ZONE_CAPTURE_COALITION self -- @param #string From -- @param #string Event -- @param #string To - --- Attack Trigger for ZONE\_CAPTURE\_COALITION + --- Attack Trigger for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] Attack -- @param #ZONE_CAPTURE_COALITION self - --- Attack Asynchronous Trigger for ZONE\_CAPTURE\_COALITION + --- Attack Asynchronous Trigger for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] __Attack -- @param #ZONE_CAPTURE_COALITION self -- @param #number Delay self:AddTransition( { "Guarded", "Attacked", "Empty" }, "Capture", "Captured" ) - --- Capture Handler OnBefore for ZONE\_CAPTURE\_COALITION + --- Capture Handler OnBefore for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeCapture -- @param #ZONE_CAPTURE_COALITION self -- @param #string From @@ -494,18 +529,18 @@ do -- ZONE_CAPTURE_COALITION -- @param #string To -- @return #boolean - --- Capture Handler OnAfter for ZONE\_CAPTURE\_COALITION + --- Capture Handler OnAfter for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterCapture -- @param #ZONE_CAPTURE_COALITION self -- @param #string From -- @param #string Event -- @param #string To - --- Capture Trigger for ZONE\_CAPTURE\_COALITION + --- Capture Trigger for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] Capture -- @param #ZONE_CAPTURE_COALITION self - --- Capture Asynchronous Trigger for ZONE\_CAPTURE\_COALITION + --- Capture Asynchronous Trigger for ZONE_CAPTURE_COALITION -- @function [parent=#ZONE_CAPTURE_COALITION] __Capture -- @param #ZONE_CAPTURE_COALITION self -- @param #number Delay From f03a2e3657a0656c67bfb65be311ad51f9c24e7c Mon Sep 17 00:00:00 2001 From: FlightControl Date: Tue, 9 Oct 2018 19:30:57 +0200 Subject: [PATCH 7/9] Revision of core classes documentation. --- Moose Development/Moose/Core/Base.lua | 64 +++++++++++--------- Moose Development/Moose/Core/Database.lua | 23 ++++++- Moose Development/Moose/Core/Event.lua | 32 ++++++---- Moose Development/Moose/Core/Fsm.lua | 17 +++++- Moose Development/Moose/Core/Goal.lua | 43 +++++++++++-- Moose Development/Moose/Core/Menu.lua | 22 ++++++- Moose Development/Moose/Core/Message.lua | 13 +++- Moose Development/Moose/Core/Point.lua | 4 +- Moose Development/Moose/Core/Radio.lua | 7 ++- Moose Development/Moose/Core/Report.lua | 22 ++++--- Moose Development/Moose/Core/Scheduler.lua | 13 ++-- Moose Development/Moose/Core/Set.lua | 25 ++++++-- Moose Development/Moose/Core/Settings.lua | 14 ++++- Moose Development/Moose/Core/Spawn.lua | 28 ++++++++- Moose Development/Moose/Core/SpawnStatic.lua | 10 ++- Moose Development/Moose/Core/Spot.lua | 2 +- Moose Development/Moose/Core/UserFlag.lua | 8 ++- Moose Development/Moose/Core/UserSound.lua | 8 ++- Moose Development/Moose/Core/Velocity.lua | 10 ++- Moose Development/Moose/Core/Zone.lua | 19 +++++- 20 files changed, 298 insertions(+), 86 deletions(-) diff --git a/Moose Development/Moose/Core/Base.lua b/Moose Development/Moose/Core/Base.lua index 3d6af24d3..cca8fedeb 100644 --- a/Moose Development/Moose/Core/Base.lua +++ b/Moose Development/Moose/Core/Base.lua @@ -1,4 +1,22 @@ ---- **Core** -- BASE forms **the basis of the MOOSE framework**. Each class within the MOOSE framework derives from BASE. +--- **Core** - The base class within the framework. +-- +-- === +-- +-- ## Features: +-- +-- * The construction and inheritance of MOOSE classes. +-- * The class naming and numbering system. +-- * The class hierarchy search system. +-- * The tracing of information or objects during mission execution for debuggin purposes. +-- * The subscription to DCS events for event handling in MOOSE objects. +-- * Object inspection. +-- +-- === +-- +-- All classes within the MOOSE framework are derived from the BASE class. +-- Note: The BASE class is an abstract class and is not meant to be used directly. +-- +-- === -- -- ### Author: **FlightControl** -- ### Contributions: @@ -23,24 +41,14 @@ local _ClassID = 0 -- @field ClassID The ID number of the class. -- @field ClassNameAndID The name of the class concatenated with the ID number of the class. ---- All classes within the MOOSE framework are derived from the BASE class. --- --- BASE provides facilities for : --- --- * The construction and inheritance of MOOSE classes. --- * The class naming and numbering system. --- * The class hierarchy search system. --- * The tracing of information or objects during mission execution for debuggin purposes. --- * The subscription to DCS events for event handling in MOOSE objects. --- --- Note: The BASE class is an abstract class and is not meant to be used directly. --- --- ## 1.1) BASE constructor +--- BASE class +-- +-- # 1. BASE constructor. -- -- Any class derived from BASE, will use the @{Core.Base#BASE.New} constructor embedded in the @{Core.Base#BASE.Inherit} method. -- See an example at the @{Core.Base#BASE.New} method how this is done. -- --- ## 1.2) Trace information for debugging +-- # 2. Trace information for debugging. -- -- The BASE class contains trace methods to trace progress within a mission execution of a certain object. -- These trace methods are inherited by each MOOSE class interiting BASE, soeach object created from derived class from BASE can use the tracing methods to trace its execution. @@ -71,7 +79,7 @@ local _ClassID = 0 -- -- Below a more detailed explanation of the different method types for tracing. -- --- ### 1.2.1) Tracing methods categories +-- ## 2.1. Tracing methods categories. -- -- There are basically 3 types of tracing methods available: -- @@ -79,9 +87,9 @@ local _ClassID = 0 -- * @{#BASE.T}: Used to trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file. -- * @{#BASE.E}: Used to always trace information giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file. -- --- ### 1.2.2) Tracing levels +-- ## 2.2 Tracing levels. -- --- There are 3 tracing levels within MOOSE. +-- There are 3 tracing levels within MOOSE. -- These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects. -- -- As such, the F and T methods have additional variants to trace level 2 and 3 respectively: @@ -91,7 +99,7 @@ local _ClassID = 0 -- * @{#BASE.T2}: Trace further logic within a function giving optional variables or parameters with tracing level 2. -- * @{#BASE.T3}: Trace further logic within a function giving optional variables or parameters with tracing level 3. -- --- ### 1.2.3) Trace activation. +-- ## 2.3. Trace activation. -- -- Tracing can be activated in several ways: -- @@ -101,16 +109,17 @@ local _ClassID = 0 -- * Activate only the tracing of a certain method of a certain class through the @{#BASE.TraceClassMethod}() method. -- * Activate only the tracing of a certain level through the @{#BASE.TraceLevel}() method. -- --- ### 1.2.4) Check if tracing is on. +-- ## 2.4. Check if tracing is on. -- -- The method @{#BASE.IsTrace}() will validate if tracing is activated or not. -- --- ## 1.3 DCS simulator Event Handling +-- +-- # 3. DCS simulator Event Handling. -- -- The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, -- and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently. -- --- ### 1.3.1 Subscribe / Unsubscribe to DCS Events +-- ## 3.1. Subscribe / Unsubscribe to DCS Events. -- -- At first, the mission designer will need to **Subscribe** to a specific DCS event for the class. -- So, when the DCS event occurs, the class will be notified of that event. @@ -119,7 +128,7 @@ local _ClassID = 0 -- * @{#BASE.HandleEvent}(): Subscribe to a DCS Event. -- * @{#BASE.UnHandleEvent}(): Unsubscribe from a DCS Event. -- --- ### 1.3.2 Event Handling of DCS Events +-- ## 3.2. Event Handling of DCS Events. -- -- Once the class is subscribed to the event, an **Event Handling** method on the object or class needs to be written that will be called -- when the DCS event occurs. The Event Handling method receives an @{Core.Event#EVENTDATA} structure, which contains a lot of information @@ -154,7 +163,7 @@ local _ClassID = 0 -- -- See the @{Event} module for more information about event handling. -- --- ## 1.4) Class identification methods +-- # 4. Class identification methods. -- -- BASE provides methods to get more information of each object: -- @@ -162,7 +171,7 @@ local _ClassID = 0 -- * @{#BASE.GetClassName}(): Gets the name of the object, which is the name of the class the object was instantiated from. -- * @{#BASE.GetClassNameAndID}(): Gets the name and ID of the object. -- --- ## 1.5) All objects derived from BASE can have "States" +-- # 5. All objects derived from BASE can have "States". -- -- A mechanism is in place in MOOSE, that allows to let the objects administer **states**. -- States are essentially properties of objects, which are identified by a **Key** and a **Value**. @@ -177,7 +186,7 @@ local _ClassID = 0 -- Thus, if the state is to be set for the same object as the object for which the method is used, then provide the same -- object name to the method. -- --- ## 1.10) Inheritance +-- # 6. Inheritance. -- -- The following methods are available to implement inheritance -- @@ -186,8 +195,7 @@ local _ClassID = 0 -- -- === -- --- @field #BASE BASE --- +-- @field #BASE BASE = { ClassName = "BASE", ClassID = 0, diff --git a/Moose Development/Moose/Core/Database.lua b/Moose Development/Moose/Core/Database.lua index 6163bac25..1a3d7c7e5 100644 --- a/Moose Development/Moose/Core/Database.lua +++ b/Moose Development/Moose/Core/Database.lua @@ -1,4 +1,25 @@ ---- **Core** -- DATABASE manages the database of mission objects. +--- **Core** - Manages several databases containing templates, mission objects, and mission information. +-- +-- === +-- +-- ## Features: +-- +-- * During mission startup, scan the mission environment, and create / instantiate intelligently the different objects as defined within the mission. +-- * Manage database of DCS Group templates (as modelled using the mission editor). +-- - Group templates. +-- - Unit templates. +-- - Statics templates. +-- * Manage database of @{Wrapper.Group#GROUP} objects alive in the mission. +-- * Manage database of @{Wrapper.Unit#UNIT} objects alive in the mission. +-- * Manage database of @{Wrapper.Static#STATIC} objects alive in the mission. +-- * Manage database of players. +-- * Manage database of client slots defined using the mission editor. +-- * Manage database of airbases on the map, and from FARPs and ships as defined using the mission editor. +-- * Manage database of countries. +-- * Manage database of zone names. +-- * Manage database of hits to units and statics. +-- * Manage database of destroys of units and statics. +-- * Manage database of @{Core.Zone#ZONE_BASE} objects. -- -- === -- diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 8f5116855..386169cb0 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -1,8 +1,15 @@ ---- **Core** -- EVENT models DCS **event dispatching** using a **publish-subscribe** model. +--- **Core** - Models DCS event dispatching using a publish-subscribe model. -- -- === -- --- # 1) Event Handling Overview +-- ## Features: +-- +-- * Capture DCS events and dispatch them to the subscribed objects. +-- * Generate DCS events to the subscribed objects from within the code. +-- +-- === +-- +-- # Event Handling Overview -- -- ![Objects](..\Presentations\EVENT\Dia2.JPG) -- @@ -14,7 +21,7 @@ -- Objects can subscribe to different events. The Event dispatcher will publish the received DCS events to the subscribed MOOSE objects, in a specified order. -- In this way, the subscribed MOOSE objects are kept in sync with your evolving running mission. -- --- ## 1.1) Event Dispatching +-- ## 1. Event Dispatching -- -- ![Objects](..\Presentations\EVENT\Dia4.JPG) -- @@ -41,7 +48,7 @@ -- -- But for some DCS events, the publishing order is reversed. This is due to the fact that objects need to be **erased** instead of added. -- --- ## 1.2) Event Handling +-- # 2. Event Handling -- -- ![Objects](..\Presentations\EVENT\Dia8.JPG) -- @@ -53,7 +60,7 @@ -- The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, -- and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently. -- --- ### 1.2.1 Subscribe / Unsubscribe to DCS Events +-- ## 2.1. Subscribe to / Unsubscribe from DCS Events. -- -- At first, the mission designer will need to **Subscribe** to a specific DCS event for the class. -- So, when the DCS event occurs, the class will be notified of that event. @@ -69,7 +76,7 @@ -- So if a UNIT within the mission has the subscribed event for that object, -- then the object event handler will receive the event for that UNIT! -- --- ### 1.3.2 Event Handling of DCS Events +-- ## 2.2 Event Handling of DCS Events -- -- Once the class is subscribed to the event, an **Event Handling** method on the object or class needs to be written that will be called -- when the DCS event occurs. The Event Handling method receives an @{Core.Event#EVENTDATA} structure, which contains a lot of information @@ -100,19 +107,19 @@ -- self:SmokeBlue() -- end -- --- ### 1.3.3 Event Handling methods that are automatically called upon subscribed DCS events +-- ## 2.3 Event Handling methods that are automatically called upon subscribed DCS events. -- -- ![Objects](..\Presentations\EVENT\Dia10.JPG) -- -- The following list outlines which EVENTS item in the structure corresponds to which Event Handling method. -- Always ensure that your event handling methods align with the events being subscribed to, or nothing will be executed. -- --- # 2) EVENTS type +-- # 3. EVENTS type -- -- The EVENTS structure contains names for all the different DCS events that objects can subscribe to using the -- @{Core.Base#BASE.HandleEvent}() method. -- --- # 3) EVENTDATA type +-- # 4. EVENTDATA type -- -- The @{Core.Event#EVENTDATA} structure contains all the fields that are populated with event information before -- an Event Handler method is being called by the event dispatcher. @@ -166,11 +173,12 @@ -- @image Core_Event.JPG ---- The EVENT structure --- --- @type EVENT +--- @type EVENT -- @field #EVENT.Events Events -- @extends Core.Base#BASE + +--- The EVENT class +-- @field #EVENT EVENT = { ClassName = "EVENT", ClassID = 0, diff --git a/Moose Development/Moose/Core/Fsm.lua b/Moose Development/Moose/Core/Fsm.lua index 65b0d3ea5..ba8e3c4de 100644 --- a/Moose Development/Moose/Core/Fsm.lua +++ b/Moose Development/Moose/Core/Fsm.lua @@ -1,5 +1,18 @@ ---- **Core** -- The **FSM** (**F**inite **S**tate **M**achine) class and derived **FSM\_** classes --- are design patterns allowing efficient (long-lasting) processes and workflows. +--- **Core** - FSM (Finite State Machine) are objects that model and control long lasting business processes and workflow. +-- +-- === +-- +-- ## Features: +-- +-- * Provide a base class to model your own state machines. +-- * Trigger events synchronously. +-- * Trigger events asynchronously. +-- * Handle events before or after the event was triggered. +-- * Handle state transitions as a result of event before and after the state change. +-- * For internal moose purposes, further state machines have been designed: +-- - to handle controllables (groups and units). +-- - to handle tasks. +-- - to handle processes. -- -- === -- diff --git a/Moose Development/Moose/Core/Goal.lua b/Moose Development/Moose/Core/Goal.lua index f530deb33..4165e7f3f 100644 --- a/Moose Development/Moose/Core/Goal.lua +++ b/Moose Development/Moose/Core/Goal.lua @@ -1,8 +1,16 @@ ---- **Core (WIP)** -- Base class to allow the modeling of processes to achieve Goals. +--- **Core** - Models the process to achieve goal(s). -- -- === -- --- GOAL models processes that have an objective with a defined achievement. Derived classes implement the ways how the achievements can be realized. +-- ## Features: +-- +-- * Define the goal. +-- * Monitor the goal achievement. +-- * Manage goal contribution by players. +-- +-- === +-- +-- Classes that implement a goal achievement, will derive from GOAL to implement the ways how the achievements can be realized. -- -- === -- @@ -13,6 +21,7 @@ -- @module Core.Goal -- @image Core_Goal.JPG + do -- Goal --- @type GOAL @@ -21,21 +30,43 @@ do -- Goal --- Models processes that have an objective with a defined achievement. Derived classes implement the ways how the achievements can be realized. -- - -- ## 1. GOAL constructor + -- # 1. GOAL constructor -- -- * @{#GOAL.New}(): Creates a new GOAL object. -- - -- ## 2. GOAL is a finite state machine (FSM). + -- # 2. GOAL is a finite state machine (FSM). -- - -- ### 2.1 GOAL States + -- ## 2.1. GOAL States -- -- * **Pending**: The goal object is in progress. -- * **Achieved**: The goal objective is Achieved. -- - -- ### 2.2 GOAL Events + -- ## 2.2. GOAL Events -- -- * **Achieved**: Set the goal objective to Achieved. -- + -- # 3. Player contributions. + -- + -- Goals are most of the time achieved by players. These player achievements can be registered as part of the goal achievement. + -- Use @{#GOAL.AddPlayerContribution}() to add a player contribution to the goal. + -- The player contributions are based on a points system, an internal counter per player. + -- So once the goal has been achieved, the player contributions can be queried using @{#GOAL.GetPlayerContributions}(), + -- that retrieves all contributions done by the players. For one player, the contribution can be queried using @{#GOAL.GetPlayerContribution}(). + -- The total amount of player contributions can be queried using @{#GOAL.GetTotalContributions}(). + -- + -- # 4. Goal achievement. + -- + -- Once the goal is achieved, the mission designer will need to trigger the goal achievement using the **Achieved** event. + -- The underlying 2 examples will achieve the goals for the `Goal` object: + -- + -- Goal:Achieved() -- Achieve the goal immediately. + -- Goal:__Achieved( 30 ) -- Achieve the goal within 30 seconds. + -- + -- # 5. Check goal achievement. + -- + -- The method @{#GOAL.IsAchieved}() will return true if the goal is achieved (the trigger **Achieved** was executed). + -- You can use this method to check asynchronously if a goal has been achieved, for example using a scheduler. + -- -- @field #GOAL GOAL = { ClassName = "GOAL", diff --git a/Moose Development/Moose/Core/Menu.lua b/Moose Development/Moose/Core/Menu.lua index d6b68b87f..fa7ab6a72 100644 --- a/Moose Development/Moose/Core/Menu.lua +++ b/Moose Development/Moose/Core/Menu.lua @@ -1,7 +1,27 @@ ---- **Core** -- MENU_ classes model the definition of **hierarchical menu structures** and **commands for players** within a mission. +--- **Core** - Manage hierarchical menu structures and commands for players within a mission. -- -- === -- +-- ### Features: +-- +-- * Setup mission sub menus. +-- * Setup mission command menus. +-- * Setup coalition sub menus. +-- * Setup coalition command menus. +-- * Setup group sub menus. +-- * Setup group command menus. +-- * Manage menu creation intelligently, avoid double menu creation. +-- * Only create or delete menus when required, and keep existing menus persistent. +-- * Update menu structures. +-- * Refresh menu structures intelligently, based on a time stamp of updates. +-- - Delete obscolete menus. +-- - Create new one where required. +-- - Don't touch the existing ones. +-- * Provide a variable amount of parameters to menus. +-- * Update the parameters and the receiving methods, without updating the menu within DCS! +-- * Provide a great performance boost in menu management. +-- * Provide a great tool to manage menus in your code. +-- -- DCS Menus can be managed using the MENU classes. -- The advantage of using MENU classes is that it hides the complexity of dealing with menu management in more advanced scanerios where you need to -- set menus and later remove them, and later set them again. You'll find while using use normal DCS scripting functions, that setting and removing diff --git a/Moose Development/Moose/Core/Message.lua b/Moose Development/Moose/Core/Message.lua index 1369f47be..8e1f8324f 100644 --- a/Moose Development/Moose/Core/Message.lua +++ b/Moose Development/Moose/Core/Message.lua @@ -1,4 +1,15 @@ ---- **Core** -- MESSAGE class takes are of the **real-time notifications** and **messages to players** during a simulation. +--- **Core** - Informs the players using messages during a simulation. +-- +-- === +-- +-- ## Features: +-- +-- * A more advanced messaging system using the DCS message system. +-- * Time messages. +-- * Send messages based on a message type, which has a pre-defined duration that can be tweaked in SETTINGS. +-- * Send message to all players. +-- * Send messages to a coalition. +-- * Send messages to a specific group. -- -- === -- diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index ae6475723..1f58ea6d6 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -1,6 +1,6 @@ ---- **Core** -- Defines an **extensive API** to **manage 3D points** in the DCS World 3D simulation space. +--- **Core** - Defines an extensive API to manage 3D points in the DCS World 3D simulation space. -- --- **Features:** +-- ## 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. diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 435cc7914..954fc51a9 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -1,6 +1,11 @@ ---- **Core** -- The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions... +--- **Core** - Is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions. -- -- === +-- +-- ## Features: +-- +-- * Provide radio functionality to broadcast radio transmissions. +-- * Provide beacon functionality to assist pilots. -- -- The Radio contains 2 classes : RADIO and BEACON -- diff --git a/Moose Development/Moose/Core/Report.lua b/Moose Development/Moose/Core/Report.lua index c570bb39b..35800c60e 100644 --- a/Moose Development/Moose/Core/Report.lua +++ b/Moose Development/Moose/Core/Report.lua @@ -1,20 +1,26 @@ ---- **Core** -- **REPORT** class provides a handy means to create messages and reports. +--- **Core** - Provides a handy means to create messages and reports. -- -- === +-- +-- ## Features: +-- +-- * Create text blocks that are formatted. +-- * Create automatic indents. +-- * Variate the delimiters between reporting lines. +-- +-- === -- --- ### Authors: --- --- * FlightControl : Design & Programming --- --- ### Contributions: +-- ### Authors: FlightControl : Design & Programming -- -- @module Core.Report -- @image Core_Report.JPG ---- The REPORT class --- @type REPORT +--- @type REPORT -- @extends Core.Base#BASE + +--- Provides a handy means to create messages and reports. +-- @field #REPORT REPORT = { ClassName = "REPORT", Title = "", diff --git a/Moose Development/Moose/Core/Scheduler.lua b/Moose Development/Moose/Core/Scheduler.lua index b8a75c5b8..2b5e7e03b 100644 --- a/Moose Development/Moose/Core/Scheduler.lua +++ b/Moose Development/Moose/Core/Scheduler.lua @@ -1,13 +1,14 @@ ---- **Core** -- SCHEDULER prepares and handles the **execution of functions over scheduled time (intervals)**. +--- **Core** - Prepares and handles the execution of functions over scheduled time (intervals). -- -- === -- --- SCHEDULER manages the **scheduling of functions**: +-- ## Features: -- --- * optionally in an optional specified time interval, --- * optionally **repeating** with a specified time repeat interval, --- * optionally **randomizing** with a specified time interval randomization factor, --- * optionally **stop** the repeating after a specified time interval. +-- * Schedule functions over time, +-- * optionally in an optional specified time interval, +-- * optionally **repeating** with a specified time repeat interval, +-- * optionally **randomizing** with a specified time interval randomization factor, +-- * optionally **stop** the repeating after a specified time interval. -- -- === -- diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index 80332312e..0722dcc8a 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -1,22 +1,35 @@ ---- **Core** -- SET_ classes define **collections** of objects to perform **bulk actions** and logically **group** objects. +--- **Core** - Define collections of objects to perform bulk actions and logically group objects. -- -- === -- --- SET_ classes group objects of the same type into a collection, which is either: +-- ## Features: -- --- * Manually managed using the **:Add...()** or **:Remove...()** methods. The initial SET can be filtered with the **@{#SET_BASE.FilterOnce}()** method +-- * Dynamically maintain collections of objects. +-- * Manually modify the collection, by adding or removing objects. +-- * Collections of different types. +-- * Validate the presence of objects in the collection. +-- * Perform bulk actions on collection. +-- +-- === +-- +-- Group objects or data of the same type into a collection, which is either: +-- +-- * Manually managed using the **:Add...()** or **:Remove...()** methods. The initial SET can be filtered with the **@{#SET_BASE.FilterOnce}()** method. -- * Dynamically updated when new objects are created or objects are destroyed using the **@{#SET_BASE.FilterStart}()** method. -- -- Various types of SET_ classes are available: -- --- * @{#SET_UNIT}: Defines a colleciton of @{Wrapper.Unit}s filtered by filter criteria. -- * @{#SET_GROUP}: Defines a collection of @{Wrapper.Group}s filtered by filter criteria. +-- * @{#SET_UNIT}: Defines a colleciton of @{Wrapper.Unit}s filtered by filter criteria. +-- * @{#SET_STATIC}: Defines a collection of @{Wrapper.Static}s filtered by filter criteria. -- * @{#SET_CLIENT}: Defines a collection of @{Client}s filterd by filter criteria. -- * @{#SET_AIRBASE}: Defines a collection of @{Wrapper.Airbase}s filtered by filter criteria. +-- * @{#SET_CARGO}: Defines a collection of @{Cargo.Cargo}s filtered by filter criteria. +-- * @{#SET_ZONE}: Defines a collection of @{Core.Zone}s filtered by filter criteria. -- --- These classes are derived from @{#SET_BASE}, which contains the main methods to manage SETs. +-- These classes are derived from @{#SET_BASE}, which contains the main methods to manage the collections. -- --- A multitude of other methods are available in SET_ classes that allow to: +-- A multitude of other methods are available in the individual set classes that allow to: -- -- * Validate the presence of objects in the SET. -- * Trigger events when objects in the SET change a zone presence. diff --git a/Moose Development/Moose/Core/Settings.lua b/Moose Development/Moose/Core/Settings.lua index 20935af35..1f504271d 100644 --- a/Moose Development/Moose/Core/Settings.lua +++ b/Moose Development/Moose/Core/Settings.lua @@ -1,7 +1,19 @@ ---- **Core** -- Manages various settings for MOOSE classes. +--- **Core** - Manages various settings for running missions, consumed by moose classes and provides a menu system for players to tweak settings in running missions. -- -- === -- +-- ## Features: +-- +-- * Provide a settings menu system to the players. +-- * Provide a player settings menu and an overall mission settings menu. +-- * Mission settings provide default settings, while player settings override mission settings. +-- * Provide a menu to select between different coordinate formats for A2G coordinates. +-- * Provide a menu to select between different coordinate formats for A2A coordinates. +-- * Provide a menu to select between different message time duration options. +-- * Provide a menu to select between different metric systems. +-- +-- === +-- -- The documentation of the SETTINGS class can be found further in this document. -- -- === diff --git a/Moose Development/Moose/Core/Spawn.lua b/Moose Development/Moose/Core/Spawn.lua index ca92bad56..11aaf062d 100644 --- a/Moose Development/Moose/Core/Spawn.lua +++ b/Moose Development/Moose/Core/Spawn.lua @@ -1,8 +1,32 @@ ---- **Core** --Spawn dynamically new GROUPs of UNITs in your missions. +--- **Core** - Spawn dynamically new groups of units in running missions. -- -- === -- --- The documentation of the SPAWN class can be found further in this document. +-- ## Features: +-- +-- * Spawn new groups in running missions. +-- * Schedule spawning of new groups. +-- * Put limits on the amount of groups that can be spawned, and the amount of units that can be alive at the same time. +-- * Randomize the spawning location between different zones. +-- * Randomize the intial positions within the zones. +-- * Spawn in array formation. +-- * Spawn uncontrolled (for planes or helos only). +-- * Clean up inactive helicopters that "crashed". +-- * Place a hook to capture a spawn event, and tailor with customer code. +-- * Spawn late activated. +-- * Spawn with or without an initial delay. +-- * Respawn after landing, on the runway or at the ramp after engine shutdown. +-- * Spawn with custom heading. +-- * Spawn with different skills. +-- * Spawn with different liveries. +-- * Spawn with an inner and outer radius to set the initial position. +-- * Spawn with a randomize route. +-- * Spawn with a randomized template. +-- * Spawn with a randomized start points on a route. +-- * Spawn with an alternative name. +-- * Spawn and keep the unit names. +-- * Spawn with a different coalition and country. +-- * Enquiry methods to check on spawn status. -- -- === -- diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua index 742bf6eac..0081195a5 100644 --- a/Moose Development/Moose/Core/SpawnStatic.lua +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -1,8 +1,14 @@ ---- **Core** -- Spawn dynamically new STATICs in your missions. +--- **Core** - Spawn new statics in your running missions. -- -- === -- --- SPAWNSTATIC spawns static structures in your missions dynamically. See below the SPAWNSTATIC class documentation. +-- ## Features: +-- +-- * Spawn new statics from a static already defined using the mission editor. +-- * Spawn new statics from a given template. +-- * Spawn new statics from a given type. +-- * Spawn with a custom heading and location. +-- * Spawn within a zone. -- -- === -- diff --git a/Moose Development/Moose/Core/Spot.lua b/Moose Development/Moose/Core/Spot.lua index 488816a9d..dbc3ea683 100644 --- a/Moose Development/Moose/Core/Spot.lua +++ b/Moose Development/Moose/Core/Spot.lua @@ -1,4 +1,4 @@ ---- **Core** -- Management of SPOT logistics, that can be transported from and to transportation carriers. +--- **Core** - Management of spotting logistics, that can be activated and deactivated upon command. -- -- === -- diff --git a/Moose Development/Moose/Core/UserFlag.lua b/Moose Development/Moose/Core/UserFlag.lua index 9bfa5a628..f20a26303 100644 --- a/Moose Development/Moose/Core/UserFlag.lua +++ b/Moose Development/Moose/Core/UserFlag.lua @@ -1,8 +1,10 @@ ---- **Core (WIP)** -- Manage user flags. +--- **Core** - Manage user flags to interact with the mission editor trigger system and server side scripts. -- -- === -- --- Management of DCS User Flags. +-- ## Features: +-- +-- * Set or get DCS user flags within running missions. -- -- === -- @@ -22,7 +24,7 @@ do -- UserFlag --- Management of DCS User Flags. -- - -- ## USERFLAG constructor + -- # 1. USERFLAG constructor -- -- * @{#USERFLAG.New}(): Creates a new USERFLAG object. -- diff --git a/Moose Development/Moose/Core/UserSound.lua b/Moose Development/Moose/Core/UserSound.lua index a8a6328d7..a0547a5cf 100644 --- a/Moose Development/Moose/Core/UserSound.lua +++ b/Moose Development/Moose/Core/UserSound.lua @@ -1,7 +1,13 @@ ---- **Core (WIP)** -- Manage user sound. +--- **Core** - Manage user sound. -- -- === -- +-- ## Features: +-- +-- * Play sounds wihtin running missions. +-- +-- === +-- -- Management of DCS User Sound. -- -- === diff --git a/Moose Development/Moose/Core/Velocity.lua b/Moose Development/Moose/Core/Velocity.lua index 7e7a368f3..5f86f6696 100644 --- a/Moose Development/Moose/Core/Velocity.lua +++ b/Moose Development/Moose/Core/Velocity.lua @@ -1,7 +1,15 @@ ---- **Core** -- VELOCITY models a speed, which can be expressed in various formats according the Settings. +--- **Core** - Models a velocity or speed, which can be expressed in various formats according the settings. -- -- === -- +-- ## Features: +-- +-- * Convert velocity in various metric systems. +-- * Set the velocity. +-- * Create a text in a specific format of a velocity. +-- +-- === +-- -- ### Author: **FlightControl** -- ### Contributions: -- diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua index 643477a86..244d5de66 100644 --- a/Moose Development/Moose/Core/Zone.lua +++ b/Moose Development/Moose/Core/Zone.lua @@ -1,7 +1,24 @@ ---- **Core** -- ZONE classes define **zones** within your mission of **various forms**, with **various capabilities**. +--- **Core** - Define zones within your mission of various forms, with various capabilities. -- -- === -- +-- ## Features: +-- +-- * Create radius zones. +-- * Create trigger zones. +-- * Create polygon zones. +-- * Create moving zones around a unit. +-- * Create moving zones around a group. +-- * Provide the zone behaviour. Some zones are static, while others are moveable. +-- * Enquiry if a coordinate is within a zone. +-- * Smoke zones. +-- * Set a zone probability to control zone selection. +-- * Get zone coordinates. +-- * Get zone properties. +-- * Get zone bounding box. +-- * Set/get zone name. +-- +-- -- There are essentially two core functions that zones accomodate: -- -- * Test if an object is within the zone boundaries. From 6625de900551d411ec9c357b37cb4cc71dc4bdc3 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Thu, 11 Oct 2018 17:44:49 +0200 Subject: [PATCH 8/9] Some optimizations for group. --- Moose Development/Moose/Wrapper/Group.lua | 91 +++++++++++++++++++---- 1 file changed, 77 insertions(+), 14 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index e00e79c4d..e6c6648fd 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -2,7 +2,9 @@ -- -- === -- --- The @{#GROUP} class is a wrapper class to handle the DCS Group objects: +-- The @{#GROUP} class is a wrapper class to handle the DCS Group objects. +-- +-- ## Features: -- -- * Support all DCS Group APIs. -- * Enhance with Group specific APIs not in the DCS Group API set. @@ -11,7 +13,16 @@ -- -- **IMPORTANT: ONE SHOULD NEVER SANATIZE these GROUP OBJECT REFERENCES! (make the GROUP object references nil).** -- --- See the detailed documentation on the GROUP class. +-- === +-- +-- For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _@{DATABASE} object. +-- This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the @{SPAWN} class). +-- +-- The GROUP class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference +-- using the DCS Group or the DCS GroupName. +-- +-- The GROUP methods will reference the DCS Group object by name when it is needed during API execution. +-- If the DCS Group object does not exist or is nil, the GROUP methods will return nil and may log an exception in the DCS.log file. -- -- === -- @@ -34,24 +45,76 @@ --- Wrapper class of the DCS world Group object. -- --- For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _@{DATABASE} object. --- This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the @{SPAWN} class). --- --- The GROUP class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference --- using the DCS Group or the DCS GroupName. --- --- Another thing to know is that GROUP objects do not "contain" the DCS Group object. --- The GROUP methods will reference the DCS Group object by name when it is needed during API execution. --- If the DCS Group object does not exist or is nil, the GROUP methods will return nil and log an exception in the DCS.log file. --- -- The GROUP class provides the following functions to retrieve quickly the relevant GROUP instance: -- -- * @{#GROUP.Find}(): Find a GROUP instance from the _DATABASE object using a DCS Group object. -- * @{#GROUP.FindByName}(): Find a GROUP instance from the _DATABASE object using a DCS Group name. -- --- ## GROUP task methods +-- # 1. Tasking of groups -- --- A GROUP is a @{Wrapper.Controllable}. See the @{Wrapper.Controllable} task methods section for a description of the task methods. +-- A GROUP is derived from the wrapper class CONTROLLABLE (@{Wrapper.Controllable#CONTROLLABLE}). +-- See the @{Wrapper.Controllable} task methods section for a description of the task methods. +-- +-- But here is an example how a group can be assigned a task. +-- +-- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. +-- +-- First we look up the objects. We create a GROUP object `HeliGroup`, using the @{#GROUP:FindByName}() method, looking up the `"Helicopter"` group object. +-- Same for the `"AttackGroup"`. +-- +-- local HeliGroup = GROUP:FindByName( "Helicopter" ) +-- local AttackGroup = GROUP:FindByName( "AttackGroup" ) +-- +-- Now we retrieve the @{Wrapper.Unit#UNIT} objects of the `AttackGroup` object, using the method `:GetUnits()`. +-- +-- local AttackUnits = AttackGroup:GetUnits() +-- +-- Tasks are actually text strings that we build using methods of GROUP. +-- So first, we declare an list of `Tasks`. +-- +-- local Tasks = {} +-- +-- Now we loop over the `AttackUnits` using a for loop. +-- We retrieve the `AttackUnit` using the `AttackGroup:GetUnit()` method. +-- Each `AttackUnit` found, will be attacked by `HeliGroup`, using the method `HeliGroup:TaskAttackUnit()`. +-- This method returns a string containing a command line to execute the task to the `HeliGroup`. +-- The code will assign the task string command to the next element in the `Task` list, using `Tasks[#Tasks+1]`. +-- This little code will take the count of `Task` using `#` operator, and will add `1` to the count. +-- This result will be the index of the `Task` element. +-- +-- for i = 1, #AttackUnits do +-- local AttackUnit = AttackGroup:GetUnit( i ) +-- Tasks[#Tasks+1] = HeliGroup:TaskAttackUnit( AttackUnit ) +-- end +-- +-- Once these tasks have been executed, a function `_Resume` will be called ... +-- +-- Tasks[#Tasks+1] = HeliGroup:TaskFunction( "_Resume", { "''" } ) +-- +-- --- @param Wrapper.Group#GROUP HeliGroup +-- function _Resume( HeliGroup ) +-- env.info( '_Resume' ) +-- +-- HeliGroup:MessageToAll( "Resuming",10,"Info") +-- end +-- +-- Now here is where the task gets assigned! +-- Using `HeliGroup:PushTask`, the task is pushed onto the task queue of the group `HeliGroup`. +-- Since `Tasks` is an array of tasks, we use the `HeliGroup:TaskCombo` method to execute the tasks. +-- The `HeliGroup:PushTask` method can receive a delay parameter in seconds. +-- In the example, `30` is given as a delay. +-- +-- +-- HeliGroup:PushTask( +-- HeliGroup:TaskCombo( +-- Tasks +-- ), 30 +-- ) +-- +-- That's it! +-- But again, please refer to the @{Wrapper.Controllable} task methods section for a description of the different task methods that are available. +-- +-- -- -- ### Obtain the mission from group templates -- From 08c593578f539acaf1facab640a499d98f5a6ccc Mon Sep 17 00:00:00 2001 From: FlightControl Date: Thu, 11 Oct 2018 19:17:33 +0200 Subject: [PATCH 9/9] Fixing issues with cargo loading for helos and apcs when the near range was too small... --- Moose Development/Moose/Cargo/Cargo.lua | 2 +- Moose Development/Moose/Cargo/CargoUnit.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Cargo/Cargo.lua b/Moose Development/Moose/Cargo/Cargo.lua index e393b9e9d..6a06e52f6 100644 --- a/Moose Development/Moose/Cargo/Cargo.lua +++ b/Moose Development/Moose/Cargo/Cargo.lua @@ -872,7 +872,7 @@ do -- CARGO --self:F( { CargoObjectVec2 = self.CargoObject:GetVec2() } ) --self:F( { PointVec2 = PointVec2:GetVec2() } ) local Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() ) - --self:F( Distance ) + --self:F( { Distance = Distance, NearRadius = NearRadius or "nil" } ) if Distance <= NearRadius then --self:F( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = true } ) diff --git a/Moose Development/Moose/Cargo/CargoUnit.lua b/Moose Development/Moose/Cargo/CargoUnit.lua index 6ca4edbff..ffd4742f9 100644 --- a/Moose Development/Moose/Cargo/CargoUnit.lua +++ b/Moose Development/Moose/Cargo/CargoUnit.lua @@ -248,7 +248,7 @@ do -- CARGO_UNIT local Speed = 90 local Angle = 180 - local Distance = 5 + local Distance = 0 local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2() local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees. @@ -297,14 +297,14 @@ do -- CARGO_UNIT self:__Boarding( -1, CargoCarrier, NearRadius, ... ) self.RunCount = self.RunCount + 1 else - self:__Boarding( -5, CargoCarrier, NearRadius, ... ) - self.RunCount = self.RunCount + 5 + self:__Boarding( -2, CargoCarrier, NearRadius, ... ) + self.RunCount = self.RunCount + 2 end if self.RunCount >= 40 then self.RunCount = 0 local Speed = 90 local Angle = 180 - local Distance = 5 + local Distance = 0 local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2() local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees.