mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2026-08-27 15:37:03 +00:00
MOOSE demonstration missions [skip ci]
This commit is contained in:
+150
@@ -0,0 +1,150 @@
|
||||
----------------------------------------------------------------------------------------
|
||||
---
|
||||
-- Name: BOS-100 - Stennis Hornet and Tomcat
|
||||
-- Author: funkyfranky
|
||||
-- Date Created: 17 August 2019
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Practice Case I/II/III recovery using the F/A-18C Hornet or F-14B Tomcat.
|
||||
--
|
||||
-- See mission briefing for further details.
|
||||
--
|
||||
-- *** IMPORTANT ***
|
||||
-- If you run the mission in single player, hit ESC twice before entering a slot!
|
||||
-- Otherwise the script will not load due to a long standing DCS bug.
|
||||
--
|
||||
----------------------------------------------------------------------------------------
|
||||
|
||||
-- No MOOSE settings menu. Comment out this line if required.
|
||||
_SETTINGS:SetPlayerMenuOff()
|
||||
|
||||
-- S-3B Recovery Tanker spawning in air.
|
||||
local tanker=RECOVERYTANKER:New("USS Stennis", "Texaco Group")
|
||||
tanker:SetTakeoffAir()
|
||||
tanker:SetRadio(250)
|
||||
tanker:SetModex(511)
|
||||
tanker:SetTACAN(1, "TKR")
|
||||
tanker:__Start(1)
|
||||
|
||||
-- E-2D AWACS spawning on Stennis.
|
||||
local awacs=RECOVERYTANKER:New("USS Stennis", "E-2D Wizard Group")
|
||||
awacs:SetAWACS()
|
||||
awacs:SetRadio(260)
|
||||
awacs:SetAltitude(20000)
|
||||
awacs:SetCallsign(CALLSIGN.AWACS.Wizard)
|
||||
awacs:SetRacetrackDistances(30, 15)
|
||||
awacs:SetModex(611)
|
||||
awacs:SetTACAN(2, "WIZ")
|
||||
awacs:__Start(1)
|
||||
|
||||
-- Rescue Helo with home base Lake Erie. Has to be a global object!
|
||||
rescuehelo=RESCUEHELO:New("USS Stennis", "Rescue Helo")
|
||||
rescuehelo:SetHomeBase(AIRBASE:FindByName("Lake Erie"))
|
||||
rescuehelo:SetModex(42)
|
||||
rescuehelo:__Start(1)
|
||||
|
||||
-- Create AIRBOSS object.
|
||||
local AirbossStennis=AIRBOSS:New("USS Stennis")
|
||||
|
||||
-- Add recovery windows:
|
||||
-- Case I from 9 to 10 am.
|
||||
local window1=AirbossStennis:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25)
|
||||
-- Case II with +15 degrees holding offset from 15:00 for 60 min.
|
||||
local window2=AirbossStennis:AddRecoveryWindow("15:00", "16:00", 2, 15, true, 23)
|
||||
-- Case III with +30 degrees holding offset from 2100 to 2200.
|
||||
local window3=AirbossStennis:AddRecoveryWindow("21:00", "22:00", 3, 30, true, 21)
|
||||
|
||||
-- Set folder of airboss sound files within miz file.
|
||||
AirbossStennis:SetSoundfilesFolder("Airboss Soundfiles/")
|
||||
|
||||
-- Single carrier menu optimization.
|
||||
AirbossStennis:SetMenuSingleCarrier()
|
||||
|
||||
-- Skipper menu.
|
||||
AirbossStennis:SetMenuRecovery(30, 20, false)
|
||||
|
||||
-- Remove landed AI planes from flight deck.
|
||||
AirbossStennis:SetDespawnOnEngineShutdown()
|
||||
|
||||
-- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized).
|
||||
AirbossStennis:Load()
|
||||
|
||||
-- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO.
|
||||
AirbossStennis:SetAutoSave()
|
||||
|
||||
-- Enable trap sheet.
|
||||
AirbossStennis:SetTrapSheet()
|
||||
|
||||
-- Start airboss class.
|
||||
AirbossStennis:Start()
|
||||
|
||||
|
||||
--- Function called when recovery tanker is started.
|
||||
function tanker:OnAfterStart(From,Event,To)
|
||||
|
||||
-- Set recovery tanker.
|
||||
AirbossStennis:SetRecoveryTanker(tanker)
|
||||
|
||||
|
||||
-- Use tanker as radio relay unit for LSO transmissions.
|
||||
AirbossStennis:SetRadioRelayLSO(self:GetUnitName())
|
||||
|
||||
end
|
||||
|
||||
--- Function called when AWACS is started.
|
||||
function awacs:OnAfterStart(From,Event,To)
|
||||
-- Set AWACS.
|
||||
AirbossStennis:SetRecoveryTanker(tanker)
|
||||
end
|
||||
|
||||
|
||||
--- Function called when rescue helo is started.
|
||||
function rescuehelo:OnAfterStart(From,Event,To)
|
||||
-- Use rescue helo as radio relay for Marshal.
|
||||
AirbossStennis:SetRadioRelayMarshal(self:GetUnitName())
|
||||
end
|
||||
|
||||
--- Function called when a player gets graded by the LSO.
|
||||
function AirbossStennis:OnAfterLSOGrade(From, Event, To, playerData, grade)
|
||||
local PlayerData=playerData --Ops.Airboss#AIRBOSS.PlayerData
|
||||
local Grade=grade --Ops.Airboss#AIRBOSS.LSOgrade
|
||||
|
||||
----------------------------------------
|
||||
--- Interface your Discord bot here! ---
|
||||
----------------------------------------
|
||||
|
||||
local score=tonumber(Grade.points)
|
||||
local name=tostring(PlayerData.name)
|
||||
|
||||
-- Report LSO grade to dcs.log file.
|
||||
env.info(string.format("Player %s scored %.1f", name, score))
|
||||
end
|
||||
|
||||
|
||||
---------------------------
|
||||
--- Generate AI Traffic ---
|
||||
---------------------------
|
||||
|
||||
-- Spawn some AI flights as additional traffic.
|
||||
local F181=SPAWN:New("FA-18C Group 1"):InitModex(111) -- Coming in from NW after ~ 6 min
|
||||
local F182=SPAWN:New("FA-18C Group 2"):InitModex(112) -- Coming in from NW after ~20 min
|
||||
local F183=SPAWN:New("FA-18C Group 3"):InitModex(113) -- Coming in from W after ~18 min
|
||||
local F14=SPAWN:New("F-14B 2ship"):InitModex(211) -- Coming in from SW after ~ 4 min
|
||||
local E2D=SPAWN:New("E-2D Group"):InitModex(311) -- Coming in from NE after ~10 min
|
||||
local S3B=SPAWN:New("S-3B Group"):InitModex(411) -- Coming in from S after ~16 min
|
||||
|
||||
-- Spawn always 9 min before the recovery window opens.
|
||||
local spawntimes={"8:51", "14:51", "20:51"}
|
||||
for _,spawntime in pairs(spawntimes) do
|
||||
local _time=UTILS.ClockToSeconds(spawntime)-timer.getAbsTime()
|
||||
if _time>0 then
|
||||
SCHEDULER:New(nil, F181.Spawn, {F181}, _time)
|
||||
SCHEDULER:New(nil, F182.Spawn, {F182}, _time)
|
||||
SCHEDULER:New(nil, F183.Spawn, {F183}, _time)
|
||||
SCHEDULER:New(nil, F14.Spawn, {F14}, _time)
|
||||
SCHEDULER:New(nil, E2D.Spawn, {E2D}, _time)
|
||||
SCHEDULER:New(nil, S3B.Spawn, {S3B}, _time)
|
||||
end
|
||||
end
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
cd $dir
|
||||
$file = Split-Path $dir -leaf
|
||||
cd "_unpacked"
|
||||
. 7z a -r -y -tzip "..\$file.miz" *
|
||||
cd ..
|
||||
@@ -0,0 +1,7 @@
|
||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
cd $dir
|
||||
$file = Split-Path $dir -leaf
|
||||
Remove-Item .\_unpacked -Force -Recurse
|
||||
md "_unpacked"
|
||||
cd "_unpacked"
|
||||
. 7z x -r -y "..\$file.miz" *
|
||||
@@ -0,0 +1,124 @@
|
||||
----------------------------------------------------------------------------------------
|
||||
---
|
||||
-- Name: BOS-200 - Tarawa Harrier
|
||||
-- Author: funkyfranky
|
||||
-- Date Created: 18 August 2019
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Practice Case I/II/III recovery using the AV-8B Harrier on the USS Tarawa.
|
||||
--
|
||||
-- See mission briefing for further details.
|
||||
--
|
||||
-- *** IMPORTANT ***
|
||||
-- If you run the mission in single player, hit ESC twice before entering a slot!
|
||||
-- Otherwise the script will not load due to a long standing DCS bug.
|
||||
--
|
||||
----------------------------------------------------------------------------------------
|
||||
|
||||
-- No MOOSE settings menu. Comment out this line if required.
|
||||
_SETTINGS:SetPlayerMenuOff()
|
||||
|
||||
-- Rescue Helo with home base USS Viksburg. Has to be a global object!
|
||||
rescuehelo=RESCUEHELO:New("USS Tarawa", "Rescue Helo")
|
||||
rescuehelo:SetHomeBase(AIRBASE:FindByName("USS Viksburg"))
|
||||
rescuehelo:SetModex(42)
|
||||
|
||||
-- Create AIRBOSS object.
|
||||
local AirbossTarawa=AIRBOSS:New("USS Tarawa")
|
||||
|
||||
-- Add recovery windows:
|
||||
-- Case I from 9:00 to 10:00 am.
|
||||
local window1=AirbossTarawa:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25)
|
||||
-- Case II with +15 degrees holding offset from 15:00 for 60 min.
|
||||
local window2=AirbossTarawa:AddRecoveryWindow("15:00", "16:00", 2, 15, true, 20)
|
||||
-- Case III with +30 degrees holding offset from 2100 to 2200.
|
||||
local window3=AirbossTarawa:AddRecoveryWindow("21:00", "22:00", 3, 30, true, 20)
|
||||
|
||||
-- Set TACAN.
|
||||
AirbossTarawa:SetTACAN(73, "X", "LHA")
|
||||
|
||||
-- Not sure if Tarawa has ICLS?
|
||||
--AirbossTarawa:SetICLSoff()
|
||||
|
||||
-- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized).
|
||||
AirbossTarawa:Load()
|
||||
|
||||
-- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO.
|
||||
AirbossTarawa:SetAutoSave()
|
||||
|
||||
-- Set radio relay units in order to properly send transmissions with subtitles only visible if correct frequency is tuned in.
|
||||
AirbossTarawa:SetRadioRelayLSO("CH-53E Radio Relay")
|
||||
AirbossTarawa:SetRadioRelayMarshal("SH-60B Radio Relay")
|
||||
|
||||
-- Radios.
|
||||
AirbossTarawa:SetMarshalRadio(243)
|
||||
AirbossTarawa:SetLSORadio(265)
|
||||
|
||||
--Set folder of airboss sound files within miz file.
|
||||
AirbossTarawa:SetSoundfilesFolder("Airboss Soundfiles/")
|
||||
|
||||
-- Remove landed AI planes from flight deck.
|
||||
AirbossTarawa:SetDespawnOnEngineShutdown()
|
||||
|
||||
-- Single carrier menu optimization.
|
||||
AirbossTarawa:SetMenuSingleCarrier()
|
||||
|
||||
-- Add Skipper menu to start recovery via F10 radio menu.
|
||||
AirbossTarawa:SetMenuRecovery(30, 20, true)
|
||||
|
||||
-- Start Airboss.
|
||||
AirbossTarawa:Start()
|
||||
|
||||
|
||||
--- Function called when a recovery starts.
|
||||
function AirbossTarawa:OnAfterRecoveryStart(From, Event, To, Case, Offset)
|
||||
-- Start helo.
|
||||
rescuehelo:Start()
|
||||
end
|
||||
|
||||
--- Function called when a recovery ends.
|
||||
function AirbossTarawa:OnAfterRecoveryStop(From,Event,To)
|
||||
-- Send helo RTB.
|
||||
rescuehelo:RTB()
|
||||
end
|
||||
|
||||
--- Function called when the rescue helo has returned to base.
|
||||
function rescuehelo:OnAfterReturned(From, Event, To, airbase)
|
||||
-- Stop helo.
|
||||
self:__Stop(3)
|
||||
end
|
||||
|
||||
--- Function called when a player gets graded by the LSO.
|
||||
function AirbossTarawa:OnAfterLSOGrade(From, Event, To, playerData, grade)
|
||||
local PlayerData=playerData --Ops.Airboss#AIRBOSS.PlayerData
|
||||
local Grade=grade --Ops.Airboss#AIRBOSS.LSOgrade
|
||||
|
||||
----------------------------------------
|
||||
--- Interface your Discord bot here! ---
|
||||
----------------------------------------
|
||||
|
||||
local score=tonumber(Grade.points)
|
||||
local name=tostring(PlayerData.name)
|
||||
|
||||
-- Report LSO grade to dcs.log file.
|
||||
env.info(self.lid..string.format("Player %s scored %.1f", name, score))
|
||||
end
|
||||
|
||||
|
||||
---------------------------
|
||||
--- Generate AI Traffic ---
|
||||
---------------------------
|
||||
|
||||
local AV8B1=SPAWN:New("Harrier Group 1"):InitModex(70)
|
||||
local AV8B2=SPAWN:New("Harrier Group 2"):InitModex(80)
|
||||
|
||||
-- Spawn always 9 min before the recovery window opens.
|
||||
local spawntimes={"9:06", "14:51", "20:51"}
|
||||
for _,spawntime in pairs(spawntimes) do
|
||||
local _time=UTILS.ClockToSeconds(spawntime)-timer.getAbsTime()
|
||||
if _time>0 then
|
||||
SCHEDULER:New(nil, AV8B1.Spawn, {AV8B1}, _time)
|
||||
SCHEDULER:New(nil, AV8B2.Spawn, {AV8B2}, _time)
|
||||
end
|
||||
end
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
cd $dir
|
||||
$file = Split-Path $dir -leaf
|
||||
cd "_unpacked"
|
||||
. 7z a -r -y -tzip "..\$file.miz" *
|
||||
cd ..
|
||||
@@ -0,0 +1,7 @@
|
||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
cd $dir
|
||||
$file = Split-Path $dir -leaf
|
||||
Remove-Item .\_unpacked -Force -Recurse
|
||||
md "_unpacked"
|
||||
cd "_unpacked"
|
||||
. 7z x -r -y "..\$file.miz" *
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
-------------------------
|
||||
-- AIRBOSS Test Script --
|
||||
-------------------------
|
||||
|
||||
-- Set mission menu.
|
||||
AIRBOSS.MenuF10Root=MENU_MISSION:New("Airboss").MenuPath
|
||||
|
||||
-- No MOOSE settings menu.
|
||||
_SETTINGS:SetPlayerMenuOff()
|
||||
|
||||
-- S-3B Recovery Tanker spawning in air.
|
||||
local tanker=RECOVERYTANKER:New("CVN-74", "- Texaco Tanker")
|
||||
tanker:SetTakeoffAir()
|
||||
tanker:SetRadio(256)
|
||||
tanker:SetModex(511)
|
||||
tanker:SetTACAN(1, "TKR")
|
||||
tanker:Start()
|
||||
|
||||
-- E-2D AWACS spawning in air
|
||||
local awacs=RECOVERYTANKER:New("CVN-74", "AWACS")
|
||||
awacs:SetAWACS()
|
||||
awacs:SetTakeoffAir()
|
||||
awacs:SetRadio(264)
|
||||
awacs:SetAltitude(20000)
|
||||
awacs:SetCallsign(CALLSIGN.AWACS.Overloard)
|
||||
awacs:SetRacetrackDistances(20, 8)
|
||||
awacs:SetModex(611)
|
||||
awacs:SetTACAN(2, "OLV")
|
||||
awacs:Start()
|
||||
|
||||
-- Rescue Helo spawned in air with home base USS Perry. Has to be a global object!
|
||||
rescuehelo=RESCUEHELO:New("CVN-74", "CV Helo")
|
||||
rescuehelo:SetHomeBase(AIRBASE:FindByName("CG-67"))
|
||||
rescuehelo:SetTakeoffAir()
|
||||
rescuehelo:SetModex(42)
|
||||
rescuehelo:Start()
|
||||
|
||||
-- Create AIRBOSS object.
|
||||
local AirbossStennis=AIRBOSS:New("CVN-74")
|
||||
|
||||
-- Add recovery windows:
|
||||
local window1=AirbossStennis:AddRecoveryWindow("18:30", "21:00", 1, nil, true, 20)
|
||||
|
||||
-- Radio freqs.
|
||||
AirbossStennis:SetMarshalRadio(305)
|
||||
AirbossStennis:SetLSORadio(265)
|
||||
|
||||
-- Radio relay units.
|
||||
AirbossStennis:SetRadioRelayLSO(rescuehelo:GetUnitName())
|
||||
AirbossStennis:SetRadioRelayMarshal(tanker:GetUnitName())
|
||||
|
||||
-- Set folder of airboss sound files within miz file.
|
||||
AirbossStennis:SetSoundfilesFolder("Airboss Soundfiles/")
|
||||
|
||||
-- Single carrier menu optimization.
|
||||
AirbossStennis:SetMenuSingleCarrier()
|
||||
|
||||
-- Enable skipper menu.
|
||||
AirbossStennis:SetMenuRecovery(15, 30, true)
|
||||
|
||||
-- AI groups explicitly excluded from handling by the Airboss
|
||||
AirbossStennis:SetHandleAIOFF()
|
||||
|
||||
-- Remove landed AI planes from flight deck.
|
||||
AirbossStennis:SetDespawnOnEngineShutdown()
|
||||
|
||||
-- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized).
|
||||
AirbossStennis:Load()
|
||||
|
||||
-- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO.
|
||||
AirbossStennis:SetAutoSave()
|
||||
|
||||
-- Enable trap sheet.
|
||||
AirbossStennis:SetTrapSheet()
|
||||
|
||||
-- Set recovery tanker
|
||||
AirbossStennis:SetRecoveryTanker(tanker)
|
||||
|
||||
-- Set AWACS.
|
||||
AirbossStennis:SetAWACS(awacs)
|
||||
|
||||
-- Start airboss class.
|
||||
AirbossStennis:Start()
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
cd $dir
|
||||
$file = Split-Path $dir -leaf
|
||||
cd "_unpacked"
|
||||
. 7z a -r -y -tzip "..\$file.miz" *
|
||||
cd ..
|
||||
@@ -0,0 +1,7 @@
|
||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
cd $dir
|
||||
$file = Split-Path $dir -leaf
|
||||
Remove-Item .\_unpacked -Force -Recurse
|
||||
md "_unpacked"
|
||||
cd "_unpacked"
|
||||
. 7z x -r -y "..\$file.miz" *
|
||||
Reference in New Issue
Block a user