Updated Moose.lua

This commit is contained in:
funkyfranky
2024-01-01 22:48:35 +00:00
parent d0ce19b779
commit 966a374f98
150 changed files with 6601 additions and 6601 deletions
@@ -1,18 +1,18 @@
-- Name: RAT-001 - Basic
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft at random airports on the map.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at random airports of the map and fly to random destination airports.
-- After the aircraft arrive at their destination they get despawned and then respawned at a new random airport with new random destination.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Spawn five aircraft.
-- Name: RAT-001 - Basic
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft at random airports on the map.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at random airports of the map and fly to random destination airports.
-- After the aircraft arrive at their destination they get despawned and then respawned at a new random airport with new random destination.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Spawn five aircraft.
yak:Spawn(5)
@@ -1,22 +1,22 @@
-- Name: RAT-002 - Fixed Departure
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at Gudauta and let them travel to random airports on the map.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at Gudauta. Destination airport for each aircraft is random.
-- After the aircraft arrive at their destination they get despawned and then respawned again at Gudauta. But the next destination is random again.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Set destination airport.
yak:SetDeparture("Gudauta")
-- Spawn five aircraft.
yak:Spawn(5)
-- Name: RAT-002 - Fixed Departure
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at Gudauta and let them travel to random airports on the map.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at Gudauta. Destination airport for each aircraft is random.
-- After the aircraft arrive at their destination they get despawned and then respawned again at Gudauta. But the next destination is random again.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Set destination airport.
yak:SetDeparture("Gudauta")
-- Spawn five aircraft.
yak:Spawn(5)
@@ -1,22 +1,22 @@
-- Name: RAT-003 - Fixed Destination
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at random airports and let them all travel to Sochi-Adler.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at random airports. They will all fly to Sochi-Adler.
-- After the aircraft arrive at their destination they get despawned and then respawned at a random aiport with destination Sochi-Adler.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Set destination airport.
yak:SetDestination("Sochi-Adler")
-- Spawn five aircraft.
yak:Spawn(5)
-- Name: RAT-003 - Fixed Destination
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at random airports and let them all travel to Sochi-Adler.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at random airports. They will all fly to Sochi-Adler.
-- After the aircraft arrive at their destination they get despawned and then respawned at a random aiport with destination Sochi-Adler.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Set destination airport.
yak:SetDestination("Sochi-Adler")
-- Spawn five aircraft.
yak:Spawn(5)
@@ -1,25 +1,25 @@
-- Name: RAT-004 - Fixed Departure and Destination
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at Guadauta or Batumi and make them fly to Gelendzhik or Beslan.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at Gudauta or Batumi. Their destination will be either Gelendzhik or Beslan.
-- After the aircraft arrive at their destination they get despawned and then respawned again at one of the defined departure airports.
-- Then they will travel to one of the defined destinations again.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Set destination airports. If multiple destinations are specified, they have to be given as a table, i.e. in curly brackets {}.
yak:SetDeparture({"Gudauta", "Batumi"})
-- Set destination airports. One of these is chosen randomly as destination.
yak:SetDestination({"Gelendzhik", "Beslan"})
-- Spawn five aircraft.
-- Name: RAT-004 - Fixed Departure and Destination
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at Guadauta or Batumi and make them fly to Gelendzhik or Beslan.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at Gudauta or Batumi. Their destination will be either Gelendzhik or Beslan.
-- After the aircraft arrive at their destination they get despawned and then respawned again at one of the defined departure airports.
-- Then they will travel to one of the defined destinations again.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Set destination airports. If multiple destinations are specified, they have to be given as a table, i.e. in curly brackets {}.
yak:SetDeparture({"Gudauta", "Batumi"})
-- Set destination airports. One of these is chosen randomly as destination.
yak:SetDestination({"Gelendzhik", "Beslan"})
-- Spawn five aircraft.
yak:Spawn(5)
@@ -1,47 +1,47 @@
-- Name: RAT-005 - Restricted Coalition
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at airports belonging to a certain coalition.
-- In the mission editor, we have set Sochi-Adler, Gelendzhik, Batumi, Senaki-Kolkhi and Kutaisi to red.
-- Likewise, Tbilisi-Lochini, Beslan, Nalchik, Mozdok and Mineralnye-Vody were set to blue.
--
-- # Test cases:
--
-- 1. Observe three Yak-40 aircraft being spawned at red airports only. The will also only get destination airports belonging to that coalition.
-- 2. Observe three Yak-40 being spawned at blue airports only. The coalition of the aircraft is changed manually.
-- Create RAT object. Additionally, to the template group name we give the group an alias to be able to distinguish to another group created from this template.
local yak=RAT:New("RAT_Yak", "Yak Red")
-- This restricts the possible departure and destination airports the airports belonging to the red coalition.
-- Here it is important that in the mission editor enough (>2) airports have been set to red! Otherwise there will be no possible departure and/or destination airports.
yak:SetCoalition("sameonly")
-- Explicitly exclude Senaki from possible departures and destinations.
yak:ExcludedAirports("Senaki-Kolkhi")
-- Spawn three aircraft.
yak:Spawn(3)
-- Create RAT object. Alias is "Yak Blue". If the same template is used multiple times, it is important to give each RAT object an indiviual name!
local yakblue=RAT:New("RAT_Yak", "Yak Blue")
-- Change coalition of Yak to blue.
yakblue:SetCoalitionAircraft("blue")
-- This restricts the possible departure and destination airports the airports belonging to the blue coalition since the coalition is changed manually.
yakblue:SetCoalition("sameonly")
-- We also change the livery of these groups. If a table of liveries is given, each spawned group gets a random livery.
yakblue:Livery({"Georgian Airlines"})
-- Explicitly exclude Nalchik from possible departures and destinations.
yakblue:ExcludedAirports({"Nalchik", "Mozdok"})
-- Spawn three aircraft.
-- Name: RAT-005 - Restricted Coalition
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at airports belonging to a certain coalition.
-- In the mission editor, we have set Sochi-Adler, Gelendzhik, Batumi, Senaki-Kolkhi and Kutaisi to red.
-- Likewise, Tbilisi-Lochini, Beslan, Nalchik, Mozdok and Mineralnye-Vody were set to blue.
--
-- # Test cases:
--
-- 1. Observe three Yak-40 aircraft being spawned at red airports only. The will also only get destination airports belonging to that coalition.
-- 2. Observe three Yak-40 being spawned at blue airports only. The coalition of the aircraft is changed manually.
-- Create RAT object. Additionally, to the template group name we give the group an alias to be able to distinguish to another group created from this template.
local yak=RAT:New("RAT_Yak", "Yak Red")
-- This restricts the possible departure and destination airports the airports belonging to the red coalition.
-- Here it is important that in the mission editor enough (>2) airports have been set to red! Otherwise there will be no possible departure and/or destination airports.
yak:SetCoalition("sameonly")
-- Explicitly exclude Senaki from possible departures and destinations.
yak:ExcludedAirports("Senaki-Kolkhi")
-- Spawn three aircraft.
yak:Spawn(3)
-- Create RAT object. Alias is "Yak Blue". If the same template is used multiple times, it is important to give each RAT object an indiviual name!
local yakblue=RAT:New("RAT_Yak", "Yak Blue")
-- Change coalition of Yak to blue.
yakblue:SetCoalitionAircraft("blue")
-- This restricts the possible departure and destination airports the airports belonging to the blue coalition since the coalition is changed manually.
yakblue:SetCoalition("sameonly")
-- We also change the livery of these groups. If a table of liveries is given, each spawned group gets a random livery.
yakblue:Livery({"Georgian Airlines"})
-- Explicitly exclude Nalchik from possible departures and destinations.
yakblue:ExcludedAirports({"Nalchik", "Mozdok"})
-- Spawn three aircraft.
yakblue:Spawn(3)
@@ -1,25 +1,25 @@
-- Name: RAT-006 - Continue Journey
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at Gudauta. Each will get a random destination.
-- Once the aircraft arrives at its destination, it will be respawned there and continue its journey to another random airport.
-- Note that we do NOT have to set a departure airport.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at Gudauta. From there they will hop from airport to airport on the map.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Set Gudauta as departure airport for all spawned aircraft. (Not required for ContinueJourney() to work.)
yak:SetDeparture("Gudauta")
-- This makes aircraft respawn at their destination airport instead of another random airport.
yak:ContinueJourney()
-- Spawn five aircraft.
-- Name: RAT-006 - Continue Journey
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at Gudauta. Each will get a random destination.
-- Once the aircraft arrives at its destination, it will be respawned there and continue its journey to another random airport.
-- Note that we do NOT have to set a departure airport.
--
-- # Test cases:
--
-- 1. Observe five Yak-40 aircraft being spawned at Gudauta. From there they will hop from airport to airport on the map.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local yak=RAT:New("RAT_Yak")
-- Set Gudauta as departure airport for all spawned aircraft. (Not required for ContinueJourney() to work.)
yak:SetDeparture("Gudauta")
-- This makes aircraft respawn at their destination airport instead of another random airport.
yak:ContinueJourney()
-- Spawn five aircraft.
yak:Spawn(5)
@@ -1,31 +1,31 @@
-- Name: RAT-007 - Commute
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at Mozdok and let them fly to Mineralnye Vody.
-- Once the aircraft arrives at its destination, it will be respawned there and fly back to Mozdok.
-- Note that:
-- We do NOT have to set a departure or destination airports. If we don't, the first departure and destination are random.
-- Commute() also works for random destination and departure airports. But once they are chosen, aircraft will only commute between those.
-- Also note that Commute() does NOT work with spawn in air since the departure airport is not defined then.
--
-- # Test cases:
--
-- 1. Observe two C-17A being spawned at Mozdok and fly back and forth between Mozdok and Mineralnye Vody until the end of time.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local c17=RAT:New("RAT_C17")
-- Set Gudauta as departure airport.
c17:SetDeparture("Mozdok")
-- Set Mineralnye Vody as destination.
c17:SetDestination("Mineralnye Vody")
-- This makes aircraft respawn at their destination airport and fly back to its departure. Hence, departure cannot be in air.
c17:Commute()
-- Spawn two aircraft.
-- Name: RAT-007 - Commute
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft of the same type at Mozdok and let them fly to Mineralnye Vody.
-- Once the aircraft arrives at its destination, it will be respawned there and fly back to Mozdok.
-- Note that:
-- We do NOT have to set a departure or destination airports. If we don't, the first departure and destination are random.
-- Commute() also works for random destination and departure airports. But once they are chosen, aircraft will only commute between those.
-- Also note that Commute() does NOT work with spawn in air since the departure airport is not defined then.
--
-- # Test cases:
--
-- 1. Observe two C-17A being spawned at Mozdok and fly back and forth between Mozdok and Mineralnye Vody until the end of time.
-- Create RAT object. The only required parameter is the name of the template group in the mission editor.
local c17=RAT:New("RAT_C17")
-- Set Gudauta as departure airport.
c17:SetDeparture("Mozdok")
-- Set Mineralnye Vody as destination.
c17:SetDestination("Mineralnye Vody")
-- This makes aircraft respawn at their destination airport and fly back to its departure. Hence, departure cannot be in air.
c17:Commute()
-- Spawn two aircraft.
c17:Spawn(2)
@@ -1,53 +1,53 @@
-- Name: RAT-008 - Spawn in Air
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft above airports or at zones pre-defined in the mission editor.
-- Note that if takeoff is set to air:
-- Airports are treated like zones with a certain radius.
-- Spawn happens at a random point anywhere within the zone.
--
--
-- # Test cases:
--
-- 1. Obsever ten Yak-40 being spawned in air near random airports of the map.
-- 2. Observe five C-17A being spawned within Zones "RAT Zone West", and "RAT Zone North".
-- 3. Observe eight IL76 being spawned within RAT Zone North or somewhere near Anapa Vityazevo airport.
-- Create RAT object from Yak-40 template.
local yak=RAT:New("RAT_YAK")
-- Set takeoff type to air.
yak:SetTakeoff("air")
-- Spawn ten Yak-40s.
yak:Spawn(10)
-- Create RAT object from C-17A template.
local c17=RAT:New("RAT_C17")
-- Set takeoff type to air.
c17:SetTakeoff("air")
-- Set departure zones for C-17.
c17:SetDeparture({"RAT Zone West", "RAT Zone South"})
-- Spawn five C-17s.
c17:Spawn(5)
-- Create RAT object from IL76 template.
local il76=RAT:New("RAT_IL76")
-- Set takeoff type to air.
il76:SetTakeoff("air")
-- Set departure zones for C-17. You can mix zone names and airport names.
il76:SetDeparture({"RAT Zone North", "Anapa-Vityazevo"})
-- Spawn eight C-17s.
-- Name: RAT-008 - Spawn in Air
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft above airports or at zones pre-defined in the mission editor.
-- Note that if takeoff is set to air:
-- Airports are treated like zones with a certain radius.
-- Spawn happens at a random point anywhere within the zone.
--
--
-- # Test cases:
--
-- 1. Obsever ten Yak-40 being spawned in air near random airports of the map.
-- 2. Observe five C-17A being spawned within Zones "RAT Zone West", and "RAT Zone North".
-- 3. Observe eight IL76 being spawned within RAT Zone North or somewhere near Anapa Vityazevo airport.
-- Create RAT object from Yak-40 template.
local yak=RAT:New("RAT_YAK")
-- Set takeoff type to air.
yak:SetTakeoff("air")
-- Spawn ten Yak-40s.
yak:Spawn(10)
-- Create RAT object from C-17A template.
local c17=RAT:New("RAT_C17")
-- Set takeoff type to air.
c17:SetTakeoff("air")
-- Set departure zones for C-17.
c17:SetDeparture({"RAT Zone West", "RAT Zone South"})
-- Spawn five C-17s.
c17:Spawn(5)
-- Create RAT object from IL76 template.
local il76=RAT:New("RAT_IL76")
-- Set takeoff type to air.
il76:SetTakeoff("air")
-- Set departure zones for C-17. You can mix zone names and airport names.
il76:SetDeparture({"RAT Zone North", "Anapa-Vityazevo"})
-- Spawn eight C-17s.
il76:Spawn(8)
@@ -1,46 +1,46 @@
-- Name: RAT-009 - Set Cruise Altitude
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft randomly but make them fly at certain cruise altitudes.
-- In the first example we specify the flight level, i.e. the altitude above sea level in hundreds of meters.
-- There are also methods to set the cruise altitude in meters. These are used in the second example.
--
-- Note that when setting a lower bound for the cruise altitude, this automatically adjusts the minimum distance to possible destinations, since the aircraft must have enough time to climb to that alt and descent again to the destination.
--
-- # Test cases:
--
-- 1. Obsever five Yak-40 being spawned at random airports. They will travel to a random destination but the cruising altitude will not be below 5,000 feet and not be above 20,000 feet.
-- Most aircraft will travel at or near 10,000 ft.
-- 2. Observe two C-17 being spawned at Tbilisi-Lochini. They will travel to a random destination but the cruise alt is set to be > 5 km.
-- Create RAT object from Yak-40 template.
local yak=RAT:New("RAT_YAK")
-- Set the minimum flight level. No aircaft will travel below this altitude.
yak:SetFLmin(50)
-- Set maximum flight level to 20,000 ft ASL. No aircraft will be assigned a cruise flight level above this altitude.
yak:SetFLmax(200)
-- Set cruise flight level to 10,000 ft. The final choise is random between FLmin and FLmax, but morst aircraft will travel at his or near this altitude.
yak:SetFLcruise(100)
-- Spawn five Yak-40s.
yak:Spawn(5)
-- Create RAT object from C-17A template.
local c17=RAT:New("RAT_C17")
-- Set departure zones for C-17.
c17:SetDeparture("Tbilisi-Lochini")
-- All aircraft will fly at least at a height of 5 km ASL.
c17:SetMinCruiseAltitude(5000)
-- Spawn two C-17s.
c17:Spawn(2)
-- Name: RAT-009 - Set Cruise Altitude
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn several aircraft randomly but make them fly at certain cruise altitudes.
-- In the first example we specify the flight level, i.e. the altitude above sea level in hundreds of meters.
-- There are also methods to set the cruise altitude in meters. These are used in the second example.
--
-- Note that when setting a lower bound for the cruise altitude, this automatically adjusts the minimum distance to possible destinations, since the aircraft must have enough time to climb to that alt and descent again to the destination.
--
-- # Test cases:
--
-- 1. Obsever five Yak-40 being spawned at random airports. They will travel to a random destination but the cruising altitude will not be below 5,000 feet and not be above 20,000 feet.
-- Most aircraft will travel at or near 10,000 ft.
-- 2. Observe two C-17 being spawned at Tbilisi-Lochini. They will travel to a random destination but the cruise alt is set to be > 5 km.
-- Create RAT object from Yak-40 template.
local yak=RAT:New("RAT_YAK")
-- Set the minimum flight level. No aircaft will travel below this altitude.
yak:SetFLmin(50)
-- Set maximum flight level to 20,000 ft ASL. No aircraft will be assigned a cruise flight level above this altitude.
yak:SetFLmax(200)
-- Set cruise flight level to 10,000 ft. The final choise is random between FLmin and FLmax, but morst aircraft will travel at his or near this altitude.
yak:SetFLcruise(100)
-- Spawn five Yak-40s.
yak:Spawn(5)
-- Create RAT object from C-17A template.
local c17=RAT:New("RAT_C17")
-- Set departure zones for C-17.
c17:SetDeparture("Tbilisi-Lochini")
-- All aircraft will fly at least at a height of 5 km ASL.
c17:SetMinCruiseAltitude(5000)
-- Spawn two C-17s.
c17:Spawn(2)
@@ -1,67 +1,67 @@
-- Name: RAT-010 - Helo FARP and Ship
-- Author: funkyfranky
-- Date Created: 23 Sep 2017
--
-- # Situation:
--
-- Spawn helos at FARPS or ships.
--
-- # Test cases:
--
-- 1. Obsever five Yak-40 being spawned at random airports. They will travel to a random destination but the cruising altitude will not be below 5,000 feet and not be above 20,000 feet.
-- Create RAT object from Huey template.
local huey1=RAT:New("RAT_HUEY", "Huey Berlin")
-- Huey departing from FARP Berlin.
huey1:SetDeparture({"FARP Berlin"})
-- Flying to Normandy.
huey1:SetDestination({"Normandy"})
-- Take-off with engines on.
huey1:SetTakeoff("hot")
-- Huey will respawn at Normandy and fly back to FARP Berlin.
huey1:Commute()
-- Huey will be spawned.
huey1:Spawn()
-- Create RAT object from Huey template.
local huey2=RAT:New("RAT_HUEY", "Huey London")
-- Huey departing from FARP London.
huey2:SetDeparture({"FARP London"})
-- Flying to Normandy.
huey2:SetDestination({"Normandy"})
-- Take-off with engines on.
huey2:SetTakeoff("hot")
-- Huey will respawn at Normandy and fly back to FARP London.
huey2:Commute()
-- Huey will be spawned.
huey2:Spawn()
-- Create RAT object from Huey template.
local huey3=RAT:New("RAT_HUEY", "Huey Anapa")
-- Huey departing from FARP London.
huey3:SetDeparture({"FARP London", "FARP Berlin", "Anapa-Vityazevo"})
-- Flying to Normandy.
huey3:SetDestination({"FARP London", "FARP Berlin", "Anapa-Vityazevo"})
-- Take-off with engines on.
huey3:SetTakeoff("hot")
-- Huey will continue its journey.
huey3:ContinueJourney()
-- Huey will be spawned.
-- Name: RAT-010 - Helo FARP and Ship
-- Author: funkyfranky
-- Date Created: 23 Sep 2017
--
-- # Situation:
--
-- Spawn helos at FARPS or ships.
--
-- # Test cases:
--
-- 1. Obsever five Yak-40 being spawned at random airports. They will travel to a random destination but the cruising altitude will not be below 5,000 feet and not be above 20,000 feet.
-- Create RAT object from Huey template.
local huey1=RAT:New("RAT_HUEY", "Huey Berlin")
-- Huey departing from FARP Berlin.
huey1:SetDeparture({"FARP Berlin"})
-- Flying to Normandy.
huey1:SetDestination({"Normandy"})
-- Take-off with engines on.
huey1:SetTakeoff("hot")
-- Huey will respawn at Normandy and fly back to FARP Berlin.
huey1:Commute()
-- Huey will be spawned.
huey1:Spawn()
-- Create RAT object from Huey template.
local huey2=RAT:New("RAT_HUEY", "Huey London")
-- Huey departing from FARP London.
huey2:SetDeparture({"FARP London"})
-- Flying to Normandy.
huey2:SetDestination({"Normandy"})
-- Take-off with engines on.
huey2:SetTakeoff("hot")
-- Huey will respawn at Normandy and fly back to FARP London.
huey2:Commute()
-- Huey will be spawned.
huey2:Spawn()
-- Create RAT object from Huey template.
local huey3=RAT:New("RAT_HUEY", "Huey Anapa")
-- Huey departing from FARP London.
huey3:SetDeparture({"FARP London", "FARP Berlin", "Anapa-Vityazevo"})
-- Flying to Normandy.
huey3:SetDestination({"FARP London", "FARP Berlin", "Anapa-Vityazevo"})
-- Take-off with engines on.
huey3:SetTakeoff("hot")
-- Huey will continue its journey.
huey3:ContinueJourney()
-- Huey will be spawned.
huey3:Spawn()
@@ -1,43 +1,43 @@
-- Name: RAT-011 - Carrier Ops
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn aircraft flying to and from aircraft carriers
--
-- # Test cases:
--
-- 1. Observe two SU-33 taking of from Novorossiysk and fly to the Kuznetsov.
-- 2. Observe two F-14A taking of from the Carl Vinson flying into Batumi.
-- Create RAT object from Su-33 template.
local su33=RAT:New("RAT_SU33")
-- Huey departing from FARP Berlin.
su33:SetDeparture({"Novorossiysk"})
-- Flying to Normandy.
su33:SetDestination({"Kuznetsov"})
-- Take-off with engines on.
su33:SetTakeoff("hot")
-- Spawn two aircraft.
su33:Spawn(2)
-- Create RAT object from Su-33 template.
local f14=RAT:New("RAT_F14")
-- Huey departing from FARP Berlin.
f14:SetDeparture({"Carl Vinson"})
-- Flying to Normandy.
f14:SetDestination({"Batumi"})
-- Take-off with engines on.
f14:SetTakeoff("hot")
-- Spawn two aircraft.
-- Name: RAT-011 - Carrier Ops
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
--
-- # Situation:
--
-- Spawn aircraft flying to and from aircraft carriers
--
-- # Test cases:
--
-- 1. Observe two SU-33 taking of from Novorossiysk and fly to the Kuznetsov.
-- 2. Observe two F-14A taking of from the Carl Vinson flying into Batumi.
-- Create RAT object from Su-33 template.
local su33=RAT:New("RAT_SU33")
-- Huey departing from FARP Berlin.
su33:SetDeparture({"Novorossiysk"})
-- Flying to Normandy.
su33:SetDestination({"Kuznetsov"})
-- Take-off with engines on.
su33:SetTakeoff("hot")
-- Spawn two aircraft.
su33:Spawn(2)
-- Create RAT object from Su-33 template.
local f14=RAT:New("RAT_F14")
-- Huey departing from FARP Berlin.
f14:SetDeparture({"Carl Vinson"})
-- Flying to Normandy.
f14:SetDestination({"Batumi"})
-- Take-off with engines on.
f14:SetTakeoff("hot")
-- Spawn two aircraft.
f14:Spawn(2)
@@ -1,76 +1,76 @@
---
-- Name: RAT-010 - Traffic at McCarran International
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
-- Updated: 10 Oct 2023
--
-- # Situation:
--
-- We want to generate some random air traffic at McCarran International Airport.
--
-- # Test cases:
--
-- 1. KC-135 aircraft are spawned at zones north and east heading to McCarran.
-- 2. E-3A aircraft are spawned at McCarran with random destinations.
-- 3. Yak-40 aircraft are spawned at random airports heading for McCarran.
-- 3. TF-51D aircraft are spawned at Henderson, Boulder City or Echo Bay heading for McCarran.
-- Create RAT object from KC-135 template.
local kc135=RAT:New("RAT_KC135")
kc135:SetCoalition("same")
-- Set departure zones. We need takeoff "air" for that.
kc135:SetDeparture({"RAT Zone North", "RAT Zone East"})
-- Set spawn in air.
kc135:SetTakeoff("air")
-- Aircraft will fly to McCarran
kc135:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn two aircraft.
kc135:Spawn(2)
-- Create RAT object from E-3A template.
local e3=RAT:New("RAT_E3")
e3:SetCoalition("same")
-- Aircraft are spawned at McCarran. Destinations are random.
e3:SetDeparture(AIRBASE.Nevada.McCarran_International_Airport)
-- Enable respawn after landing with a delay of six minutes.
e3:RespawnAfterLanding(360)
-- Spawn two aircraft.
e3:Spawn(2)
-- Create RAT object from Yak-40 template.
local yak=RAT:New("RAT_YAK")
-- These are the airports a Yak-40 gets a parking slot.
yak:SetDeparture({AIRBASE.Nevada.Tonopah_Airport, AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Henderson_Executive_Airport, AIRBASE.Nevada.Nellis_AFB, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Laughlin_Airport})
-- Destination McCarran.
yak:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn eight Yak-40.
yak:Spawn(8)
-- Create RAT object from E-3A template.
local tf51=RAT:New("RAT_TF51")
tf51:SetCoalition("same")
-- Departure airport will be chosen from this list.
tf51:SetDeparture({AIRBASE.Nevada.Henderson_Executive_Airport, AIRBASE.Nevada.Boulder_City_Airport, AIRBASE.Nevada.Echo_Bay})
-- All will fly to McCarran.
tf51:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn four TF-51D
tf51:Spawn(4)
---
-- Name: RAT-010 - Traffic at McCarran International
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
-- Updated: 10 Oct 2023
--
-- # Situation:
--
-- We want to generate some random air traffic at McCarran International Airport.
--
-- # Test cases:
--
-- 1. KC-135 aircraft are spawned at zones north and east heading to McCarran.
-- 2. E-3A aircraft are spawned at McCarran with random destinations.
-- 3. Yak-40 aircraft are spawned at random airports heading for McCarran.
-- 3. TF-51D aircraft are spawned at Henderson, Boulder City or Echo Bay heading for McCarran.
-- Create RAT object from KC-135 template.
local kc135=RAT:New("RAT_KC135")
kc135:SetCoalition("same")
-- Set departure zones. We need takeoff "air" for that.
kc135:SetDeparture({"RAT Zone North", "RAT Zone East"})
-- Set spawn in air.
kc135:SetTakeoff("air")
-- Aircraft will fly to McCarran
kc135:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn two aircraft.
kc135:Spawn(2)
-- Create RAT object from E-3A template.
local e3=RAT:New("RAT_E3")
e3:SetCoalition("same")
-- Aircraft are spawned at McCarran. Destinations are random.
e3:SetDeparture(AIRBASE.Nevada.McCarran_International_Airport)
-- Enable respawn after landing with a delay of six minutes.
e3:RespawnAfterLanding(360)
-- Spawn two aircraft.
e3:Spawn(2)
-- Create RAT object from Yak-40 template.
local yak=RAT:New("RAT_YAK")
-- These are the airports a Yak-40 gets a parking slot.
yak:SetDeparture({AIRBASE.Nevada.Tonopah_Airport, AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Henderson_Executive_Airport, AIRBASE.Nevada.Nellis_AFB, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Laughlin_Airport})
-- Destination McCarran.
yak:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn eight Yak-40.
yak:Spawn(8)
-- Create RAT object from E-3A template.
local tf51=RAT:New("RAT_TF51")
tf51:SetCoalition("same")
-- Departure airport will be chosen from this list.
tf51:SetDeparture({AIRBASE.Nevada.Henderson_Executive_Airport, AIRBASE.Nevada.Boulder_City_Airport, AIRBASE.Nevada.Echo_Bay})
-- All will fly to McCarran.
tf51:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn four TF-51D
tf51:Spawn(4)
@@ -1,101 +1,101 @@
---
-- Name: RAT-011 - Traffic at Nellis AFB
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
-- Updated: 10 Oct 2023
--
-- # Situation:
--
-- We want to generate some random air traffic at Nellis AFB.
--
-- # Test cases:
--
-- 1. F-15C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech.
-- 2. A-10C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech.
-- 3. F/A-18C are spawned at Tonopah, Groom Lake or Creech and fly to Nellis.
-- 4. KC-135 are spawned in air at two zones heading for Nellis.
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from F-15C template.
local f15=RAT:New("RAT_F15C")
-- Departure Nellis.
f15:SetDeparture(AIRBASE.Nevada.Nellis_AFB)
f15:SetCoalition("same")
-- Destination Tonopah, Groom Lake or Creech.
f15:SetDestination({AIRBASE.Nevada.Tonopah_Airport, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Spawn three flights.
f15:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
local a10=RAT:New("RAT_A10C")
-- Departure Nellis.
a10:SetDeparture(AIRBASE.Nevada.Nellis_AFB)
a10:SetCoalition("same")
-- Destination Tonopa, Groom Lake or Creech.
a10:SetDestination({AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Spawning will happen 60 seconds after mission start.
a10:SetSpawnDelay(60)
-- Spawn three flights.
a10:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Creat RAT object from F/A-18C template.
local f18=RAT:New("RAT_F18C")
f18:SetCoalition("same")
-- Departure airports.
f18:SetDeparture({AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Destination Nellis.
f18:SetDestination(AIRBASE.Nevada.Nellis_AFB)
-- Spawn three flights.
f18:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from KC-135 template.
local kc135=RAT:New("RAT_KC135")
-- Set departure zones. We need takeoff "air" for that.
kc135:SetDeparture({"RAT Zone North", "RAT Zone East"})
-- Set spawn in air.
kc135:SetTakeoff("air")
-- Aircraft will fly to McCarran
kc135:SetDestination(AIRBASE.Nevada.Nellis_AFB)
-- Spawning of aircraft will happen in 2 minute intervalls.
kc135:SetSpawnInterval(120)
-- Spawn two aircraft.
kc135:Spawn(2)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Store time at mission start
local T0=timer.getTime()
-- Send message with current misson time to all coalisions
local function print_mission_time()
local Tnow=timer.getTime()
local mission_time=Tnow-T0
local mission_time_minutes=mission_time/60
local mission_time_seconds=mission_time%60
local text=string.format("Mission Time: %i:%02d", mission_time_minutes,mission_time_seconds)
MESSAGE:New(text, 5):ToAll()
end
-- Start scheduler to report mission time.
---
-- Name: RAT-011 - Traffic at Nellis AFB
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
-- Updated: 10 Oct 2023
--
-- # Situation:
--
-- We want to generate some random air traffic at Nellis AFB.
--
-- # Test cases:
--
-- 1. F-15C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech.
-- 2. A-10C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech.
-- 3. F/A-18C are spawned at Tonopah, Groom Lake or Creech and fly to Nellis.
-- 4. KC-135 are spawned in air at two zones heading for Nellis.
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from F-15C template.
local f15=RAT:New("RAT_F15C")
-- Departure Nellis.
f15:SetDeparture(AIRBASE.Nevada.Nellis_AFB)
f15:SetCoalition("same")
-- Destination Tonopah, Groom Lake or Creech.
f15:SetDestination({AIRBASE.Nevada.Tonopah_Airport, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Spawn three flights.
f15:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
local a10=RAT:New("RAT_A10C")
-- Departure Nellis.
a10:SetDeparture(AIRBASE.Nevada.Nellis_AFB)
a10:SetCoalition("same")
-- Destination Tonopa, Groom Lake or Creech.
a10:SetDestination({AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Spawning will happen 60 seconds after mission start.
a10:SetSpawnDelay(60)
-- Spawn three flights.
a10:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Creat RAT object from F/A-18C template.
local f18=RAT:New("RAT_F18C")
f18:SetCoalition("same")
-- Departure airports.
f18:SetDeparture({AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Destination Nellis.
f18:SetDestination(AIRBASE.Nevada.Nellis_AFB)
-- Spawn three flights.
f18:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from KC-135 template.
local kc135=RAT:New("RAT_KC135")
-- Set departure zones. We need takeoff "air" for that.
kc135:SetDeparture({"RAT Zone North", "RAT Zone East"})
-- Set spawn in air.
kc135:SetTakeoff("air")
-- Aircraft will fly to McCarran
kc135:SetDestination(AIRBASE.Nevada.Nellis_AFB)
-- Spawning of aircraft will happen in 2 minute intervalls.
kc135:SetSpawnInterval(120)
-- Spawn two aircraft.
kc135:Spawn(2)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Store time at mission start
local T0=timer.getTime()
-- Send message with current misson time to all coalisions
local function print_mission_time()
local Tnow=timer.getTime()
local mission_time=Tnow-T0
local mission_time_minutes=mission_time/60
local mission_time_seconds=mission_time%60
local text=string.format("Mission Time: %i:%02d", mission_time_minutes,mission_time_seconds)
MESSAGE:New(text, 5):ToAll()
end
-- Start scheduler to report mission time.
local Scheduler_Mission_Time = SCHEDULER:New(nil, print_mission_time, {}, 0, 10)
@@ -1,85 +1,85 @@
-- Name: RAT-020 - WWII Scenario
-- Author: funkyfranky
-- Date Created: 16 Sep 2017
--
-- # Situation:
--
-- We want to generate some random air traffic of WWII units in 1944 Normandy.
-- In the mission editor we have defined a couple of red and blue airfields.
-- Germans are located to the east while the allies hold the western airfiels and those of southern England.
-- Note that the default setting of the RAT aircraft is to hold their weapons and to ignore enemy threads.
--
-- # Test cases:
--
-- 1. Four two-ship flights of Bf-109 get random routes restricted to red airfields.
-- 2. Two two-ship flights of FW-190 similar to the Bf-109s.
-- 3. Three two-ship flights of TF-51 get random routes restricted to blue airfields.
-- 4. Two two-ship flights of Spitfires are set up analogously to the TF-51
-- 5. One two-ship flight of Spitfires is explicitly ordered to fly back and forth across the channel.
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from Bf-109 template.
local bf109=RAT:New("RAT_Bf109")
-- Airports are restricted to red.
bf109:SetCoalition("sameonly")
-- Spawn four Bf-109.
bf109:Spawn(4)
-- Create RAT object from FW-190 template.
local fw190=RAT:New("RAT_Fw190")
-- Again, airports restricted to red.
fw190:SetCoalition("sameonly")
-- Spawn two FW-190.
fw190:Spawn(2)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from TF-51 template.
local tf51=RAT:New("RAT_TF-51")
-- Allow only blue airports for departure and destination.
tf51:SetCoalition("sameonly")
-- We exclude ever airport across the channel.
tf51:ExcludedAirports({"Needs Oar Point", "Funtington", "Tangmere", "Ford", "Chailey"})
-- Spawn three TF-51.
tf51:Spawn(3)
-- Creat RAT object from Spitfire template.
local spit=RAT:New("RAT_Spit")
-- Blue airports only.
spit:SetCoalition("sameonly")
-- We exclude ever airport across the channel.
spit:ExcludedAirports({"Needs Oar Point", "Funtington", "Tangmere", "Ford", "Chailey"})
-- Spawn two two-ship flights.
spit:Spawn(2)
-- Create RAT object from Spitfire template.
-- NOTE that since we have already used this template, we need to give it another name.
-- This is done by the second parameter, which is the alias name for RAT aircraft.
-- In particular, this will be the name given in the F10 Menu.
-- IMPORTANT: It is no problem to reuse the same template multiple times. But each template must get its own alias!
local spit_commute=RAT:New("RAT_Spit", "RAT_Spit_Commute")
-- These Spitfires get the order fly across the channel and to commute between Chailey and Le Molay.
spit_commute:SetDeparture("Chailey")
spit_commute:SetDestination("Le Molay")
spit_commute:Commute()
-- Set another livery for these aircraft.
spit_commute:Livery("RAF, No. 126 Squadron, Harrowbeer")
-- Spawn one two-ship flight.
spit_commute:Spawn()
-- Name: RAT-020 - WWII Scenario
-- Author: funkyfranky
-- Date Created: 16 Sep 2017
--
-- # Situation:
--
-- We want to generate some random air traffic of WWII units in 1944 Normandy.
-- In the mission editor we have defined a couple of red and blue airfields.
-- Germans are located to the east while the allies hold the western airfiels and those of southern England.
-- Note that the default setting of the RAT aircraft is to hold their weapons and to ignore enemy threads.
--
-- # Test cases:
--
-- 1. Four two-ship flights of Bf-109 get random routes restricted to red airfields.
-- 2. Two two-ship flights of FW-190 similar to the Bf-109s.
-- 3. Three two-ship flights of TF-51 get random routes restricted to blue airfields.
-- 4. Two two-ship flights of Spitfires are set up analogously to the TF-51
-- 5. One two-ship flight of Spitfires is explicitly ordered to fly back and forth across the channel.
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from Bf-109 template.
local bf109=RAT:New("RAT_Bf109")
-- Airports are restricted to red.
bf109:SetCoalition("sameonly")
-- Spawn four Bf-109.
bf109:Spawn(4)
-- Create RAT object from FW-190 template.
local fw190=RAT:New("RAT_Fw190")
-- Again, airports restricted to red.
fw190:SetCoalition("sameonly")
-- Spawn two FW-190.
fw190:Spawn(2)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from TF-51 template.
local tf51=RAT:New("RAT_TF-51")
-- Allow only blue airports for departure and destination.
tf51:SetCoalition("sameonly")
-- We exclude ever airport across the channel.
tf51:ExcludedAirports({"Needs Oar Point", "Funtington", "Tangmere", "Ford", "Chailey"})
-- Spawn three TF-51.
tf51:Spawn(3)
-- Creat RAT object from Spitfire template.
local spit=RAT:New("RAT_Spit")
-- Blue airports only.
spit:SetCoalition("sameonly")
-- We exclude ever airport across the channel.
spit:ExcludedAirports({"Needs Oar Point", "Funtington", "Tangmere", "Ford", "Chailey"})
-- Spawn two two-ship flights.
spit:Spawn(2)
-- Create RAT object from Spitfire template.
-- NOTE that since we have already used this template, we need to give it another name.
-- This is done by the second parameter, which is the alias name for RAT aircraft.
-- In particular, this will be the name given in the F10 Menu.
-- IMPORTANT: It is no problem to reuse the same template multiple times. But each template must get its own alias!
local spit_commute=RAT:New("RAT_Spit", "RAT_Spit_Commute")
-- These Spitfires get the order fly across the channel and to commute between Chailey and Le Molay.
spit_commute:SetDeparture("Chailey")
spit_commute:SetDestination("Le Molay")
spit_commute:Commute()
-- Set another livery for these aircraft.
spit_commute:Livery("RAF, No. 126 Squadron, Harrowbeer")
-- Spawn one two-ship flight.
spit_commute:Spawn()
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------