From b5db08eec3665218dcfff43ef45eb4e24aa0380f Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Mon, 28 Mar 2022 10:13:02 +0200 Subject: [PATCH 1/5] AIRBASE - Add'l AB for the Channels map --- Moose Development/Moose/Wrapper/Airbase.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index 59ffbad8d..c82697530 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -316,6 +316,9 @@ AIRBASE.PersianGulf = { -- * AIRBASE.TheChannel.Lympne -- * AIRBASE.TheChannel.Detling -- * AIRBASE.TheChannel.High_Halden +-- * AIRBASE.TheChannel.Biggin_Hill +-- * AIRBASE.TheChannel.Eastchurch +-- * AIRBASE.TheChannel.Headcorn -- -- @field TheChannel AIRBASE.TheChannel = { @@ -328,6 +331,9 @@ AIRBASE.TheChannel = { ["Lympne"] = "Lympne", ["Detling"] = "Detling", ["High_Halden"] = "High Halden", + ["Biggin_Hill"] = "Biggin Hill", + ["Eastchurch"] = "Eastchurch", + ["Headcorn"] = "Headcorn", } --- Airbases of the Syria map: From 0d15cdd370e73d2bb3c3e56bc3680f44637724a9 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Tue, 29 Mar 2022 08:52:21 +0200 Subject: [PATCH 2/5] CTLD - corrected error in setting Hercules min and max drop height, added documentation --- Moose Development/Moose/Ops/CTLD.lua | 33 ++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index 4ae5f4720..f3514cd7d 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -870,8 +870,12 @@ do -- -- ## 5. Support for Hercules mod by Anubis -- --- Basic support for the Hercules mod By Anubis has been build into CTLD. Currently this does **not** cover objects and troops which can --- be loaded from the Rearm/Refuel menu, i.e. you can drop them into the field, but you cannot use them in functions scripted with this class. +-- Basic support for the Hercules mod By Anubis has been build into CTLD - that is you can load/drop/build the same objects as the helicopters. +-- To also cover objects and troops which can be loaded from the groud crew Rearm/Refuel menu, you need to use @{#CTLD_HERCULES.New}() and link +-- this object to your CTLD setup. In this case, do **not** use the `Hercules_Cargo.lua` or `Hercules_Cargo_CTLD.lua` which are part of the mod +-- in your mission! +-- +-- ### 5.1 Create an own CTLD instance and allow the usage of the Hercules mod: -- -- local my_ctld = CTLD:New(coalition.side.BLUE,{"Helicargo", "Hercules"},"Lufttransportbrigade I") -- @@ -882,10 +886,31 @@ do -- my_ctld.HercMaxAngels = 2000 -- for troop/cargo drop via chute in meters, ca 6000 ft -- my_ctld.HercMaxSpeed = 77 -- 77mps or 270kph or 150kn -- +-- Hint: you can **only** airdrop from the Hercules if you are "in parameters", i.e. at or below `HercMaxSpeed` and in the AGL bracket between +-- `HercMinAngels` and `HercMaxAngels`! +-- -- Also, the following options need to be set to `true`: -- -- my_ctld.useprefix = true -- this is true by default and MUST BE ON. -- +-- ### 5.2 Integrate Hercules ground crew loadable objects +-- +-- Add ground crew loadable objects to your CTLD instance like so, where `my_ctld` is the previously created CTLD instance: +-- +-- local herccargo = CTLD_HERCULES:New("blue", "Hercules Test", my_ctld) +-- +-- You also need: +-- * A template called "Infantry" for 10 Paratroopers (as set via herccargo.infantrytemplate). +-- * Depending on what you are loading with the help of the ground crew, there are 42 more templates for the various vehicles that are loadable. +-- There's a **quick check output in the `dcs.log`** which tells you what's there and what not. +-- E.g.: +-- ...Checking template for APC BTR-82A Air [24998lb] (BTR-82A) ... MISSING) +-- ...Checking template for ART 2S9 NONA Skid [19030lb] (SAU 2-C9) ... MISSING) +-- ...Checking template for EWR SBORKA Air [21624lb] (Dog Ear radar) ... MISSING) +-- ...Checking template for Transport Tigr Air [15900lb] (Tigr_233036) ... OK) +-- +-- Expected template names are the ones in the rounded brackets. +-- -- Standard transport capabilities as per the real Hercules are: -- -- ["Hercules"] = {type="Hercules", crates=true, troops=true, cratelimit = 7, trooplimit = 64}, -- 19t cargo, 64 paratroopers @@ -3787,8 +3812,8 @@ end local ucoord = Unit:GetCoordinate() local gheight = ucoord:GetLandHeight() local aheight = uheight - gheight -- height above ground - local maxh = self.HercMinAngels-- 1500m - local minh = self.HercMaxAngels -- 5000m + local minh = self.HercMinAngels-- 1500m + local maxh = self.HercMaxAngels -- 5000m local maxspeed = self.HercMaxSpeed -- 77 mps -- DONE: TEST - Speed test for Herc, should not be above 280kph/150kn local kmspeed = uspeed * 3.6 From e11381729319b77d7118194406b347f5f83cf8d2 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Tue, 29 Mar 2022 12:02:35 +0200 Subject: [PATCH 3/5] CTLD - docu nicefy --- Moose Development/Moose/Ops/CTLD.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index f3514cd7d..de3225630 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -899,9 +899,11 @@ do -- -- local herccargo = CTLD_HERCULES:New("blue", "Hercules Test", my_ctld) -- --- You also need: +-- You also need: +-- -- * A template called "Infantry" for 10 Paratroopers (as set via herccargo.infantrytemplate). -- * Depending on what you are loading with the help of the ground crew, there are 42 more templates for the various vehicles that are loadable. +-- -- There's a **quick check output in the `dcs.log`** which tells you what's there and what not. -- E.g.: -- ...Checking template for APC BTR-82A Air [24998lb] (BTR-82A) ... MISSING) From f8a577749a35d8fd409ebe71638407de8b42672a Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Tue, 29 Mar 2022 12:03:45 +0200 Subject: [PATCH 4/5] OPS - Some changes to ARMORATTACK to update route if target is moving --- Moose Development/Moose/Ops/Auftrag.lua | 14 +++++++++++--- Moose Development/Moose/Ops/OpsGroup.lua | 6 +++++- Moose Development/Moose/Ops/Target.lua | 6 +++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index 9d4ee753f..eaab8d480 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -269,6 +269,10 @@ -- -- A troop transport mission can be created with the @{#AUFTRAG.NewTROOPTRANSPORT}() function. -- +-- ## HOVER +-- +-- A mission for a helicoptre or VSTOL plane to Hover at a point for a certain amount of time can be created with the @{#AUFTRAG.NewHOVER}() function. +-- -- # Ground Missions -- -- ## ARTY @@ -281,7 +285,7 @@ -- -- # Options and Parameters -- --- +-- TODO -- -- # Assigning Missions -- @@ -385,6 +389,7 @@ _AUFTRAGSNR=0 -- @field #string BARRAGE Barrage. -- @field #string ARMORATTACK Armor attack. -- @field #string CASENHANCED Enhanced CAS. +-- @field #string HOVER Hover at a point. AUFTRAG.Type={ ANTISHIP="Anti Ship", AWACS="AWACS", @@ -431,6 +436,7 @@ AUFTRAG.Type={ -- @field #string ONGUARD On guard. -- @field #string ARMOREDGUARD On guard with armor. -- @field #string BARRAGE Barrage. +-- @field #string HOVER Hover. AUFTRAG.SpecialTask={ PATROLZONE="PatrolZone", RECON="ReconMission", @@ -1765,7 +1771,7 @@ end --- **[GROUND]** Create a ARMORATTACK mission. Armoured ground group(s) will go to the zone and attack. -- @param #AUFTRAG self --- @param Wrapper.Positionable#POSITIONABLE Target The target to attack. Can be a GROUP, UNIT or STATIC object. +-- @param Ops.Target#TARGET Target The target to attack. Can be a GROUP, UNIT or STATIC object. -- @param #number Speed Speed in knots. -- @param #string Formation The attack formation, e.g. "Wedge", "Vee" etc. -- @return #AUFTRAG self @@ -1779,7 +1785,7 @@ function AUFTRAG:NewARMORATTACK(Target, Speed, Formation) mission.optionROE=ENUMS.ROE.OpenFire mission.optionAlarm=ENUMS.AlarmState.Auto - mission.optionFormation="Off Road" + mission.optionFormation="On Road" mission.optionAttackFormation=Formation or "Wedge" mission.missionFraction=1.0 @@ -5091,6 +5097,8 @@ function AUFTRAG:GetDCSMissionTask(TaskControllable) -- We create a "fake" DCS task and pass the parameters to the ARMYGROUP. local param={} param.zone=self:GetObjective() + param.tVec2=param.zone:GetVec2() + param.tzone=ZONE_RADIUS:New("ARMORATTACK-Zone-"..self.auftragsnummer,param.tVec2,1000) param.action="Wedge" param.speed=self.missionSpeed diff --git a/Moose Development/Moose/Ops/OpsGroup.lua b/Moose Development/Moose/Ops/OpsGroup.lua index 82183252c..5f21422da 100644 --- a/Moose Development/Moose/Ops/OpsGroup.lua +++ b/Moose Development/Moose/Ops/OpsGroup.lua @@ -4642,11 +4642,15 @@ function OPSGROUP:RouteToMission(mission, delay) local armorwaypointcoord = nil if mission.type==AUFTRAG.Type.ARMORATTACK then local target=mission.engageTarget:GetObject() -- Wrapper.Positionable#POSITIONABLE - local zone = ZONE_RADIUS:New("AttackZone",target:GetVec2(),1000) + --BASE:I({mission.DCStask}) + --BASE:I({mission.DCStask.params}) + --local zone = ZONE_RADIUS:New("AttackZone",target:GetVec2(),1000) + local zone = mission.DCStask.params.tzone -- Core.Zone#ZONE_RADIUS -- final WP waypointcoord=zone:GetRandomCoordinate(0, 100, surfacetypes) -- Core.Point#COORDINATE -- Ingress - add formation to this one armorwaypointcoord = zone:GetRandomCoordinate(1000, 500, surfacetypes) -- Core.Point#COORDINATE + self:__EngageTarget(2,target) end -- Add enroute tasks. diff --git a/Moose Development/Moose/Ops/Target.lua b/Moose Development/Moose/Ops/Target.lua index 1ecece092..a71b5fed8 100644 --- a/Moose Development/Moose/Ops/Target.lua +++ b/Moose Development/Moose/Ops/Target.lua @@ -990,8 +990,12 @@ function TARGET:GetTargetVec3(Target) if object and object:IsAlive() then local vec3=object:GetVec3() - return vec3 + if vec3 then + return vec3 + else + return nil + end else return nil From ad37e5ca2714804561808abb58defbee3930d0d8 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Wed, 30 Mar 2022 12:05:04 +0200 Subject: [PATCH 5/5] AIRBASE, added ["Deir_ez-Zor"] = "Deir ez-Zor", --- Moose Development/Moose/Wrapper/Airbase.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index c82697530..84ee9cf83 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -352,7 +352,6 @@ AIRBASE.TheChannel = { -- * AIRBASE.Syria.Wujah_Al_Hajar -- * AIRBASE.Syria.Al_Dumayr -- * AIRBASE.Syria.Gazipasa --- * AIRBASE.Syria.Ru_Convoy_4 -- * AIRBASE.Syria.Hatay -- * AIRBASE.Syria.Nicosia -- * AIRBASE.Syria.Pinarbashi @@ -370,7 +369,6 @@ AIRBASE.TheChannel = { -- * AIRBASE.Syria.Akrotiri -- * AIRBASE.Syria.Naqoura -- * AIRBASE.Syria.Gaziantep --- * AIRBASE.Syria.CVN_71 -- * AIRBASE.Syria.Sayqal -- * AIRBASE.Syria.Tiyas -- * AIRBASE.Syria.Shayrat @@ -418,7 +416,7 @@ AIRBASE.Syria={ ["Wujah_Al_Hajar"]="Wujah Al Hajar", ["Al_Dumayr"]="Al-Dumayr", ["Gazipasa"]="Gazipasa", - ["Ru_Convoy_4"]="Ru Convoy-4", + --["Ru_Convoy_4"]="Ru Convoy-4", ["Hatay"]="Hatay", ["Nicosia"]="Nicosia", ["Pinarbashi"]="Pinarbashi", @@ -466,6 +464,7 @@ AIRBASE.Syria={ ["Ruwayshid"]="Ruwayshid", ["Sanliurfa"]="Sanliurfa", ["Tal_Siman"]="Tal Siman", + ["Deir_ez-Zor"] = "Deir ez-Zor", } --- Airbases of the Mariana Islands map: