From 940f872b40d909e1053823a3dc241472d3591cf5 Mon Sep 17 00:00:00 2001 From: FlightControl_Master Date: Wed, 26 Jul 2017 10:06:42 +0200 Subject: [PATCH] Documentation improvements. --- .../Moose/AI/AI_A2A_Dispatcher.lua | 105 ++++++++++++++- docs/Documentation/AI_A2A_Dispatcher.html | 121 ++++++++++++++++-- docs/Documentation/AI_Patrol.html | 3 + docs/Documentation/Account.html | 20 --- docs/Documentation/Cargo.html | 1 + docs/Documentation/Designate.html | 29 ++++- docs/Documentation/Detection.html | 6 +- docs/Documentation/Fsm.html | 3 +- docs/Documentation/Menu.html | 94 ++++++++++++-- docs/Documentation/Mission.html | 19 +++ docs/Documentation/Point.html | 1 + docs/Documentation/Spawn.html | 7 +- docs/Documentation/Task.html | 44 ++++++- docs/Documentation/Task_A2G.html | 85 ++++++++++++ docs/Documentation/Task_A2G_Dispatcher.html | 30 ++++- docs/Documentation/Task_Cargo.html | 2 +- 16 files changed, 505 insertions(+), 65 deletions(-) diff --git a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua index ad5834458..597cbba79 100644 --- a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua @@ -567,13 +567,26 @@ do -- AI_A2A_DISPATCHER } --- AI_A2A_DISPATCHER constructor. + -- This is defining the A2A DISPATCHER for one coaliton. + -- The Dispatcher works with a @{Functional#Detection} object that is taking of the detection of targets using the EWR units. + -- The Detection object is polymorphic, depending on the type of detection object choosen, the detection will work differently. -- @param #AI_A2A_DISPATCHER self -- @param Functional.Detection#DETECTION_BASE Detection The DETECTION object that will detects targets using the the Early Warning Radar network. -- @return #AI_A2A_DISPATCHER self -- @usage -- - -- -- Set a new AI A2A Dispatcher object, based on an EWR network with a 6 km grouping radius. + -- -- Setup the Detection, using DETECTION_AREAS. + -- -- First define the SET of GROUPs that are defining the EWR network. + -- -- Here with prefixes DF CCCP AWACS, DF CCCP EWR. + -- DetectionSetGroup = SET_GROUP:New() + -- DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) + -- DetectionSetGroup:FilterStart() -- + -- -- Define the DETECTION_AREAS, using the DetectionSetGroup, with a 30km grouping radius. + -- Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + -- + -- -- Now Setup the A2A dispatcher, and initialize it using the Detection object. + -- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) -- -- function AI_A2A_DISPATCHER:New( Detection ) @@ -795,11 +808,14 @@ do -- AI_A2A_DISPATCHER -- @return #AI_A2A_DISPATCHER -- @usage -- + -- -- Now Setup the A2A dispatcher, and initialize it using the Detection object. + -- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) -- + -- -- -- Set 100km as the radius to ground control intercept detected targets from the nearest airbase. - -- Dispatcher:SetGciRadius( 100000 ) + -- A2ADispatcher:SetGciRadius( 100000 ) -- -- -- Set 200km as the radius to ground control intercept. - -- Dispatcher:SetGciRadius() -- 200000 is the default value. + -- A2ADispatcher:SetGciRadius() -- 200000 is the default value. -- function AI_A2A_DISPATCHER:SetGciRadius( GciRadius ) @@ -820,16 +836,19 @@ do -- AI_A2A_DISPATCHER -- @return #AI_A2A_DISPATCHER -- @usage -- + -- -- Now Setup the A2A dispatcher, and initialize it using the Detection object. + -- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + -- -- -- Set one ZONE_POLYGON object as the border for the A2A dispatcher. -- local BorderZone = ZONE_POLYGON( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -- The GROUP object is a late activate helicopter unit. - -- Dispatcher:SetBorderZone( BorderZone ) + -- A2ADispatcher:SetBorderZone( BorderZone ) -- - -- or + -- or -- -- -- Set two ZONE_POLYGON objects as the border for the A2A dispatcher. -- local BorderZone1 = ZONE_POLYGON( "CCCP Border1", GROUP:FindByName( "CCCP Border1" ) ) -- The GROUP object is a late activate helicopter unit. -- local BorderZone2 = ZONE_POLYGON( "CCCP Border2", GROUP:FindByName( "CCCP Border2" ) ) -- The GROUP object is a late activate helicopter unit. - -- Dispatcher:SetBorderZone( { BorderZone1, BorderZone2 } ) + -- A2ADispatcher:SetBorderZone( { BorderZone1, BorderZone2 } ) -- -- function AI_A2A_DISPATCHER:SetBorderZone( BorderZone ) @@ -849,6 +868,14 @@ do -- AI_A2A_DISPATCHER -- @param #AI_A2A_DISPATCHER self -- @param #boolean TacticalDisplay Provide a value of **true** to display every 30 seconds a tactical overview. -- @return #AI_A2A_DISPATCHER + -- @usage + -- + -- -- Now Setup the A2A dispatcher, and initialize it using the Detection object. + -- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + -- + -- -- Now Setup the Tactical Display for debug mode. + -- A2ADispatcher:SetTacticalDisplay( true ) + -- function AI_A2A_DISPATCHER:SetTacticalDisplay( TacticalDisplay ) self.TacticalDisplay = TacticalDisplay @@ -967,8 +994,72 @@ do -- AI_A2A_DISPATCHER end - --- + --- This is the main method to define Squadrons programmatically. + -- Squadrons: + -- + -- * Have a **name or key** that is the identifier or key of the squadron. + -- * Have **specific plane types** defined by **templates**. + -- * Are **located at one specific airbase**. Multiple squadrons can be located at one airbase through. + -- * Have a limited set of **resources**. + -- + -- The name of the squadron given acts as the **squadron key** in the AI\_A2A\_DISPATCHER:Squadron...() methods. + -- + -- Additionally, squadrons have specific configuration options to: + -- + -- * Control how new aircraft are **taking off** from the airfield (in the air, cold, hot, at the runway). + -- * Control how returning aircraft are **landing** at the airfield (in the air near the airbase, after landing, after engine shutdown). + -- * Control the **grouping** of new aircraft spawned at the airfield. If there is more than one aircraft to be spawned, these may be grouped. + -- * Control the **overhead** or defensive strength of the squadron. Depending on the types of planes and amount of resources, the mission designer can choose to increase or reduce the amount of planes spawned. + -- + -- For performance and bug workaround reasons within DCS, squadrons have different methods to spawn new aircraft or land returning or damaged aircraft. + -- -- @param #AI_A2A_DISPATCHER self + -- + -- @param #string SquadronName A string (text) that defines the squadron identifier or the key of the Squadron. + -- It can be any name, for example `"104th Squadron"` or `"SQ SQUADRON1"`, whatever. + -- As long as you remember that this name becomes the identifier of your squadron you have defined. + -- You need to use this name in other methods too! + -- + -- @param #string AirbaseName The airbase name where you want to have the squadron located. + -- You need to specify here EXACTLY the name of the airbase as you see it in the mission editor. + -- Examples are `"Batumi"` or `"Tbilisi-Lochini"`. + -- EXACTLY the airbase name, between quotes `""`. + -- To ease the airbase naming when using the LDT editor and IntelliSense, the @{Airbase#AIRBASE} class contains enumerations of the airbases of each map. + -- * Caucasus: @{Airbase#AIRBASE.Caucaus} + -- * Nevada or NTTR: @{Airbase#AIRBASE.Nevada} + -- * Normandy: @{Airbase#AIRBASE.Normandy} + -- + -- @param #string SpawnTemplates A string or an array of strings specifying the **prefix names of the templates** (not going to explain what is templates here again). + -- Examples are `{ "104th", "105th" }` or `"104th"` or `"Template 1"` or `"BLUE PLANES"`. + -- Just remember that your template (groups late activated) need to start with the prefix you have specified in your code. + -- If you have only one prefix name for a squadron, you don't need to use the `{ }`, otherwise you need to use the brackets. + -- + -- @param #number Resources A number that specifies how many resources are in stock of the squadron. It is still a bit buggy, this part. Just make this a large number for the moment. This will be fine tuned later. + -- + -- @usage + -- + -- -- Now Setup the A2A dispatcher, and initialize it using the Detection object. + -- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + -- + -- @usage + -- + -- -- This will create squadron "Squadron1" at "Batumi" airbase, and will use plane types "SQ1" and has 40 planes in stock... + -- A2ADispatcher:SetSquadron( "Squadron1", "Batumi", "SQ1", 40 ) + -- + -- @usage + -- + -- -- This will create squadron "Sq 1" at "Batumi" airbase, and will use plane types "Mig-29" and "Su-27" and has 20 planes in stock... + -- -- Note that in this implementation, the A2A dispatcher will select a random plane when a new plane (group) needs to be spawned for defenses. + -- -- Note the usage of the {} for the airplane templates list. + -- A2ADispatcher:SetSquadron( "Sq 1", "Batumi", { "Mig-29", "Su-27" }, 40 ) + -- + -- @usage + -- + -- -- This will create 2 squadrons "104th" and "23th" at "Batumi" airbase, and will use plane types "Mig-29" and "Su-27" respectively and each squadron has 10 planes in stock... + -- -- Note that in this implementation, the A2A dispatcher will select a random plane when a new plane (group) needs to be spawned for defenses. + -- A2ADispatcher:SetSquadron( "104th", "Batumi", "Mig-29", 40 ) + -- A2ADispatcher:SetSquadron( "23th", "Batumi", "Su-27", 40 ) + -- -- @return #AI_A2A_DISPATCHER function AI_A2A_DISPATCHER:SetSquadron( SquadronName, AirbaseName, SpawnTemplates, Resources ) diff --git a/docs/Documentation/AI_A2A_Dispatcher.html b/docs/Documentation/AI_A2A_Dispatcher.html index 6abf8452d..818cc2c98 100644 --- a/docs/Documentation/AI_A2A_Dispatcher.html +++ b/docs/Documentation/AI_A2A_Dispatcher.html @@ -461,7 +461,7 @@ AI_A2A_DISPATCHER:SetSquadron(SquadronName, AirbaseName, SpawnTemplates, Resources) - +

This is the main method to define Squadrons programmatically.

@@ -2241,6 +2241,11 @@ Takeoff From the airbase hot, from the airbase cold, in the air, from the runway

AIA2ADISPATCHER constructor.

+ +

This is defining the A2A DISPATCHER for one coaliton. +The Dispatcher works with a Functional#Detection object that is taking of the detection of targets using the EWR units. +The Detection object is polymorphic, depending on the type of detection object choosen, the detection will work differently.

+

Parameter

+ + +
+
+ + +DESIGNATE.MenuDesignate + +
+
+ + +
@@ -1131,7 +1150,7 @@ function below will use the range 1-7 just in case

-DESIGNATE:New(CC, Detection, AttackSet) +DESIGNATE:New(CC, Detection, AttackSet, Mission)
@@ -1158,6 +1177,12 @@ function below will use the range 1-7 just in case

Core.Set#SET_GROUP AttackSet : The Attack collection of GROUP objects to designate and report for.

+ +
  • + +

    Tasking.Mission#MISSION Mission : +(Optional) The Mission where the menu needs to be attached.

    +
  • Return value

    diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index b79fd2b86..1fd6665f8 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -956,7 +956,7 @@ The different values of Unit.Category can be:

    - DETECTION_BASE.DetectedItem.ItemID + DETECTION_BASE.DetectedItem.ID

    -- The identifier of the detected area.

    @@ -4518,8 +4518,8 @@ The To State string.

    #number - -DETECTION_BASE.DetectedItem.ItemID + +DETECTION_BASE.DetectedItem.ID
    diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html index e0276d335..177f34281 100644 --- a/docs/Documentation/Fsm.html +++ b/docs/Documentation/Fsm.html @@ -1598,7 +1598,7 @@ A string defining the start state.

    - + #string FSM._StartState @@ -1897,7 +1897,6 @@ A string defining the start state.

    - FSM.current diff --git a/docs/Documentation/Menu.html b/docs/Documentation/Menu.html index cda35ef3a..2946591be 100644 --- a/docs/Documentation/Menu.html +++ b/docs/Documentation/Menu.html @@ -241,6 +241,12 @@ classes are derived from, in order to set commands.

    MENU_BASE.MenuRemoveParent + + + + MENU_BASE.MenuTag + + @@ -259,6 +265,12 @@ classes are derived from, in order to set commands.

    MENU_BASE:SetRemoveParent(RemoveParent)

    Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.

    + + + + MENU_BASE:SetTag(MenuTag) + +

    Sets a tag for later selection of menu refresh.

    @@ -406,13 +418,13 @@ classes are derived from, in order to set commands.

    - MENU_GROUP:Remove(MenuTime) + MENU_GROUP:Remove(MenuTime, MenuTag)

    Removes the main menu and sub menus recursively of this MENU_GROUP.

    - MENU_GROUP:RemoveSubMenus(MenuTime) + MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag, Menutag)

    Removes the sub menus recursively of this MENU_GROUP.

    @@ -464,7 +476,7 @@ classes are derived from, in order to set commands.

    - MENU_GROUP_COMMAND:Remove(MenuTime) + MENU_GROUP_COMMAND:Remove(MenuTime, MenuTag)

    Removes a menu structure for a group.

    @@ -896,6 +908,20 @@ The text of the child menu.

    +
    +
    +
    +
    + + + +MENU_BASE.MenuTag + +
    +
    + + +
    @@ -979,6 +1005,33 @@ If true, the parent menu is automatically removed when this menu is the last chi

    #MENU_BASE:

    + +
    +
    +
    + + +MENU_BASE:SetTag(MenuTag) + +
    +
    + +

    Sets a tag for later selection of menu refresh.

    + +

    Parameter

    +
      +
    • + +

      #string MenuTag : +A Tag or Key that will filter only menu items set with this key.

      + +
    • +
    +

    Return value

    + +

    #MENU_BASE:

    + +
    @@ -1534,19 +1587,25 @@ self

    -MENU_GROUP:Remove(MenuTime) +MENU_GROUP:Remove(MenuTime, MenuTag)

    Removes the main menu and sub menus recursively of this MENU_GROUP.

    -

    Parameter

    +

    Parameters

    • MenuTime :

      +
    • +
    • + +

      MenuTag : +A Tag or Key to filter the menus to be refreshed with the Tag set.

      +

    Return value

    @@ -1560,19 +1619,30 @@ self

    -MENU_GROUP:RemoveSubMenus(MenuTime) +MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag, Menutag)

    Removes the sub menus recursively of this MENU_GROUP.

    -

    Parameter

    +

    Parameters

    • MenuTime :

      +
    • +
    • + +

      MenuTag : +A Tag or Key to filter the menus to be refreshed with the Tag set.

      + +
    • +
    • + +

      Menutag :

      +

    Return value

    @@ -1729,19 +1799,25 @@ An argument for the function.

    -MENU_GROUP_COMMAND:Remove(MenuTime) +MENU_GROUP_COMMAND:Remove(MenuTime, MenuTag)

    Removes a menu structure for a group.

    -

    Parameter

    +

    Parameters

    • MenuTime :

      +
    • +
    • + +

      MenuTag : +A Tag or Key to filter the menus to be refreshed with the Tag set.

      +

    Return value

    diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html index 2b7b44682..c0f6adf18 100644 --- a/docs/Documentation/Mission.html +++ b/docs/Documentation/Mission.html @@ -349,6 +349,12 @@ MISSION:MissionGoals()

    MissionGoals Trigger for MISSION

    + + + + MISSION.MissionGroupMenu + + @@ -1460,6 +1466,19 @@ The status

    MissionGoals Trigger for MISSION

    +
    +
    +
    +
    + + +MISSION.MissionGroupMenu + +
    +
    + + +
    diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index 864921e2a..f561df108 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -2829,6 +2829,7 @@ The y coordinate.

    + POINT_VEC2.z diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index 6c440cb38..0f27003d1 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -2746,6 +2746,9 @@ when nothing was spawned.

    + +

    By default, no InitLimit

    +
    @@ -2781,7 +2784,7 @@ when nothing was spawned.

    - + #number SPAWN.SpawnMaxGroups @@ -2798,7 +2801,7 @@ when nothing was spawned.

    - + #number SPAWN.SpawnMaxUnitsAlive diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html index ce9c5ff8f..c3cef5272 100644 --- a/docs/Documentation/Task.html +++ b/docs/Documentation/Task.html @@ -396,7 +396,19 @@ - TASK.MenuAssignToGroup(MenuParam) + TASK:MenuAssignToGroup(TaskGroup) + + + + + + TASK.MenuAssigned + + + + + + TASK.MenuPlanned @@ -1795,7 +1807,7 @@ true if Unit is part of the Task.

    -TASK.MenuAssignToGroup(MenuParam) +TASK:MenuAssignToGroup(TaskGroup)
    @@ -1806,10 +1818,36 @@ true if Unit is part of the Task.

    +
    +
    +
    +
    + + +TASK.MenuAssigned + +
    +
    + + + +
    +
    +
    +
    + + +TASK.MenuPlanned + +
    +
    + + +
    diff --git a/docs/Documentation/Task_A2G.html b/docs/Documentation/Task_A2G.html index c1a63b897..841460bca 100644 --- a/docs/Documentation/Task_A2G.html +++ b/docs/Documentation/Task_A2G.html @@ -222,6 +222,12 @@ based on the tasking capabilities defined in Task#TA TASK_A2G:SetTargetCoordinate(TargetCoordinate, TaskUnit) + + + + TASK_A2G:SetTargetSetUnit(TargetSetUnit) + + @@ -274,6 +280,12 @@ based on the tasking capabilities defined in Task#TA TASK_A2G_BAI.TargetSetUnit + + + + TASK_A2G_BAI:UpdateTaskInfo() + + @@ -320,6 +332,12 @@ based on the tasking capabilities defined in Task#TA TASK_A2G_CAS.TargetSetUnit + + + + TASK_A2G_CAS:UpdateTaskInfo() + + @@ -366,6 +384,12 @@ based on the tasking capabilities defined in Task#TA TASK_A2G_SEAD.TargetSetUnit + + + + TASK_A2G_SEAD:UpdateTaskInfo() + + @@ -809,6 +833,28 @@ The Coordinate object where the Target is located on the map.

    + +TASK_A2G:SetTargetSetUnit(TargetSetUnit) + +
    +
    + + + +

    Parameter

    + +
    +
    +
    +
    + TASK_A2G:SetTargetZone(TargetZone, TaskUnit) @@ -1049,6 +1095,19 @@ The score in points.

    + +
    +
    +
    + + +TASK_A2G_BAI:UpdateTaskInfo() + +
    +
    + + +
    @@ -1289,6 +1348,19 @@ The score in points.

    + +
    +
    +
    + + +TASK_A2G_CAS:UpdateTaskInfo() + +
    +
    + + +
    @@ -1529,6 +1601,19 @@ The score in points.

    + +
    +
    +
    + + +TASK_A2G_SEAD:UpdateTaskInfo() + +
    +
    + + +
    diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html index 62948a354..dca001ffa 100644 --- a/docs/Documentation/Task_A2G_Dispatcher.html +++ b/docs/Documentation/Task_A2G_Dispatcher.html @@ -272,11 +272,21 @@ Find a summary below describing for which situation a task type is created:

    -

    Return value

    +

    Return values

    +
      +
    1. -

      Tasking.Task#TASK:

      +

      Core.Set#SET_UNIT: +TargetSetUnit: The target set of units.

      +
    2. +
    3. + +

      #nil: +If there are no targets to be set.

      +
    4. +
    @@ -298,11 +308,21 @@ Find a summary below describing for which situation a task type is created:

    -

    Return value

    +

    Return values

    +
      +
    1. -

      Tasking.Task#TASK:

      +

      Core.Set#SET_UNIT: +TargetSetUnit: The target set of units.

      +
    2. +
    3. + +

      #nil: +If there are no targets to be set.

      +
    4. +
    @@ -382,7 +402,7 @@ Find a summary below describing for which situation a task type is created:

    1. -

      Set#SET_UNIT: +

      Core.Set#SET_UNIT: TargetSetUnit: The target set of units.

    2. diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html index 5ccba6643..bb3b9bca1 100644 --- a/docs/Documentation/Task_Cargo.html +++ b/docs/Documentation/Task_Cargo.html @@ -631,7 +631,7 @@ based on the tasking capabilities defined in Task#TA
      - + #number TASK_CARGO.CargoLimit