mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2025-08-15 10:37:46 +00:00
Updated Moose.lua
This commit is contained in:
@@ -1,121 +1,121 @@
|
||||
---
|
||||
-- COMMANDER: Bombing with Airwings
|
||||
--
|
||||
-- The Commander is in charge of three airwings located at Batumi, Kobuleti and Senaki. Each airwing has one squadron of F/A-18C fighters.
|
||||
--
|
||||
-- A mission to bomb red targets is assigned to the commander. This mission requires more assets than each individual airwing can supply.
|
||||
-- The commander will recruite the number of required assest from all of his airwings.
|
||||
---
|
||||
|
||||
-- Blue (US) side.
|
||||
local US={}
|
||||
US.Squad={} -- US squadrons.
|
||||
US.Wing={} -- US airwings.
|
||||
US.Commander=nil --Ops.Commander#COMMANDER
|
||||
|
||||
-- F/A-18C squadron.
|
||||
US.Squad.FS01=SQUADRON:New("F/A-18C Template", 2, "1st Fighter Squad") --Ops.Squadron#SQUADRON
|
||||
US.Squad.FS01:AddMissionCapability({AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY})
|
||||
US.Squad.FS01:SetModex(100)
|
||||
US.Squad.FS01:SetCallsign(CALLSIGN.Aircraft.Chevy)
|
||||
US.Squad.FS01:SetSkill(AI.Skill.GOOD)
|
||||
|
||||
-- F/A-18C squadron.
|
||||
US.Squad.FS02=SQUADRON:New("F/A-18C Template", 2, "2nd Fighter Squad") --Ops.Squadron#SQUADRON
|
||||
US.Squad.FS02:AddMissionCapability({AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY})
|
||||
US.Squad.FS02:SetModex(200)
|
||||
US.Squad.FS02:SetCallsign(CALLSIGN.Aircraft.Colt)
|
||||
US.Squad.FS02:SetSkill(AI.Skill.GOOD)
|
||||
|
||||
-- F/A-18C squadron.
|
||||
US.Squad.FS03=SQUADRON:New("F/A-18C Template", 2, "3rd Fighter Squad") --Ops.Squadron#SQUADRON
|
||||
US.Squad.FS03:AddMissionCapability({AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY})
|
||||
US.Squad.FS03:SetModex(300)
|
||||
US.Squad.FS03:SetCallsign(CALLSIGN.Aircraft.Springfield)
|
||||
US.Squad.FS03:SetSkill(AI.Skill.GOOD)
|
||||
|
||||
|
||||
---
|
||||
-- AIRWING Batumi
|
||||
---
|
||||
|
||||
-- Create a new airwing.
|
||||
US.Wing.Batumi=AIRWING:New("Warehouse Batumi", "1st Fighter Wing Batumi") --Ops.AirWing#AIRWING
|
||||
|
||||
-- Payload F/A-18C
|
||||
US.Wing.Batumi:NewPayload("F/A-18C Payload AIM-9M*2, MK-83*4, FUEL*2", 2, {AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY}, 70)
|
||||
|
||||
-- Add squadrons to airwing.
|
||||
US.Wing.Batumi:AddSquadron(US.Squad.FS01)
|
||||
|
||||
---
|
||||
-- AIRWING Kobuleti
|
||||
---
|
||||
|
||||
-- Create a new airwing.
|
||||
US.Wing.Kobuleti=AIRWING:New("Warehouse Kobuleti", "2nd Fighter Wing Kobuleti") --Ops.AirWing#AIRWING
|
||||
|
||||
-- Payload F/A-18C
|
||||
US.Wing.Kobuleti:NewPayload("F/A-18C Payload AIM-9M*2, MK-83*4, FUEL*2", 2, {AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY}, 70)
|
||||
|
||||
-- Add squadrons to airwing.
|
||||
US.Wing.Kobuleti:AddSquadron(US.Squad.FS02)
|
||||
|
||||
---
|
||||
-- AIRWING Senaki
|
||||
---
|
||||
|
||||
-- Create a new airwing.
|
||||
US.Wing.Senaki=AIRWING:New("Warehouse Senaki", "3nd Fighter Wing Senaki") --Ops.AirWing#AIRWING
|
||||
|
||||
-- Payload F/A-18C
|
||||
US.Wing.Senaki:NewPayload("F/A-18C Payload AIM-9M*2, MK-83*4, FUEL*2", 1, {AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY}, 70)
|
||||
|
||||
-- Add squadrons to airwing.
|
||||
US.Wing.Senaki:AddSquadron(US.Squad.FS03)
|
||||
|
||||
|
||||
---
|
||||
-- COMMANDER
|
||||
---
|
||||
|
||||
-- Commander.
|
||||
US.Commander=COMMANDER:New(coalition.side.BLUE)
|
||||
|
||||
-- Add airwings to commander
|
||||
US.Commander:AddAirwing(US.Wing.Batumi)
|
||||
US.Commander:AddAirwing(US.Wing.Kobuleti)
|
||||
US.Commander:AddAirwing(US.Wing.Senaki)
|
||||
|
||||
-- Start commander. This also auto starts added airwings if they are not started yet.
|
||||
US.Commander:__Start(1)
|
||||
|
||||
|
||||
--- Function called each time the commanders sends an OPS group on a mission.
|
||||
function US.Commander:OnAfterOpsOnMission(From, Event, To, OpsGroup, Mission)
|
||||
local opsgroup=OpsGroup --Ops.OpsGroup#OPSGROUP
|
||||
local mission=Mission --Ops.Auftrag#AUFTRAG
|
||||
|
||||
-- Info message.
|
||||
local text=string.format("Group %s is on %s mission %s", opsgroup:GetName(), mission:GetType(), mission:GetName())
|
||||
MESSAGE:New(text, 360):ToAll()
|
||||
env.info(text)
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- MISSION
|
||||
---
|
||||
|
||||
-- Target X: A group at the abondoned airfield near Kobuleti.
|
||||
local TargetX=TARGET:New(GROUP:FindByName("Red Target X-1"))
|
||||
|
||||
-- Mission to bomb Target X.
|
||||
-- We will recruit up to six asset groups (at least two) and repeat five times if mission was not successful.
|
||||
local MissionBombX=AUFTRAG:NewBOMBING(TargetX, 8000)
|
||||
MissionBombX:SetRequiredAssets(2, 6)
|
||||
MissionBombX:SetRepeatOnFailure(5)
|
||||
|
||||
|
||||
-- Add mission to Commander.
|
||||
---
|
||||
-- COMMANDER: Bombing with Airwings
|
||||
--
|
||||
-- The Commander is in charge of three airwings located at Batumi, Kobuleti and Senaki. Each airwing has one squadron of F/A-18C fighters.
|
||||
--
|
||||
-- A mission to bomb red targets is assigned to the commander. This mission requires more assets than each individual airwing can supply.
|
||||
-- The commander will recruite the number of required assest from all of his airwings.
|
||||
---
|
||||
|
||||
-- Blue (US) side.
|
||||
local US={}
|
||||
US.Squad={} -- US squadrons.
|
||||
US.Wing={} -- US airwings.
|
||||
US.Commander=nil --Ops.Commander#COMMANDER
|
||||
|
||||
-- F/A-18C squadron.
|
||||
US.Squad.FS01=SQUADRON:New("F/A-18C Template", 2, "1st Fighter Squad") --Ops.Squadron#SQUADRON
|
||||
US.Squad.FS01:AddMissionCapability({AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY})
|
||||
US.Squad.FS01:SetModex(100)
|
||||
US.Squad.FS01:SetCallsign(CALLSIGN.Aircraft.Chevy)
|
||||
US.Squad.FS01:SetSkill(AI.Skill.GOOD)
|
||||
|
||||
-- F/A-18C squadron.
|
||||
US.Squad.FS02=SQUADRON:New("F/A-18C Template", 2, "2nd Fighter Squad") --Ops.Squadron#SQUADRON
|
||||
US.Squad.FS02:AddMissionCapability({AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY})
|
||||
US.Squad.FS02:SetModex(200)
|
||||
US.Squad.FS02:SetCallsign(CALLSIGN.Aircraft.Colt)
|
||||
US.Squad.FS02:SetSkill(AI.Skill.GOOD)
|
||||
|
||||
-- F/A-18C squadron.
|
||||
US.Squad.FS03=SQUADRON:New("F/A-18C Template", 2, "3rd Fighter Squad") --Ops.Squadron#SQUADRON
|
||||
US.Squad.FS03:AddMissionCapability({AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY})
|
||||
US.Squad.FS03:SetModex(300)
|
||||
US.Squad.FS03:SetCallsign(CALLSIGN.Aircraft.Springfield)
|
||||
US.Squad.FS03:SetSkill(AI.Skill.GOOD)
|
||||
|
||||
|
||||
---
|
||||
-- AIRWING Batumi
|
||||
---
|
||||
|
||||
-- Create a new airwing.
|
||||
US.Wing.Batumi=AIRWING:New("Warehouse Batumi", "1st Fighter Wing Batumi") --Ops.AirWing#AIRWING
|
||||
|
||||
-- Payload F/A-18C
|
||||
US.Wing.Batumi:NewPayload("F/A-18C Payload AIM-9M*2, MK-83*4, FUEL*2", 2, {AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY}, 70)
|
||||
|
||||
-- Add squadrons to airwing.
|
||||
US.Wing.Batumi:AddSquadron(US.Squad.FS01)
|
||||
|
||||
---
|
||||
-- AIRWING Kobuleti
|
||||
---
|
||||
|
||||
-- Create a new airwing.
|
||||
US.Wing.Kobuleti=AIRWING:New("Warehouse Kobuleti", "2nd Fighter Wing Kobuleti") --Ops.AirWing#AIRWING
|
||||
|
||||
-- Payload F/A-18C
|
||||
US.Wing.Kobuleti:NewPayload("F/A-18C Payload AIM-9M*2, MK-83*4, FUEL*2", 2, {AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY}, 70)
|
||||
|
||||
-- Add squadrons to airwing.
|
||||
US.Wing.Kobuleti:AddSquadron(US.Squad.FS02)
|
||||
|
||||
---
|
||||
-- AIRWING Senaki
|
||||
---
|
||||
|
||||
-- Create a new airwing.
|
||||
US.Wing.Senaki=AIRWING:New("Warehouse Senaki", "3nd Fighter Wing Senaki") --Ops.AirWing#AIRWING
|
||||
|
||||
-- Payload F/A-18C
|
||||
US.Wing.Senaki:NewPayload("F/A-18C Payload AIM-9M*2, MK-83*4, FUEL*2", 1, {AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY}, 70)
|
||||
|
||||
-- Add squadrons to airwing.
|
||||
US.Wing.Senaki:AddSquadron(US.Squad.FS03)
|
||||
|
||||
|
||||
---
|
||||
-- COMMANDER
|
||||
---
|
||||
|
||||
-- Commander.
|
||||
US.Commander=COMMANDER:New(coalition.side.BLUE)
|
||||
|
||||
-- Add airwings to commander
|
||||
US.Commander:AddAirwing(US.Wing.Batumi)
|
||||
US.Commander:AddAirwing(US.Wing.Kobuleti)
|
||||
US.Commander:AddAirwing(US.Wing.Senaki)
|
||||
|
||||
-- Start commander. This also auto starts added airwings if they are not started yet.
|
||||
US.Commander:__Start(1)
|
||||
|
||||
|
||||
--- Function called each time the commanders sends an OPS group on a mission.
|
||||
function US.Commander:OnAfterOpsOnMission(From, Event, To, OpsGroup, Mission)
|
||||
local opsgroup=OpsGroup --Ops.OpsGroup#OPSGROUP
|
||||
local mission=Mission --Ops.Auftrag#AUFTRAG
|
||||
|
||||
-- Info message.
|
||||
local text=string.format("Group %s is on %s mission %s", opsgroup:GetName(), mission:GetType(), mission:GetName())
|
||||
MESSAGE:New(text, 360):ToAll()
|
||||
env.info(text)
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- MISSION
|
||||
---
|
||||
|
||||
-- Target X: A group at the abondoned airfield near Kobuleti.
|
||||
local TargetX=TARGET:New(GROUP:FindByName("Red Target X-1"))
|
||||
|
||||
-- Mission to bomb Target X.
|
||||
-- We will recruit up to six asset groups (at least two) and repeat five times if mission was not successful.
|
||||
local MissionBombX=AUFTRAG:NewBOMBING(TargetX, 8000)
|
||||
MissionBombX:SetRequiredAssets(2, 6)
|
||||
MissionBombX:SetRepeatOnFailure(5)
|
||||
|
||||
|
||||
-- Add mission to Commander.
|
||||
US.Commander:AddMission(MissionBombX)
|
||||
Binary file not shown.
@@ -1,102 +1,100 @@
|
||||
---
|
||||
-- COMMANDER: Infantry Transport via Helos
|
||||
--
|
||||
-- Two brigades at Batumi and Kobuleti provide ground assets for a PATROL ZONE mission.
|
||||
--
|
||||
-- The Airwing at Senaki provides helicopter assets to transport assets to the patrol zone.
|
||||
-- The helicopters will fly to the brigades and pickup the infantry.
|
||||
---
|
||||
|
||||
---
|
||||
-- BRIGADE Batumi
|
||||
---
|
||||
|
||||
-- Create a platoon of infantry groups.
|
||||
local platoonBatumiInf=PLATOON:New("Infantry M4 Template", 2, "Infantry Platoon Batumi")
|
||||
platoonBatumiInf:AddMissionCapability({AUFTRAG.Type.PATROLZONE}, 40)
|
||||
|
||||
-- Create a Brigade
|
||||
local brigadeBatumi=BRIGADE:New("Warehouse Batumi", "Brigade Batumi")
|
||||
|
||||
-- Set spawn zone.
|
||||
brigadeBatumi:SetSpawnZone(ZONE:New("Warehouse Batumi Spawn Zone"))
|
||||
|
||||
-- Add platoons.
|
||||
brigadeBatumi:AddPlatoon(platoonBatumiInf)
|
||||
|
||||
---
|
||||
-- BRIGADE Kobuleti
|
||||
---
|
||||
|
||||
local platoonKobuletiInf=PLATOON:New("Infantry M4 Template", 2, "Infantry Platoon Kobuleti")
|
||||
platoonKobuletiInf:AddMissionCapability({AUFTRAG.Type.PATROLZONE}, 40)
|
||||
|
||||
-- Create a Brigade
|
||||
local brigadeKobuleti=BRIGADE:New("Warehouse Kobuleti", "Brigade Kobuleti")
|
||||
|
||||
-- Set spawn zone.
|
||||
brigadeKobuleti:SetSpawnZone(ZONE:New("Warehouse Kobuleti Spawn Zone"))
|
||||
|
||||
-- Add platoons.
|
||||
brigadeKobuleti:AddPlatoon(platoonKobuletiInf)
|
||||
|
||||
---
|
||||
-- AIRWING Senaki
|
||||
---
|
||||
|
||||
-- UH-1H squadron.
|
||||
local squadSenakiUH1H=SQUADRON:New("UH-1H Template", 5, "UH-1H Squadron Senaki") --Ops.Squadron#SQUADRON
|
||||
squadSenakiUH1H:AddMissionCapability({AUFTRAG.Type.OPSTRANSPORT})
|
||||
|
||||
-- Create a new airwing.
|
||||
local airwingSenaki=AIRWING:New("Warehouse Senaki", "3nd Transport Wing Senaki") --Ops.AirWing#AIRWING
|
||||
|
||||
-- Payloads.
|
||||
airwingSenaki:NewPayload("UH-1H Template", -1, {AUFTRAG.Type.OPSTRANSPORT}, 70)
|
||||
|
||||
-- Add squadrons to airwing.
|
||||
airwingSenaki:AddSquadron(squadSenakiUH1H)
|
||||
|
||||
---
|
||||
-- COMMANDER
|
||||
---
|
||||
|
||||
-- Create a commander.
|
||||
local commander=COMMANDER:New(coalition.side.BLUE)
|
||||
|
||||
-- Add legions to commander.
|
||||
commander:AddLegion(airwingSenaki)
|
||||
commander:AddLegion(brigadeBatumi)
|
||||
commander:AddLegion(brigadeKobuleti)
|
||||
|
||||
-- Start commander. This also auto-starts all assigned legions.
|
||||
commander:Start()
|
||||
|
||||
--- Function called each time and OPS group is send on a mission.
|
||||
function commander:onafterOpsOnMission(From, Event, To, OpsGroup, Mission)
|
||||
local opsgroup=OpsGroup --Ops.OpsGroup#OPSGROUP
|
||||
local mission=Mission --Ops.Auftrag#AUFTRAG
|
||||
|
||||
-- Info message.
|
||||
local text=string.format("Group %s is on %s mission %s", opsgroup:GetName(), mission:GetType(), mission:GetName())
|
||||
MESSAGE:New(text, 360):ToAll()
|
||||
env.info(text)
|
||||
end
|
||||
|
||||
---
|
||||
-- MISSION
|
||||
---
|
||||
|
||||
-- Patrol zone.
|
||||
local zoneAlpha=ZONE:New("Patrol Alpha"):DrawZone()
|
||||
|
||||
-- Mission to patrol the zone.
|
||||
-- At least four infantry asset groups required.
|
||||
-- These need to be transported by at least one and up to 5 cargo carrier asset groups.
|
||||
local missionPatrol=AUFTRAG:NewPATROLZONE(zoneAlpha)
|
||||
missionPatrol:SetRequiredAssets(4)
|
||||
missionPatrol:SetRequiredTransport(zoneAlpha, 1, 5)
|
||||
|
||||
|
||||
-- Assign mission to commander.
|
||||
commander:AddMission(missionPatrol)
|
||||
---
|
||||
-- COMMANDER: Infantry Transport via Helos
|
||||
--
|
||||
-- Two brigades at Batumi and Kobuleti provide ground assets for a PATROL ZONE mission.
|
||||
-- The Airwing at Senaki provides helicopter assets to transport assets to the patrol zone.
|
||||
---
|
||||
|
||||
---
|
||||
-- BRIGADE Batumi
|
||||
---
|
||||
|
||||
-- Create a platoon of infantry groups.
|
||||
local platoonBatumiInf=PLATOON:New("Infantry M4 Template", 2, "Infantry Platoon Batumi")
|
||||
platoonBatumiInf:AddMissionCapability({AUFTRAG.Type.PATROLZONE}, 40)
|
||||
|
||||
-- Create a Brigade
|
||||
local brigadeBatumi=BRIGADE:New("Warehouse Batumi", "Brigade Batumi")
|
||||
|
||||
-- Set spawn zone.
|
||||
brigadeBatumi:SetSpawnZone(ZONE:New("Warehouse Batumi Spawn Zone"))
|
||||
|
||||
-- Add platoons.
|
||||
brigadeBatumi:AddPlatoon(platoonBatumiInf)
|
||||
|
||||
---
|
||||
-- BRIGADE Kobuleti
|
||||
---
|
||||
|
||||
local platoonKobuletiInf=PLATOON:New("Infantry M4 Template", 2, "Infantry Platoon Kobuleti")
|
||||
platoonKobuletiInf:AddMissionCapability({AUFTRAG.Type.PATROLZONE}, 40)
|
||||
|
||||
-- Create a Brigade
|
||||
local brigadeKobuleti=BRIGADE:New("Warehouse Kobuleti", "Brigade Kobuleti")
|
||||
|
||||
-- Set spawn zone.
|
||||
brigadeKobuleti:SetSpawnZone(ZONE:New("Warehouse Kobuleti Spawn Zone"))
|
||||
|
||||
-- Add platoons.
|
||||
brigadeKobuleti:AddPlatoon(platoonKobuletiInf)
|
||||
|
||||
---
|
||||
-- AIRWING Senaki
|
||||
---
|
||||
|
||||
-- UH-1H squadron.
|
||||
local squadSenakiUH1H=SQUADRON:New("UH-1H Template", 5, "UH-1H Squadron Senaki") --Ops.Squadron#SQUADRON
|
||||
squadSenakiUH1H:AddMissionCapability({AUFTRAG.Type.OPSTRANSPORT})
|
||||
|
||||
-- Create a new airwing.
|
||||
local airwingSenaki=AIRWING:New("Warehouse Senaki", "3nd Transport Wing Senaki") --Ops.AirWing#AIRWING
|
||||
|
||||
-- Payloads.
|
||||
airwingSenaki:NewPayload("UH-1H Template", -1, {AUFTRAG.Type.OPSTRANSPORT}, 70)
|
||||
|
||||
-- Add squadrons to airwing.
|
||||
airwingSenaki:AddSquadron(squadSenakiUH1H)
|
||||
|
||||
---
|
||||
-- COMMANDER
|
||||
---
|
||||
|
||||
-- Create a commander.
|
||||
local commander=COMMANDER:New(coalition.side.BLUE)
|
||||
|
||||
-- Add legions to commander.
|
||||
commander:AddLegion(airwingSenaki)
|
||||
commander:AddLegion(brigadeBatumi)
|
||||
commander:AddLegion(brigadeKobuleti)
|
||||
|
||||
-- Start commander. This also auto-starts all assigned legions.
|
||||
commander:Start()
|
||||
|
||||
--- Function called each time and OPS group is send on a mission.
|
||||
function commander:onafterOpsOnMission(From, Event, To, OpsGroup, Mission)
|
||||
local opsgroup=OpsGroup --Ops.OpsGroup#OPSGROUP
|
||||
local mission=Mission --Ops.Auftrag#AUFTRAG
|
||||
|
||||
-- Info message.
|
||||
local text=string.format("Group %s is on %s mission %s", opsgroup:GetName(), mission:GetType(), mission:GetName())
|
||||
MESSAGE:New(text, 360):ToAll()
|
||||
env.info(text)
|
||||
end
|
||||
|
||||
---
|
||||
-- MISSION
|
||||
---
|
||||
|
||||
-- Patrol zone.
|
||||
local zoneAlpha=ZONE:New("Patrol Alpha"):DrawZone()
|
||||
|
||||
-- Mission to patrol the zone.
|
||||
-- At least four infantry asset groups required.
|
||||
-- These need to be transported by at least one and up to 5 cargo carrier asset groups.
|
||||
local missionPatrol=AUFTRAG:NewPATROLZONE(zoneAlpha)
|
||||
missionPatrol:SetRequiredAssets(4)
|
||||
missionPatrol:SetRequiredTransport(zoneAlpha, 1, 5)
|
||||
|
||||
|
||||
-- Assign mission to commander.
|
||||
commander:AddMission(missionPatrol)
|
||||
|
||||
Reference in New Issue
Block a user