diff --git a/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.lua b/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.lua new file mode 100644 index 0000000000..8abd67b362 --- /dev/null +++ b/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.lua @@ -0,0 +1,3 @@ + +local PlanesClientSet = SET_CLIENT:New():FilterCategories( "plane" ):FilterStart() +local AirbasePolice = AIRBASEPOLICE_CAUCASUS:New( PlanesClientSet ) diff --git a/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.miz b/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.miz new file mode 100644 index 0000000000..20dad9db67 Binary files /dev/null and b/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.miz differ diff --git a/ABP - Airbase Police/ABP-001 - Caucasus/pack.ps1 b/ABP - Airbase Police/ABP-001 - Caucasus/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ABP - Airbase Police/ABP-001 - Caucasus/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ABP - Airbase Police/ABP-001 - Caucasus/unpack.ps1 b/ABP - Airbase Police/ABP-001 - Caucasus/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ABP - Airbase Police/ABP-001 - Caucasus/unpack.ps1 @@ -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" * diff --git a/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.lua b/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.lua new file mode 100644 index 0000000000..f908630f90 --- /dev/null +++ b/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.lua @@ -0,0 +1,3 @@ + +local PlanesClientSet = SET_CLIENT:New():FilterCategories( "plane" ):FilterStart() +local AirbasePolice = AIRBASEPOLICE_NEVADA:New( PlanesClientSet ) diff --git a/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.miz b/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.miz new file mode 100644 index 0000000000..a4fa9c8823 Binary files /dev/null and b/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.miz differ diff --git a/ABP - Airbase Police/ABP-002 - Nevada/pack.ps1 b/ABP - Airbase Police/ABP-002 - Nevada/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ABP - Airbase Police/ABP-002 - Nevada/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ABP - Airbase Police/ABP-002 - Nevada/unpack.ps1 b/ABP - Airbase Police/ABP-002 - Nevada/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ABP - Airbase Police/ABP-002 - Nevada/unpack.ps1 @@ -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" * diff --git a/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua b/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua new file mode 100644 index 0000000000..44b68cdb4e --- /dev/null +++ b/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua @@ -0,0 +1,28 @@ +--- +-- Name: AIB-001 - Spawned AI +-- Author: FlightControl +-- Date Created: 07 Dec 2016 +-- +-- # Situation: +-- +-- For the red coalition, 2 client slots are foreseen. +-- We test the AI spawning frequency, validating the number of spawned AI, +-- matching the amount of players that not have joined the mission. +-- When players join, AI should fly to the nearest home base. +-- +-- # Test cases: +-- +-- 1. If no player is logging into the red slots, 2 red AI planes should be alive. +-- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. +-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. + +-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. +RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) + +-- Define the SPAWN object for the red AI plane template. +-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. +-- If a blocked plane exists, this red plane will be ReSpawned. +RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) + +-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. +RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) diff --git a/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz b/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz new file mode 100644 index 0000000000..f43c90cf8e Binary files /dev/null and b/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz differ diff --git a/AIB - AI Balancing/AIB-001 - Spawned AI/pack.ps1 b/AIB - AI Balancing/AIB-001 - Spawned AI/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIB - AI Balancing/AIB-001 - Spawned AI/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIB - AI Balancing/AIB-001 - Spawned AI/unpack.ps1 b/AIB - AI Balancing/AIB-001 - Spawned AI/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIB - AI Balancing/AIB-001 - Spawned AI/unpack.ps1 @@ -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" * diff --git a/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua b/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua new file mode 100644 index 0000000000..c0b085a927 --- /dev/null +++ b/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua @@ -0,0 +1,43 @@ +-- Name: AIB-002 - Patrol AI.lua +-- Author: FlightControl +-- Date Created: 7 December 2016 +-- +-- # Situation: +-- +-- For the red coalition, 2 client slots are foreseen. +-- For those players that have not joined the mission, red AI is spawned. +-- The red AI should start patrolling an area until fuel is empty and return to the home base. +-- +-- # Test cases: +-- +-- 1. If no player is logging into the red slots, 2 red AI planes should be alive. +-- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. +-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. +-- 4. Spawned AI should take-off from the airbase, and start patrolling the area around Anapa. +-- 5. When the AI is out-of-fuel, it should report it is returning to the home base, and land at Anapa. + +-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. +RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) + +-- Define the SPAWN object for the red AI plane template. +-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. +-- If a blocked plane exists, this red plane will be ReSpawned. +RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) + +-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. +RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) + +local PatrolZones = {} + +function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) + + local PatrolZoneGroup = GROUP:FindByName( "PatrolZone" ) + local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) + + + PatrolZones[AIGroup] = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 400, 600 ) + PatrolZones[AIGroup]:ManageFuel( 0.2, 60 ) + PatrolZones[AIGroup]:SetControllable( AIGroup ) + PatrolZones[AIGroup]:__Start( 5 ) + +end diff --git a/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz b/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz new file mode 100644 index 0000000000..fe3002e4a3 Binary files /dev/null and b/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz differ diff --git a/AIB - AI Balancing/AIB-002 - Patrol AI/pack.ps1 b/AIB - AI Balancing/AIB-002 - Patrol AI/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIB - AI Balancing/AIB-002 - Patrol AI/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIB - AI Balancing/AIB-002 - Patrol AI/unpack.ps1 b/AIB - AI Balancing/AIB-002 - Patrol AI/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIB - AI Balancing/AIB-002 - Patrol AI/unpack.ps1 @@ -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" * diff --git a/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua b/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua new file mode 100644 index 0000000000..2f4a137abf --- /dev/null +++ b/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua @@ -0,0 +1,24 @@ +RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) +RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) +RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) + +RU_AirbasesSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart() +RU_AirbasesSet:Flush() +RU_AI_Balancer:ReturnToNearestAirbases( 10000, RU_AirbasesSet ) + + +US_PlanesClientSet = SET_CLIENT:New():FilterCountries( "USA" ):FilterCategories( "plane" ) +US_PlanesSpawn = SPAWN:New( "AI US" ):InitCleanUp( 20 ) +US_AI_Balancer = AI_BALANCER:New( US_PlanesClientSet, US_PlanesSpawn ) + +--RU_AI_Balancer:ReturnToHomeAirbase( 10000 ) + +--local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone Blue" ) +--local PatrolZoneBlue = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) +--local PatrolZoneB = AI_PATROL_ZONE:New( PatrolZoneBlue, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 ) +--US_AI_Balancer:SetPatrolZone( PatrolZoneB ) +-- +--local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone Red" ) +--local PatrolZoneRed = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) +--local PatrolZoneR = AI_PATROL_ZONE:New( PatrolZoneRed, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 ) +--RU_AI_Balancer:SetPatrolZone( PatrolZoneR ) diff --git a/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz b/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz new file mode 100644 index 0000000000..ed3ecbc6db Binary files /dev/null and b/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz differ diff --git a/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/pack.ps1 b/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/unpack.ps1 b/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/unpack.ps1 @@ -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" * diff --git a/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.lua b/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.lua new file mode 100644 index 0000000000..07efab0d00 --- /dev/null +++ b/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.lua @@ -0,0 +1,47 @@ +-- Name: AIB-004 - Respawn Test when Destroyed.lua +-- Author: FlightControl +-- Date Created: 7 January 2017 +-- +-- # Situation: +-- +-- For the red coalition, 2 client slots are foreseen. +-- For those players that have not joined the mission, red AI is spawned. +-- The red AI should start patrolling an area. +-- +-- The blue side has SAMs nearby. +-- Once the red AI takes off, the red AI is attacked by the blue SAMs. +-- Red AI should be killed and once that happens, a Respawn of the group should happen! +-- The Respawn happens through the InitCleanUp() API of SPAWN. +-- +-- # Test cases: +-- +-- 1. If no player is logging into the red slots, 2 red AI planes should be alive. +-- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. +-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. +-- 4. Monitor that once a red AI is destroyed, that it ReSpawns... + + +-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. +RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) + +-- Define the SPAWN object for the red AI plane template. +-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. +-- If a blocked plane exists, this red plane will be ReSpawned. +RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) + +-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. +RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) + +function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) + + local PatrolZoneGroup = GROUP:FindByName( "PatrolZone" ) + local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) + + + local Patrol = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 400, 600 ) + Patrol:ManageFuel( 0.2, 60 ) + Patrol:SetControllable( AIGroup ) + Patrol:__Start( 5 ) + +end + diff --git a/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz b/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz new file mode 100644 index 0000000000..698bd358b3 Binary files /dev/null and b/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz differ diff --git a/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/pack.ps1 b/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/unpack.ps1 b/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/unpack.ps1 @@ -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" * diff --git a/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.lua b/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.lua new file mode 100644 index 0000000000..f0253d5e94 --- /dev/null +++ b/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.lua @@ -0,0 +1,51 @@ +-- Name: AIB-005 - Patrol AI and Randomize Zones +-- Author: FlightControl +-- Date Created: 10 Jan 2016 +-- +-- # Situation: +-- +-- For the red coalition, 2 client slots are foreseen. +-- For those players that have not joined the mission, red AI is spawned. +-- The red AI should start patrolling an area until fuel is empty and return to the home base. +-- For each AI being spawned, ensure that they fly to a random zone defined within the mission editor. +-- Right now there are two patrol zones defined, so the AI should start patrolliing in one of these zones. +-- +-- # Test cases: +-- +-- 1. If no player is logging into the red slots, 2 red AI planes should be alive. +-- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. +-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. +-- 4. Spawned AI should take-off from the airbase, and start patrolling the area around Anapa. +-- 5. When the AI is out-of-fuel, it should report it is returning to the home base, and land at Anapa. +-- 6. Ensure that you see the AI patrol in one of the two zones ... + +-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. +RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) + +-- Define the SPAWN object for the red AI plane template. +-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. +-- If a blocked plane exists, this red plane will be ReSpawned. +RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) + +-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. +RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) + +-- Create the first polygon zone ... +PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" ) +PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 ) + +-- Create the second polygon zone ... +PatrolZoneGroup2 = GROUP:FindByName( "PatrolZone2" ) +PatrolZone2 = ZONE_POLYGON:New( "PatrolZone2", PatrolZoneGroup2 ) + +-- Now, create an array of these zones ... +PatrolZoneArray = { PatrolZone1, PatrolZone2 } + +function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) + + local Patrol = AI_PATROL_ZONE:New( PatrolZoneArray[math.random( 1, 2 )], 3000, 6000, 400, 600 ) + Patrol:ManageFuel( 0.2, 60 ) + Patrol:SetControllable( AIGroup ) + Patrol:Start() + +end diff --git a/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz b/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz new file mode 100644 index 0000000000..814d1db8ed Binary files /dev/null and b/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz differ diff --git a/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/pack.ps1 b/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/unpack.ps1 b/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/unpack.ps1 @@ -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" * diff --git a/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.lua b/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.lua new file mode 100644 index 0000000000..31574814df --- /dev/null +++ b/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.lua @@ -0,0 +1,43 @@ +-- Name: AIB-005 - Patrol AI and Randomize Zones +-- Author: FlightControl +-- Date Created: 10 Jan 2016 +-- +-- # Situation: +-- +-- For the red coalition, 2 client slots are foreseen. +-- For those players that have not joined the mission, red AI is spawned. +-- You'll notice a lot of AI is being spawned, as there are a lot of slots... +-- If the SPAWN API :InitCleanUp( secs ) is NOT used, you'll notice that the planes block each other on the runway. +-- After a short period of time, nothing will move anymore... +-- The :InitCleanUp( seconds ) API of the SPAWN class ensure that any AI that is parked longer than the +-- specified amount of seconds, is respawned back at the parking position. +-- This frees up the other planes departing, and the airbase is in this way decluttered... +-- +-- # Test cases: +-- +-- 1. Observe the de-cluttering of planes at Krymsk. +-- 2. Play with the InitCleanUp API of the SPAWN class, extende the amount of seconds to find the optimal setting. + +-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. +RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) + +-- Define the SPAWN object for the red AI plane template. +-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. +-- If a blocked plane exists, this red plane will be ReSpawned. +RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) + +-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. +RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) + +-- Create the first polygon zone ... +PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" ) +PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 ) + +function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) + + local Patrol = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 ) + Patrol:ManageFuel( 0.2, 60 ) + Patrol:SetControllable( AIGroup ) + Patrol:__Start( 5 ) + +end diff --git a/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz b/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz new file mode 100644 index 0000000000..59e3e154aa Binary files /dev/null and b/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz differ diff --git a/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/pack.ps1 b/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/unpack.ps1 b/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/unpack.ps1 @@ -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" * diff --git a/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.lua b/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.lua new file mode 100644 index 0000000000..d6cc8a8f3b --- /dev/null +++ b/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.lua @@ -0,0 +1,163 @@ +-- Name: AIB-007 - AI Balancers For all airports and both coalitions +-- Author: Delta99 +-- Date Created: 11 Feb 2017 +-- +-- Originally created to solve issues jg7xman (from Moose Slack group) was having in creating +-- AI_BALANCER across multiple airbases. + +-- # Situation: +-- +-- AI_BALANCERS created per airbase for both coalitions. Mutiple patrol zones are created +-- for each side. Each flight that is created by AI_BALANCER will pick a random patrol zone +-- to patrol. + +-- # Test Cases +-- +-- 1. Observe at least 1 flight spawning and taking off from each airbase. +-- 2. Each flight patrols randomly in one of its sides zones. +-- 3. AI will respawn after killed. +-- 4. Additional client slots are available at Sochi. If players don't take a slot there +-- will be more than one AI taking off from Sochi. +-- 5. Batumi contains a flight of 3 units rather than just 1 like most of the rest of the airbases. +-- 6. Watch the coalition AI clash and kill each other. + +-- Create the Red Patrol Zone Array + +-- This zone array will be used in the AI_BALANCER to randomize the patrol +-- zone that each spawned group will patrol + +RedPatrolZone = {} +RedPatrolZone[1] = ZONE:New( "RedPatrolZone1" ) +RedPatrolZone[2] = ZONE:New( "RedPatrolZone2" ) +RedPatrolZone[3] = ZONE:New( "RedPatrolZone3" ) +RedPatrolZone[4] = ZONE:New( "RedPatrolZone4" ) +RedPatrolZone[5] = ZONE:New( "RedPatrolZone5" ) +RedPatrolZone[6] = ZONE:New( "RedPatrolZone6" ) + +-- Russian CAP Aircraft + +-- These are the aircraft created in the mission editor that the AI will spawn +-- with replacing any CLIENT created aircraft in the mission that a human +-- player does not take. + +RU_PlanesSpawn = {} +RU_PlanesSpawn[1] = SPAWN:New( "RU CAP Anapa AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[2] = SPAWN:New( "RU CAP Beslan AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[3] = SPAWN:New( "RU CAP Gelendzhik AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[4] = SPAWN:New( "RU CAP Krasnodar Center AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[5] = SPAWN:New( "RU CAP Krasnodar Pashkovsky AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[6] = SPAWN:New( "RU CAP Krymsk AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[7] = SPAWN:New( "RU CAP Maykop AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[8] = SPAWN:New( "RU CAP Mineralnye Vody AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[9] = SPAWN:New( "RU CAP Mozdok AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[10] = SPAWN:New( "RU CAP Nalchik AB" ):InitCleanUp( 45 ) +RU_PlanesSpawn[11] = SPAWN:New( "RU CAP Novorossiysk AB" ):InitCleanUp( 45 ) + +-- Russian Client Aircraft (via AI_BALANCER, AI will replace these if no human players are in the slot) + +-- If you want more client slots per airbase that you want AI to be able to take control of then +-- name them with the prefixes below and they will be picked up automatically by FilterPrevixes. +-- +-- For example, if you want another Client slot available at Anapa name it "RU CLIENT Anapa AB 2". +-- The code here does not need to be changed. Only an addition in the mission editor. An example +-- of this can be found on the USA side at Sochi AB. + +RU_PlanesClientSet = {} +RU_PlanesClientSet[1] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Anapa AB") +RU_PlanesClientSet[2] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Beslan AB") +RU_PlanesClientSet[3] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Gelendzhik AB") +RU_PlanesClientSet[4] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Krasnodar Center AB") +RU_PlanesClientSet[5] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Krasnodar Pashkovsky AB") +RU_PlanesClientSet[6] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Krymsk AB") +RU_PlanesClientSet[7] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Maykop AB") +RU_PlanesClientSet[8] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Mineralnye Vody AB") +RU_PlanesClientSet[9] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Mozdok AB") +RU_PlanesClientSet[10] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Nalchik AB") +RU_PlanesClientSet[11] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Novorossiysk AB") + +-- We setup an array to store all the AI_BALANCERS that are going to be created. Basically one +-- per airbase. We loop through and create an AI_BALANCER as well as a separate OnAfterSpawned +-- function for each. The Patrol Zone is randomized in the first parameter to AI_PATROL_ZONE:New() +-- call. This is done for each of the AI_BALANCERS. To add more patrol zones, just define them in +-- the mission editor and add into the array above. Code here does not need to be changed. The +-- table.getn(RedPatrolZone) gets the number of elements in the RedPatrolZone array so that all +-- of them are included to pick randomly. + + +RU_AI_Balancer = {} +for i=1, 11 do + RU_AI_Balancer[i] = AI_BALANCER:New(RU_PlanesClientSet[i], RU_PlanesSpawn[i]) + + -- We set a local variable within the for loop to the AI_BALANCER that was just created. + -- I couldn't get RU_AI_BALANCER[i]:OnAfterSpawn to be recognized so this is just pointing + -- curAIBalancer to the relevant RU_AI_BALANCER array item for each loop. + + -- So in this case there are essentially 11 OnAfterSpawned functions defined and handled. + + local curAIBalancer = RU_AI_Balancer[i] + function curAIBalancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) + local Patrol = AI_PATROL_ZONE:New( RedPatrolZone[math.random( 1, table.getn(RedPatrolZone))], 1500, 5500, 700, 1400 ) + Patrol:ManageFuel( 0.2, 60 ) + Patrol:SetControllable( AIGroup ) + Patrol:Start() + end +end + +-- US / Blue side is setup pretty much identically to the RU side above. Same detailed comments +-- above apply here. The main difference here is 10 airbases instead of 11. + +-- Another difference is additional client slots at Sochi and a group defined at Batumi with +-- more than 1 unit per group (flight of 3 units). This is just to show that you can have more +-- client slots per airbase and more units in a single group that the AI will control. I think +-- this will also allow you to fly lead with AI on your wing or you can fly wing with an AI +-- leader. + +-- Create the Blue Patrol Zone Array +BluePatrolZone = {} +BluePatrolZone[1] = ZONE:New( "BluePatrolZone1") +BluePatrolZone[2] = ZONE:New( "BluePatrolZone2") +BluePatrolZone[3] = ZONE:New( "BluePatrolZone3") +BluePatrolZone[4] = ZONE:New( "BluePatrolZone4") +BluePatrolZone[5] = ZONE:New( "BluePatrolZone5") +BluePatrolZone[6] = ZONE:New( "BluePatrolZone6") + +--United States CAP Aircraft (these are used as templates for AI) + +US_PlanesSpawn = {} +US_PlanesSpawn[1] = SPAWN:New( "US CAP Batumi AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[2] = SPAWN:New( "US CAP Gudauta AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[3] = SPAWN:New( "US CAP Kobuleti AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[4] = SPAWN:New( "US CAP Kutaisi AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[5] = SPAWN:New( "US CAP Senaki AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[6] = SPAWN:New( "US CAP Sochi AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[7] = SPAWN:New( "US CAP Soganlug AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[8] = SPAWN:New( "US CAP Sukhumi AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[9] = SPAWN:New( "US CAP Vaziani AB" ):InitCleanUp( 45 ) +US_PlanesSpawn[10] = SPAWN:New( "US CAP Tbilisi AB" ):InitCleanUp( 45 ) + +--United States Client Aircraft (via AI_BALANCER, AI will replace these if no human players are in the slot) + +US_PlanesClientSet = {} +US_PlanesClientSet[1] = SET_CLIENT:New():FilterPrefixes("US CLIENT Batumi AB") +US_PlanesClientSet[2] = SET_CLIENT:New():FilterPrefixes("US CLIENT Gudauta AB") +US_PlanesClientSet[3] = SET_CLIENT:New():FilterPrefixes("US CLIENT Kobuleti AB") +US_PlanesClientSet[4] = SET_CLIENT:New():FilterPrefixes("US CLIENT Kutaisi AB") +US_PlanesClientSet[5] = SET_CLIENT:New():FilterPrefixes("US CLIENT Senaki AB") +US_PlanesClientSet[6] = SET_CLIENT:New():FilterPrefixes("US CLIENT Sochi AB") +US_PlanesClientSet[7] = SET_CLIENT:New():FilterPrefixes("US CLIENT Soganlug AB") +US_PlanesClientSet[8] = SET_CLIENT:New():FilterPrefixes("US CLIENT Sukhumi AB") +US_PlanesClientSet[9] = SET_CLIENT:New():FilterPrefixes("US CLIENT Vaziani AB") +US_PlanesClientSet[10] = SET_CLIENT:New():FilterPrefixes("US CLIENT Tbilisi AB") + +US_AI_Balancer = {} +for i=1, 10 do + US_AI_Balancer[i] = AI_BALANCER:New( US_PlanesClientSet[i], US_PlanesSpawn[i] ) + + local curAIBalancer = US_AI_Balancer[i] + function curAIBalancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) + local Patrol = AI_PATROL_ZONE:New( BluePatrolZone[math.random( 1, table.getn(BluePatrolZone))], 1500, 5500, 700, 1400 ) + Patrol:ManageFuel( 0.2, 60 ) + Patrol:SetControllable( AIGroup ) + Patrol:Start() + end +end diff --git a/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.miz b/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.miz new file mode 100644 index 0000000000..550694d34e Binary files /dev/null and b/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.miz differ diff --git a/AIB - AI Balancing/AIB-007 - All Airports/pack.ps1 b/AIB - AI Balancing/AIB-007 - All Airports/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIB - AI Balancing/AIB-007 - All Airports/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIB - AI Balancing/AIB-007 - All Airports/unpack.ps1 b/AIB - AI Balancing/AIB-007 - All Airports/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIB - AI Balancing/AIB-007 - All Airports/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.lua b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.lua new file mode 100644 index 0000000000..956604cd68 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.lua @@ -0,0 +1,18 @@ +--- +-- Name: AIC-APC-000 - APC +-- Author: FlightControl +-- Date Created: 26 Mar 2018 +-- +-- A demonstration of the AI_CARGO_APC class. +-- This simple example transports Infantry. +-- The CARGO_GROUP objects are declared within the mission script. + +local Infantry1 = CARGO_GROUP:New( GROUP:FindByName( "Infantry1" ), "Infantry", "Infantry1", 500, 25 ) +local Infantry2 = CARGO_GROUP:New( GROUP:FindByName( "Infantry2" ), "Infantry", "Infantry2", 500, 25 ) +local Infantry3 = CARGO_GROUP:New( GROUP:FindByName( "Infantry3" ), "Infantry", "Infantry3", 500, 25 ) + +local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local APC = GROUP:FindByName( "APC" ) +AICargoAPC = AI_CARGO_APC:New( APC, InfantryCargoSet, 500 ) +AICargoAPC:__Pickup( 5 ) + diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.miz b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.miz new file mode 100644 index 0000000000..00ad2f4712 Binary files /dev/null and b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.miz differ diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/pack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/unpack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.lua b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.lua new file mode 100644 index 0000000000..3a4c8a6598 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.lua @@ -0,0 +1,16 @@ +--- +-- Name: AIC-APC-001 - APC with Cargo declared in ME +-- Author: FlightControl +-- Date Created: 26 Mar 2018 +-- +-- A demonstration of the AI_CARGO_APC class. +-- This simple example transports Infantry. +-- The cargo is declared with the ~CARGO tag in the mission editor. +-- So, within the mission, the infantry groups have the name: +-- + +local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local APC = GROUP:FindByName( "APC" ) +AICargoAPC = AI_CARGO_APC:New( APC, InfantryCargoSet, 500 ) +AICargoAPC:__Pickup( 5 ) + diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.miz b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.miz new file mode 100644 index 0000000000..fb29ec978d Binary files /dev/null and b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.miz differ diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/pack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/unpack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.lua b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.lua new file mode 100644 index 0000000000..548353884f --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.lua @@ -0,0 +1,12 @@ +--- +-- Name: AIC-APC-002 - APC Move by Game Master +-- Author: FlightControl +-- Date Created: 26 Mar 2018 +-- + +local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() + +local CargoCarrier = GROUP:FindByName( "Carrier" ) + +CargoTroops = AI_CARGO_APC:New( CargoCarrier, InfantryCargoSet, 500 ) + diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.miz b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.miz new file mode 100644 index 0000000000..bf819a75f5 Binary files /dev/null and b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.miz differ diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/pack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/unpack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.lua b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.lua new file mode 100644 index 0000000000..2624490d96 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.lua @@ -0,0 +1,14 @@ +--- +-- Name: AIC-APC-003 - APC Troops and Equipment +-- Author: FlightControl +-- Date Created: 07 Apr 2018 +-- + +local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() + +local CargoCarrier = GROUP:FindByName( "Carrier" ) + +CargoTroops = AI_CARGO_APC:New( CargoCarrier, InfantryCargoSet, 350 ) + + + diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.miz b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.miz new file mode 100644 index 0000000000..3bc81124e8 Binary files /dev/null and b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.miz differ diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/pack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/unpack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.lua b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.lua new file mode 100644 index 0000000000..0ef77a487b --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.lua @@ -0,0 +1,26 @@ +--- +-- Name: AIC-APC-004 - APC Pickup +-- Author: FlightControl +-- Date Created: 23 Apr 2018 +-- + +local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local APC = GROUP:FindByName( "APC" ) +Cargo_APC = AI_CARGO_APC:New( APC, InfantryCargoSet, 350 ) +Cargo_APC:__Pickup( 1, ZONE:New( "Pickup" ):GetCoordinate() ) + + + +--- Loaded Handler OnAfter for Cargo_APC +-- @function [parent=#Cargo_APC] OnAfterLoaded +-- @param #Cargo_APC self +-- @param Wrapper.Group#GROUP APC +-- @param #string From +-- @param #string Event +-- @param #string To +function Cargo_APC:OnAfterLoaded( APC, From, Event, To ) + Cargo_APC:Deploy( ZONE:New( "Deploy" ):GetCoordinate() ) +end + + + diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.miz b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.miz new file mode 100644 index 0000000000..5ca400e797 Binary files /dev/null and b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.miz differ diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/pack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/unpack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-001 - Troops Relocate APC.lua b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-001 - Troops Relocate APC.lua new file mode 100644 index 0000000000..14db08b124 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-001 - Troops Relocate APC.lua @@ -0,0 +1,24 @@ +--- +-- Name: AIC-APC-001 - Troops Relocate APC +-- Author: FlightControl +-- Date Created: 07 Apr 2018 +-- +-- Demonstration of troops relocation when carrier is destroyed... +-- Carrier will relocate to the rescue carrier. + +local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() + +local CargoCarrier = GROUP:FindByName( "Carrier" ) + +CargoTroops = AI_CARGO_APC:New( CargoCarrier, InfantryCargoSet, 500 ) + + +function CargoTroops:OnAfterDestroyed( CargoCarrier ) + CargoTroops:F( { Destroyed = CargoCarrier } ) + -- The coordinate is passed where the carrier is destroyed. + local NewCarrierGroup = self:FindCarrier( CargoCarrier:GetCoordinate(), 1000 ) -- which returns one Carrier GROUP object or nil. + if NewCarrierGroup then + self:SetCarrier( NewCarrierGroup ) + end +end + diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-006 - Troops Relocate APC.miz b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-006 - Troops Relocate APC.miz new file mode 100644 index 0000000000..7873f7cc49 Binary files /dev/null and b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-006 - Troops Relocate APC.miz differ diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/pack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/unpack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.lua b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.lua new file mode 100644 index 0000000000..a73dd91dc9 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.lua @@ -0,0 +1,13 @@ +--- +-- Name: AIC-APC-010 - Multiple APC +-- Author: FlightControl +-- Date Created: 24 Apr 2018 +-- + +local InfantrySet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local APC = GROUP:FindByName( "APC" ) +Cargo_APC = AI_CARGO_APC:New( APC, InfantrySet, 150 ) +Cargo_APC:__Pickup( 2 ) + + + diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.miz b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.miz new file mode 100644 index 0000000000..64e2590696 Binary files /dev/null and b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.miz differ diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/pack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/unpack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.lua b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.lua new file mode 100644 index 0000000000..2fc87f90a1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.lua @@ -0,0 +1,42 @@ +--- +-- Name: AIC-APC-004 - APC Pickup +-- Author: FlightControl +-- Date Created: 23 Apr 2018 +-- + +local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() + +Cargo_APC = {} + +for i = 1, 4 do + Cargo_APC[i] = AI_CARGO_APC:New( GROUP:FindByName( "APC"..i ), InfantryCargoSet, 350 ) + + --- Loaded Handler OnAfter for Cargo_APC + -- @function [parent=#Cargo_APC] OnAfterLoaded + -- @param #Cargo_APC self + -- @param Wrapper.Group#GROUP APC + -- @param #string From + -- @param #string Event + -- @param #string To + Cargo_APC[i].OnAfterLoaded = function( self, APC, From, Event, To ) + self:Deploy( ZONE:New( "Deploy" ):GetRandomCoordinate( 300, 500 ), 70, "Line abreast" ) + end + + --- Unloaded Handler OnAfter for Cargo_APC + -- @function [parent=#Cargo_APC] OnAfterUnloaded + -- @param #Cargo_APC self + -- @param Wrapper.Group#GROUP APC + -- @param #string From + -- @param #string Event + -- @param #string To + Cargo_APC[i].OnAfterUnloaded = function( self, APC, From, Event, To ) + self:Pickup( ZONE:New( "Pickup" ):GetRandomCoordinate( 50, 70 ), 70, "Line abreast" ) + end + + Cargo_APC[i]:__Pickup( i * 120, ZONE:New( "Pickup" ):GetRandomCoordinate( 50, 70 ), 70, "Line abreast" ) + +end + + + + diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.miz b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.miz new file mode 100644 index 0000000000..8d8234e015 Binary files /dev/null and b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.miz differ diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/pack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/unpack.ps1 b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.lua b/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.lua new file mode 100644 index 0000000000..707948fbf1 --- /dev/null +++ b/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.lua @@ -0,0 +1,34 @@ +--- +-- Name: AIC-HEL-000 - Helicopter +-- Author: FlightControl +-- Date Created: 13 Apr 2018 +-- + +WorkerCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() + + +for i = 1, 10 do + local WorkerGroup = GROUP:FindByName( string.format( "Infantry#%03d", i ) ) + local WorkersCargo = CARGO_GROUP:New( WorkerGroup, "Workers", string.format( "Infantry %d", i ), 1000, 35 ) +end + +local Helicopter = GROUP:FindByName( "Helicopter" ) + +CargoHelicopter = AI_CARGO_HELICOPTER:New( Helicopter, WorkerCargoSet ) + + +PickupZone = ZONE:New( "PickupZone" ) +DeployZones = { ZONE:New( "DeployZone Alpha" ), ZONE:New( "DeployZone Beta" ), ZONE:New( "DeployZone Gamma" ) } + +CargoHelicopter:Pickup( PickupZone:GetRandomCoordinate( 500, 200 ) ) + +function CargoHelicopter:onafterLoaded( Helicopter, From, Event, To, Cargo ) + CargoHelicopter:Deploy( DeployZones[math.random( 1, #DeployZones ) ]:GetRandomCoordinate( 500, 100 ), math.random( 50, 250 ) ) +end + + +function CargoHelicopter:onafterUnloaded( Helicopter, From, Event, To, Cargo ) + CargoHelicopter:Pickup( PickupZone:GetRandomCoordinate( 500, 200 ), math.random( 50, 250 ) ) +end + + diff --git a/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.miz b/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.miz new file mode 100644 index 0000000000..37e5d65dfa Binary files /dev/null and b/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.miz differ diff --git a/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/pack.ps1 b/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/unpack.ps1 b/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/unpack.ps1 @@ -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" * diff --git a/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.lua b/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.lua new file mode 100644 index 0000000000..1a7482ee86 --- /dev/null +++ b/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.lua @@ -0,0 +1,35 @@ +--- +-- Name: AIC-PLN-000 - Airplane +-- Author: FlightControl +-- Date Created: 14 Apr 2018 +-- + +VehicleCargoSet = SET_CARGO:New():FilterTypes( "Vehicles" ):FilterStart() + + +for i = 1, 10 do + local WorkerGroup = GROUP:FindByName( string.format( "Vehicle #%03d", i ) ) + local WorkersCargo = CARGO_GROUP:New( WorkerGroup, "Vehicles", string.format( "Vehicle %d", i ), 5000, 35 ) +end + +local Airplane = GROUP:FindByName( "Airplane" ) + +CargoAirplane = AI_CARGO_AIRPLANE:New( Airplane, VehicleCargoSet ) + + +PickupAirbase = AIRBASE:FindByName( AIRBASE.Caucasus.Kobuleti ) +DeployAirbases = { AIRBASE:FindByName( AIRBASE.Caucasus.Batumi ), AIRBASE:FindByName( AIRBASE.Caucasus.Gudauta ) } + + +CargoAirplane:Pickup( PickupAirbase ) + +function CargoAirplane:onafterLoaded( Airplane, From, Event, To, Cargo ) + CargoAirplane:Deploy( DeployAirbases[math.random( 1, #DeployAirbases ) ], math.random( 50, 250 ) ) +end + + +function CargoAirplane:onafterUnloaded( Airplane, From, Event, To, Cargo ) + CargoAirplane:Pickup( PickupAirbase, math.random( 50, 250 ) ) +end + + diff --git a/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.miz b/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.miz new file mode 100644 index 0000000000..b23ec8b951 Binary files /dev/null and b/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.miz differ diff --git a/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/pack.ps1 b/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/unpack.ps1 b/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.lua new file mode 100644 index 0000000000..6a99afe218 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.lua @@ -0,0 +1,27 @@ +--- +-- Name: AID-008 - AI_A2A - CAP Grouping Test +-- Author: FlightControl +-- Date Created: 06 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" } ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200 ) +A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 10, 30, 1 ) +A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.miz new file mode 100644 index 0000000000..44b31448ca Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.lua new file mode 100644 index 0000000000..4d82132294 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.lua @@ -0,0 +1,30 @@ +--- +-- Name: AID-A2A-009 - Border Test +-- Author: FlightControl +-- Date Created: 06 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Setup the border zone. +-- In this case the border is a POLYGON, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Sochi", 1000, 1500 ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.miz new file mode 100644 index 0000000000..faf7564ea4 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.lua new file mode 100644 index 0000000000..56a68ef15c --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.lua @@ -0,0 +1,50 @@ +--- +-- Name: AID-A2A-010 - RTB and ReEngage +-- Author: FlightControl +-- Date Created: 30 May 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +--A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) + +A2ADispatcher:SetDefaultTakeoffFromParkingCold() +A2ADispatcher:SetDefaultLandingAtEngineShutdown() + +-- Blue attack simulation + +local Frequency = 180 + +BlueSpawn2 = SPAWN + :New( "RT NATO 2" ) + :InitLimit( 8, 40 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + :InitDelayOn() + :SpawnScheduled( Frequency, 0.5 ) + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.miz new file mode 100644 index 0000000000..c6afa0033d Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.lua new file mode 100644 index 0000000000..a3ec875645 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.lua @@ -0,0 +1,51 @@ +--- +-- Name: AID-A2A-011 - RTB Fuel Treshold test +-- Author: FlightControl +-- Date Created: 30 Jul 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +--A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Set the fuel treshold to 40%. Airplanes will return when only 40% of fuel left in the tank. +A2ADispatcher:SetDefaultFuelThreshold( 0.4 ) + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronOverhead( "Sochi", 1 ) +A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) + +-- CAP Squadron execution. + +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) + +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) + +A2ADispatcher:SetSquadronTakeoffFromParkingHot("Sochi") +A2ADispatcher:SetSquadronLandingAtEngineShutdown("Sochi") + + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.miz new file mode 100644 index 0000000000..c2068a37bc Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.lua new file mode 100644 index 0000000000..4d3131ab93 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.lua @@ -0,0 +1,51 @@ +--- +-- Name: AID-A2A-012 - CAP Time Interval Test +-- Author: FlightControl +-- Date Created: 30 Jul 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +--A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + + +A2ADispatcher:SetTacticalDisplay( true ) + +A2ADispatcher:SetDefaultCapLimit( 2 ) +A2ADispatcher:SetDefaultCapTimeInterval( 300, 300 ) -- Spawn each 5 minutes. + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronOverhead( "Sochi", 1 ) +A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) + +-- CAP Squadron execution. + +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) + + +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) + +A2ADispatcher:SetSquadronTakeoffFromParkingHot("Sochi") +A2ADispatcher:SetSquadronLandingAtEngineShutdown("Sochi") + + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.miz new file mode 100644 index 0000000000..687a684e62 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.lua new file mode 100644 index 0000000000..5812b35678 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.lua @@ -0,0 +1,47 @@ +--- +-- Name: AID-A2A-013 - Intercept Test +-- Author: FlightControl +-- Date Created: 31 Jul 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +--A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Test intercept. +A2ADispatcher:SetIntercept( 450 ) + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP MIG-31" }, 20 ) +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Sochi" ) +A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Sochi" ) + +A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronGci( "Gelend", 800, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Gelend" ) +A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Gelend" ) + +A2ADispatcher:Start() + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.miz new file mode 100644 index 0000000000..f0b399545e Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.lua new file mode 100644 index 0000000000..440fd2965a --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.lua @@ -0,0 +1,48 @@ +--- +-- Name: AID-A2A-014 - DisengageRange Test +-- Author: FlightControl +-- Date Created: 31 Jul 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +--A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Test intercept. +A2ADispatcher:SetIntercept( 450 ) + +-- Test an other disengage radius. +A2ADispatcher:SetDisengageRadius( 150000 ) + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP MIG-31" }, 20 ) +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Sochi" ) + + +A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronGci( "Gelend", 800, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Gelend" ) + + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.miz new file mode 100644 index 0000000000..3f55b8c63b Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.lua new file mode 100644 index 0000000000..583dc9ebf5 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.lua @@ -0,0 +1,53 @@ +--- +-- Name: AID-A2A-015 - Takeoff Test +-- Author: FlightControl +-- Date Created: 01 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +--A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Test intercept. +A2ADispatcher:SetIntercept( 450 ) + +-- Test an other disengage radius. +A2ADispatcher:SetDisengageRadius( 20000 ) + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP MIG-31" }, 20 ) +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Sochi" ) + +A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronGci( "Gelend", 800, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromRunway( "Gelend" ) + +A2ADispatcher:SetSquadron( "Anapa", AIRBASE.Caucasus.Anapa_Vityazevo, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronGci( "Anapa", 800, 1200 ) +A2ADispatcher:SetSquadronTakeoffInAir( "Anapa" ) + +A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronGci( "Novo", 800, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.miz new file mode 100644 index 0000000000..f5c2f548bb Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.lua new file mode 100644 index 0000000000..e55be8b3d5 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.lua @@ -0,0 +1,50 @@ +--- +-- Name: AID-A2A-016 - Refuel Tanker Test +-- Author: FlightControl +-- Date Created: 01 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Test intercept. +A2ADispatcher:SetIntercept( 450 ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-34" }, 20 ) +A2ADispatcher:SetSquadronCap( "Sochi", ZONE:New( "PatrolZone" ), 4000, 8000, 600, 800, 1000, 1300 ) +A2ADispatcher:SetSquadronCapInterval("Sochi", 2, 30, 600, 1 ) +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) + + +A2ADispatcher:SetDefaultFuelThreshold( 0.9 ) +A2ADispatcher:SetDefaultTanker( "Tanker" ) + + +A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-30" }, 20 ) +A2ADispatcher:SetSquadronCap( "Gelend", ZONE:New( "PatrolZoneGelend" ), 4000, 8000, 600, 800, 1000, 1300 ) +A2ADispatcher:SetSquadronCapInterval( "Gelend", 2, 30, 600, 1 ) +A2ADispatcher:SetSquadronGci( "Gelend", 900, 1200 ) + +A2ADispatcher:SetSquadronFuelThreshold( "Gelend", 0.8 ) +A2ADispatcher:SetSquadronTanker( "Gelend", "TankerGelend" ) + + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.miz new file mode 100644 index 0000000000..fb6aab5ffa Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.lua new file mode 100644 index 0000000000..c9cb820bc1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.lua @@ -0,0 +1,44 @@ +--- +-- Name: AID-A2A-017 - Spawn Altitude Test +-- Author: FlightControl +-- Date Created: 05 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Set the default takeoff method in the air. +A2ADispatcher:SetDefaultTakeoffInAir() + +-- Set the default takeoff altitude at 2000 meters. +A2ADispatcher:SetDefaultTakeoffInAirAltitude( 2000 ) -- Takeoff by default at 2000 meters. + + +-- Spawn for Sochi airbase. +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-34" }, 20 ) +A2ADispatcher:SetSquadronCap( "Sochi", ZONE:New( "PatrolZone" ), 4000, 8000, 600, 800, 1000, 1300 ) +A2ADispatcher:SetSquadronCapInterval("Sochi", 2, 30, 600, 1 ) +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) + + +-- Spawn for Gelend airbase. +A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-30" }, 20 ) +A2ADispatcher:SetSquadronCap( "Gelend", ZONE:New( "PatrolZoneGelend" ), 4000, 8000, 600, 800, 1000, 1300 ) +A2ADispatcher:SetSquadronCapInterval( "Gelend", 2, 30, 600, 1 ) +A2ADispatcher:SetSquadronGci( "Gelend", 900, 1200 ) + +-- Let Gelend squadron take off in the air at 4000 meters. +A2ADispatcher:SetSquadronTakeoffInAir( "Gelend", 4000 ) -- Takeoff in Gelend at 4000 meters. + + +-- Run the mission and observe the spawning altitudes. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.miz new file mode 100644 index 0000000000..e91995b1e9 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.lua new file mode 100644 index 0000000000..1b7477d7f5 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.lua @@ -0,0 +1,45 @@ +--- +-- Name: AID-A2A-018 - Unlimited Resources Test +-- Author: FlightControl +-- Date Created: 05 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +--A2ADispatcher:SetBorderZone( CCCPBorderZone ) + + +A2ADispatcher:SetTacticalDisplay( true ) + +-- Setup the squadrons. +-- Unlimited resources, as the Resources parameter of the :SetSquadron method is not given. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP MIG-31" } ) +A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Sochi" ) + +A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Gelend", 800, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromRunway( "Gelend" ) + +A2ADispatcher:SetSquadron( "Anapa", AIRBASE.Caucasus.Anapa_Vityazevo, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Anapa", 800, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromRunway( "Anapa" ) + +A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Novo", 800, 1200 ) +A2ADispatcher:SetSquadronTakeoffFromRunway( "Novo" ) + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.miz new file mode 100644 index 0000000000..0272980da0 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.lua new file mode 100644 index 0000000000..e9a94f24de --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.lua @@ -0,0 +1,31 @@ +--- +-- Name: AID-A2A-019 - Engage Range Test +-- Author: FlightControl +-- Date Created: 06 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a radius of 50km where any airborne friendly +-- without an assignment within 50km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 50000 ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" } ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200 ) +A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 10, 30, 1 ) + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.miz new file mode 100644 index 0000000000..f3c78b8b3b Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.lua new file mode 100644 index 0000000000..958046a556 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.lua @@ -0,0 +1,60 @@ +--- +-- Name: AID-A2A-020 - GCI RTB and ReEngage +-- Author: FlightControl +-- Date Created: 30 May 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +--A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Center, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Kras1", 900, 1200 ) + +A2ADispatcher:SetSquadron( "Kras2", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Kras2", 900, 1200 ) + +A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "May", 900, 1200 ) + + + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + +A2ADispatcher:Start() + +-- Blue attack simulation + +local Frequency = 300 + +BlueSpawn2 = SPAWN + :New( "RT NATO 2" ) + :InitLimit( 8, 40 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + :InitDelayOn() + :SpawnScheduled( Frequency, 0.5 ) + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.miz new file mode 100644 index 0000000000..becc6dd8f3 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.lua new file mode 100644 index 0000000000..d71552dbc8 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.lua @@ -0,0 +1,42 @@ +--- +-- Name: AID-A2A-021 - GCI Radius Test +-- Author: FlightControl +-- Date Created: 30 May 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + +A2ADispatcher:SetGciRadius( 100000 ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Center, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Kras1", 900, 1200 ) + +A2ADispatcher:SetSquadron( "Kras2", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Kras2", 900, 1200 ) + +A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "May", 900, 1200 ) + + + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.miz new file mode 100644 index 0000000000..8ce5a97ec8 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.lua new file mode 100644 index 0000000000..0eb253c633 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.lua @@ -0,0 +1,49 @@ +--- +-- Name: AID-A2A-022 - GCI Overhead +-- Author: FlightControl +-- Date Created: 05 Sep 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "May", 900, 1200 ) +A2ADispatcher:SetSquadronOverhead( "May", 0.25 ) + +A2ADispatcher:SetSquadron( "Kras", AIRBASE.Caucasus.Krasnodar_Center, { "SQ CCCP SU-27" } ) +A2ADispatcher:SetSquadronGci( "Kras", 900, 1200 ) +A2ADispatcher:SetSquadronOverhead( "Kras", 1.5 ) + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + +-- Blue attack simulation + +local Frequency = 30 + +BlueSpawn2 = SPAWN + :New( "RT NATO" ) + :InitLimit( 1, 40 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + :InitDelayOn() + :SpawnScheduled( Frequency, 0.5 ) + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.miz new file mode 100644 index 0000000000..ddddeef111 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.lua new file mode 100644 index 0000000000..8a1f845f3a --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.lua @@ -0,0 +1,54 @@ +--- +-- Name: AID-A2A-030 - CAP RTB and ReEngage +-- Author: FlightControl +-- Date Created: 30 May 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) +--Detection:BoundDetectedZones() + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 200000 ) + +A2ADispatcher:SetDisengageRadius( 200000 ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" }, 20 ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "Kras1", 4, 30, 120, 1 ) + +A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "May", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "May", 4, 30, 120, 1 ) + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + +-- Blue attack simulation + +local Frequency = 150 + +BlueSpawn2 = SPAWN + :New( "RT NATO 2" ) + :InitLimit( 6, 40 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + :InitDelayOn() + :SpawnScheduled( Frequency, 0.5 ) + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.miz new file mode 100644 index 0000000000..f40edafd5f Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.lua new file mode 100644 index 0000000000..4f731074ac --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.lua @@ -0,0 +1,35 @@ +--- +-- Name: AID-A2A-031 - CAP out of fuel +-- Author: FlightControl +-- Date Created: 30 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" }, 20 ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "Kras1", 1, 30, 120, 1 ) + +--A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) +--CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +--A2ADispatcher:SetSquadronCap( "May", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +--A2ADispatcher:SetSquadronCapInterval( "May", 1, 30, 120, 1 ) + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.miz new file mode 100644 index 0000000000..339171baa7 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.lua new file mode 100644 index 0000000000..46d2855264 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.lua @@ -0,0 +1,46 @@ +--- +-- Name: AID-A2A-032 - CAP Damage +-- Author: FlightControl +-- Date Created: 29 Oct 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP MIG-31" }, 20 ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "Kras1", 2, 30, 120, 1 ) + +--A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) +--CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +--A2ADispatcher:SetSquadronCap( "May", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +--A2ADispatcher:SetSquadronCapInterval( "May", 1, 30, 120, 1 ) + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingAtEngineShutdown() + +-- Blue attack simulation + +local Frequency = 300 + +BlueSpawn2 = SPAWN + :New( "RT NATO 2" ) + :InitLimit( 6, 40 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + :InitDelayOn() + :SpawnScheduled( Frequency, 0.5 ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.miz new file mode 100644 index 0000000000..92958cf761 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.lua new file mode 100644 index 0000000000..9087d30193 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.lua @@ -0,0 +1,47 @@ +--- +-- Name: AID-A2A-040 - CAP Independent Detection in EWR +-- Author: FlightControl +-- Date Created: 30 Aug 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +A2ADispatcher:SetEngageRadius( 90000 ) +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" } ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "Kras1", 4, 30, 120 ) + +--A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) +--CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +--A2ADispatcher:SetSquadronCap( "May", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +--A2ADispatcher:SetSquadronCapInterval( "May", 1, 30, 120 ) + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + +-- Blue attack simulation + +local Frequency = 180 + +BlueSpawn2 = SPAWN + :New( "RT NATO" ) + :InitLimit( 2, 40 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + :InitDelayOn() + :SpawnScheduled( Frequency, 0.5 ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.miz new file mode 100644 index 0000000000..a050ba4901 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.lua new file mode 100644 index 0000000000..17988a21d1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.lua @@ -0,0 +1,49 @@ +--- +-- Name: AID-A2A-041 - CAP Independent Detection in EWR with Clients +-- Author: FlightControl +-- Date Created: 01 Sep 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) +Detection:SetRefreshTimeInterval( 10 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +A2ADispatcher:SetTacticalDisplay( true ) +A2ADispatcher:SetRefreshTimeInterval( 10 ) + + +A2ADispatcher:SetEngageRadius( 90000 ) +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" } ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "Kras1", 2, 30, 120 ) + +A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "May", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "May", 2, 30, 120 ) + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + +-- Blue attack simulation + +--local Frequency = 600 +-- +--BlueSpawn2 = SPAWN +-- :New( "RT NATO" ) +-- :InitLimit( 2, 40 ) +-- :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) +-- :InitRandomizeRoute( 0, 0, 30000 ) +-- :InitDelayOn() +-- :SpawnScheduled( Frequency, 0.5 ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.miz new file mode 100644 index 0000000000..e38c885029 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.lua new file mode 100644 index 0000000000..2f8a24fdb0 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.lua @@ -0,0 +1,67 @@ +--- +-- Name: AID-A2A-050 - Resources +-- Author: FlightControl +-- Date Created: 21 Sep 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Enable the tactical display panel. +A2ADispatcher:SetTacticalDisplay( true ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 250000 ) + +-- Setup the squadrons. +A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 6 ) + +-- Setup the overhead +A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) + +-- Setup the Grouping +A2ADispatcher:SetSquadronGrouping( "Mineralnye", 1 ) + +-- Setup the Takeoff methods +A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air ) + +-- Setup the Landing methods +A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) + + +-- CAP Squadron execution. +--CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) +--A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) +--A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) + +-- GCI Squadron execution. +A2ADispatcher:SetSquadronGci( "Mineralnye", 900, 1200 ) + +CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) + + +-- Blue attack simulation +local Frequency = 60 + +BlueSpawn1 = SPAWN + :New( "RT NATO 1" ) + :InitLimit( 2, 10 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.miz new file mode 100644 index 0000000000..66c0630b4c Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.lua new file mode 100644 index 0000000000..8c83b2728c --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.lua @@ -0,0 +1,67 @@ +--- +-- Name: AID-A2A-060 - Takeoff From Runway Test +-- Author: FlightControl +-- Date Created: 21 Sep 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Enable the tactical display panel. +A2ADispatcher:SetTacticalDisplay( true ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 250000 ) + +-- Setup the squadrons. +A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 ) + +-- Setup the overhead +A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) + +-- Setup the Grouping +A2ADispatcher:SetSquadronGrouping( "Mineralnye", 1 ) + +-- Setup the Takeoff methods +A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Runway ) + +-- Setup the Landing methods +A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) + + +-- CAP Squadron execution. +--CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) +--A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) +--A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) + +-- GCI Squadron execution. +A2ADispatcher:SetSquadronGci( "Mineralnye", 900, 1200 ) + +CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) + + +-- Blue attack simulation +local Frequency = 60 + +BlueSpawn1 = SPAWN + :New( "RT NATO 1" ) + :InitLimit( 2, 10 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.miz new file mode 100644 index 0000000000..1815f1c24c Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.lua new file mode 100644 index 0000000000..e38968423c --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.lua @@ -0,0 +1,61 @@ +--- +-- Name: AID-A2A-061 - Takeoff From Ship Runway Test +-- Author: FlightControl +-- Date Created: 21 Sep 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Enable the tactical display panel. +A2ADispatcher:SetTacticalDisplay( true ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 250000 ) + +-- Setup the squadrons. +A2ADispatcher:SetSquadron( "Kuznetsov", "Kuznetsov", { "SQ CCCP SU-33" }, 20 ) + +-- Setup the overhead +A2ADispatcher:SetSquadronOverhead( "Kuznetsov", 1.2 ) + +-- Setup the Grouping +A2ADispatcher:SetSquadronGrouping( "Kuznetsov", 1 ) + +-- Setup the Takeoff methods +A2ADispatcher:SetSquadronTakeoff( "Kuznetsov", AI_A2A_DISPATCHER.Takeoff.Runway ) + +-- Setup the Landing methods +A2ADispatcher:SetSquadronLandingAtRunway( "Kuznetsov" ) + + +-- CAP Squadron execution. +--CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) +--A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) +--A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) + +-- GCI Squadron execution. +A2ADispatcher:SetSquadronGci( "Kuznetsov", 900, 1200 ) + +CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) + + +-- Blue attack simulation +local Frequency = 60 + +BlueSpawn1 = SPAWN + :New( "RT NATO 1" ) + :InitLimit( 2, 10 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.miz new file mode 100644 index 0000000000..2d91cb39d0 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.lua new file mode 100644 index 0000000000..5b07594af7 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.lua @@ -0,0 +1,39 @@ +--- +-- Name: AID-A2A-070 - CAP - Player Exit +-- Author: FlightControl +-- Date Created: 30 Oct 2017 +-- +-- Test Scenario(s): +-- +-- Now take a seat in the client plane as a player. +-- Do the following tests after the plane has been spawned. +-- 1. Immediately exit the plane. +-- 2. Only exit the plane once the defender is engaged. +-- 3. Let the defender shoot you. +-- In all these scenarios, observe if the defender is continuing its patrol. + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" }, 20 ) +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "Kras1", 1, 30, 120, 1 ) + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.miz new file mode 100644 index 0000000000..ef70558659 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.lua new file mode 100644 index 0000000000..bac60cdcda --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.lua @@ -0,0 +1,37 @@ +--- +-- Name: AID-A2A-071 - GCI - Player Exit +-- Author: FlightControl +-- Date Created: 30 Oct 2017 +-- +-- Test Scenario(s): +-- +-- Now take a seat in the client plane as a player. +-- Do the following tests after the plane has been spawned. +-- 1. Immediately exit the plane. +-- 2. Only exit the plane once the defender is engaged. +-- 3. Let the defender shoot you. +-- In all these scenarios, observe if the defender is returning to base. + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +A2ADispatcher:SetTacticalDisplay( true ) + + +-- Setup the squadrons. + +A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadronGci( "Kras1", 800, 1200 ) + +A2ADispatcher:SetDefaultTakeoffInAir() +A2ADispatcher:SetDefaultLandingNearAirbase() + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.miz new file mode 100644 index 0000000000..d6e3eb1edd Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.lua new file mode 100644 index 0000000000..3c1d426059 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.lua @@ -0,0 +1,120 @@ +--- +-- Name: AID-A2A-100 - Demonstration +-- Author: FlightControl +-- Date Created: 30 May 2017 + + +-- Define a SET_GROUP object that builds a collection of groups that define the EWR network. +-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. +DetectionSetGroup = SET_GROUP:New() +DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) +DetectionSetGroup:FilterStart() + +Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) + +-- Enable the tactical display panel. +A2ADispatcher:SetTacticalDisplay( true ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +A2ADispatcher:SetBorderZone( CCCPBorderZone ) + +-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly +-- without an assignment within 100km radius from a detected target, will engage that target. +A2ADispatcher:SetEngageRadius( 80000 ) + +-- Setup the squadrons. +A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 ) +A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 ) +A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) +A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 ) + +-- Setup the overhead +A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) +A2ADispatcher:SetSquadronOverhead( "Maykop", 1 ) +A2ADispatcher:SetSquadronOverhead( "Mozdok", 1 ) +A2ADispatcher:SetSquadronOverhead( "Sochi", 1 ) +A2ADispatcher:SetSquadronOverhead( "Novo", 1.5 ) + +-- Setup the Grouping +A2ADispatcher:SetSquadronGrouping( "Mineralnye", 1 ) +A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) +A2ADispatcher:SetSquadronGrouping( "Novo", 3 ) + +-- Setup the Takeoff methods +A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air ) +A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" ) +A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" ) +A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" ) +A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) + +-- Setup the Landing methods +A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) +A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" ) +A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" ) +A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" ) +A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway ) + + +-- CAP Squadron execution. +CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) +A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) +A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) + +CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) +A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) +A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) + +CAPZoneMiddle = ZONE:New( "CAP Zone Middle") +A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" ) +A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) + +-- GCI Squadron execution. +A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 ) +A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 ) +A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 ) + +CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) + + +-- Blue attack simulation +local Frequency = 300 + +BlueSpawn1 = SPAWN + :New( "RT NATO 1" ) + :InitLimit( 2, 10 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) + +BlueSpawn2 = SPAWN + :New( "RT NATO 2" ) + :InitLimit( 2, 10 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) + +BlueSpawn3 = SPAWN + :New( "RT NATO 3" ) + :InitLimit( 2, 10 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) + +BlueSpawn4 = SPAWN + :New( "RT NATO 4" ) + :InitLimit( 2, 10 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.miz new file mode 100644 index 0000000000..28404c40f5 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.lua new file mode 100644 index 0000000000..aa673655d9 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.lua @@ -0,0 +1,75 @@ +--- +-- Name: AID-A2A-200 - GCICAP Demonstration +-- Author: FlightControl +-- Date Created: 05 July 2017 + + +-- Setup the A2A dispatcher, and initialize it. +A2ADispatcher = AI_A2A_GCICAP:New( { "DF CCCP" }, { "SQ CCCP" }, { "CAP Zone" }, 2 ) + +-- Enable the tactical display panel. +A2ADispatcher:SetTacticalDisplay( true ) + +-- Initialize the dispatcher, setting up a border zone. This is a polygon, +-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. +-- Any enemy crossing this border will be engaged. +CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) +A2ADispatcher:SetBorderZone( CCCPBorderZone ) + + + +A2ADispatcher:SetDefaultTakeoffFromParkingCold() +A2ADispatcher:SetDefaultLandingAtEngineShutdown() +A2ADispatcher:SetDefaultFuelThreshold( 0.20 ) +A2ADispatcher:SetIntercept( 100 ) +A2ADispatcher:SetDisengageRadius( 100000 ) +A2ADispatcher:SetEngageRadius( 50000 ) +A2ADispatcher:SetGciRadius( 100000 ) + +A2ADispatcher:Start() + +------------------------------- + + + + + + + + + +-- Blue attack simulation +local Frequency = 600 + +BlueSpawn1 = SPAWN + :New( "RT NATO 1" ) + :InitLimit( 2, 3 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) + +BlueSpawn2 = SPAWN + :New( "RT NATO 2" ) + :InitLimit( 2, 3 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) + +BlueSpawn3 = SPAWN + :New( "RT NATO 3" ) + :InitLimit( 2, 3 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) + +BlueSpawn4 = SPAWN + :New( "RT NATO 4" ) + :InitLimit( 2, 3 ) + :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) + :InitRandomizeRoute( 0, 0, 30000 ) + --:InitDelayOn() + :SpawnScheduled( Frequency, 0.4 ) + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.miz new file mode 100644 index 0000000000..bed47856c5 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.lua new file mode 100644 index 0000000000..21114438a7 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.lua @@ -0,0 +1,54 @@ + + +-- RED + +--- Setup the Red Coalition A2A GCICAP dispatcher, and initialize it. +A2A_GCICAP_Red = AI_A2A_GCICAP:New( { "RED EWR" }, { "4477th" }, { }, 2 ) + +A2A_GCICAP_Red:SetBorderZone( ZONE_POLYGON:New( "Red Border", GROUP:FindByName( "Red Border" ) ) ) + +-- Enable the tactical display panel. This is to see what this dispatcher is doing. +--A2A_GCICAP_Red:SetTacticalDisplay( true ) + + +-- Initialize the dispatcher, setting up a radius of 150km where any airborne friendly +-- without an assignment within 150km radius from a detected target, will engage that target. +A2A_GCICAP_Red:SetEngageRadius( 150000 ) + +-- The default take-off method is planes takeoff right in the air. +-- Here we specify to take off from a parking space, with engines already running. +A2A_GCICAP_Red:SetSquadronTakeoffFromParkingHot( AIRBASE.Nevada.Tonopah_Test_Range_Airfield ) +--A2A_GCICAP_Red:SetSquadronTakeoffFromParkingHot( "Groom Lake AFB" ) + + +-- BLUE + + +--- Setup the Red Coalition A2A GCICAP dispatcher, and initialize it. +-- EWR network groups start with BLUE EWR. +-- Squadron templates which are placed above the colored airbase, start with 104th or 105th or 106th. +-- Perform CAP in a polygon zone placed near 104th, which is Nellis. +-- Perform 2 CAP. +A2A_GCICAP_Blue = AI_A2A_GCICAP:New( { "BLUE EWR" }, { "104th", "105th", "106th" }, { "104th CAP" }, 2 ) + +A2A_GCICAP_Blue:SetBorderZone( ZONE_POLYGON:New( "Blue Border", GROUP:FindByName( "Blue Border" ) ) ) + +-- Enable the tactical display panel. This is to see what this dispatcher is doing. +--A2A_GCICAP_Blue:SetTacticalDisplay( true ) + + +-- Initialize the dispatcher, setting up a radius of 150km where any airborne friendly +-- without an assignment within 150km radius from a detected target, will engage that target. +A2A_GCICAP_Blue:SetEngageRadius( 150000 ) + +-- The default take-off method is planes takeoff right in the air. +-- Here we specify other take off options. +A2A_GCICAP_Blue:SetSquadronTakeoffFromRunway( AIRBASE.Nevada.Boulder_City_Airport ) -- Takeoff from the runway. +A2A_GCICAP_Blue:SetSquadronTakeoffFromParkingCold( AIRBASE.Nevada.McCarran_International_Airport ) -- Takeoff from parking spot, with engines shut off. +--A2A_GCICAP_Blue:SetSquadronTakeoffFromParkingHot( AIRBASE.Nevada.Nellis_AFB ) -- Takaeoff from parking spot, engines running. + +-- The Nellis airbase contains a squadron that flies an F-5... Less modern airplane. +-- So it needs a stronger "overhead". +A2A_GCICAP_Blue:SetSquadronOverhead( AIRBASE.Nevada.Nellis_AFB, 2 ) -- When 2 airplanes are attacking, we spawn 4 airplanes for defense. +A2A_GCICAP_Blue:SetSquadronGrouping( AIRBASE.Nevada.Nellis_AFB, 2 ) -- We group the spawned defence airplanes per 2 units. + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.miz new file mode 100644 index 0000000000..30f79b7f91 Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - AI_A2A_GCICAP Demonstration.lua b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - AI_A2A_GCICAP Demonstration.lua new file mode 100644 index 0000000000..b394c5a047 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - AI_A2A_GCICAP Demonstration.lua @@ -0,0 +1,27 @@ + + +-- RED + +--- Setup the Red Coalition A2A GCICAP dispatcher, and initialize it. +-- EWR network groups start with RED EWR, which are ships and patrols. +-- Squadron templates which are placed above the colored airbases, start with TR SQ. +-- Perform CAP, the zone for CAP starts with TR CAP, send minimal 10 groups of planes in the air. +A2A_GCICAP_Red = AI_A2A_GCICAP:New( { "TR SQ"}, { "TR SQ" }, { "TR CAP" }, 10 ) + +A2A_GCICAP_Red:SetBorderZone( ZONE_POLYGON:New( "Red Border", GROUP:FindByName( "Red Border" ) ) ) + +-- Enable the tactical display panel. This is to see what this dispatcher is doing. +--A2A_GCICAP_Red:SetTacticalDisplay( true ) + +-- BLUE + +--- Setup the Red Coalition A2A GCICAP dispatcher, and initialize it. +-- EWR network groups start with BLUE EWR. +-- Squadron templates which are placed above the colored airbases, start with UK SQ. +-- Perform no CAP. +A2A_GCICAP_Blue = AI_A2A_GCICAP:New( { "BLUE EWR" }, { "UK SQ" }, { }, 2 ) + +A2A_GCICAP_Blue:SetBorderZone( ZONE_POLYGON:New( "Blue Border", GROUP:FindByName( "Blue Border" ) ) ) + + + diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - GCICAP Demonstration.miz b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - GCICAP Demonstration.miz new file mode 100644 index 0000000000..727aa75b9d Binary files /dev/null and b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - GCICAP Demonstration.miz differ diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/pack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/unpack.ps1 b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.lua new file mode 100644 index 0000000000..d639b671f5 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.lua @@ -0,0 +1,13 @@ +--- +-- Name: AID-CGO-100 - APC - Pickup and Deploy +-- Author: FlightControl +-- Date Created: 10 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherAPC:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.miz new file mode 100644 index 0000000000..f80cee7cb6 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.lua new file mode 100644 index 0000000000..b3f4315e93 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.lua @@ -0,0 +1,17 @@ +--- +-- Name: AID-CGO-110 - APC - Deploy at Group Zones +-- Author: FlightControl +-- Date Created: 10 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +local ZoneGroup = GROUP:FindByName( "Deploy Group") +local DeployZone = ZONE_GROUP:New( "Deploy Group", ZoneGroup, 200 ) + + +AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherAPC:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.miz new file mode 100644 index 0000000000..b1786186c5 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.lua new file mode 100644 index 0000000000..d639b671f5 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.lua @@ -0,0 +1,13 @@ +--- +-- Name: AID-CGO-100 - APC - Pickup and Deploy +-- Author: FlightControl +-- Date Created: 10 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherAPC:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.miz new file mode 100644 index 0000000000..893c132a40 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.lua new file mode 100644 index 0000000000..c630d3322f --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.lua @@ -0,0 +1,172 @@ +--- +-- Name: AID-CGO-100 - APC - Pickup and Deploy +-- Author: FlightControl +-- Date Created: 10 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() +local SetPickupZones = SET_ZONE:New():FilterPrefixes( "Pickup" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, SetPickupZones, SetDeployZones ) +AICargoDispatcherAPC:SetHomeZone( ZONE:New("Home") ) + +--- Pickup Handler OnAfter for AICargoDispatcherAPC. +-- Use this event handler to tailor the event when a CarrierGroup is routed towards a new pickup Coordinate and a specified Speed. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherAPC self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The coordinate of the pickup location. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the pickup Coordinate. +-- @param #number Height Height in meters to move to the pickup coordinate. +-- @param Core.Zone#ZONE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. +function AICargoDispatcherAPC:OnAfterPickup( From, Event, To, CarrierGroup, Coordinate, Speed, Height, PickupZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is picking up cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() + + +end + + +--- Load Handler OnAfter for AICargoDispatcherAPC. +-- Use this event handler to tailor the event when a CarrierGroup has initiated the loading or boarding of cargo within reporting or near range. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherAPC self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. +function AICargoDispatcherAPC:OnAfterLoad( From, Event, To, CarrierGroup, PickupZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is loading cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + +--- PickedUp Handler OnAfter for AICargoDispatcherAPC. +-- Use this event handler to tailor the event when a carrier has picked up all cargo objects into the CarrierGroup. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherAPC self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. +function AICargoDispatcherAPC:OnAfterPickedUp( From, Event, To, CarrierGroup, PickupZone ) + + -- Write here your own code. + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " has loaded all cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + +--- Deploy Handler OnAfter for AICargoDispatcherAPC. +-- Use this event handler to tailor the event when a CarrierGroup is routed to a deploy coordinate, to Unload all cargo objects in each CarrierUnit. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @function OnAfterDeploy +-- @param #AICargoDispatcherAPC self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The deploy coordinate. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the deploy Coordinate. +-- @param #number Height Height in meters to move to the deploy coordinate. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherAPC:OnAfterDeploy( From, Event, To, CarrierGroup, Coordinate, Speed, Height, DeployZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is starting deployment of all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + + + + + + +--- Unloaded Handler OnAfter for AICargoDispatcherAPC. +-- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has unloaded a cargo object. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- Note that if more cargo objects were unloading or unboarding from the CarrierUnit, then this event can be fired multiple times for each different Cargo/CarrierUnit. +-- A CarrierUnit can be part of the larger CarrierGroup. +-- @function OnAfterUnloaded +-- @param #AICargoDispatcherAPC self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Cargo.Cargo#CARGO Cargo The cargo object. +-- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo unloading operation. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherAPC:OnAfterUnloaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, DeployZone ) + + local CargoGroup = Cargo:GetObject() -- Wrapper.Group#GROUP + + -- Get the name of the DeployZone + local DeployZoneName = DeployZone:GetName() + + local DeployBuildingNames = { + ["Deploy A"] = "Building A", + } + + + -- Now board the infantry into the respective warehouse building. + if DeployZoneName then + local Building = STATIC:FindByName( DeployBuildingNames[DeployZoneName] ) + Cargo:__Board( 5, Building, 25 ) + end + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. ", Unit " .. CarrierUnit:GetName() .. " has unloaded cargo " .. Cargo:GetName() .. " in zone " .. DeployZone:GetName() .. " and cargo is moving to building " .. DeployBuildingNames[DeployZoneName], MESSAGE.Type.Information ):ToAll() + + +end + + +--- Deployed Handler OnAfter for AICargoDispatcherAPC. +-- Use this event handler to tailor the event when a carrier has deployed all cargo objects from the CarrierGroup. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @function OnAfterDeployed +-- @param #AICargoDispatcherAPC self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherAPC:OnAfterDeployed( From, Event, To, CarrierGroup, DeployZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + +--- Home event handler OnAfter for AICargoDispatcherAPC. +-- Use this event handler to tailor the event when a CarrierGroup is returning to the HomeZone, after it has deployed all cargo objects from the CarrierGroup. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- If there is no HomeZone is specified, the CarrierGroup will stay at the current location after having deployed all cargo. +-- @param #AICargoDispatcherAPC self +-- @param #string From A string that contains the "*from state name*" when the event was triggered. +-- @param #string Event A string that contains the "*event name*" when the event was triggered. +-- @param #string To A string that contains the "*to state name*" when the event was triggered. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The home coordinate the Carrier will arrive and stop it's activities. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the home Coordinate. +-- @param #number Height Height in meters to move to the home coordinate. +-- @param Core.Zone#ZONE HomeZone The zone wherein the carrier will return when all cargo has been transported. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherAPC:OnAfterHome( From, Event, To, CarrierGroup, Coordinate, Speed, Height, HomeZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo and going home to zone " .. HomeZone:GetName(), MESSAGE.Type.Detailed ):ToAll() + +end + + + +AICargoDispatcherAPC:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.miz new file mode 100644 index 0000000000..80a10e880d Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.lua new file mode 100644 index 0000000000..f988621bc2 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.lua @@ -0,0 +1,21 @@ +--- +-- Name: AID-CGO-150 - APC - Manpads against enemy helicopters +-- Author: FlightControl +-- Date Created: 17 May 2018 +-- +-- This simulates manpads to fight against enemy helicpters. +-- So when the enemy helicopters are within combat range, the manpads will unload and will attack the helos. + + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +local ZoneGroup = GROUP:FindByName( "Deploy Group") +local DeployZone = ZONE_GROUP:New( "Deploy Group", ZoneGroup, 200 ) + + +-- For the manpads to unload on time, a range of 8000 meters is appropriate. +AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones, 8000 ) +AICargoDispatcherAPC:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.miz new file mode 100644 index 0000000000..9529b384b7 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.lua new file mode 100644 index 0000000000..74f93810bf --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.lua @@ -0,0 +1,26 @@ +--- +-- Name: AID-CGO-151 - APC - Manpads and not defending the carrier +-- Author: FlightControl +-- Date Created: 08 Sep 2018 +-- +-- This simulates manpads to board APCs and won't disembark to defend the enemy carrier when enemies are nearby.. +-- So when the enemy helicopters are within combat range, the manpads will NOT unload and will NOT attack the helos. +-- This is because the combat range was not provided, and thus is 0. + + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +local ZoneGroup = GROUP:FindByName( "Deploy Group") +local DeployZone = ZONE_GROUP:New( "Deploy Group", ZoneGroup, 200 ) + + +-- For the manpads to unload on time, a range of 8000 meters is appropriate. +AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones ) + +-- This will work too, so the combat range can be provided, but must be 0. +--AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones, 0 ) + +AICargoDispatcherAPC:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.miz new file mode 100644 index 0000000000..3d4b8cb18b Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.lua new file mode 100644 index 0000000000..ca7b0d7ca5 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.lua @@ -0,0 +1,39 @@ +--- +-- Name: AID-CGO-160 - APC - Spawning of cargo objects +-- Author: FlightControl +-- Date Created: 11 Sep 2018 +-- +-- In this demo cargo objects are spawned at random locations within the battle field. +-- +-- This simulates manpads to board APCs and won't disembark to defend the enemy carrier when enemies are nearby.. +-- So when the enemy helicopters are within combat range, the manpads will NOT unload and will NOT attack the helos. +-- This is because the combat range was not provided, and thus is 0. + + +-- Spawn some random cargo in a zone. + +SpawnInfantry = SPAWN:New( "Infantry" ) +:InitLimit( 30, 100 ) +:InitRandomizePosition(true,500,100) +:InitRandomizeZones( { ZONE:New( "SpawnZone" ) } ) +:OnSpawnGroup( + function( SpawnGroup ) + CARGO_GROUP:New(SpawnGroup,"InfantryType",SpawnGroup:GetName(),150,10) + end +) +:SpawnScheduled( 30, 0 ) + + +local CargoInfantrySet = SET_CARGO:New():FilterTypes( "InfantryType" ):FilterStart() +local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() +local PickupZonesSet = SET_ZONE:New():FilterPrefixes( "Spawn" ):FilterOnce() +local DeployZonesSet = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterOnce() + +-- For the manpads to unload on time, a range of 8000 meters is appropriate. +AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, CargoInfantrySet, PickupZonesSet, DeployZonesSet ) + +-- This will work too, so the combat range can be provided, but must be 0. +--AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones, 0 ) + +AICargoDispatcherAPC:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.miz new file mode 100644 index 0000000000..e6f0ad7cab Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.lua new file mode 100644 index 0000000000..43bc6f1c57 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.lua @@ -0,0 +1,13 @@ +--- +-- Name: AID-CGO-200 - Helicopter - Pickup and Deploy +-- Author: FlightControl +-- Date Created: 10 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherHelicopter:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.miz new file mode 100644 index 0000000000..4355227d8e Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.lua new file mode 100644 index 0000000000..993ef0b5b6 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.lua @@ -0,0 +1,14 @@ +--- +-- Name: AID-CGO-201 - Helicopter - DeployZone Orbit +-- Author: FlightControl +-- Date Created: 10 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) +AICargoDispatcherHelicopter:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.miz new file mode 100644 index 0000000000..5c30ce6b51 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.lua new file mode 100644 index 0000000000..24f908c019 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.lua @@ -0,0 +1,18 @@ +--- +-- Name: AID-CGO-202 - Helicopter - Spawning of Helicopters +-- Author: FlightControl +-- Date Created: 19 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherHelicopter:Start() + +HelicopterSpawn = SPAWN + :New( "Helicopter" ) + :InitLimit( 4, 20 ) + :InitLateActivated( true ) + :SpawnScheduled( 180, 0.5 ) diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.miz new file mode 100644 index 0000000000..d172f9b7a5 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.lua new file mode 100644 index 0000000000..d177ea531e --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.lua @@ -0,0 +1,30 @@ +--- +-- Name: AID-CGO-203 - Helicopter - Spawning of Infantry +-- Author: FlightControl +-- Date Created: 19 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherHelicopter:Start() + +HelicopterSpawn = SPAWN + :New( "Helicopter" ) + :InitLimit( 4, 20 ) + :InitLateActivated( true ) + :SpawnScheduled( 20, 0.5 ) + +InfantrySpawn = SPAWN + :New( "Infantry" ) + :InitLimit( 20, 60 ) + :OnSpawnGroup( + function( SpawnGroup ) + CARGO_GROUP:New( SpawnGroup, "Infantry", SpawnGroup:GetName(), 500, 25 ) + end + ) + :InitRandomizePosition( true, 1000, 250 ) + :SpawnScheduled( 10, 0.5 ) + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.miz new file mode 100644 index 0000000000..eea01af4dd Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.lua new file mode 100644 index 0000000000..c2af7a85d8 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.lua @@ -0,0 +1,13 @@ +--- +-- Name: AID-CGO-210 - Helicopter - Home +-- Author: FlightControl +-- Date Created: 10 May 2018 +-- + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) +AICargoDispatcherHelicopter:Start() diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.miz new file mode 100644 index 0000000000..f263b1bb6d Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.lua new file mode 100644 index 0000000000..e9eca93557 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.lua @@ -0,0 +1,16 @@ +--- +-- Name: AID-CGO-220 - Helicopter - Randomize Coordinates +-- Author: FlightControl +-- Date Created: 10 May 2018 +-- +-- Demonstrates the way how the pickup and deploy locations can be randomized. + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherHelicopter:Start() + +AICargoDispatcherHelicopter:SetPickupRadius( 100, 50 ) +AICargoDispatcherHelicopter:SetDeployRadius( 100, 50 ) diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.miz new file mode 100644 index 0000000000..0081e89b7e Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.lua new file mode 100644 index 0000000000..4a96b975b7 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.lua @@ -0,0 +1,18 @@ +--- +-- Name: AID-CGO-230 - Helicopter - DeployZone Probability +-- Author: FlightControl +-- Date Created: 15 May 2018 +-- +-- Demonstrates the way how the deploy locations can be set to a specific probability distribution. + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) +AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) +AICargoDispatcherHelicopter:Start() + +SetDeployZones:SetZoneProbability( "Deploy A", 0.1 ) +SetDeployZones:SetZoneProbability( "Deploy B", 0.1 ) +SetDeployZones:SetZoneProbability( "Deploy C", 0.8 ) \ No newline at end of file diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.miz new file mode 100644 index 0000000000..0659382a69 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.lua new file mode 100644 index 0000000000..808f62cc93 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.lua @@ -0,0 +1,176 @@ +--- +-- Name: AID-CGO-240 - Helicopter - Unloaded Event Handling +-- Author: FlightControl +-- Date Created: 15 May 2018 +-- +-- Demonstrates the way how the deploy locations can be set to a specific probability distribution. + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetPickupZones = SET_ZONE:New():FilterPrefixes( "Pickup" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, SetPickupZones, SetDeployZones ) +AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) + + + +--- Pickup Handler OnAfter for AICargoDispatcherHelicopter. +-- Use this event handler to tailor the event when a CarrierGroup is routed towards a new pickup Coordinate and a specified Speed. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherAirplanes self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The coordinate of the pickup location. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the pickup Coordinate. +-- @param #number Height Height in meters to move to the pickup coordinate. +function AICargoDispatcherHelicopter:OnAfterPickup( From, Event, To, CarrierGroup, Coordinate, Speed, Height ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is picking up cargo.", MESSAGE.Type.Information ):ToAll() + + +end + + +--- Load Handler OnAfter for AICargoDispatcherHelicopter. +-- Use this event handler to tailor the event when a CarrierGroup has initiated the loading or boarding of cargo within reporting or near range. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +function AICargoDispatcherHelicopter:OnAfterLoad( From, Event, To, CarrierGroup ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is loading cargo.", MESSAGE.Type.Information ):ToAll() + +end + + +--- Loaded event handler OnAfter for AICargoDispatcherHelicopter. +-- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has loaded a cargo object. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- Note that if more cargo objects were loading or boarding into the CarrierUnit, then this event can be triggered multiple times for each different Cargo/CarrierUnit. +-- A CarrierUnit can be part of the larger CarrierGroup. +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was triggered. +-- @param #string Event A string that contains the "*event name*" when the event was triggered. +-- @param #string To A string that contains the "*to state name*" when the event was triggered. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Cargo.Cargo#CARGO Cargo The cargo object. +-- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo loading operation. +-- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. +function AICargoDispatcherHelicopter:OnAfterLoaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, PickupZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " has loaded cargo " .. Cargo:GetName(), MESSAGE.Type.Information ):ToAll() + +end + +--- Deploy Handler OnAfter for AI_CARGO_DISPATCHER. +-- Use this event handler to tailor the event when a CarrierGroup is routed to a deploy coordinate, to Unload all cargo objects in each CarrierUnit. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @function OnAfterPickedUp +-- @param self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The deploy coordinate. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the deploy Coordinate. +-- @param #number Height Height in meters to move to the deploy coordinate. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherHelicopter:OnAfterDeploy( From, Event, To, CarrierGroup, Coordinate, Speed, Height, DeployZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is starting deployment of all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + + + + + + +--- Unloaded Handler OnAfter for AI_CARGO_DISPATCHER. +-- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has unloaded a cargo object. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- Note that if more cargo objects were unloading or unboarding from the CarrierUnit, then this event can be fired multiple times for each different Cargo/CarrierUnit. +-- A CarrierUnit can be part of the larger CarrierGroup. +-- @function OnAfterUnloaded +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Cargo.Cargo#CARGO Cargo The cargo object. +-- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo unloading operation. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherHelicopter:OnAfterUnloaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, DeployZone ) + + local CargoGroup = Cargo:GetObject() -- Wrapper.Group#GROUP + + -- Get the name of the DeployZone + local DeployZoneName = DeployZone:GetName() + + local DeployBuildingNames = { + ["Deploy A"] = "Building A", + ["Deploy B"] = "Building B", + ["Deploy C"] = "Building C", + } + + + -- Now board the infantry into the respective warehouse building. + if DeployZoneName then + local Building = STATIC:FindByName( DeployBuildingNames[DeployZoneName] ) + Cargo:__Board( 5, Building, 25 ) + end + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. ", Unit " .. CarrierUnit:GetName() .. " has unloaded cargo " .. Cargo:GetName() .. " in zone " .. DeployZone:GetName() .. " and cargo is moving to building " .. DeployBuildingNames[DeployZoneName], MESSAGE.Type.Information ):ToAll() + + +end + + +--- Deployed Handler OnAfter for AI_CARGO_DISPATCHER. +-- Use this event handler to tailor the event when a carrier has deployed all cargo objects from the CarrierGroup. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @function OnAfterDeployed +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherHelicopter:OnAfterDeployed( From, Event, To, CarrierGroup, DeployZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + +--- Home event handler OnAfter for AICargoDispatcherHelicopter. +-- Use this event handler to tailor the event when a CarrierGroup is returning to the HomeZone, after it has deployed all cargo objects from the CarrierGroup. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- If there is no HomeZone is specified, the CarrierGroup will stay at the current location after having deployed all cargo. +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was triggered. +-- @param #string Event A string that contains the "*event name*" when the event was triggered. +-- @param #string To A string that contains the "*to state name*" when the event was triggered. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The home coordinate the Carrier will arrive and stop it's activities. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the home Coordinate. +-- @param #number Height Height in meters to move to the home coordinate. +-- @param Core.Zone#ZONE HomeZone The zone wherein the carrier will return when all cargo has been transported. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherHelicopter:OnAfterHome( From, Event, To, CarrierGroup, Coordinate, Speed, Height, HomeZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo and going home to zone " .. HomeZone:GetName(), MESSAGE.Type.Detailed ):ToAll() + +end + + +AICargoDispatcherHelicopter:Start() diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.miz new file mode 100644 index 0000000000..cf6b740243 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.lua new file mode 100644 index 0000000000..4e1350cec3 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.lua @@ -0,0 +1,206 @@ +--- +-- Name: AID-CGO-250 - Helicopter - Front-Line Enforcements +-- Author: FlightControl +-- Date Created: 20 Sep 2018 +-- +-- Demonstrates the way how front-line enforcements can be setup using helicopter transportations. + +local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() +local SetPickupZones = SET_ZONE:New():FilterPrefixes( "Pickup" ):FilterStart() +local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Defense" ):FilterStart() + +AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, SetPickupZones, SetDeployZones ) +AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) + + +-- Here we setup the spawning of Infantry. +SpawnCargoInfantry = SPAWN + :New( "Infantry" ) + :InitLimit( 40, 60 ) + :InitRandomizeZones( { ZONE_POLYGON:NewFromGroupName( "Pickup Location" ) } ) + :OnSpawnGroup( + function( SpawnGroup ) + -- This will automatically add also the CargoInfantry object to the SetCargoInfantry (in the background through the event system). + local CargoInfantry = CARGO_GROUP:New( SpawnGroup, "Infantry", SpawnGroup:GetName(), 150 ) + end + ) + :SpawnScheduled( 60, 0.5 ) + +-- Now we create 4 zones based on GROUP objects within the battlefield, which form the front line defense points. +local ZoneDefense1 = ZONE_GROUP:New( "Defense 1", GROUP:FindByName("Defense #001"), 1500 ) +local ZoneDefense2 = ZONE_GROUP:New( "Defense 2", GROUP:FindByName("Defense #002"), 1500 ) +local ZoneDefense3 = ZONE_GROUP:New( "Defense 3", GROUP:FindByName("Defense #003"), 1500 ) +local ZoneDefense4 = ZONE_GROUP:New( "Defense 4", GROUP:FindByName("Defense #004"), 1500 ) + + +-- Here we setup the spawning of Helicopters. + + + +--- Pickup Handler OnAfter for AICargoDispatcherHelicopter. +-- Use this event handler to tailor the event when a CarrierGroup is routed towards a new pickup Coordinate and a specified Speed. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherAirplanes self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The coordinate of the pickup location. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the pickup Coordinate. +-- @param #number Height Height in meters to move to the pickup coordinate. +function AICargoDispatcherHelicopter:OnAfterPickup( From, Event, To, CarrierGroup, Coordinate, Speed, Height, PickupZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is picking up cargo.", MESSAGE.Type.Information ):ToAll() + + +end + + +--- Load Handler OnAfter for AICargoDispatcherHelicopter. +-- Use this event handler to tailor the event when a CarrierGroup has initiated the loading or boarding of cargo within reporting or near range. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +function AICargoDispatcherHelicopter:OnAfterLoad( From, Event, To, CarrierGroup ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is loading cargo.", MESSAGE.Type.Information ):ToAll() + +end + + +--- Loaded event handler OnAfter for AICargoDispatcherHelicopter. +-- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has loaded a cargo object. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- Note that if more cargo objects were loading or boarding into the CarrierUnit, then this event can be triggered multiple times for each different Cargo/CarrierUnit. +-- A CarrierUnit can be part of the larger CarrierGroup. +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was triggered. +-- @param #string Event A string that contains the "*event name*" when the event was triggered. +-- @param #string To A string that contains the "*to state name*" when the event was triggered. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Cargo.Cargo#CARGO Cargo The cargo object. +-- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo loading operation. +-- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. +function AICargoDispatcherHelicopter:OnAfterLoaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, PickupZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " has loaded cargo " .. Cargo:GetName(), MESSAGE.Type.Information ):ToAll() + +end + +--- Deploy Handler OnAfter for AI_CARGO_DISPATCHER. +-- Use this event handler to tailor the event when a CarrierGroup is routed to a deploy coordinate, to Unload all cargo objects in each CarrierUnit. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @function OnAfterPickedUp +-- @param self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The deploy coordinate. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the deploy Coordinate. +-- @param #number Height Height in meters to move to the deploy coordinate. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherHelicopter:OnAfterDeploy( From, Event, To, CarrierGroup, Coordinate, Speed, Height, DeployZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is starting deployment of all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + + + + + + +--- Unloaded Handler OnAfter for AI_CARGO_DISPATCHER. +-- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has unloaded a cargo object. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- Note that if more cargo objects were unloading or unboarding from the CarrierUnit, then this event can be fired multiple times for each different Cargo/CarrierUnit. +-- A CarrierUnit can be part of the larger CarrierGroup. +-- @function OnAfterUnloaded +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Cargo.Cargo#CARGO Cargo The cargo object. +-- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo unloading operation. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherHelicopter:OnAfterUnloaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, DeployZone ) + + local CargoGroup = Cargo:GetObject() -- Wrapper.Group#GROUP + + -- Get the name of the DeployZone + local DeployZoneName = DeployZone:GetName() + + local DeployBuildingNames = { + ["Deploy A"] = "Building A", + ["Deploy B"] = "Building B", + ["Deploy C"] = "Building C", + } + + + -- Now board the infantry into the respective warehouse building. + if DeployZoneName then + local Building = STATIC:FindByName( DeployBuildingNames[DeployZoneName] ) + Cargo:__Board( 5, Building, 25 ) + end + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. ", Unit " .. CarrierUnit:GetName() .. " has unloaded cargo " .. Cargo:GetName() .. " in zone " .. DeployZone:GetName() .. " and cargo is moving to building " .. DeployBuildingNames[DeployZoneName], MESSAGE.Type.Information ):ToAll() + + +end + + +--- Deployed Handler OnAfter for AI_CARGO_DISPATCHER. +-- Use this event handler to tailor the event when a carrier has deployed all cargo objects from the CarrierGroup. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @function OnAfterDeployed +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherHelicopter:OnAfterDeployed( From, Event, To, CarrierGroup, DeployZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + +--- Home event handler OnAfter for AICargoDispatcherHelicopter. +-- Use this event handler to tailor the event when a CarrierGroup is returning to the HomeZone, after it has deployed all cargo objects from the CarrierGroup. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- If there is no HomeZone is specified, the CarrierGroup will stay at the current location after having deployed all cargo. +-- @param #AICargoDispatcherHelicopter self +-- @param #string From A string that contains the "*from state name*" when the event was triggered. +-- @param #string Event A string that contains the "*event name*" when the event was triggered. +-- @param #string To A string that contains the "*to state name*" when the event was triggered. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The home coordinate the Carrier will arrive and stop it's activities. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the home Coordinate. +-- @param #number Height Height in meters to move to the home coordinate. +-- @param Core.Zone#ZONE HomeZone The zone wherein the carrier will return when all cargo has been transported. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherHelicopter:OnAfterHome( From, Event, To, CarrierGroup, Coordinate, Speed, Height, HomeZone ) + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo and going home to zone " .. HomeZone:GetName(), MESSAGE.Type.Detailed ):ToAll() + +end + + +AICargoDispatcherHelicopter:SetPickupRadius( 30, 10 ) +AICargoDispatcherHelicopter:SetDeployRadius( 200, 100 ) +AICargoDispatcherHelicopter:SetPickupSpeed( 300, 200 ) +AICargoDispatcherHelicopter:SetDeploySpeed( 300, 200 ) +AICargoDispatcherHelicopter:SetPickupHeight( 100, 30 ) +AICargoDispatcherHelicopter:SetDeployHeight( 100, 30 ) + +AICargoDispatcherHelicopter:__Start( 10 ) diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.miz new file mode 100644 index 0000000000..0096894eef Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.lua new file mode 100644 index 0000000000..b4c9bbfc90 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.lua @@ -0,0 +1,17 @@ +--- +-- Name: AID-CGO-300 - Airplane - Pickup and Deploy +-- Author: FlightControl +-- Date Created: 02 Aug 2018 +-- + +local CargoInfantrySet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local AirplanesSet = SET_GROUP:New():FilterPrefixes( "Airplane" ):FilterStart() +local PickupZoneSet = SET_ZONE:New() +local DeployZoneSet = SET_ZONE:New() + +PickupZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Gudauta ) ) +DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Sochi_Adler ) ) + +AICargoDispatcherAirplanes = AI_CARGO_DISPATCHER_AIRPLANE:New( AirplanesSet, CargoInfantrySet, PickupZoneSet, DeployZoneSet ) +AICargoDispatcherAirplanes:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.miz new file mode 100644 index 0000000000..86b9e6064b Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.lua new file mode 100644 index 0000000000..af6f24ff04 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.lua @@ -0,0 +1,21 @@ +--- +-- Name: AID-CGO-310 - Airplane - Pickup and Deploy Multiple +-- Author: FlightControl +-- Date Created: 03 Aug 2018 +-- + +local CargoInfantrySet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local AirplanesSet = SET_GROUP:New():FilterPrefixes( "Airplane" ):FilterStart() +local PickupZoneSet = SET_ZONE:New() +local DeployZoneSet = SET_ZONE:New() + +PickupZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Gudauta ) ) +DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Sochi_Adler ) ) + +AICargoDispatcherAirplanes = AI_CARGO_DISPATCHER_AIRPLANE:New( AirplanesSet, CargoInfantrySet, PickupZoneSet, DeployZoneSet ) +AICargoDispatcherAirplanes:Start() + +for CargoName, Cargo in pairs( CargoInfantrySet:GetSet() ) do + AICargoDispatcherAirplanes:I( { Cargo = Cargo:GetName() } ) +end + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.miz new file mode 100644 index 0000000000..312fa4194a Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/unpack.ps1 @@ -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" * diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.lua b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.lua new file mode 100644 index 0000000000..8424c0d461 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.lua @@ -0,0 +1,153 @@ +--- +-- Name: AID-CGO-340 - Airplane - Event Handling +-- Author: FlightControl +-- Date Created: 02 Aug 2018 +-- + +local CargoInfantrySet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() +local AirplanesSet = SET_GROUP:New():FilterPrefixes( "Airplane" ):FilterStart() +local PickupZoneSet = SET_ZONE:New() +local DeployZoneSet = SET_ZONE:New() + +PickupZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Gudauta ) ) +DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Sochi_Adler ) ) +DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Maykop_Khanskaya ) ) +DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Mineralnye_Vody ) ) +DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Vaziani ) ) + +AICargoDispatcherAirplanes = AI_CARGO_DISPATCHER_AIRPLANE:New( AirplanesSet, CargoInfantrySet, PickupZoneSet, DeployZoneSet ) +AICargoDispatcherAirplanes:SetHomeZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Kobuleti ) ) + +--- Pickup Handler OnAfter for AICargoDispatcherAirplanes. +-- Use this event handler to tailor the event when a CarrierGroup is routed towards a new pickup Coordinate and a specified Speed. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherAirplanes self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The coordinate of the pickup location. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the pickup Coordinate. +-- @param #number Height Height in meters to move to the pickup coordinate. +-- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. +function AICargoDispatcherAirplanes:OnAfterPickup( From, Event, To, CarrierGroup, Coordinate, Speed, Height, PickupZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is picking up cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() + + +end + + +--- Load Handler OnAfter for AICargoDispatcherAirplanes. +-- Use this event handler to tailor the event when a CarrierGroup has initiated the loading or boarding of cargo within reporting or near range. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherAirplanes self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. +function AICargoDispatcherAirplanes:OnAfterLoad( From, Event, To, CarrierGroup, PickupZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is loading cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + +--- PickedUp Handler OnAfter for AICargoDispatcherAirplanes. +-- Use this event handler to tailor the event when a carrier has picked up all cargo objects into the CarrierGroup. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @param #AICargoDispatcherAirplanes self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. +function AICargoDispatcherAirplanes:OnAfterPickedUp( From, Event, To, CarrierGroup, PickupZone ) + + -- Write here your own code. + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " has loaded all cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + +--- Deploy Handler OnAfter for AICargoDispatcherAirplanes. +-- Use this event handler to tailor the event when a CarrierGroup is routed to a deploy coordinate, to Unload all cargo objects in each CarrierUnit. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- @function OnAfterDeploy +-- @param #AICargoDispatcherAirplanes self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Point#COORDINATE Coordinate The deploy coordinate. +-- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the deploy Coordinate. +-- @param #number Height Height in meters to move to the deploy coordinate. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherAirplanes:OnAfterDeploy( From, Event, To, CarrierGroup, Coordinate, Speed, Height, DeployZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is starting deployment of all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + +--- Unloaded Handler OnAfter for AICargoDispatcherAirplanes. +-- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has unloaded a cargo object. +-- You can use this event handler to post messages to players, or provide status updates etc. +-- Note that if more cargo objects were unloading or unboarding from the CarrierUnit, then this event can be fired multiple times for each different Cargo/CarrierUnit. +-- A CarrierUnit can be part of the larger CarrierGroup. +-- @function OnAfterUnloaded +-- @param #AICargoDispatcherAirplanes self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Cargo.Cargo#CARGO Cargo The cargo object. +-- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo unloading operation. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherAirplanes:OnAfterUnloaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, DeployZone ) + + -- Write here your own code. + local CargoGroup = Cargo:GetObject() -- Wrapper.Group#GROUP + + -- Get the name of the DeployZone + local DeployZoneName = DeployZone:GetName() + + local DeployBuildingNames = { + ["Deploy A"] = "Building A", + } + + + -- Now board the infantry into the respective warehouse building. + if DeployZoneName then + local Building = STATIC:FindByName( DeployBuildingNames[DeployZoneName] ) + Cargo:__Board( 5, Building, 25 ) + end + + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. ", Unit " .. CarrierUnit:GetName() .. " has unloaded cargo " .. Cargo:GetName() .. " in zone " .. DeployZone:GetName() .. " and cargo is moving to building " .. DeployBuildingNames[DeployZoneName], MESSAGE.Type.Information ):ToAll() + + +end + + +--- Deployed Handler OnAfter for AICargoDispatcherAirplanes. +-- @function OnAfterDeployed +-- @param #AICargoDispatcherAirplanes self +-- @param #string From A string that contains the "*from state name*" when the event was fired. +-- @param #string Event A string that contains the "*event name*" when the event was fired. +-- @param #string To A string that contains the "*to state name*" when the event was fired. +-- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. +-- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. +function AICargoDispatcherAirplanes:OnAfterDeployed( From, Event, To, CarrierGroup, DeployZone ) + + -- Write here your own code. + MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() + +end + + +AICargoDispatcherAirplanes:Start() + diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.miz b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.miz new file mode 100644 index 0000000000..7a59813521 Binary files /dev/null and b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.miz differ diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/pack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/unpack.ps1 b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/unpack.ps1 @@ -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" * diff --git a/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.lua b/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.lua new file mode 100644 index 0000000000..5bb060dd35 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.lua @@ -0,0 +1,74 @@ +--- +-- Name: BAI-001 - BAI in a Zone by Airplane Group +-- Author: FlightControl +-- Date Created: 09 May 2017 +-- +-- # Situation: +-- +-- A group of 4 bombers at patrolling north of an engage zone for 10 minutes. +-- After 10 minutes, the command center orders the bombers to engage the zone and execute a BAI strike. +-- +-- # Test cases: +-- +-- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. +-- 2. The bombers are not detecting any target during the patrol. +-- 3. When the bombers is commanded to engage, the group will fly to the engage zone. +-- 4. Detection is activated and detected targets within the engage zone are assigned for BAI. +-- 5. Observe the bombers eliminating the targets. +-- 6. Observe the bombers defenses. +-- 7. When all targets within the engage zone are destroyed, the bombers BAI task is set to Accomplished. +-- 8. The bombers will return to base. + + + +-- Create a local variable (in this case called BAIEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +BAIEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called BAIPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +BAIPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AIBAIZone) and +-- using the functions AI_BAI_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) +AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function +AIBAIZone:SetControllable( BAIPlane ) + +-- Tell the group BAIPlane to start the mission in 1 second. +AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. (600 is 600 seconds) +AIBAIZone:__Engage( 600 ) + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to the patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the bombers back to base." ) + Check:Stop( CheckScheduleID ) + AIBAIZone:__RTB( 1 ) +end diff --git a/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.miz b/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.miz new file mode 100644 index 0000000000..ff1ca9c1c2 Binary files /dev/null and b/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.miz differ diff --git a/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/pack.ps1 b/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/unpack.ps1 b/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/unpack.ps1 @@ -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" * diff --git a/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.lua b/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.lua new file mode 100644 index 0000000000..f8fdfdb665 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.lua @@ -0,0 +1,75 @@ +--- +-- Name: BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed +-- Author: FlightControl +-- Date Created: 09 May 2017 +-- +-- # Situation: +-- +-- A group of 4 bombers at patrolling north of an engage zone for 1 minute. +-- After 1 minute, the command center orders the bombers to engage the zone and execute a BAI. +-- +-- # Test cases: +-- +-- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. +-- 2. The bombers are not detecting any target during the patrol. +-- 3. When the bombers is commanded to engage, the group will fly to the engage zone. +-- 3.1. The approach speed to the engage zone is set to 400 km/h. +-- 4. Detection is activated and detected targets within the engage zone are assigned for BAI. +-- 5. Observe the bombers eliminating the targets. +-- 6. Observe the bombers defenses. +-- 7. When all targets within the engage zone are destroyed, the bombers BAI task is set to Accomplished. +-- 8. The bombers will return to base. + + + +-- Create a local variable (in this case called BAIEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +BAIEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called BAIPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +BAIPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AIBAIZone) and +-- using the functions AI_BAI_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) +AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function +AIBAIZone:SetControllable( BAIPlane ) + +-- Tell the group BAIPlane to start the mission in 1 second. +AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. (600 is 600 seconds) +AIBAIZone:__Engage( 60, 400 ) -- Engage after one minute with a speed of 400 km/h. + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the bombers back to base." ) + Check:Stop( CheckScheduleID ) + AIBAIZone:__RTB( 1 ) +end diff --git a/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.miz b/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.miz new file mode 100644 index 0000000000..2d9e55cde0 Binary files /dev/null and b/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.miz differ diff --git a/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/pack.ps1 b/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/unpack.ps1 b/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/unpack.ps1 @@ -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" * diff --git a/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.lua b/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.lua new file mode 100644 index 0000000000..43ff85443e --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.lua @@ -0,0 +1,81 @@ +--- +-- Name: BAI-004 - BAI in a Zone by Airplane Group - Test Abort +-- Author: FlightControl +-- Date Created: 09 May 2017 +-- +-- # Situation: +-- +-- A group of 4 bombers at patrolling north of an engage zone for 1 minute. +-- After 10 minutes, the command center orders the bombers to engage the zone and execute a BAI. +-- After 12 minutes, the mission is aborted. +-- +-- # Test cases: +-- +-- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. +-- 2. The bombers are not detecting any target during the patrol. +-- 3. When the bombers is commanded to engage, the group will fly to the engage zone +-- 3.1. The approach speed to the engage zone is set to 350 km/h. +-- 3.2. The altitude to the engage zone and BAI execution is set to 4000 meters. +-- 4. Observe the mission being aborted. A message will be sent. +-- 5. The bombers will go back patrolling. + + + +-- Create a local variable (in this case called BAIEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +BAIEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called BAIPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +BAIPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AIBAIZone) and +-- using the functions AI_BAI_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) +AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function +AIBAIZone:SetControllable( BAIPlane ) + +-- Tell the group BAIPlane to start the mission in 1 second. +AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. (600 is 600 seconds) +AIBAIZone:__Engage( 600, 350, 4000 ) -- Engage after 10 minutes with a speed of 350 km/h and an altitude of 4000 meters. + +-- After 12 minutes, tell the group BAIPlane to abort the engagement. +AIBAIZone:__Abort( 720 ) -- Abort the engagement. + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + +function AIBAIZone:OnAfterAbort(Controllable,From,Event,To) + BASE:E( "MISSION ABORT! Back to patrol zone." ) + MESSAGE:New("Mission ABORTED! Back to the Patrol Zone!",30,"ALERT!"):ToAll() +end + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the bombers back to base." ) + Check:Stop( CheckScheduleID ) + AIBAIZone:__RTB( 1 ) +end diff --git a/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.miz b/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.miz new file mode 100644 index 0000000000..12d48e7906 Binary files /dev/null and b/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.miz differ diff --git a/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/pack.ps1 b/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/unpack.ps1 b/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/unpack.ps1 @@ -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" * diff --git a/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.lua b/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.lua new file mode 100644 index 0000000000..85468404d9 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.lua @@ -0,0 +1,78 @@ +--- +-- Name: BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend +-- Author: FlightControl +-- Date Created: 09 May 2017 +-- +-- # Situation: +-- +-- A group of 4 bombers at patrolling north of an engage zone for 1 minute. +-- After 1 minute, the command center orders the bombers to engage the zone and execute a BAI. +-- The planes should expend 4 weapons per run. +-- +-- # Test cases: +-- +-- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. +-- 2. The bombers are not detecting any target during the patrol. +-- 3. When the bombers is commanded to engage, the group will fly to the engage zone +-- 3.1. The approach speed to the engage zone is set to 400 km/h. +-- 3.2. The altitude to the engage zone and BAI execution is set to 500 meters. +-- 3.3. The planes should expend 4 weapons per run. +-- 4. Detection is activated and detected targets within the engage zone are assigned for BAI. +-- 5. Observe the bombers eliminating the targets. +-- 6. Observe the bombers defenses. +-- 7. When all targets within the engage zone are destroyed, the bombers BAI task is set to Accomplished. +-- 8. The bombers will return to base. + + + +-- Create a local variable (in this case called BAIEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +BAIEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called BAIPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +BAIPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AIBAIZone) and +-- using the functions AI_BAI_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) +AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function +AIBAIZone:SetControllable( BAIPlane ) + +-- Tell the group BAIPlane to start the mission in 1 second. +AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 1 minute, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. (600 is 600 seconds) +AIBAIZone:__Engage( 60, 600, 8000, AI.Task.WeaponExpend.FOUR ) -- Engage with a speed of 600 km/h and an altitude of 8000 meters, weapn expend 4. + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the bombers back to base." ) + Check:Stop( CheckScheduleID ) + AIBAIZone:__RTB( 1 ) +end diff --git a/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.miz b/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.miz new file mode 100644 index 0000000000..25cbc53b5f Binary files /dev/null and b/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.miz differ diff --git a/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 b/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 b/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 @@ -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" * diff --git a/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.lua b/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.lua new file mode 100644 index 0000000000..f6f922876e --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.lua @@ -0,0 +1,76 @@ +--- +-- Name: BAI-100 - BAI of a Bridge +-- Author: FlightControl +-- Date Created: 09 May 2017 +-- +-- # Situation: +-- +-- A group of 2 bombers are patrolling north of an engage zone. +-- The command center orders the bombers to engage the zone and execute a BAI strike on a bridge. +-- +-- # Test cases: +-- +-- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. +-- 2. The bombers are not detecting any target during the patrol. +-- 3. When the bombers is commanded to engage, the group will fly to the engage zone. +-- 4. Detection is activated and detected targets within the engage zone are assigned for BAI. +-- 5. Observe the bombers eliminating the bridge. +-- 6. Observe the bombers defenses. +-- 7. When the bridge within the engage zone is destroyed, the bombers BAI task is set to Accomplished. +-- 8. The bombers will return to base. + + + +-- Create a local variable (in this case called BAIEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +BAIEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called BAIPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +BAIPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AIBAIZone) and +-- using the functions AI_BAI_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) +AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + +-- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function +AIBAIZone:SetControllable( BAIPlane ) + +-- Tell the BAI not to search for potential targets in the BAIEngagementZone, but rather use the center of the BAIEngagementZone as the bombing location. +AIBAIZone:SearchOff() + +-- Tell the group BAIPlane to start the mission in 1 second. +AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. +AIBAIZone:__Engage( 10 ) + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() ~= 0 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The bridge is destroyed." ) + AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to the patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the bombers back to base." ) + Check:Stop( CheckScheduleID ) + AIBAIZone:__RTB( 1 ) +end diff --git a/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.miz b/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.miz new file mode 100644 index 0000000000..005c7a4625 Binary files /dev/null and b/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.miz differ diff --git a/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/pack.ps1 b/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/unpack.ps1 b/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/unpack.ps1 @@ -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" * diff --git a/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.lua b/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.lua new file mode 100644 index 0000000000..12abd4eb47 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.lua @@ -0,0 +1,23 @@ +--- +-- Name: CAP-001 - Combat Air Patrol +-- Author: FlightControl +-- Date Created: 16 January 2017 +-- +-- # Situation: +-- The Su-27 airplane will patrol in PatrolZone. +-- It will not engage any enemy automatically. +-- +-- # Test cases: +-- +-- 1. Observe the Su-27 patrolling. +-- + +local CapPlane = GROUP:FindByName( "Plane" ) + +local PatrolZone = ZONE:New( "Patrol Zone" ) + +AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) + +AICapZone:SetControllable( CapPlane ) + +AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. diff --git a/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz b/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz new file mode 100644 index 0000000000..26260e713f Binary files /dev/null and b/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz differ diff --git a/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/pack.ps1 b/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/unpack.ps1 b/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/unpack.ps1 @@ -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" * diff --git a/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.lua b/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.lua new file mode 100644 index 0000000000..87189c8c5b --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.lua @@ -0,0 +1,27 @@ +--- +-- Name: CAP-010 - CAP and Engage within Range +-- Author: FlightControl +-- Date Created: 16 January 2017 +-- +-- # Situation: +-- +-- The Su-27 airplane will patrol in PatrolZone. +-- It will engage when it detects the airplane and when the A-10C is within the engage range. +-- +-- # Test cases: +-- +-- 1. Observe the Su-27 patrolling. +-- 2. Observe that, when the A-10C is within the engage range, it will engage. +-- 3. After engage, observe that the Su-27 returns to the PatrolZone. +-- 4. If you want, you can wait until the Su-27 is out of fuel and will land. + +CapPlane = GROUP:FindByName( "Plane" ) + +PatrolZone = ZONE:New( "Patrol Zone" ) + +AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) + +AICapZone:SetControllable( CapPlane ) +AICapZone:SetEngageRange( 20000 ) -- Set the Engage Range to 20.000 meters. The AI won't engage when the enemy is beyond 20.000 meters. + +AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. diff --git a/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz b/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz new file mode 100644 index 0000000000..44f29bbe39 Binary files /dev/null and b/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz differ diff --git a/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/pack.ps1 b/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/unpack.ps1 b/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/unpack.ps1 @@ -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" * diff --git a/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.lua b/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.lua new file mode 100644 index 0000000000..9c6d374153 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.lua @@ -0,0 +1,32 @@ +--- +-- Name: CAP-011 - CAP and Engage within Zone +-- Author: FlightControl +-- Date Created: 16 January 2017 +-- +-- # Situation: +-- +-- The Su-27 airplane will patrol in PatrolZone. +-- It will engage when it detects the airplane and when the A-10C is within the CapEngageZone. +-- +-- # Test cases: +-- +-- 1. Observe the Su-27 patrolling. +-- 2. Observe that, when the A-10C is within the engage zone, it will engage. +-- 3. After engage, observe that the Su-27 returns to the PatrolZone. +-- 4. If you want, you can wait until the Su-27 is out of fuel and will land. + + +CapPlane = GROUP:FindByName( "Plane" ) + +PatrolZone = ZONE:New( "Patrol Zone" ) + +AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) + +EngageZoneGroup = GROUP:FindByName( "Engage Zone" ) + +CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup ) + +AICapZone:SetControllable( CapPlane ) +AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone. + +AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. diff --git a/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.miz b/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.miz new file mode 100644 index 0000000000..99648b0e65 Binary files /dev/null and b/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.miz differ diff --git a/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/pack.ps1 b/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/unpack.ps1 b/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/unpack.ps1 @@ -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" * diff --git a/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.lua b/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.lua new file mode 100644 index 0000000000..3b0ad84bc6 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.lua @@ -0,0 +1,43 @@ +--- +-- Name: CAP-012 - CAP - Test Abort +-- Author: FlightControl +-- Date Created: 14 Mar 2017 +-- +-- # Situation: +-- +-- The Su-27 airplane will patrol in PatrolZone. +-- It will engage when it detects the airplane and when the A-10C is within the CapEngageZone. +-- It will abort the engagement after 1 minute and return to the patrol zone. +-- +-- # Test cases: +-- +-- 1. Observe the Su-27 patrolling. +-- 2. Observe that, when the A-10C is within the engage zone, it will engage. +-- 3. After engage, observe that the Su-27 returns to the PatrolZone. +-- 4. When it engages, it will abort the engagement after 1 minute. + + +CapPlane = GROUP:FindByName( "Plane" ) + +PatrolZone = ZONE:New( "Patrol Zone" ) + +AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) + +EngageZoneGroup = GROUP:FindByName( "Engage Zone" ) + +CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup ) + +AICapZone:SetControllable( CapPlane ) +AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone. + +AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +function AICapZone:OnAfterEngage(Controllable,From,Event,To) + AICapZone:__Abort( 60 ) +end + +function AICapZone:OnAfterAbort(Controllable,From,Event,To) + BASE:E("MISSION ABORTED! Returning to Patrol Zone!") + MESSAGE:New("MISSION ABORTED! Returning to Patrol Zone!",30,"ALERT!") +end + diff --git a/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.miz b/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.miz new file mode 100644 index 0000000000..a1db1b1cf8 Binary files /dev/null and b/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.miz differ diff --git a/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/pack.ps1 b/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/unpack.ps1 b/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/unpack.ps1 @@ -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" * diff --git a/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.lua b/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.lua new file mode 100644 index 0000000000..16f456f049 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.lua @@ -0,0 +1,27 @@ +--- +-- Name: CAP-020 - Combat Air Patrol RTB Test +-- Author: FlightControl +-- Date Created: 14 February 2017 +-- +-- # Situation: +-- The Su-27 airplane will patrol in PatrolZone. +-- It will return to base when out of fuel. +-- +-- # Test cases: +-- +-- 1. Observe the Su-27 patrolling. +-- 2. It should return to base when out of fuel. +-- + +CapSpawn = SPAWN:New( "Plane" ):InitLimit(1,2):InitRepeatOnLanding() + +CapGroup = CapSpawn:Spawn() + +PatrolZone = ZONE:New( "Patrol Zone" ) + +AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) + +AICapZone:SetControllable( CapGroup ) + +AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + diff --git a/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.miz b/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.miz new file mode 100644 index 0000000000..f9d81f7349 Binary files /dev/null and b/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.miz differ diff --git a/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/pack.ps1 b/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/unpack.ps1 b/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/unpack.ps1 @@ -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" * diff --git a/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.lua b/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.lua new file mode 100644 index 0000000000..7b5db069a6 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.lua @@ -0,0 +1,26 @@ +--- +-- Name: CAP-100 - AI_A2A_CAP - Normal CAP +-- Author: FlightControl +-- Date Created: 30 May 2017 +-- +-- # Situation: +-- The Su-27 airplane will patrol in PatrolZone. +-- It will not engage any enemy automatically. +-- +-- # Test cases: +-- +-- 1. Observe the Su-27 patrolling. +-- + +local CapPlane = GROUP:FindByName( "Plane" ) + +local PatrolZone = ZONE:New( "Patrol Zone" ) + +A2ACap = AI_A2A_CAP:New( CapPlane, PatrolZone, 500, 1000, 500, 600 ) + +A2ACap:Patrol() + +local IntruderUnit = UNIT:FindByName( "Intruder" ) + + +A2ACap:__Engage( 120, { IntruderUnit } ) \ No newline at end of file diff --git a/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.miz b/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.miz new file mode 100644 index 0000000000..bf2a93271f Binary files /dev/null and b/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.miz differ diff --git a/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/pack.ps1 b/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/unpack.ps1 b/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/unpack.ps1 @@ -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" * diff --git a/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.lua b/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.lua new file mode 100644 index 0000000000..fea4b81e98 --- /dev/null +++ b/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.lua @@ -0,0 +1,74 @@ +--- +-- Name: CAS-001 - CAS in a Zone by Airplane Group +-- Author: FlightControl +-- Date Created: 13 January 2017 +-- +-- # Situation: +-- +-- A group of 4 Su-25T at patrolling north of an engage zone for 10 minutes. +-- After 10 minutes, the command center orders the Su-25T to engage the zone and execute a CAS. +-- +-- # Test cases: +-- +-- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. +-- 2. The Su-25T are not detecting any target during the patrol. +-- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone. +-- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. +-- 5. Observe the Su-25T eliminating the targets. +-- 6. Observe the Su-25T defenses. +-- 7. When all targets within the engage zone are destroyed, the Su-25T CAS task is set to Accomplished. +-- 8. The Su-25T will return to base. + + + +-- Create a local variable (in this case called CASEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +CASEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called CASPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +CASPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AICasZone) and +-- using the functions AI_CAS_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) +AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function +AICasZone:SetControllable( CASPlane ) + +-- Tell the group CASPlane to start the mission in 1 second. +AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) +AICasZone:__Engage( 600 ) + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AICasZone:__Accomplish( 1 ) -- Now they should fly back to the patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Su-25T back to base." ) + Check:Stop( CheckScheduleID ) + AICasZone:__RTB( 1 ) +end diff --git a/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz b/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz new file mode 100644 index 0000000000..7f7d539b15 Binary files /dev/null and b/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz differ diff --git a/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/pack.ps1 b/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/unpack.ps1 b/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/unpack.ps1 @@ -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" * diff --git a/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.lua b/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.lua new file mode 100644 index 0000000000..fad0bea38c --- /dev/null +++ b/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.lua @@ -0,0 +1,75 @@ +--- +-- Name: CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed +-- Author: FlightControl +-- Date Created: 06 February 2017 +-- +-- # Situation: +-- +-- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute. +-- After 1 minute, the command center orders the Su-25T to engage the zone and execute a CAS. +-- +-- # Test cases: +-- +-- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. +-- 2. The Su-25T are not detecting any target during the patrol. +-- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone. +-- 3.1. The approach speed to the engage zone is set to 400 km/h. +-- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. +-- 5. Observe the Su-25T eliminating the targets. +-- 6. Observe the Su-25T defenses. +-- 7. When all targets within the engage zone are destroyed, the Su-25T CAS task is set to Accomplished. +-- 8. The Su-25T will return to base. + + + +-- Create a local variable (in this case called CASEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +CASEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called CASPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +CASPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AICasZone) and +-- using the functions AI_CAS_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) +AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function +AICasZone:SetControllable( CASPlane ) + +-- Tell the group CASPlane to start the mission in 1 second. +AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) +AICasZone:__Engage( 60, 400 ) -- Engage after one minute with a speed of 400 km/h. + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Su-25T back to base." ) + Check:Stop( CheckScheduleID ) + AICasZone:__RTB( 1 ) +end diff --git a/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.miz b/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.miz new file mode 100644 index 0000000000..ecd144af9f Binary files /dev/null and b/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.miz differ diff --git a/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/pack.ps1 b/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/unpack.ps1 b/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/unpack.ps1 @@ -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" * diff --git a/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.lua b/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.lua new file mode 100644 index 0000000000..8af2ca77e8 --- /dev/null +++ b/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.lua @@ -0,0 +1,76 @@ +--- +-- Name: CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude +-- Author: FlightControl +-- Date Created: 6 February 2017 +-- +-- # Situation: +-- +-- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute. +-- After 1 minute, the command center orders the Su-25T to engage the zone and execute a CAS. +-- +-- # Test cases: +-- +-- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. +-- 2. The Su-25T are not detecting any target during the patrol. +-- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone +-- 3.1. The approach speed to the engage zone is set to 400 km/h. +-- 3.2. The altitude to the engage zone and CAS execution is set to 500 meters. +-- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. +-- 5. Observe the Su-25T eliminating the targets. +-- 6. Observe the Su-25T defenses. +-- 7. When all targets within the engage zone are destroyed, the Su-25T CAS task is set to Accomplished. +-- 8. The Su-25T will return to base. + + + +-- Create a local variable (in this case called CASEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +CASEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called CASPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +CASPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AICasZone) and +-- using the functions AI_CAS_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) +AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function +AICasZone:SetControllable( CASPlane ) + +-- Tell the group CASPlane to start the mission in 1 second. +AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) +AICasZone:__Engage( 600, 350, 4000 ) -- Engage after 10 minutes with a speed of 350 km/h and an altitude of 4000 meters. + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Su-25T back to base." ) + Check:Stop( CheckScheduleID ) + AICasZone:__RTB( 1 ) +end diff --git a/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.miz b/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.miz new file mode 100644 index 0000000000..2c64b23194 Binary files /dev/null and b/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.miz differ diff --git a/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/pack.ps1 b/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/unpack.ps1 b/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/unpack.ps1 @@ -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" * diff --git a/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.lua b/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.lua new file mode 100644 index 0000000000..295b7d11d8 --- /dev/null +++ b/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.lua @@ -0,0 +1,81 @@ +--- +-- Name: CAS-004 - CAS in a Zone by Airplane Group - Test Abort +-- Author: FlightControl +-- Date Created: 14 Mar 2017 +-- +-- # Situation: +-- +-- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute. +-- After 10 minutes, the command center orders the Su-25T to engage the zone and execute a CAS. +-- After 12 minutes, the mission is aborted. +-- +-- # Test cases: +-- +-- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. +-- 2. The Su-25T are not detecting any target during the patrol. +-- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone +-- 3.1. The approach speed to the engage zone is set to 350 km/h. +-- 3.2. The altitude to the engage zone and CAS execution is set to 4000 meters. +-- 4. Observe the mission being aborted. A message will be sent. +-- 5. The Su-25T will go back patrolling. + + + +-- Create a local variable (in this case called CASEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +CASEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called CASPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +CASPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AICasZone) and +-- using the functions AI_CAS_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) +AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function +AICasZone:SetControllable( CASPlane ) + +-- Tell the group CASPlane to start the mission in 1 second. +AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) +AICasZone:__Engage( 600, 350, 4000 ) -- Engage after 10 minutes with a speed of 350 km/h and an altitude of 4000 meters. + +-- After 12 minutes, tell the group CASPlane to abort the engagement. +AICasZone:__Abort( 720 ) -- Abort the engagement. + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + +function AICasZone:OnAfterAbort(Controllable,From,Event,To) + BASE:E( "MISSION ABORT! Back to patrol zone." ) + MESSAGE:New("Mission ABORTED! Back to the Patrol Zone!",30,"ALERT!"):ToAll() +end + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Su-25T back to base." ) + Check:Stop( CheckScheduleID ) + AICasZone:__RTB( 1 ) +end diff --git a/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.miz b/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.miz new file mode 100644 index 0000000000..6aeaa2e740 Binary files /dev/null and b/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.miz differ diff --git a/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/pack.ps1 b/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/unpack.ps1 b/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/unpack.ps1 @@ -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" * diff --git a/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.lua b/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.lua new file mode 100644 index 0000000000..203eed00a8 --- /dev/null +++ b/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.lua @@ -0,0 +1,78 @@ +--- +-- Name: CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend +-- Author: FlightControl +-- Date Created: 18 Mar 2017 +-- +-- # Situation: +-- +-- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute. +-- After 1 minute, the command center orders the Su-25T to engage the zone and execute a CAS. +-- The planes should expend 4 weapons per run. +-- +-- # Test cases: +-- +-- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. +-- 2. The Su-25T are not detecting any target during the patrol. +-- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone +-- 3.1. The approach speed to the engage zone is set to 400 km/h. +-- 3.2. The altitude to the engage zone and CAS execution is set to 500 meters. +-- 3.3. The planes should expend 4 weapons per run. +-- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. +-- 5. Observe the Su-25T eliminating the targets. +-- 6. Observe the Su-25T defenses. +-- 7. When all targets within the engage zone are destroyed, the Su-25T CAS task is set to Accomplished. +-- 8. The Su-25T will return to base. + + + +-- Create a local variable (in this case called CASEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +CASEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called CASPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +CASPlane = GROUP:FindByName( "Plane" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AICasZone) and +-- using the functions AI_CAS_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) +AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function +AICasZone:SetControllable( CASPlane ) + +-- Tell the group CASPlane to start the mission in 1 second. +AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 1 minute, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) +AICasZone:__Engage( 60, 600, 8000, AI.Task.WeaponExpend.FOUR ) -- Engage with a speed of 600 km/h and an altitude of 8000 meters, weapn expend 4. + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Su-25T back to base." ) + Check:Stop( CheckScheduleID ) + AICasZone:__RTB( 1 ) +end diff --git a/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.miz b/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.miz new file mode 100644 index 0000000000..ad8051d9c8 Binary files /dev/null and b/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.miz differ diff --git a/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 b/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 b/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 @@ -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" * diff --git a/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.lua b/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.lua new file mode 100644 index 0000000000..42f76f38f6 --- /dev/null +++ b/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.lua @@ -0,0 +1,76 @@ +--- +-- Name: CAS-010 - CAS in a Zone by Helicopter +-- Author: FlightControl +-- Date Created: 6 February 2017 +-- +-- # Situation: +-- +-- A group of 1 Ka-50 patrolling north of an engage zone for 1 minute. +-- After 1 minute, the command center orders the Ka-50 to engage the zone and execute a CAS. +-- +-- # Test cases: +-- +-- 1. Observe that the Ka-50 is patrolling in the patrol zone, until the engage command is given. +-- 2. The Ka-50 are not detecting any target during the patrol. +-- 3. When the Ka-50 is commanded to engage, the group will fly to the engage zone. +-- 3.1. Engage Speed is set to 100 km/h. +-- 3.2. Engage Altitude is set to 150 meters. +-- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. +-- 5. Observe the Ka-50 eliminating the targets. +-- 6. Observe the Ka-50 defenses. +-- 7. When all targets within the engage zone are destroyed, the Ka-50 CAS task is set to Accomplished. +-- 8. The Ka-50 will return to base. + + + +-- Create a local variable (in this case called CASEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +CASEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called CASPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +CASPlane = GROUP:FindByName( "Helicopter" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AICasZone) and +-- using the functions AI_CAS_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) +AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function +AICasZone:SetControllable( CASPlane ) + +-- Tell the group CASPlane to start the mission in 1 second. +AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) +AICasZone:__Engage( 60, 100, 150 ) + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Su-25T back to base." ) + Check:Stop( CheckScheduleID ) + AICasZone:__RTB( 1 ) +end diff --git a/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz b/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz new file mode 100644 index 0000000000..fe14eb00cb Binary files /dev/null and b/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz differ diff --git a/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/pack.ps1 b/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/unpack.ps1 b/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/unpack.ps1 @@ -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" * diff --git a/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.lua b/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.lua new file mode 100644 index 0000000000..dbf2bcb055 --- /dev/null +++ b/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.lua @@ -0,0 +1,75 @@ +--- +-- Name: CAS-011 - CAS in a Zone by Helicopter Group +-- Author: FlightControl +-- Date Created: 6 February 2017 +-- +-- # Situation: +-- +-- A group of 4 Ka-50 patrolling north of an engage zone for 1 minute. +-- After 1 minute, the command center orders the Ka-50 to engage the zone and execute a CAS. +-- +-- # Test cases: +-- +-- 1. Observe that the Ka-50 is patrolling in the patrol zone, until the engage command is given. +-- 2. The Ka-50 are not detecting any target during the patrol. +-- 3. When the Ka-50 is commanded to engage, the group will fly to the engage zone. +-- 3.1. Engage Speed is set to 100 km/h. +-- 3.2. Engage Altitude is set to 150 meters. +-- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. +-- 5. Observe the Ka-50 eliminating the targets. +-- 6. Observe the Ka-50 defenses. +-- 7. When all targets within the engage zone are destroyed, the Ka-50 CAS task is set to Accomplished. +-- 8. The Ka-50 will return to base. + + +-- Create a local variable (in this case called CASEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +CASEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variable (in this case called CASPlane) and +-- using the GROUP function find the aircraft group called "Plane" and assign to this variable +CASPlane = GROUP:FindByName( "Helicopter" ) + +-- Create a local Variable (in this cased called PatrolZone and +-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable +PatrolZone = ZONE:New( "Patrol Zone" ) + +-- Create and object (in this case called AICasZone) and +-- using the functions AI_CAS_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) +AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function +AICasZone:SetControllable( CASPlane ) + +-- Tell the group CASPlane to start the mission in 1 second. +AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) +AICasZone:__Engage( 60, 100, 150 ) + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Su-25T back to base." ) + Check:Stop( CheckScheduleID ) + AICasZone:__RTB( 1 ) +end diff --git a/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz b/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz new file mode 100644 index 0000000000..d6613e2fc2 Binary files /dev/null and b/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz differ diff --git a/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/pack.ps1 b/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/unpack.ps1 b/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/unpack.ps1 @@ -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" * diff --git a/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.lua b/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.lua new file mode 100644 index 0000000000..05d2beba9d --- /dev/null +++ b/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.lua @@ -0,0 +1,91 @@ +--- +-- Name: CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups +-- Author: FlightControl +-- Date Created: 6 February 2017 +-- +-- # Situation: +-- +-- A group of 4 Ka-50 and 5 Su-25T are patrolling north in two engage zone for 5 minutes. +-- After 5 minutes, the command center orders the groups to engage the zone and execute a CAS. +-- +-- # Test cases: +-- +-- 1. Observe that the groups is patrolling in the patrol zone, until the engage command is given. +-- 2. The groups are not detecting any target during the patrol. +-- 3. When the groups is commanded to engage, the group will fly to the engage zone. +-- 3.1. Engage Speed for the Su-25T is set to 350 km/h. +-- 3.2. Engage Altitude for the Su-25T is set to 1500 meters. +-- 3.3. Engage Speed for the Ka-50 is set to 100 km/h. +-- 3.4. Engage Altitude for the Ka-50 is set to 150 meters. +-- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. +-- 5. Observe the groups eliminating the targets. +-- 6. Observe the groups defenses. +-- 7. When all targets within the engage zone are destroyed, the groups CAS task is set to Accomplished. +-- 8. The groups will return to base. + + + +-- Create a local variable (in this case called CASEngagementZone) and +-- using the ZONE function find the pre-defined zone called "Engagement Zone" +-- currently on the map and assign it to this variable +CASEngagementZone = ZONE:New( "Engagement Zone" ) + +-- Create a local variables (in this case called CASPlane and CASHelicopters) and +-- using the GROUP function find the aircraft group called "Plane" and "Helicopter" and assign to these variables +CASPlane = GROUP:FindByName( "Plane" ) +CASHelicopter = GROUP:FindByName( "Helicopter" ) + +-- Create two patrol zones, one for the Planes and one for the Helicopters. +PatrolZonePlanes = ZONE:New( "Patrol Zone Planes" ) +PatrolZoneHelicopters = ZONE:New( "Patrol Zone Helicopters" ) + +-- Create and object (in this case called AICasZone) and +-- using the functions AI_CAS_ZONE assign the parameters that define this object +-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) +AICasZonePlanes = AI_CAS_ZONE:New( PatrolZonePlanes, 400, 500, 500, 2500, CASEngagementZone ) +AICasZoneHelicopters = AI_CAS_ZONE:New( PatrolZoneHelicopters, 100, 250, 300, 1000, CASEngagementZone ) + +-- Create an object (in this case called Targets) and +-- using the GROUP function find the group labeled "Targets" and assign it to this object +Targets = GROUP:FindByName("Targets") + + +-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function +AICasZonePlanes:SetControllable( CASPlane ) +AICasZoneHelicopters:SetControllable( CASHelicopter ) + +-- Tell the group CASPlane to start the mission in 1 second. +AICasZonePlanes:__Start( 1 ) -- They should startup, and start patrolling in the PatrolZone. +AICasZoneHelicopters:__Start( 1 ) -- They should startup, and start patrolling in the PatrolZone. + +-- After 10 minutes, tell the group CASPlanes and CASHelicopters to engage the targets located in the engagement zone called CASEngagement Zone. +AICasZonePlanes:__Engage( 300, 350, 1500 ) -- Engage with a speed of 350 km/h and 1500 meter altitude. +AICasZoneHelicopters:__Engage( 300, 100, 150 ) -- Engage with a speed of 100 km/h and 150 meter altitude. + + +-- Check every 60 seconds whether the Targets have been eliminated. +-- When the trigger completed has been fired, the Planes and Helicopters will go back to the Patrol Zone. +Check, CheckScheduleID = SCHEDULER:New(nil, + function() + if Targets:IsAlive() and Targets:GetSize() > 5 then + BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") + else + BASE:E( "Test Mission: The required targets are destroyed." ) + Check:Stop( CheckScheduleID ) + AICasZonePlanes:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + AICasZoneHelicopters:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. + end + end, {}, 20, 60, 0.2 ) + + +-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... +function AICasZonePlanes:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Su-25T back to base." ) + AICasZonePlanes:__RTB( 1 ) +end + +-- When the targets in the zone are destroyed, (see scheduled function), the helicpters will return home ... +function AICasZoneHelicopters:OnAfterAccomplish( Controllable, From, Event, To ) + BASE:E( "Test Mission: Sending the Ka-50 back to base." ) + AICasZoneHelicopters:__RTB( 1 ) +end diff --git a/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.miz b/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.miz new file mode 100644 index 0000000000..1f1341470d Binary files /dev/null and b/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.miz differ diff --git a/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/pack.ps1 b/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/unpack.ps1 b/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/unpack.ps1 @@ -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" * diff --git a/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua b/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua new file mode 100644 index 0000000000..5867155b2d --- /dev/null +++ b/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua @@ -0,0 +1,108 @@ +--- +-- Name: CAZ-001 - Capture Zone +-- Author: FlightControl +-- Date Created: 13 January 2017 +-- +-- # Situation: +-- +-- # Test cases: +-- + +do -- Setup the Command Centers + + RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" ) + US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" ) + +end + +do -- Missions + + US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary", + "Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" .. + "There are five random capture zones located at the airbase.\n" .. + "Move to one of the capture zones, destroy the fuel tanks in the capture zone, " .. + "and occupy each capture zone with a platoon.\n " .. + "Your orders are to hold position until all capture zones are taken.\n" .. + "Use the map (F10) for a clear indication of the location of each capture zone.\n" .. + "Note that heavy resistance can be expected at the airbase!\n" .. + "Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!" + , coalition.side.RED) + + US_Score = SCORING:New( "CAZ-001 - Capture Zone" ) + + US_Mission_EchoBay:AddScoring( US_Score ) + + US_Mission_EchoBay:Start() + +end + + + + + + +CaptureZone = ZONE:New( "CaptureZone" ) + +ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED ) + + +--- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self +function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) + if From ~= To then + local Coalition = self:GetCoalition() + self:E( { Coalition = Coalition } ) + if Coalition == coalition.side.BLUE then + ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue ) + US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + else + ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red ) + RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + end + end +end + +--- @param Functional.Protect#ZONE_CAPTURE_COALITION self +function ZoneCaptureCoalition:OnEnterEmpty() + ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green ) + US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) +end + + +--- @param Functional.Protect#ZONE_CAPTURE_COALITION self +function ZoneCaptureCoalition:OnEnterAttacked() + ZoneCaptureCoalition:Smoke( SMOKECOLOR.White ) + local Coalition = self:GetCoalition() + self:E({Coalition = Coalition}) + if Coalition == coalition.side.BLUE then + US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + else + RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + end +end + +--- @param Functional.Protect#ZONE_CAPTURE_COALITION self +function ZoneCaptureCoalition:OnEnterCaptured() + local Coalition = self:GetCoalition() + self:E({Coalition = Coalition}) + if Coalition == coalition.side.BLUE then + RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + else + US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + end + + self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 ) + + self:__Guard( 30 ) +end + +ZoneCaptureCoalition:__Guard( 1 ) + + + diff --git a/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz b/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz new file mode 100644 index 0000000000..92719df6c7 Binary files /dev/null and b/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz differ diff --git a/CAZ - Capture Zones/CAZ-001 - Capture Zone/pack.ps1 b/CAZ - Capture Zones/CAZ-001 - Capture Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAZ - Capture Zones/CAZ-001 - Capture Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAZ - Capture Zones/CAZ-001 - Capture Zone/unpack.ps1 b/CAZ - Capture Zones/CAZ-001 - Capture Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAZ - Capture Zones/CAZ-001 - Capture Zone/unpack.ps1 @@ -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" * diff --git a/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua b/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua new file mode 100644 index 0000000000..7a477de451 --- /dev/null +++ b/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua @@ -0,0 +1,114 @@ +--- +-- Name: CAZ-500 - Task Capture Zone +-- Author: FlightControl +-- Date Created: 13 January 2017 +-- +-- # Situation: +-- +-- # Test cases: +-- + +do -- Setup the Command Centers + + RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" ) + US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" ) + +end + +do -- Missions + + US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary", + "Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" .. + "There are five random capture zones located at the airbase.\n" .. + "Move to one of the capture zones, destroy the fuel tanks in the capture zone, " .. + "and occupy each capture zone with a platoon.\n " .. + "Your orders are to hold position until all capture zones are taken.\n" .. + "Use the map (F10) for a clear indication of the location of each capture zone.\n" .. + "Note that heavy resistance can be expected at the airbase!\n" .. + "Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!" + , coalition.side.RED) + + US_Score = SCORING:New( "CAZ-001 - Capture Zone" ) + + US_Mission_EchoBay:AddScoring( US_Score ) + + US_Mission_EchoBay:Start() + +end + + + + + + +CaptureZone = ZONE:New( "Alpha-001" ) + +ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED ) + + +--- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self +function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) + if From ~= To then + local Coalition = self:GetCoalition() + self:E( { Coalition = Coalition } ) + if Coalition == coalition.side.BLUE then + ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue ) + US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + else + ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red ) + RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + end + end +end + +--- @param Functional.Protect#ZONE_CAPTURE_COALITION self +function ZoneCaptureCoalition:OnEnterEmpty() + ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green ) + US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) +end + + +--- @param Functional.Protect#ZONE_CAPTURE_COALITION self +function ZoneCaptureCoalition:OnEnterAttacked() + ZoneCaptureCoalition:Smoke( SMOKECOLOR.White ) + local Coalition = self:GetCoalition() + self:E({Coalition = Coalition}) + if Coalition == coalition.side.BLUE then + US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + else + RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + end +end + +--- @param Functional.Protect#ZONE_CAPTURE_COALITION self +function ZoneCaptureCoalition:OnEnterCaptured() + local Coalition = self:GetCoalition() + self:E({Coalition = Coalition}) + if Coalition == coalition.side.BLUE then + RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + else + US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) + end + + self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 ) + + self:__Guard( 30 ) +end + +ZoneCaptureCoalition:MonitorDestroyedUnits() +ZoneCaptureCoalition:__Guard( 1 ) + +-- Create the tasks under the mission + +local ZoneCaptureGroupSet = SET_GROUP:New():FilterCoalitions("blue"):FilterStart() + +local US_Task_Zone_Capture = TASK_ZONE_CAPTURE:New( US_Mission_EchoBay, ZoneCaptureGroupSet, ZoneCaptureCoalition:GetZoneName(), ZoneCaptureCoalition ) + +US_CC:SetMenu() \ No newline at end of file diff --git a/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz b/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz new file mode 100644 index 0000000000..9741cbc5be Binary files /dev/null and b/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz differ diff --git a/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/pack.ps1 b/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/unpack.ps1 b/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua b/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua new file mode 100644 index 0000000000..4df5cc8d0f --- /dev/null +++ b/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua @@ -0,0 +1,11 @@ + +CargoEngineer = UNIT:FindByName( "Engineer" ) +InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrier ) + diff --git a/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz b/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz new file mode 100644 index 0000000000..141fd2975d Binary files /dev/null and b/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz differ diff --git a/CGO - Cargo/CGO-001 - Unit Boarding/pack.ps1 b/CGO - Cargo/CGO-001 - Unit Boarding/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-001 - Unit Boarding/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-001 - Unit Boarding/unpack.ps1 b/CGO - Cargo/CGO-001 - Unit Boarding/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-001 - Unit Boarding/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua b/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua new file mode 100644 index 0000000000..bbc6edc586 --- /dev/null +++ b/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua @@ -0,0 +1,11 @@ + +CargoEngineer = UNIT:FindByName( "Engineer" ) +InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is. +InfantryCargo:Load( CargoCarrier ) + +-- This will Unboard the Cargo from the Carrier. +InfantryCargo:UnBoard() \ No newline at end of file diff --git a/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz b/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz new file mode 100644 index 0000000000..bd1007418b Binary files /dev/null and b/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz differ diff --git a/CGO - Cargo/CGO-002 - Unit Unboarding/pack.ps1 b/CGO - Cargo/CGO-002 - Unit Unboarding/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-002 - Unit Unboarding/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-002 - Unit Unboarding/unpack.ps1 b/CGO - Cargo/CGO-002 - Unit Unboarding/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-002 - Unit Unboarding/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua b/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua new file mode 100644 index 0000000000..6cf1b1f696 --- /dev/null +++ b/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua @@ -0,0 +1,25 @@ + +CargoEngineer = UNIT:FindByName( "Engineer" ) +InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) + +CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) + +CargoCarrierTo = UNIT:FindByName( "CarrierTo" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrierFrom ) + +-- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo. +function InfantryCargo:OnEnterLoaded() + self:__UnBoard( 1 ) + self.OnEnterLoaded = nil +end + +-- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier. +function InfantryCargo:OnEnterUnLoaded() + self:__Board( 1, CargoCarrierTo ) + self.OnEnterUnLoaded = nil +end + diff --git a/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz b/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz new file mode 100644 index 0000000000..7f813e45db Binary files /dev/null and b/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz differ diff --git a/CGO - Cargo/CGO-003 - Unit Transferring/pack.ps1 b/CGO - Cargo/CGO-003 - Unit Transferring/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-003 - Unit Transferring/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-003 - Unit Transferring/unpack.ps1 b/CGO - Cargo/CGO-003 - Unit Transferring/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-003 - Unit Transferring/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua b/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua new file mode 100644 index 0000000000..041dcb92e7 --- /dev/null +++ b/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua @@ -0,0 +1,25 @@ +--- +-- Name: CGO-101 - Group Boarding +-- Author: FlightControl +-- Date Created: 13 Apr 2017 +-- +-- # Situation: +-- +-- A cargo group called Infantry with Engineers is boarding the Carrier "Carrier". +-- +-- # Test cases: +-- +-- 1. Observe that the cargo is boarding. +-- + +local InfantryGroup = GROUP:FindByName( "Infantry" ) + +local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) + +local CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrier, 25 ) + diff --git a/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz b/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz new file mode 100644 index 0000000000..e36e42237c Binary files /dev/null and b/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz differ diff --git a/CGO - Cargo/CGO-101 - Group Boarding/pack.ps1 b/CGO - Cargo/CGO-101 - Group Boarding/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-101 - Group Boarding/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-101 - Group Boarding/unpack.ps1 b/CGO - Cargo/CGO-101 - Group Boarding/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-101 - Group Boarding/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua b/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua new file mode 100644 index 0000000000..562338d8d8 --- /dev/null +++ b/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua @@ -0,0 +1,25 @@ +--- +-- Name: CGO-102 - Group Unboarding +-- Author: FlightControl +-- Date Created: 13 Apr 2017 +-- +-- # Situation: +-- +-- A cargo group called Infantry with Engineers is unboarding the Carrier "Carrier". +-- +-- # Test cases: +-- +-- 1. Observe that the cargo is unboarding. +-- + +local InfantryGroup = GROUP:FindByName( "Infantry" ) + +local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) + +local CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is. +InfantryCargo:Load( CargoCarrier ) + +-- This will Unboard the Cargo from the Carrier. +InfantryCargo:UnBoard() \ No newline at end of file diff --git a/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz b/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz new file mode 100644 index 0000000000..46c7cde4f9 Binary files /dev/null and b/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz differ diff --git a/CGO - Cargo/CGO-102 - Group Unboarding/pack.ps1 b/CGO - Cargo/CGO-102 - Group Unboarding/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-102 - Group Unboarding/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-102 - Group Unboarding/unpack.ps1 b/CGO - Cargo/CGO-102 - Group Unboarding/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-102 - Group Unboarding/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua b/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua new file mode 100644 index 0000000000..61176ff873 --- /dev/null +++ b/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua @@ -0,0 +1,40 @@ +--- +-- Name: CGO-103 - Group Tranferring +-- Author: FlightControl +-- Date Created: 13 Apr 2017 +-- +-- # Situation: +-- +-- A cargo group called Infantry with Engineers is tranferring from the APC "CarrierFrom" to the APC "CarrierTo". +-- +-- # Test cases: +-- +-- 1. Observe that the cargo is boarding the APC "CarrierFrom". +-- 2. Observe that the cargo is unboarding the APC "CarrierFrom". +-- 3. Observe that the cargo is boarding the APC "CarrierTo". +-- + +local InfantryGroup = GROUP:FindByName( "Infantry" ) + +local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) + +local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) + +local CargoCarrierTo = UNIT:FindByName( "CarrierTo" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrierFrom, 20 ) + +-- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo. +function InfantryCargo:OnEnterLoaded() + self:__UnBoard( 1 ) + self.OnEnterLoaded = nil +end + +-- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier. +function InfantryCargo:OnEnterUnLoaded() + self:__Board( 1, CargoCarrierTo, 20 ) + self.OnEnterUnLoaded = nil +end diff --git a/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz b/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz new file mode 100644 index 0000000000..650cdf6237 Binary files /dev/null and b/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz differ diff --git a/CGO - Cargo/CGO-103 - Group Transferring/pack.ps1 b/CGO - Cargo/CGO-103 - Group Transferring/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-103 - Group Transferring/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-103 - Group Transferring/unpack.ps1 b/CGO - Cargo/CGO-103 - Group Transferring/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-103 - Group Transferring/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua b/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua new file mode 100644 index 0000000000..a7f0a688d6 --- /dev/null +++ b/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua @@ -0,0 +1,29 @@ +--- +-- Name: CGO-110 - Group Respawn +-- Author: FlightControl +-- Date Created: 07 Jul 2017 +-- +-- # Situation: +-- +-- A cargo group called Infantry with Engineers is Respawned after boarding the carrier. +-- +-- # Test cases: +-- +-- 1. Observe that the cargo is Respawned after boarding the Carrier. +-- + +local InfantryGroup = GROUP:FindByName( "Infantry" ) + +local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) + +local CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +InfantryCargo:Board( CargoCarrier, 25 ) + +function InfantryCargo:OnEnterLoaded() + InfantryCargo:Respawn() + InfantryCargo:Board( CargoCarrier, 25 ) +end \ No newline at end of file diff --git a/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz b/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz new file mode 100644 index 0000000000..12e33971f0 Binary files /dev/null and b/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz differ diff --git a/CGO - Cargo/CGO-110 - Group Respawn/pack.ps1 b/CGO - Cargo/CGO-110 - Group Respawn/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-110 - Group Respawn/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-110 - Group Respawn/unpack.ps1 b/CGO - Cargo/CGO-110 - Group Respawn/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-110 - Group Respawn/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua b/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua new file mode 100644 index 0000000000..c26fa24fa1 --- /dev/null +++ b/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua @@ -0,0 +1,11 @@ + +DeliveryUnit = UNIT:FindByName( "Delivery" ) +Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +Letter:Board( CargoCarrier, 40, 3, 25, 90 ) + diff --git a/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz b/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz new file mode 100644 index 0000000000..6f5a7eaea6 Binary files /dev/null and b/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz differ diff --git a/CGO - Cargo/CGO-201 - Package Boarding/pack.ps1 b/CGO - Cargo/CGO-201 - Package Boarding/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-201 - Package Boarding/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-201 - Package Boarding/unpack.ps1 b/CGO - Cargo/CGO-201 - Package Boarding/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-201 - Package Boarding/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua b/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua new file mode 100644 index 0000000000..716b6186cc --- /dev/null +++ b/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua @@ -0,0 +1,13 @@ + +CargoEngineer = UNIT:FindByName( "Engineer" ) +InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This will Load the Cargo into the Carrier, regardless where the Cargo is. +InfantryCargo:Load( CargoCarrier ) + +-- This will Unboard the Cargo from the Carrier. +-- The Cargo will run from the Carrier to a point in the NearRadius around the Carrier. +-- Unboard the Cargo with a speed of 10 km/h, go to 200 meters 180 degrees from the Carrier, iin a zone of 25 meters (NearRadius). +InfantryCargo:UnBoard( 10, 2, 20, 10, 180 ) \ No newline at end of file diff --git a/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz b/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz new file mode 100644 index 0000000000..49b7257564 Binary files /dev/null and b/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz differ diff --git a/CGO - Cargo/CGO-202 - Package Unboarding/pack.ps1 b/CGO - Cargo/CGO-202 - Package Unboarding/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-202 - Package Unboarding/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-202 - Package Unboarding/unpack.ps1 b/CGO - Cargo/CGO-202 - Package Unboarding/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-202 - Package Unboarding/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua b/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua new file mode 100644 index 0000000000..9bedd3b72a --- /dev/null +++ b/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua @@ -0,0 +1,11 @@ + +Barrels = STATIC:FindByName( "Barrels" ) +CargoBarrels = CARGO_CRATE:New( Barrels, "EAQ-234-432" ) + +CargoCarrier = UNIT:FindByName( "Carrier" ) + +-- This call will make the Cargo run to the CargoCarrier. +-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. +-- This process is now fully automated. +CargoBarrels:Load( CargoCarrier ) + diff --git a/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz b/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz new file mode 100644 index 0000000000..2739d4801c Binary files /dev/null and b/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz differ diff --git a/CGO - Cargo/CGO-300 - Crate Boarding/pack.ps1 b/CGO - Cargo/CGO-300 - Crate Boarding/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-300 - Crate Boarding/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-300 - Crate Boarding/unpack.ps1 b/CGO - Cargo/CGO-300 - Crate Boarding/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-300 - Crate Boarding/unpack.ps1 @@ -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" * diff --git a/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua b/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua new file mode 100644 index 0000000000..0db80b2cbe --- /dev/null +++ b/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua @@ -0,0 +1,3 @@ +InfantryUnitSet = SET_UNIT:New():FilterCategories("ground"):FilterPrefixes("Infantry"):FilterOnce() +InfantryUnitSet:Flush() + diff --git a/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz b/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz new file mode 100644 index 0000000000..dbc4cbe834 Binary files /dev/null and b/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz differ diff --git a/CGO - Cargo/CGO-900 - Cargo sets/pack.ps1 b/CGO - Cargo/CGO-900 - Cargo sets/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CGO - Cargo/CGO-900 - Cargo sets/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CGO - Cargo/CGO-900 - Cargo sets/unpack.ps1 b/CGO - Cargo/CGO-900 - Cargo sets/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CGO - Cargo/CGO-900 - Cargo sets/unpack.ps1 @@ -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" * diff --git a/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua b/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua new file mode 100644 index 0000000000..5f2b3a57cf --- /dev/null +++ b/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua @@ -0,0 +1,14 @@ + + + + +Clean = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Batumi ) +Clean:SetCleanMissiles( false ) + + +SpawnRU = SPAWN:New( 'RU Attack Heli Batumi'):InitLimit( 2, 120 ):SpawnScheduled( 10, 0 ) + +SpawnUS = SPAWN:New( 'US Attack Heli Batumi'):InitLimit( 2, 120 ):SpawnScheduled( 10, 0 ) + +SpawnTransport = SPAWN:New( "US Transport"):SpawnScheduled( 90, 0 ) + diff --git a/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz b/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz new file mode 100644 index 0000000000..90d20bd8e7 Binary files /dev/null and b/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz differ diff --git a/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/pack.ps1 b/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/unpack.ps1 b/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/unpack.ps1 @@ -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" * diff --git a/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua b/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua new file mode 100644 index 0000000000..1bdca35cba --- /dev/null +++ b/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua @@ -0,0 +1,568 @@ +--- Gori Valley designed with the MOOSE framework for DCS World. +-- Author: FlightControl + +-- Define the headquarters. + +NATO_HQ = COMMANDCENTER:New( GROUP:FindByName( "HQ NATO Gori" ), "Gori" ) +CCCP_HQ = COMMANDCENTER:New( GROUP:FindByName( "HQ CCCP Tskinvali" ), "Tskinvali" ) + + +-- Define the scoring object. + +Score = SCORING:New( "Gori Valley" ) + +Score:SetScaleDestroyScore( 40 ) +Score:SetScaleDestroyPenalty( 80 ) +Score:SetFratricide( 80 ) +Score:SetMessagesHit( false ) + + +--- Cargo Dispatching + +do + + local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() + local SetHelicopter = SET_GROUP:New():FilterPrefixes( "US CH-47D@RAMP Troop Deployment" ):FilterStart() + local SetDeployZones = SET_ZONE:New():FilterPrefixes( "US Troops Landing Zone" ):FilterStart() + + NATO_AI_Cargo_Dispatcher_Helicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, SetDeployZones ) + NATO_AI_Cargo_Dispatcher_Helicopter:SetPickupRadius( 50, 25 ) + NATO_AI_Cargo_Dispatcher_Helicopter:SetDeployRadius( 1000, 500 ) + NATO_AI_Cargo_Dispatcher_Helicopter:Start() + +end + +-- CCCP COALITION UNITS + +-- Russian helicopters engaging the battle field in Gori Valley +Spawn_RU_KA50 = SPAWN + :New( "RU KA-50@HOT-Patriot Attack" ) + :InitLimit( 1, 24 ) + :InitRandomizeRoute( 1, 1, 8000 ) + :InitCleanUp( 180 ) + :SpawnScheduled( 1200, 0.2 ) + +-- Russian ground troops attacking Gori Valley +Spawn_RU_Troops = + { 'RU Attack Gori 1', + 'RU Attack Gori 2', + 'RU Attack Gori 3', + 'RU Attack Gori 4', + 'RU Attack Gori 5', + 'RU Attack Gori 6', + 'RU Attack Gori 7', + 'RU Attack Gori 8', + 'RU Attack Gori 9', + 'RU Attack Gori 10' + } + + +Spawn_RU_Troops_Left = SPAWN + :New( "RU Attack Gori Left" ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_RU_Troops ) + :InitRandomizeRoute( 1, 1, 2000 ) + --:InitArray( 349, 30, 20, 6 * 20 ) + :SpawnScheduled( 120, 1 ) + +Spawn_RU_Troops_Middle = SPAWN + :New( "RU Attack Gori Middle" ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_RU_Troops ) + :InitRandomizeRoute( 1, 1, 2000 ) + --:InitArray( 260, 50, 20, 6 * 20 ) + :SpawnScheduled( 120, 1 ) + +Spawn_RU_Troops_Right = SPAWN + :New( "RU Attack Gori Right" ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_RU_Troops ) + :InitRandomizeRoute( 1, 1, 2000 ) + --:InitArray( 238, 50, 20, 6 * 20 ) + :SpawnScheduled( 120, 1 ) + + +-- NATO Tank Platoons invading Tskinvali + +Spawn_US_Platoon = + { 'US Tank Platoon 1', + 'US Tank Platoon 2', + 'US Tank Platoon 3', + 'US Tank Platoon 4', + 'US Tank Platoon 5', + 'US Tank Platoon 6', + 'US Tank Platoon 7', + 'US Tank Platoon 8', + 'US Tank Platoon 9', + 'US Tank Platoon 10', + 'US Tank Platoon 11', + 'US Tank Platoon 12', + 'US Tank Platoon 13' + } + +Spawn_US_Platoon_Left = SPAWN + :New( 'US Tank Platoon Left' ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_US_Platoon ) + :InitRandomizeRoute( 3, 1, 2000 ) + --:InitArray( 76, 20, 15, 15*6 ) + :SpawnScheduled( 120, 1 ) + +Spawn_US_Platoon_Middle = SPAWN + :New( 'US Tank Platoon Middle' ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_US_Platoon ) + :InitRandomizeRoute( 3, 1, 2000 ) + --:InitArray( 160, 20, 15, 15*6 ) + :SpawnScheduled( 120, 1 ) + +Spawn_US_Platoon_Right = SPAWN + :New( 'US Tank Platoon Right' ) + :InitLimit( 15, 40 ) + :InitRandomizeTemplate( Spawn_US_Platoon ) + :InitRandomizeRoute( 1, 1, 2000 ) + --:InitArray( 90, 20, 15, 15*6 ) + :SpawnScheduled( 120, 1 ) + + + +do -- NATO Air Patrol Support Mission + + + local NATO_S1 = MISSION + :New( NATO_HQ, "Intercept Intruders","Support","Intercept any intruders invading airspace from the North!", coalition.side.BLUE ) + :AddScoring( Score ) + + -- Define the Recce groups that will detect the upcoming ground forces. + local NATO_S1_EWR = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes( "AI NATO EWR A2A" ):FilterStart() + + -- Define the detection method, we'll use here AREA detection. + local NATO_S1_EWR_Areas = DETECTION_AREAS:New( NATO_S1_EWR, 20000 ) + NATO_S1_EWR_Areas:SetFriendliesRange( 80000 ) + NATO_S1_EWR_Areas:SetRefreshTimeInterval( 30 ) + NATO_S1_EWR_Areas:SetAcceptRange( 250000 ) -- Only report targets within 250km. + + local NATO_S1_Task = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "S1 NATO Air Patrol" ):FilterStart() + + -- Define the Task dispatcher that will define the tasks based on the detected targets. + NATO_S1_A2A = TASK_A2A_DISPATCHER:New( NATO_S1, NATO_S1_Task, NATO_S1_EWR_Areas ) + + + local NATO_AI_A2A_Support_East = { + "AI NATO Air Support East F-16A A", + "AI NATO Air Support East F-16A B", + } + + local NATO_AI_A2A_Support_West = { + "AI NATO Air Support West F-16A A", + "AI NATO Air Support West F-16A B", + } + + NATO_AI_A2A_Dispatcher = AI_A2A_DISPATCHER:New( NATO_S1_EWR_Areas ) + + NATO_AI_A2A_Dispatcher:SetTacticalDisplay( false ) + + NATO_AI_A2A_Dispatcher:SetEngageRadius( 80000 ) + NATO_AI_A2A_Dispatcher:SetGciRadius( 140000 ) + + NATO_AI_A2A_Dispatcher:SetSquadron( "Kutaisi", AIRBASE.Caucasus.Kutaisi, NATO_AI_A2A_Support_West, 20 ) + NATO_AI_A2A_Dispatcher:SetSquadronCap( "Kutaisi", ZONE_POLYGON:New( "NATO CAP EAST", GROUP:FindByName( "NATO CAP EAST") ), 4000, 8000, 450, 600, 800, 1200, "BARO" ) + NATO_AI_A2A_Dispatcher:SetSquadronCapInterval( "Kutaisi", 2, 180, 300 ) + + NATO_AI_A2A_Dispatcher:SetSquadronGci( "Kutaisi", 800, 1200 ) + + NATO_AI_A2A_Dispatcher:SetSquadron( "Vaziani", AIRBASE.Caucasus.Vaziani, NATO_AI_A2A_Support_East, 20 ) + NATO_AI_A2A_Dispatcher:SetSquadronCap( "Vaziani", ZONE_POLYGON:New( "NATO CAP WEST", GROUP:FindByName( "NATO CAP WEST" ) ), 4000, 8000, 500, 700, 800, 1200, "BARO" ) + NATO_AI_A2A_Dispatcher:SetSquadronCapInterval( "Vaziani", 2, 180, 300 ) + + NATO_AI_A2A_Dispatcher:SetSquadronGci( "Vaziani", 800, 1200 ) + +end + + +do -- NATO Mission 1 + + + local NATO_M1 = MISSION + :New( NATO_HQ, "Destroy SAM-6","Primary","Destroy SAM-6 batteries", coalition.side.BLUE ) + :AddScoring( Score ) + + + -- Define the Recce groups that will detect the upcoming ground forces. + local NATO_M1_RecceSet = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes( "M1 NATO Recce" ):FilterStart() + + NATO_M1_Spawn_Reaper = SPAWN + :New( "M1 NATO Recce Reaper" ) + :InitLimit( 1, 5 ) + :SpawnScheduled( 300, 0 ) + + + NATO_M1_ReccePatrolArray = {} + NATO_M1_RecceSpawn_US = SPAWN + :New( "M1 NATO Recce AH-64" ) + :InitLimit( 2, 10 ) + :SpawnScheduled( 60, 0.4 ) + :InitCleanUp( 300 ) + :OnSpawnGroup( + function( SpawnGroup ) + NATO_M1_RecceSpawn_US:E( SpawnGroup.ControllableName ) + local M1_ReccePatrolZoneWP = GROUP:FindByName( "M1 US Patrol Zone@ZONE" ) + local M1_ReccePatrolZone = ZONE_POLYGON:New( "PatrolZone", M1_ReccePatrolZoneWP ) + local M1_ReccePatrol = AI_PATROL_ZONE:New( M1_ReccePatrolZone, 30, 50, 50, 100 ) + NATO_M1_ReccePatrolArray[#NATO_M1_ReccePatrolArray+1] = M1_ReccePatrol + + M1_ReccePatrol:SetControllable( SpawnGroup ) + M1_ReccePatrol:__Start( 30 ) -- It takes a bit of time for the Recce to start + end + ) + + + -- Define the detection method, we'll use here AREA detection. + local NATO_M1_DetectionAreas = DETECTION_AREAS:New( NATO_M1_RecceSet, 1000 ) + --M1_DetectionAreas:BoundDetectedZones() + + local NATO_M1_Attack = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "M1 NATO Attack" ):FilterStart() + + -- Define the Task dispatcher that will define the tasks based on the detected targets. + NATO_M1_Task_A2G_Dispatcher = TASK_A2G_DISPATCHER:New( NATO_M1, NATO_M1_Attack, NATO_M1_DetectionAreas ) + + NATO_M1_Designate = DESIGNATE:New( NATO_HQ, NATO_M1_DetectionAreas, NATO_M1_Attack, NATO_M1 ) + + +end + + +do -- NATO Transport Task Engineers + + local NATO_M4_Patriots = MISSION + :New( NATO_HQ, + "Engineers Patriots", + "Operational", + "Transport 3 engineering teams to three strategical Patriot launch sites. " .. + "The launch sites are not yet complete and need some special launch codes to be delivered. " .. + "The engineers have the knowledge to install these launch codes. ", + coalition.side.BLUE ) + + local NATO_M4_HeloSetGroup = SET_GROUP:New():FilterPrefixes( "M4 NATO Patriot Transport" ):FilterStart() + + local NATO_M4_SetCargo = SET_CARGO:New():FilterTypes( { "Patriot Engineers" } ):FilterStart() + + local EngineersCargo1 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Bear" ), "Patriot Engineers", "Team Bear", 500 ):RespawnOnDestroyed(true) + local EngineersCargo2 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Moose" ), "Patriot Engineers", "Team Moose", 500 ):RespawnOnDestroyed(true) + local EngineersCargo3 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Falcon" ), "Patriot Engineers", "Team Falcon", 500 ):RespawnOnDestroyed(true) + + + -- These are the groups of the SA-6 batteries. + local Patriots1 = GROUP:FindByName( "M4 NATO Patriot North" ):SetAIOff() + local Patriots2 = GROUP:FindByName( "M4 NATO Patriot West" ):SetAIOff() + local Patriots3 = GROUP:FindByName( "M4 NATO Patriot East" ):SetAIOff() + + -- Each SA-6 battery has a zone of type ZONE_GROUP. That makes these zone moveable as they drive around the battle field! + local Zone_Patriots1 = ZONE_GROUP:New( "Patriots North", Patriots1, 600 ) + local Zone_Patriots2 = ZONE_GROUP:New( "Patriots West", Patriots2, 600 ) + local Zone_Patriots3 = ZONE_GROUP:New( "Patriots East", Patriots3, 600 ) + + NATO_M4_Cargo_Transport_Dispatcher = TASK_CARGO_DISPATCHER:New( NATO_M4_Patriots, NATO_M4_HeloSetGroup ) + + local NATO_M4_Cargo_Transport_TaskName = NATO_M4_Cargo_Transport_Dispatcher:AddTransportTask( + "Activate Patriot Batteries", + NATO_M4_SetCargo, + "Pickup Engineers Alpha, Beta and Gamma from their current location, and drop them near the Patriot launchers. " .. + "Deployment zones have been defined at each Patriot location." + ) + + NATO_M4_Cargo_Transport_Dispatcher:SetTransportDeployZones( NATO_M4_Cargo_Transport_TaskName, { Zone_Patriots1, Zone_Patriots2, Zone_Patriots3 } ) + + local NATO_M4_Cargo_Transport_Task = NATO_M4_Cargo_Transport_Dispatcher:GetTransportTask( NATO_M4_Cargo_Transport_TaskName ) + + + --- OnAfter Transition Handler for Event CargoDeployed. + -- This event will handle after deployment the activation of the SA-6 site. + -- @function [parent=#TASK_CARGO_TRANSPORT] OnAfterCargoDeployed + -- @param Tasking.Task_CARGO#TASK_CARGO_TRANSPORT self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @param Wrapper.Unit#UNIT TaskUnit The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc. + -- @param Core.Cargo#CARGO Cargo The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status. + -- @param Core.Zone#ZONE DeployZone The zone where the Cargo got Deployed or UnBoarded. + function NATO_M4_Cargo_Transport_Task:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + self:E( { From, Event, To, TaskUnit, Cargo, DeployZone } ) + + local DeployZoneName = DeployZone:GetName() + local CargoName = Cargo:GetName() + + + NATO_HQ:MessageToCoalition( + string.format( "Engineers %s are successfully transported to patriot site %s.", + CargoName, + DeployZoneName + ) + ) + + if DeployZoneName == Zone_Patriots1:GetName() then + if Patriots1 and not Patriots1:IsAlive() then + local Template = Patriots1:GetTemplate() + Template.lateActivation = false + Template.Visible = false + Patriots1:Respawn(Template) + --Patriots1:SetAIOn() + end + end + + if DeployZoneName == Zone_Patriots2:GetName() then + if Patriots2 and not Patriots2:IsAlive() then + local Template = Patriots2:GetTemplate() + Template.lateActivation = false + Template.Visible = false + Patriots2:Respawn(Template) + --Patriots2:SetAIOn() + end + end + + if DeployZoneName == Zone_Patriots3:GetName() then + if Patriots3 and not Patriots3:IsAlive() then + local Template = Patriots3:GetTemplate() + Template.lateActivation = false + Template.Visible = false + Patriots3:Respawn(Template) + --Patriots3:SetAIOn() + end + end + + if self:IsAllCargoTransported() then + self:Success() + NATO_M4_Patriots:Complete() + end + end + +end + + + + + + +do -- CCCP Air Patrol Support Functions + + + local CCCP_S1 = MISSION + :New( CCCP_HQ, "Provide Air Support","Support","Intercept any bogeys invading airspace from the South or East!", coalition.side.RED ) + :AddScoring( Score ) + + -- Define the Recce groups that will detect the upcoming A2A intruders. + local CCCP_S1_EWR_Groups = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes( "AI CCCP EWR" ):FilterStart() + + -- Define the detection method, we'll use here AREA detection. + local CCCP_S1_EWR_Areas = DETECTION_AREAS:New( CCCP_S1_EWR_Groups, 30000 ) + CCCP_S1_EWR_Areas:SetFriendliesRange( 80000 ) + CCCP_S1_EWR_Areas:SetAcceptRange( 250000 ) -- Only report targets that are within 250km from detection. + --M1_DetectionAreas_US:BoundDetectedZones() + + local CCCP_S1_SupportGroups = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes( "S1 CCCP Air Defense" ):FilterStart() + + -- Define the Task dispatcher that will define the tasks based on the detected targets. + CCCP_S1_A2A_Task_Dispatcher = TASK_A2A_DISPATCHER:New( CCCP_S1, CCCP_S1_SupportGroups, CCCP_S1_EWR_Areas ) + + + CCCP_AI_A2A_Support_SU_27 = { + "AI CCCP Air Support SU-27 A", + "AI CCCP Air Support SU-27 B", + "AI CCCP Air Support SU-27 C", + "AI CCCP Air Support SU-27 D" + } + + CCCP_AI_A2A_Support_MIG_29S = { + "AI CCCP Air Support MIG-29S A", + "AI CCCP Air Support MIG-29S B", + "AI CCCP Air Support MIG-29S C", + "AI CCCP Air Support MIG-29S D" + } + + + CCCP_AI_A2A_Dispatcher = AI_A2A_DISPATCHER:New( CCCP_S1_EWR_Areas ) + + CCCP_AI_A2A_Dispatcher:SetTacticalDisplay( false ) + + CCCP_AI_A2A_Dispatcher:SetEngageRadius( 80000 ) + CCCP_AI_A2A_Dispatcher:SetGciRadius( 100000 ) + + -- Beslan + CCCP_AI_A2A_Dispatcher:SetSquadron( "Beslan", AIRBASE.Caucasus.Beslan, CCCP_AI_A2A_Support_SU_27, 20 ) + CCCP_AI_A2A_Dispatcher:SetSquadronCap( "Beslan", ZONE_POLYGON:New( "CCCP CAP EAST", GROUP:FindByName( "CCCP CAP EAST") ), 4000, 8000, 450, 600, 800, 1200, "BARO" ) + CCCP_AI_A2A_Dispatcher:SetSquadronCapInterval( "Beslan", 2, 180, 300 ) + CCCP_AI_A2A_Dispatcher:SetSquadronTakeoffInAir( "Beslan" ) + + -- Mozdok + CCCP_AI_A2A_Dispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, CCCP_AI_A2A_Support_SU_27, 20 ) + CCCP_AI_A2A_Dispatcher:SetSquadronGci( "Mozdok", 800, 1200 ) + + CCCP_AI_A2A_Dispatcher:SetSquadron( "Nalchik", AIRBASE.Caucasus.Nalchik, CCCP_AI_A2A_Support_MIG_29S, 20 ) + CCCP_AI_A2A_Dispatcher:SetSquadronCap( "Nalchik", ZONE_POLYGON:New( "CCCP CAP WEST", GROUP:FindByName( "CCCP CAP WEST" ) ), 4000, 8000, 500, 700, 800, 1200, "BARO" ) + CCCP_AI_A2A_Dispatcher:SetSquadronCapInterval( "Nalchik", 2, 180, 300 ) + CCCP_AI_A2A_Dispatcher:SetSquadronGci( "Nalchik", 800, 1200 ) + +end + +do -- CCCP Destroy Patriots + + local CCCP_M1 = MISSION + :New( CCCP_HQ, + "Destroy Patriots", + "Primary", + "Destroy Patriot batteries.", + coalition.side.RED + ) + :AddScoring( Score ) + + -- Define the Recce groups that will detect the upcoming ground forces. + local CCCP_M1_RecceSet = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "M1 CCCP Recce" ):FilterStart() + + CCCP_M1_Spawn_SU25MR = SPAWN + :New( "M1 CCCP Recce SU-25MR" ) + :InitLimit( 1, 5 ) + :SpawnScheduled( 300, 0.5 ) + + + CCCP_M1_ReccePatrolArray = {} + CCCP_M1_RecceSpawn = SPAWN + :New( "M1 CCCP Recce MI-28N" ) + :InitLimit( 2, 10 ) + :SpawnScheduled( 60, 0.4 ) + :OnSpawnGroup( + function( SpawnGroup ) + local M1_ReccePatrolZoneWP = GROUP:FindByName( "M1 RU Patrol Zone@ZONE" ) + local M1_ReccePatrolZone = ZONE_POLYGON:New( "PatrolZone", M1_ReccePatrolZoneWP ) + local M1_ReccePatrol = AI_PATROL_ZONE:New( M1_ReccePatrolZone, 30, 50, 50, 100 ) + CCCP_M1_ReccePatrolArray[#CCCP_M1_ReccePatrolArray+1] = M1_ReccePatrol + + M1_ReccePatrol:SetControllable( SpawnGroup ) + M1_ReccePatrol:__Start( 20 ) -- It takes a bit of time for the Recce to start + end + ) + + + -- Define the detection method, we'll use here AREA detection. + local CCCP_M1_DetectionAreas = DETECTION_AREAS:New( CCCP_M1_RecceSet, 1000 ) + --M1_DetectionAreas_US:BoundDetectedZones() + + local CCCP_M1_Attack = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "M1 CCCP Attack" ):FilterStart() + CCCP_M1_Attack:Flush() + + -- Define the Task dispatcher that will define the tasks based on the detected targets. + CCCP_M1_Task_A2G_Dispatcher = TASK_A2G_DISPATCHER:New( CCCP_M1, CCCP_M1_Attack, CCCP_M1_DetectionAreas ) + +end + +do -- CCCP Transport Task Engineers + + local CCCP_M4_SA6 = MISSION + :New( CCCP_HQ, + "Engineers SA-6", + "Operational", + "Transport 3 engineering teams to three strategical SA-6 launch sites. " .. + "The launch sites are not yet complete and need some special launch codes to be delivered. " .. + "The engineers have the knowledge to install these launch codes. ", + coalition.side.RED ) + :AddScoring( Score ) + + local CCCP_M4_HeloSetGroup = SET_GROUP:New():FilterPrefixes( "M4 CCCP SA6 Transport" ):FilterStart() + + local CCCP_M4_SA6_SetCargo = SET_CARGO:New():FilterTypes( { "SA6 Engineers" } ):FilterStart() + + local EngineersCargoAlpha = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Alpha" ), "SA6 Engineers", "Team Alpha", 500 ) + local EngineersCargoBeta = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Beta" ), "SA6 Engineers", "Team Beta", 500 ) + local EngineersCargoGamma = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Gamma" ), "SA6 Engineers", "Team Gamma", 500 ) + + CCCP_M4_Cargo_Transport_Dispatcher = TASK_CARGO_DISPATCHER:New( CCCP_M4_SA6, CCCP_M4_HeloSetGroup ) + + local CCCP_M4_Cargo_Transport_TaskName = CCCP_M4_Cargo_Transport_Dispatcher:AddTransportTask( + "Transport SA-6 Engineers", + CCCP_M4_SA6_SetCargo, + "Pickup Engineers Alpha, Beta and Gamma from their current location, and drop them near the SA-6 launchers. " .. + "Deployment zones have been defined at each SA-6 location." + ) + + -- These are the groups of the SA-6 batteries. + local SA6_1 = GROUP:FindByName( "M4 CCCP SA6 Kub Moskva" ):SetAIOff() + local SA6_2 = GROUP:FindByName( "M4 CCCP SA6 Kub Niznij" ):SetAIOff() + local SA6_3 = GROUP:FindByName( "M4 CCCP SA6 Kub Yaroslavl" ):SetAIOff() + + -- Each SA-6 battery has a zone of type ZONE_GROUP. That makes these zone moveable as they drive around the battle field! + local Zone_SA6_1 = ZONE_GROUP:New( "SA6 Moskva", SA6_1, 500 ) + local Zone_SA6_2 = ZONE_GROUP:New( "SA6 Niznij", SA6_2, 500 ) + local Zone_SA6_3 = ZONE_GROUP:New( "SA6 Yaroslavl", SA6_3, 500 ) + + CCCP_M4_Cargo_Transport_Dispatcher:SetTransportDeployZones( CCCP_M4_Cargo_Transport_TaskName, { Zone_SA6_1, Zone_SA6_2, Zone_SA6_3 } ) + local CCCP_M4_Cargo_Transport_Task = CCCP_M4_Cargo_Transport_Dispatcher:GetTransportTask( CCCP_M4_Cargo_Transport_TaskName ) + + --- OnAfter Transition Handler for Event CargoDeployed. + -- This event will handle after deployment the activation of the SA-6 site. + -- @function [parent=#TASK_CARGO_TRANSPORT] OnAfterCargoDeployed + -- @param Tasking.Task_CARGO#TASK_CARGO_TRANSPORT self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @param Wrapper.Unit#UNIT TaskUnit The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc. + -- @param Core.Cargo#CARGO Cargo The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status. + -- @param Core.Zone#ZONE DeployZone The zone where the Cargo got Deployed or UnBoarded. + function CCCP_M4_Cargo_Transport_Task:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + + self:E( { From, Event, To, TaskUnit:GetName(), Cargo:GetName(), DeployZone:GetName() } ) + + local DeployZoneName = DeployZone:GetName() + local CargoName = Cargo:GetName() + + + CCCP_HQ:MessageToCoalition( + string.format( "Engineers %s are successfully transported to SA-6 site %s.", + CargoName, + DeployZoneName + ) + ) + + if DeployZoneName == Zone_SA6_1:GetName() then + if SA6_1 and not SA6_1:IsAlive() then + self:E( { GroupActivated = SA6_1:GetName() } ) + local Template = SA6_1:GetTemplate() + Template.lateActivation = false + Template.Visible = false + SA6_1:Respawn(Template) + --SA6_1:SetAIOn() + end + end + + if DeployZoneName == Zone_SA6_2:GetName() then + if SA6_2 and not SA6_2:IsAlive() then + self:E( { GroupActivated = SA6_2:GetName() } ) + local Template = SA6_2:GetTemplate() + Template.lateActivation = false + Template.Visible = false + SA6_2:Respawn(Template) + --SA6_2:SetAIOn() + end + end + + if DeployZoneName == Zone_SA6_3:GetName() then + if SA6_3 and not SA6_3:IsAlive() then + self:E( { GroupActivated = SA6_3:GetName() } ) + local Template = SA6_3:GetTemplate() + Template.lateActivation = false + Template.Visible = false + SA6_3:Respawn(Template) + --SA6_3:SetAIOn() + end + end + + if self:IsAllCargoTransported() then + self:Success() + CCCP_M4_SA6:Complete() + end + end + +end + +MissileTrainer = MISSILETRAINER:New( 100, "Helps with missile tracking" ) + + + diff --git a/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz b/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz new file mode 100644 index 0000000000..f0e857bd5c Binary files /dev/null and b/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz differ diff --git a/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx b/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx new file mode 100644 index 0000000000..4860db6c6e Binary files /dev/null and b/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx differ diff --git a/DEM - Demo Missions/GOV - Gori Valley/pack.ps1 b/DEM - Demo Missions/GOV - Gori Valley/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DEM - Demo Missions/GOV - Gori Valley/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DEM - Demo Missions/GOV - Gori Valley/unpack.ps1 b/DEM - Demo Missions/GOV - Gori Valley/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DEM - Demo Missions/GOV - Gori Valley/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua b/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua new file mode 100644 index 0000000000..8905e43c35 --- /dev/null +++ b/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua @@ -0,0 +1,43 @@ +--- +-- Name: DES-010 - Designation of AREAS - Threat Level Prioritization +-- Author: FlightControl +-- Date Created: 24 Apr 2017 +-- +-- # Situation: +-- +-- Demonstrates the designation of units, which are grouped in AREAs. +-- +-- A Set of Recce are detecting a large group of units. +-- This test is about the prioritization. First the SAMs should be designated, then the rest. +-- +-- # Test cases: +-- +-- - Check if the SAMs are designated first. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) + +-- Create a Attack Set, which contains the human player client slots and CA vehicles. +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- This sets the threat level prioritization on +RecceDesignation:SetThreatLevelPrioritization( true ) + +-- Set the possible laser codes. +RecceDesignation:GenerateLaserCodes() + +RecceDesignation:AddMenuLaserCode( 1113, "Lase with %d for Su-25T" ) +RecceDesignation:AddMenuLaserCode( 1680, "Lase with %d for A-10A" ) + +-- Start the detection process in 5 seconds. +RecceDesignation:__Detect( -5 ) + diff --git a/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz b/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz new file mode 100644 index 0000000000..029eb4afc3 Binary files /dev/null and b/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz differ diff --git a/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/pack.ps1 b/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/unpack.ps1 b/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua b/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua new file mode 100644 index 0000000000..81c46290c2 --- /dev/null +++ b/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua @@ -0,0 +1,40 @@ +--- +-- Name: DES-011 - Designation of AREAS - Empty Set with Threat Levels +-- Author: FlightControl +-- Date Created: 15 May 2017 +-- +-- # Situation: +-- +-- Demonstrates the designation of units, which are grouped in AREAs. +-- +-- A Set of Recce are detecting a large group of units. +-- This test is about not failing the process when the Detected Set is empty, and the LaseOn is activated ... +-- +-- # Test cases: +-- +-- - Check nothing is detected, and put lase on. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) + +-- Create a Attack Set, which contains the human player client slots and CA vehicles. +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- This sets the threat level prioritization on +RecceDesignation:SetThreatLevelPrioritization( true ) + +-- Set the possible laser codes. +RecceDesignation:SetLaserCodes({1113,1131,1256}) + +-- Start the detection process in 5 seconds. +RecceDesignation:__Detect( -5 ) + diff --git a/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz b/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz new file mode 100644 index 0000000000..5788204bda Binary files /dev/null and b/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz differ diff --git a/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/pack.ps1 b/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/unpack.ps1 b/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua b/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua new file mode 100644 index 0000000000..9777d1e676 --- /dev/null +++ b/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua @@ -0,0 +1,40 @@ +--- +-- Name: DES-020 - Designation of AREAS - Status Menu Flash Activate +-- Author: FlightControl +-- Date Created: 24 Apr 2017 +-- +-- # Situation: +-- +-- Demonstrates the designation of units, which are grouped in AREAs. +-- +-- A Set of Recce are detecting a large group of units. +-- This test is about the prioritization. First the SAMs should be designated, then the rest. +-- +-- # Test cases: +-- +-- - Check if the SAMs are designated first. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) + +-- Create a Attack Set, which contains the human player client slots and CA vehicles. +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- This sets the current status menu flashing on +RecceDesignation:SetFlashStatusMenu( true ) + +-- Set the possible laser codes. +RecceDesignation:SetLaserCodes({1113,1131,1256}) + +-- Start the detection process in 5 seconds. +RecceDesignation:__Detect( -5 ) + diff --git a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz b/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz new file mode 100644 index 0000000000..a295474fe5 Binary files /dev/null and b/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz differ diff --git a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/pack.ps1 b/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/unpack.ps1 b/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua b/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua new file mode 100644 index 0000000000..6123068b22 --- /dev/null +++ b/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua @@ -0,0 +1,58 @@ +-- Name: DES-100 - UNITS - Night Test +-- Author: FlightControl +-- Date Created: 23 Apr 2017 +-- +-- Demonstrates the designation of units, which are grouped per detected UNIT. +-- So each DetectedItem contains one detected unit only. +-- A Set of Recce are detecting a large group of units. +-- +-- - Wait until all units are detected by the recce. A report should appear. +-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. +-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. +-- - If a target group is not lased, it should start with "Designate". +-- - If a target group is lased, the menu should start with "Lasing". +-- - If a target group is smoked, the menu should start with "Smoking". +-- - If a target group is illuminated, the menu should start with "Illuminating". +-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). +-- - With FLIR activated in a ground vehicle, search for the laser beams. +-- - Watch the laser beams alternate as targets are being detected or not detected... +-- The Recce will try to lase as many targets as possible, +-- but only for those targets to be lased, +-- and until sufficient laser codes are available. +-- - While the target group is lased, check if the available Recce are lasing the most possible targets. +-- - Check if all laser codes are being used, but not twice. +-- - Check if once a target has been destoyed, that after a while a Recce selects a new target. +-- - Check that if all targets are destroyed, that the Recce reports that. +-- - Check that while a Recce is lasing a target, that it is marking the target. +-- - Check that when you deactive the lasing, that the Recce report the deactivation. +-- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target. +-- - Check that when you illuminate a target group, that the target area gets illuminated after a while. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) + +-- Create a +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +-- Setup Designation for the AttackSet. +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- Generate the random laser codes. +RecceDesignation:GenerateLaserCodes() + +-- The su-25T uses a specific laser code to guide its laser guides rockets. +-- The code is 1113. A special menu option will be added that allows to lase with 1113. +RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) + +-- The A-10A etc use a specific laser code to guide its laser guides rockets. +-- The code is 1680. A special menu option will be added that allows to lase with 1680. +RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) + + diff --git a/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz b/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz new file mode 100644 index 0000000000..37d36cab88 Binary files /dev/null and b/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz differ diff --git a/DES - Designation/DES-100 - UNITS - Night Test/pack.ps1 b/DES - Designation/DES-100 - UNITS - Night Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-100 - UNITS - Night Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-100 - UNITS - Night Test/unpack.ps1 b/DES - Designation/DES-100 - UNITS - Night Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-100 - UNITS - Night Test/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua b/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua new file mode 100644 index 0000000000..9526575366 --- /dev/null +++ b/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua @@ -0,0 +1,58 @@ +-- Name: DES-101 - UNITS - Day Test +-- Author: FlightControl +-- Date Created: 14 Mar 2018 +-- +-- Demonstrates the designation of units, which are grouped per detected UNIT. +-- So each DetectedItem contains one detected unit only. +-- A Set of Recce are detecting a large group of units. +-- +-- - Wait until all units are detected by the recce. A report should appear. +-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. +-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. +-- - If a target group is not lased, it should start with "Designate". +-- - If a target group is lased, the menu should start with "Lasing". +-- - If a target group is smoked, the menu should start with "Smoking". +-- - If a target group is illuminated, the menu should start with "Illuminating". +-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). +-- - With FLIR activated in a ground vehicle, search for the laser beams. +-- - Watch the laser beams alternate as targets are being detected or not detected... +-- The Recce will try to lase as many targets as possible, +-- but only for those targets to be lased, +-- and until sufficient laser codes are available. +-- - While the target group is lased, check if the available Recce are lasing the most possible targets. +-- - Check if all laser codes are being used, but not twice. +-- - Check if once a target has been destoyed, that after a while a Recce selects a new target. +-- - Check that if all targets are destroyed, that the Recce reports that. +-- - Check that while a Recce is lasing a target, that it is marking the target. +-- - Check that when you deactive the lasing, that the Recce report the deactivation. +-- - Check that when you smoke a target, that a message appears that the Recce is smoking the target. +-- - Check that when you smoke a target, that a smoke appears at the target. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) + +-- Create a +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +-- Setup Designation for the AttackSet. +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- Generate the random laser codes. +RecceDesignation:GenerateLaserCodes() + +-- The su-25T uses a specific laser code to guide its laser guides rockets. +-- The code is 1113. A special menu option will be added that allows to lase with 1113. +RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) + +-- The A-10A etc use a specific laser code to guide its laser guides rockets. +-- The code is 1680. A special menu option will be added that allows to lase with 1680. +RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) + + diff --git a/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz b/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz new file mode 100644 index 0000000000..0ec0975c6f Binary files /dev/null and b/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz differ diff --git a/DES - Designation/DES-101 - UNITS - Day Test/pack.ps1 b/DES - Designation/DES-101 - UNITS - Day Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-101 - UNITS - Day Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-101 - UNITS - Day Test/unpack.ps1 b/DES - Designation/DES-101 - UNITS - Day Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-101 - UNITS - Day Test/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua b/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua new file mode 100644 index 0000000000..9526575366 --- /dev/null +++ b/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua @@ -0,0 +1,58 @@ +-- Name: DES-101 - UNITS - Day Test +-- Author: FlightControl +-- Date Created: 14 Mar 2018 +-- +-- Demonstrates the designation of units, which are grouped per detected UNIT. +-- So each DetectedItem contains one detected unit only. +-- A Set of Recce are detecting a large group of units. +-- +-- - Wait until all units are detected by the recce. A report should appear. +-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. +-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. +-- - If a target group is not lased, it should start with "Designate". +-- - If a target group is lased, the menu should start with "Lasing". +-- - If a target group is smoked, the menu should start with "Smoking". +-- - If a target group is illuminated, the menu should start with "Illuminating". +-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). +-- - With FLIR activated in a ground vehicle, search for the laser beams. +-- - Watch the laser beams alternate as targets are being detected or not detected... +-- The Recce will try to lase as many targets as possible, +-- but only for those targets to be lased, +-- and until sufficient laser codes are available. +-- - While the target group is lased, check if the available Recce are lasing the most possible targets. +-- - Check if all laser codes are being used, but not twice. +-- - Check if once a target has been destoyed, that after a while a Recce selects a new target. +-- - Check that if all targets are destroyed, that the Recce reports that. +-- - Check that while a Recce is lasing a target, that it is marking the target. +-- - Check that when you deactive the lasing, that the Recce report the deactivation. +-- - Check that when you smoke a target, that a message appears that the Recce is smoking the target. +-- - Check that when you smoke a target, that a smoke appears at the target. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) + +-- Create a +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +-- Setup Designation for the AttackSet. +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- Generate the random laser codes. +RecceDesignation:GenerateLaserCodes() + +-- The su-25T uses a specific laser code to guide its laser guides rockets. +-- The code is 1113. A special menu option will be added that allows to lase with 1113. +RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) + +-- The A-10A etc use a specific laser code to guide its laser guides rockets. +-- The code is 1680. A special menu option will be added that allows to lase with 1680. +RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) + + diff --git a/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz b/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz new file mode 100644 index 0000000000..4bead47f55 Binary files /dev/null and b/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz differ diff --git a/DES - Designation/DES-110 - UNITS - Stress Test/pack.ps1 b/DES - Designation/DES-110 - UNITS - Stress Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-110 - UNITS - Stress Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-110 - UNITS - Stress Test/unpack.ps1 b/DES - Designation/DES-110 - UNITS - Stress Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-110 - UNITS - Stress Test/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua b/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua new file mode 100644 index 0000000000..e465a98e9b --- /dev/null +++ b/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua @@ -0,0 +1,57 @@ +-- Name: DES-200 - AREAS - Night Test +-- Author: FlightControl +-- Date Created: 23 Apr 2017 +-- +-- Demonstrates the designation of units, which are grouped in AREAs. +-- A Set of Recce are detecting a large group of units. +-- +-- - Wait until all units are detected by the recce. A report should appear. +-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. +-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. +-- - If a target group is not lased, it should start with "Designate". +-- - If a target group is lased, the menu should start with "Lasing". +-- - If a target group is smoked, the menu should start with "Smoking". +-- - If a target group is illuminated, the menu should start with "Illuminating". +-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). +-- - With FLIR activated in a ground vehicle, search for the laser beams. +-- - Watch the laser beams alternate as targets are being detected or not detected... +-- The Recce will try to lase as many targets as possible, +-- but only for those targets to be lased, +-- and until sufficient laser codes are available. +-- - While the target group is lased, check if the available Recce are lasing the most possible targets. +-- - Check if all laser codes are being used, but not twice. +-- - Check if once a target has been destoyed, that after a while a Recce selects a new target. +-- - Check that if all targets are destroyed, that the Recce reports that. +-- - Check that while a Recce is lasing a target, that it is marking the target. +-- - Check that when you deactive the lasing, that the Recce report the deactivation. +-- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target. +-- - Check that when you illuminate a target group, that the target area gets illuminated after a while. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) + +-- Create a +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +-- Setup Designation for the AttackSet. +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- Generate the random laser codes. +RecceDesignation:GenerateLaserCodes() + +-- The su-25T uses a specific laser code to guide its laser guides rockets. +-- The code is 1113. A special menu option will be added that allows to lase with 1113. +RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) + +-- The A-10A etc use a specific laser code to guide its laser guides rockets. +-- The code is 1680. A special menu option will be added that allows to lase with 1680. +RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) + + diff --git a/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz b/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz new file mode 100644 index 0000000000..390d4637ed Binary files /dev/null and b/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz differ diff --git a/DES - Designation/DES-200 - AREAS - Night Test/pack.ps1 b/DES - Designation/DES-200 - AREAS - Night Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-200 - AREAS - Night Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-200 - AREAS - Night Test/unpack.ps1 b/DES - Designation/DES-200 - AREAS - Night Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-200 - AREAS - Night Test/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua b/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua new file mode 100644 index 0000000000..6b5e8e1790 --- /dev/null +++ b/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua @@ -0,0 +1,57 @@ +-- Name: DES-201 - AREAS - Day Test +-- Author: FlightControl +-- Date Created: 23 Apr 2017 +-- +-- Demonstrates the designation of units, which are grouped in AREAs. +-- A Set of Recce are detecting a large group of units. +-- +-- - Wait until all units are detected by the recce. A report should appear. +-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. +-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. +-- - If a target group is not lased, it should start with "Designate". +-- - If a target group is lased, the menu should start with "Lasing". +-- - If a target group is smoked, the menu should start with "Smoking". +-- - If a target group is illuminated, the menu should start with "Illuminating". +-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). +-- - With FLIR activated in a ground vehicle, search for the laser beams. +-- - Watch the laser beams alternate as targets are being detected or not detected... +-- The Recce will try to lase as many targets as possible, +-- but only for those targets to be lased, +-- and until sufficient laser codes are available. +-- - While the target group is lased, check if the available Recce are lasing the most possible targets. +-- - Check if all laser codes are being used, but not twice. +-- - Check if once a target has been destoyed, that after a while a Recce selects a new target. +-- - Check that if all targets are destroyed, that the Recce reports that. +-- - Check that while a Recce is lasing a target, that it is marking the target. +-- - Check that when you deactive the lasing, that the Recce report the deactivation. +-- - Check that when you smoke a target, that a message appears that the Recce is smoking the target. +-- - Check that when you smoke a target, that a smoke appears at the target. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) + +-- Create a +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +-- Setup Designation for the AttackSet. +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- Generate the random laser codes. +RecceDesignation:GenerateLaserCodes() + +-- The su-25T uses a specific laser code to guide its laser guides rockets. +-- The code is 1113. A special menu option will be added that allows to lase with 1113. +RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) + +-- The A-10A etc use a specific laser code to guide its laser guides rockets. +-- The code is 1680. A special menu option will be added that allows to lase with 1680. +RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) + + diff --git a/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz b/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz new file mode 100644 index 0000000000..8821e30041 Binary files /dev/null and b/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz differ diff --git a/DES - Designation/DES-201 - AREAS - Day Test/pack.ps1 b/DES - Designation/DES-201 - AREAS - Day Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-201 - AREAS - Day Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-201 - AREAS - Day Test/unpack.ps1 b/DES - Designation/DES-201 - AREAS - Day Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-201 - AREAS - Day Test/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua b/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua new file mode 100644 index 0000000000..605f1b4d24 --- /dev/null +++ b/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua @@ -0,0 +1,57 @@ +-- Name: DES-300 - TYPES - Night Test +-- Author: FlightControl +-- Date Created: 23 Apr 2017 +-- +-- Demonstrates the designation of units, which are grouped per TYPES of the detected units. +-- A Set of Recce are detecting a large group of units. +-- +-- - Wait until all units are detected by the recce. A report should appear. +-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. +-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. +-- - If a target group is not lased, it should start with "Designate". +-- - If a target group is lased, the menu should start with "Lasing". +-- - If a target group is smoked, the menu should start with "Smoking". +-- - If a target group is illuminated, the menu should start with "Illuminating". +-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). +-- - With FLIR activated in a ground vehicle, search for the laser beams. +-- - Watch the laser beams alternate as targets are being detected or not detected... +-- The Recce will try to lase as many targets as possible, +-- but only for those targets to be lased, +-- and until sufficient laser codes are available. +-- - While the target group is lased, check if the available Recce are lasing the most possible targets. +-- - Check if all laser codes are being used, but not twice. +-- - Check if once a target has been destoyed, that after a while a Recce selects a new target. +-- - Check that if all targets are destroyed, that the Recce reports that. +-- - Check that while a Recce is lasing a target, that it is marking the target. +-- - Check that when you deactive the lasing, that the Recce report the deactivation. +-- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target. +-- - Check that when you illuminate a target group, that the target area gets illuminated after a while. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_TYPES:New( RecceSetGroup ) + +-- Create a +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +-- Setup Designation for the AttackSet. +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- Generate the random laser codes. +RecceDesignation:GenerateLaserCodes() + +-- The su-25T uses a specific laser code to guide its laser guides rockets. +-- The code is 1113. A special menu option will be added that allows to lase with 1113. +RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) + +-- The A-10A etc use a specific laser code to guide its laser guides rockets. +-- The code is 1680. A special menu option will be added that allows to lase with 1680. +RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) + + diff --git a/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz b/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz new file mode 100644 index 0000000000..80c65e9c83 Binary files /dev/null and b/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz differ diff --git a/DES - Designation/DES-300 - TYPES - Night Test/pack.ps1 b/DES - Designation/DES-300 - TYPES - Night Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-300 - TYPES - Night Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-300 - TYPES - Night Test/unpack.ps1 b/DES - Designation/DES-300 - TYPES - Night Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-300 - TYPES - Night Test/unpack.ps1 @@ -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" * diff --git a/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua b/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua new file mode 100644 index 0000000000..0b5c8ddde0 --- /dev/null +++ b/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua @@ -0,0 +1,57 @@ +-- Name: DES-301 - TYPES - Day Test +-- Author: FlightControl +-- Date Created: 14 Mar 2018 +-- +-- Demonstrates the designation of units, which are grouped per TYPES of the detected units. +-- A Set of Recce are detecting a large group of units. +-- +-- - Wait until all units are detected by the recce. A report should appear. +-- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. +-- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. +-- - If a target group is not lased, it should start with "Designate". +-- - If a target group is lased, the menu should start with "Lasing". +-- - If a target group is smoked, the menu should start with "Smoking". +-- - If a target group is illuminated, the menu should start with "Illuminating". +-- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). +-- - With FLIR activated in a ground vehicle, search for the laser beams. +-- - Watch the laser beams alternate as targets are being detected or not detected... +-- The Recce will try to lase as many targets as possible, +-- but only for those targets to be lased, +-- and until sufficient laser codes are available. +-- - While the target group is lased, check if the available Recce are lasing the most possible targets. +-- - Check if all laser codes are being used, but not twice. +-- - Check if once a target has been destoyed, that after a while a Recce selects a new target. +-- - Check that if all targets are destroyed, that the Recce reports that. +-- - Check that while a Recce is lasing a target, that it is marking the target. +-- - Check that when you deactive the lasing, that the Recce report the deactivation. +-- - Check that when you smoke a target, that a message appears that the Recce is smoking the target. +-- - Check that when you smoke a target, that a smoke appears at the target. + + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +-- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. +RecceDetection = DETECTION_TYPES:New( RecceSetGroup ) + +-- Create a +AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() + +-- Setup Designation for the AttackSet. +RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) + +-- Generate the random laser codes. +RecceDesignation:GenerateLaserCodes() + +-- The su-25T uses a specific laser code to guide its laser guides rockets. +-- The code is 1113. A special menu option will be added that allows to lase with 1113. +RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) + +-- The A-10A etc use a specific laser code to guide its laser guides rockets. +-- The code is 1680. A special menu option will be added that allows to lase with 1680. +RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) + + diff --git a/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz b/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz new file mode 100644 index 0000000000..1762377113 Binary files /dev/null and b/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz differ diff --git a/DES - Designation/DES-301 - TYPES - Day Test/pack.ps1 b/DES - Designation/DES-301 - TYPES - Day Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DES - Designation/DES-301 - TYPES - Day Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DES - Designation/DES-301 - TYPES - Day Test/unpack.ps1 b/DES - Designation/DES-301 - TYPES - Day Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DES - Designation/DES-301 - TYPES - Day Test/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua b/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua new file mode 100644 index 0000000000..7afca5c499 --- /dev/null +++ b/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua @@ -0,0 +1,24 @@ +--- +-- Name: DET-001 - Detection Areas +-- Author: FlightControl +-- Date Created: 04 Feb 2017 +-- +-- # Situation: +-- +-- A small blue vehicle with laser detection methods is detecting targets. +-- Targets are grouped within areas. A detection range and zone range is given to group the detected units. +-- This demo will group 5 red vehicles in areas. One vehicle is diving from one group to the other. +-- +-- # Test cases: +-- +-- 1. Observe the flaring of the areas formed +-- 2. Observe the smoking of the units detected +-- 3. Observe the areas being flexibly changed very detection run. +-- 4. The truck driving from the one group to the other, will leave the first area, and will join the second. +-- 5. While driving in between the areas, it will have a separate area. + +FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart() + +FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits() + +FACDetection:__Start( 5 ) \ No newline at end of file diff --git a/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz b/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz new file mode 100644 index 0000000000..e3e15b56dc Binary files /dev/null and b/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz differ diff --git a/DET - Detection/DET-001 - Detection Areas/pack.ps1 b/DET - Detection/DET-001 - Detection Areas/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-001 - Detection Areas/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-001 - Detection Areas/unpack.ps1 b/DET - Detection/DET-001 - Detection Areas/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-001 - Detection Areas/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua b/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua new file mode 100644 index 0000000000..7afca5c499 --- /dev/null +++ b/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua @@ -0,0 +1,24 @@ +--- +-- Name: DET-001 - Detection Areas +-- Author: FlightControl +-- Date Created: 04 Feb 2017 +-- +-- # Situation: +-- +-- A small blue vehicle with laser detection methods is detecting targets. +-- Targets are grouped within areas. A detection range and zone range is given to group the detected units. +-- This demo will group 5 red vehicles in areas. One vehicle is diving from one group to the other. +-- +-- # Test cases: +-- +-- 1. Observe the flaring of the areas formed +-- 2. Observe the smoking of the units detected +-- 3. Observe the areas being flexibly changed very detection run. +-- 4. The truck driving from the one group to the other, will leave the first area, and will join the second. +-- 5. While driving in between the areas, it will have a separate area. + +FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart() + +FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits() + +FACDetection:__Start( 5 ) \ No newline at end of file diff --git a/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz b/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz new file mode 100644 index 0000000000..3342b2191a Binary files /dev/null and b/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz differ diff --git a/DET - Detection/DET-002 - Detection only Visible Units/pack.ps1 b/DET - Detection/DET-002 - Detection only Visible Units/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-002 - Detection only Visible Units/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-002 - Detection only Visible Units/unpack.ps1 b/DET - Detection/DET-002 - Detection only Visible Units/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-002 - Detection only Visible Units/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua b/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua new file mode 100644 index 0000000000..7fcc33cc62 --- /dev/null +++ b/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua @@ -0,0 +1,56 @@ +--- +-- Name: DET-100 - Detection Probability Distance +-- Author: FlightControl +-- Date Created: 04 Feb 2017 +-- +-- # Situation: +-- +-- Demonstrates the DistanceProbability factor during the detection of units. +-- +-- Two JTAC are detecting 4 units, which are 10 km away. +-- The first JTAC has no DistanceProbability set. +-- The second JTAC has a DistanceProbability set. +-- +-- # Test cases: +-- +-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first. +-- 2. Eventually all units should be detected by both JTAC. + +RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart() +RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 ) + +RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 ) +RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance. + +RecceDetection1:Start() +RecceDetection2:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection1:OnAfterDetect(From,Event,To) + + local DetectionReport = RecceDetection1:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No distance Probability" ) +end + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection2:OnAfterDetect(From,Event,To) + + local DetectionReport = RecceDetection2:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" ) +end diff --git a/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz b/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz new file mode 100644 index 0000000000..f3ff2c80f8 Binary files /dev/null and b/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz differ diff --git a/DET - Detection/DET-100 - Detection Probability Distance/pack.ps1 b/DET - Detection/DET-100 - Detection Probability Distance/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-100 - Detection Probability Distance/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-100 - Detection Probability Distance/unpack.ps1 b/DET - Detection/DET-100 - Detection Probability Distance/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-100 - Detection Probability Distance/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua b/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua new file mode 100644 index 0000000000..a09bef36dd --- /dev/null +++ b/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua @@ -0,0 +1,9 @@ + + +FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart() + +FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 ) +SeadClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart() +DestroyClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart() + +FACReporting = FAC_REPORTING:New( FACClientSet, FACDetection ) diff --git a/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz b/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz new file mode 100644 index 0000000000..96d855ef07 Binary files /dev/null and b/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz differ diff --git a/DET - Detection/DET-101 - Detection Reporting/pack.ps1 b/DET - Detection/DET-101 - Detection Reporting/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-101 - Detection Reporting/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-101 - Detection Reporting/unpack.ps1 b/DET - Detection/DET-101 - Detection Reporting/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-101 - Detection Reporting/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua b/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua new file mode 100644 index 0000000000..6659d2c08c --- /dev/null +++ b/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua @@ -0,0 +1,62 @@ +--- +-- Name: DET-120 - Detection Probability Zones +-- Author: FlightControl +-- Date Created: 04 Feb 2017 +-- +-- # Situation: +-- +-- Demonstrates the DistanceProbability factor during the detection of units. +-- +-- Two JTAC are detecting 4 units, which are 10 km away. +-- The first JTAC has no DistanceProbability set. +-- The second JTAC has a DistanceProbability set. +-- +-- # Test cases: +-- +-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first. +-- 2. Eventually all units should be detected by both JTAC. + +RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart() +RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 ) + +RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 ) + +ForestZone = ZONE_POLYGON:New( "ForestZone", GROUP:FindByName( "ForestZone" ) ) + +RecceDetection2:SetZoneProbability( { { ForestZone, 0.1 } } ) -- Set a 10% probability that a vehicle can be detected within the forest. + + +RecceDetection1:Start() +RecceDetection2:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection1:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No Zone Probability" ) +end + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection2:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Forest Zone Probability" ) +end + +garbagecollect() diff --git a/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz b/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz new file mode 100644 index 0000000000..59954455b1 Binary files /dev/null and b/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz differ diff --git a/DET - Detection/DET-120 - Detection Probability Zones/pack.ps1 b/DET - Detection/DET-120 - Detection Probability Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-120 - Detection Probability Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-120 - Detection Probability Zones/unpack.ps1 b/DET - Detection/DET-120 - Detection Probability Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-120 - Detection Probability Zones/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua b/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua new file mode 100644 index 0000000000..00fd71b742 --- /dev/null +++ b/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua @@ -0,0 +1,42 @@ +--- +-- Name: DET-200 - Detection UNITS +-- Author: FlightControl +-- Date Created: 13 Feb 2017 +-- +-- # Situation: +-- +-- Demonstrates the detection of units. +-- +-- A Set of Recce are detecting a large group of units, which are 5 km away. +-- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve. +-- The enemy is approaching. +-- +-- # Test cases: +-- +-- 1. Observe the detection reporting of both the Recce. +-- 2. Eventually all units should be detected by both Recce. + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + self:E("Detect") + + local DetectionReport = RecceDetection:DetectedReportDetailed() + + CC:MessageToAll( DetectionReport, 15, "" ) +end + diff --git a/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz b/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz new file mode 100644 index 0000000000..a835d6df68 Binary files /dev/null and b/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz differ diff --git a/DET - Detection/DET-200 - Detection UNITS/pack.ps1 b/DET - Detection/DET-200 - Detection UNITS/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-200 - Detection UNITS/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-200 - Detection UNITS/unpack.ps1 b/DET - Detection/DET-200 - Detection UNITS/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-200 - Detection UNITS/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua b/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua new file mode 100644 index 0000000000..6f4bee12a7 --- /dev/null +++ b/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua @@ -0,0 +1,43 @@ +--- +-- Name: DET-201 - Detection UNITS - Air +-- Author: FlightControl +-- Date Created: 03 May 2017 +-- +-- # Situation: +-- +-- Demonstrates the detection of units. +-- +-- A Set of Recce are detecting a approaching airplanes. +-- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve. +-- The enemy is approaching. +-- +-- # Test cases: +-- +-- 1. Observe the detection reporting of both the Recce. +-- 2. Eventually all units should be detected by both Recce. + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) +RecceDetection:InitDetectRadar(true) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + self:E("Detect") + + local DetectionReport = RecceDetection:DetectedReportDetailed() + + CC:MessageToAll( DetectionReport, 15, "" ) +end + diff --git a/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz b/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz new file mode 100644 index 0000000000..8e93f2aed2 Binary files /dev/null and b/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz differ diff --git a/DET - Detection/DET-201 - Detection UNITS - Air/pack.ps1 b/DET - Detection/DET-201 - Detection UNITS - Air/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-201 - Detection UNITS - Air/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-201 - Detection UNITS - Air/unpack.ps1 b/DET - Detection/DET-201 - Detection UNITS - Air/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-201 - Detection UNITS - Air/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua b/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua new file mode 100644 index 0000000000..e39217d203 --- /dev/null +++ b/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua @@ -0,0 +1,42 @@ +--- +-- Name: DET-210 - Detection TYPES +-- Author: FlightControl +-- Date Created: 13 Feb 2017 +-- +-- # Situation: +-- +-- Demonstrates the detection of units. +-- +-- A Set of Recce are detecting a large group of units, which are 5 km away. +-- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve. +-- The enemy is approaching. +-- +-- The blue Recce will report the detected units grouped per vehicle type! +-- +-- # Test cases: +-- +-- 1. Observe the detection reporting of both the Recce. +-- 2. Eventually all units should be detected by both Recce. + +RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_TYPES:New( RecceSetGroup ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = RecceDetection:DetectedReportDetailed() + + CC:MessageToAll( DetectionReport, 15, "" ) +end + diff --git a/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz b/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz new file mode 100644 index 0000000000..40f700b085 Binary files /dev/null and b/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz differ diff --git a/DET - Detection/DET-210 - Detection TYPES/pack.ps1 b/DET - Detection/DET-210 - Detection TYPES/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-210 - Detection TYPES/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-210 - Detection TYPES/unpack.ps1 b/DET - Detection/DET-210 - Detection TYPES/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-210 - Detection TYPES/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua b/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua new file mode 100644 index 0000000000..34cf755e65 --- /dev/null +++ b/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua @@ -0,0 +1,58 @@ +--- +-- Name: DET-100 - Detection Probability Distance +-- Author: FlightControl +-- Date Created: 04 Feb 2017 +-- +-- # Situation: +-- +-- Demonstrates the DistanceProbability factor during the detection of units. +-- +-- Two JTAC are detecting 4 units, which are 10 km away. +-- The first JTAC has no DistanceProbability set. +-- The second JTAC has a DistanceProbability set. +-- +-- # Test cases: +-- +-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first. +-- 2. Eventually all units should be detected by both JTAC. + +RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart() +RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection1 = DETECTION_AREAS:New( RecceSetGroup1, 1000 ) +RecceDetection1:BoundDetectedZones() + +RecceDetection2 = DETECTION_AREAS:New( RecceSetGroup2, 1000 ) +RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance. +RecceDetection1:BoundDetectedZones() + +RecceDetection1:Start() +RecceDetection2:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection1:OnAfterDetect(From,Event,To) + + local DetectionReport = RecceDetection1:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No distance Probability" ) +end + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection2:OnAfterDetect(From,Event,To) + + local DetectionReport = RecceDetection2:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" ) +end \ No newline at end of file diff --git a/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz b/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz new file mode 100644 index 0000000000..cee4063c11 Binary files /dev/null and b/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz differ diff --git a/DET - Detection/DET-250 - Detection AREAS/pack.ps1 b/DET - Detection/DET-250 - Detection AREAS/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-250 - Detection AREAS/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-250 - Detection AREAS/unpack.ps1 b/DET - Detection/DET-250 - Detection AREAS/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-250 - Detection AREAS/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua b/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua new file mode 100644 index 0000000000..cbba0418f0 --- /dev/null +++ b/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua @@ -0,0 +1,46 @@ +--- +-- Name: DET-255 - Detection AEAS with Destroys +-- Author: FlightControl +-- Date Created: 06 Mar 2017 +-- +-- # Situation: +-- +-- A small blue vehicle with laser detection methods is detecting targets. +-- Targets are grouped within areas. A detection range and zone range is given to group the detected units. +-- This demo will group red vehicles in areas. One vehicle is diving from one group to the other. +-- After 30 seconds, one vehicle is destroyed in a zone. +-- After 60 seconds, a vehicle is destroyed that is a leader of a zone. +-- After 90 seconds, all vehicles are destroyed in a zone. +-- +-- # Test cases: +-- +-- 1. Observe the flaring of the areas formed +-- 2. Observe the smoking of the units detected +-- 3. Observe the areas being flexibly changed very detection run. +-- 4. The truck driving from the one group to the other, will leave the first area, and will join the second. +-- 5. While driving in between the areas, it will have a separate area. +-- 6. Observe the correct removal or relocation of the ZONEs. + +FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart() + +FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits() + +FACDetection:__Start( 5 ) + +SCHEDULER:New( nil,function() + local Target = UNIT:FindByName( "Target #004") + Target:Destroy() + end, {}, 30 + ) + +SCHEDULER:New( nil,function() + local Target = UNIT:FindByName( "Target #006") + Target:Destroy() + end, {}, 60 + ) + +SCHEDULER:New( nil,function() + local Target = UNIT:FindByName( "Target #007") + Target:Destroy() + end, {}, 90 + ) \ No newline at end of file diff --git a/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz b/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz new file mode 100644 index 0000000000..dba8621293 Binary files /dev/null and b/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz differ diff --git a/DET - Detection/DET-255 - Detection AEAS with Destroys/pack.ps1 b/DET - Detection/DET-255 - Detection AEAS with Destroys/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-255 - Detection AEAS with Destroys/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-255 - Detection AEAS with Destroys/unpack.ps1 b/DET - Detection/DET-255 - Detection AEAS with Destroys/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-255 - Detection AEAS with Destroys/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua b/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua new file mode 100644 index 0000000000..a543336ba7 --- /dev/null +++ b/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua @@ -0,0 +1,36 @@ +--- +-- Name: DET-300 - Dectection Filter AIRPLANE +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- # Situation: +-- +-- Demonstrates the filtering of detections. +-- +-- # Test cases: +-- +-- 1. Observe the reporting only detecting the airplane, not the other units. + +SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.AIRPLANE ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection" ) +end + +garbagecollect() diff --git a/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz b/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz new file mode 100644 index 0000000000..d2fd71b4a5 Binary files /dev/null and b/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz differ diff --git a/DET - Detection/DET-300 - Dectection Filter AIRPLANE/pack.ps1 b/DET - Detection/DET-300 - Dectection Filter AIRPLANE/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-300 - Dectection Filter AIRPLANE/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-300 - Dectection Filter AIRPLANE/unpack.ps1 b/DET - Detection/DET-300 - Dectection Filter AIRPLANE/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-300 - Dectection Filter AIRPLANE/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua b/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua new file mode 100644 index 0000000000..2471addbb5 --- /dev/null +++ b/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua @@ -0,0 +1,36 @@ +--- +-- Name: DET-301 - Dectection Filter GROUND_UNIT +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- # Situation: +-- +-- Demonstrates the filtering of detections. +-- +-- # Test cases: +-- +-- 1. Observe the reporting only detecting the ground unit, not the other units. + +SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.GROUND_UNIT ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection" ) +end + +garbagecollect() diff --git a/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz b/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz new file mode 100644 index 0000000000..b48d738664 Binary files /dev/null and b/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz differ diff --git a/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/pack.ps1 b/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/unpack.ps1 b/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua b/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua new file mode 100644 index 0000000000..4150c5e647 --- /dev/null +++ b/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua @@ -0,0 +1,36 @@ +--- +-- Name: DET-302 - Dectection Filter HELICOPTER +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- # Situation: +-- +-- Demonstrates the filtering of detections. +-- +-- # Test cases: +-- +-- 1. Observe the reporting only detecting the helicopter, not the other units. + +SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.HELICOPTER ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection" ) +end + +garbagecollect() diff --git a/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz b/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz new file mode 100644 index 0000000000..6e656567ac Binary files /dev/null and b/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz differ diff --git a/DET - Detection/DET-302 - Dectection Filter HELICOPTER/pack.ps1 b/DET - Detection/DET-302 - Dectection Filter HELICOPTER/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-302 - Dectection Filter HELICOPTER/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-302 - Dectection Filter HELICOPTER/unpack.ps1 b/DET - Detection/DET-302 - Dectection Filter HELICOPTER/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-302 - Dectection Filter HELICOPTER/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua b/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua new file mode 100644 index 0000000000..71b8ae7d0e --- /dev/null +++ b/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua @@ -0,0 +1,36 @@ +--- +-- Name: DET-303 - Dectection Filter SHIP +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- # Situation: +-- +-- Demonstrates the filtering of detections. +-- +-- # Test cases: +-- +-- 1. Observe the reporting only detecting the ship, not the other units. + +SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.SHIP ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection" ) +end + +garbagecollect() diff --git a/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz b/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz new file mode 100644 index 0000000000..b6c588a518 Binary files /dev/null and b/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz differ diff --git a/DET - Detection/DET-303 - Dectection Filter SHIP/pack.ps1 b/DET - Detection/DET-303 - Dectection Filter SHIP/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-303 - Dectection Filter SHIP/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-303 - Dectection Filter SHIP/unpack.ps1 b/DET - Detection/DET-303 - Dectection Filter SHIP/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-303 - Dectection Filter SHIP/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua b/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua new file mode 100644 index 0000000000..8abd8bf5cf --- /dev/null +++ b/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua @@ -0,0 +1,36 @@ +--- +-- Name: DET-304 - Dectection Filter STRUCTURE +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- # Situation: +-- +-- Demonstrates the filtering of detections. +-- +-- # Test cases: +-- +-- 1. Observe the reporting only detecting the structure, not the other units. + +SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.STRUCTURE ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection" ) +end + +collectgarbage() diff --git a/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz b/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz new file mode 100644 index 0000000000..6d958fac8e Binary files /dev/null and b/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz differ diff --git a/DET - Detection/DET-304 - Dectection Filter STRUCTURE/pack.ps1 b/DET - Detection/DET-304 - Dectection Filter STRUCTURE/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-304 - Dectection Filter STRUCTURE/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-304 - Dectection Filter STRUCTURE/unpack.ps1 b/DET - Detection/DET-304 - Dectection Filter STRUCTURE/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-304 - Dectection Filter STRUCTURE/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua b/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua new file mode 100644 index 0000000000..039db9d696 --- /dev/null +++ b/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua @@ -0,0 +1,44 @@ +--- +-- Name: DET-305 - Dectection Filter ALL +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- # Situation: +-- +-- Demonstrates the filtering of detections. +-- +-- # Test cases: +-- +-- 1. Observe the reporting detecting all the units regardless of the type. + +SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS + :New( SetGroup ) + :FilterCategories( { + Unit.Category.AIRPLANE, + Unit.Category.GROUND_UNIT, + Unit.Category.HELICOPTER, + Unit.Category.SHIP, + Unit.Category.STRUCTURE + } ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection" ) +end + +garbagecollect() diff --git a/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz b/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz new file mode 100644 index 0000000000..c0e6758488 Binary files /dev/null and b/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz differ diff --git a/DET - Detection/DET-305 - Dectection Filter ALL/pack.ps1 b/DET - Detection/DET-305 - Dectection Filter ALL/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-305 - Dectection Filter ALL/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-305 - Dectection Filter ALL/unpack.ps1 b/DET - Detection/DET-305 - Dectection Filter ALL/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-305 - Dectection Filter ALL/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua b/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua new file mode 100644 index 0000000000..0d6bacfba0 --- /dev/null +++ b/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua @@ -0,0 +1,35 @@ +--- +-- Name: DET-310 - EWR - Line Of Sight +-- Author: FlightControl +-- Date Created: 12 Sep 2018 +-- +-- # Situation: +-- +-- Demonstrates the lost of line of sight using an airplane. + +SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS + :New( SetGroup ) + :FilterCategories( { Unit.Category.AIRPLANE } ) + :InitDetectRWR(true) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection" ) +end + +garbagecollect() diff --git a/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz b/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz new file mode 100644 index 0000000000..43812ef469 Binary files /dev/null and b/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz differ diff --git a/DET - Detection/DET-310 - EWR - Line Of Sight/pack.ps1 b/DET - Detection/DET-310 - EWR - Line Of Sight/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-310 - EWR - Line Of Sight/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-310 - EWR - Line Of Sight/unpack.ps1 b/DET - Detection/DET-310 - EWR - Line Of Sight/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-310 - EWR - Line Of Sight/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua b/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua new file mode 100644 index 0000000000..9b1b2df832 --- /dev/null +++ b/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua @@ -0,0 +1,57 @@ +--- +-- Name: DET-310 - EWR - Line Of Sight +-- Author: FlightControl +-- Date Created: 12 Sep 2018 +-- +-- # Situation: +-- +-- Demonstrates the lost of line of sight using an airplane. + +SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_AREAS + :New( SetGroup, 1500 ) + :FilterCategories( { Unit.Category.AIRPLANE } ) + :InitDetectRWR(true) + +local Zones = { + ZONE:New( "Zone1" ), + ZONE:New( "Zone2" ) +} + +local Sams = { + GROUP:FindByName( "SAM1" ), + GROUP:FindByName( "SAM2" ) +} + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event DetectedItem. +-- @param RecceDetection self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +-- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem +function RecceDetection:OnAfterDetectedItem(From,Event,To,DetectedItem) + + local DetectionReport = self:DetectedReportDetailed() + + HQ:MessageToAll( DetectionReport, 15, "Detection" ) + + if DetectedItem.IsDetected then + local Coordinate = DetectedItem.Coordinate -- Core.Point#COORDINATE + for ZoneID, ZoneData in pairs( Zones ) do + local Zone = ZoneData -- Core.Zone#ZONE + if Zone:IsCoordinateInZone(Coordinate) then + Sams[ZoneID]:Activate() + end + end + end + +end + +garbagecollect() diff --git a/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz b/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz new file mode 100644 index 0000000000..2ffccc3448 Binary files /dev/null and b/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz differ diff --git a/DET - Detection/DET-320 - EWR - Line Of Sight/pack.ps1 b/DET - Detection/DET-320 - EWR - Line Of Sight/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-320 - EWR - Line Of Sight/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-320 - EWR - Line Of Sight/unpack.ps1 b/DET - Detection/DET-320 - EWR - Line Of Sight/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-320 - EWR - Line Of Sight/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua b/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua new file mode 100644 index 0000000000..6890351a4d --- /dev/null +++ b/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua @@ -0,0 +1,70 @@ +--- +-- Name: DET-500 - Handle Detected Event - Govern Artillery Demo +-- Author: FlightControl +-- Date Created: 13 Feb 2017 +-- +-- # Situation: +-- +-- Demonstrates the detection of units. +-- +-- A Set of Recces are detecting a large group of units, which are 5 km away. +-- Once the Recces detect the enemy, the artilley units are controlled and will fire a missile to the target. +-- +-- # Test cases: +-- +-- 1. Observe the detected reporting of the recces. +-- 2. When one Recce group detects a target, it will select an artillery unit and fire a missile. +-- 3. This will run until all Recces have eliminated the targets. + +RecceSetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Recce" ):FilterStart() +ArtillerySetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Artillery" ):FilterStart() + +HQ = GROUP:FindByName( "HQ" ) + +CC = COMMANDCENTER:New( HQ, "HQ" ) + +RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) +RecceDetection:SetRefreshTimeInterval( 5 ) + +RecceDetection:Start() + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +function RecceDetection:OnAfterDetect(From,Event,To) + + local DetectionReport = RecceDetection:DetectedReportDetailed() + + CC:GetPositionable():MessageToAll( DetectionReport, 15, "" ) +end + +local ArtilleryTime = {} +local ArtilleryAim = 180 + +--- OnAfter Transition Handler for Event Detect. +-- @param Functional.Detection#DETECTION_UNITS self +-- @param #string From The From State string. +-- @param #string Event The Event string. +-- @param #string To The To State string. +-- @param Wrapper.Unit#UNIT DetectedUnits +function RecceDetection:OnAfterDetected( From, Event, To, DetectedUnits ) + self:E( { From, Event, To, DetectedUnits } ) + + for DetectedUnitID, DetectedUnit in pairs( DetectedUnits ) do + local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT + local Artillery = ArtillerySetGroup:GetRandom() -- Wrapper.Group#GROUP + + if ArtilleryTime[Artillery] and ArtilleryTime[Artillery] <= timer.getTime() - ArtilleryAim then + ArtilleryTime[Artillery] = nil + end + + if not ArtilleryTime[Artillery] then + local Task = Artillery:TaskFireAtPoint( DetectedUnit:GetVec2(), 500, 4 ) -- Fire 2 rockets to the target point. + Artillery:SetTask( Task, 0.5 ) + ArtilleryTime[Artillery] = timer.getTime() + end + + end +end \ No newline at end of file diff --git a/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz b/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz new file mode 100644 index 0000000000..d2c583a7e4 Binary files /dev/null and b/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz differ diff --git a/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/pack.ps1 b/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/unpack.ps1 b/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/unpack.ps1 @@ -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" * diff --git a/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua b/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua new file mode 100644 index 0000000000..cc2969de45 --- /dev/null +++ b/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua @@ -0,0 +1,25 @@ +--- +-- Name: DET-900 - Detection Test with RED FACA +-- Author: FlightControl +-- Date Created: 06 Mar 2017 +-- +-- # Situation: +-- +-- A red FACA is detecting targets while airborne. +-- Targets are grouped within areas. A detection range and zone range is given to group the detected units. +-- This demo will group blue vehicles in areas. +-- Upon the detection capabilities of the red FACA, the blue vehicles will be grouped when detected. +-- All blue vehicles have ROE on hold. +-- +-- # Test cases: +-- +-- 1. Observe the tyres put around the detected areas formed +-- 2. Observe the smoking of the units detected +-- 3. Observe the areas being flexibly changed very detection run. + +FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() + +FACDetection = DETECTION_AREAS:New( FACSetGroup, 2000, 250 ):BoundDetectedZones():SmokeDetectedUnits() + + +FACDetection:__Start( 5 ) diff --git a/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz b/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz new file mode 100644 index 0000000000..7705f2a4be Binary files /dev/null and b/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz differ diff --git a/DET - Detection/DET-900 - Detection Test with RED FACA/pack.ps1 b/DET - Detection/DET-900 - Detection Test with RED FACA/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/DET - Detection/DET-900 - Detection Test with RED FACA/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/DET - Detection/DET-900 - Detection Test with RED FACA/unpack.ps1 b/DET - Detection/DET-900 - Detection Test with RED FACA/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/DET - Detection/DET-900 - Detection Test with RED FACA/unpack.ps1 @@ -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" * diff --git a/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua b/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua new file mode 100644 index 0000000000..2885f61672 --- /dev/null +++ b/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua @@ -0,0 +1,89 @@ +--- +-- Name: ESC-001 - Escorting Helicopters +-- Author: FlightControl +-- Date Created: 10 Mar 2017 +-- +-- # Situation: +-- +-- Your client helicopter is flying in the battle field. +-- It is escorted by an MI-28N, which you can command... +-- Use the menu options to: +-- - Make the escort follow you. +-- - Report detected targets. +-- - Attack targets +-- - Flare +-- +-- # Test cases: +-- +-- 1. When executing the commands, observe the MI-28N reactions. + +do + local function EventAliveHelicopter( Client ) + local EscortGroupHeli1 = SpawnEscortHeli:ReSpawn(1) + local EscortHeli1 = ESCORT + :New( Client, EscortGroupHeli1, "Escort Helicopter" ) + :MenuFollowAt( 100 ) + :MenuFollowAt( 200 ) + :MenuHoldAtEscortPosition( 20, 10, "Hold at %d meters for %d seconds" ) + :MenuHoldAtLeaderPosition( 120 ) + :MenuFlare( "Disperse Flares" ) + :MenuSmoke() + :MenuReportTargets( 60, 20 ) + :MenuResumeMission() + :MenuROE() + :MenuAssistedAttack() + + EscortHeli1:SetDetection( EscortHeliDetection ) + + local EscortGroupArtillery = SpawnEscortArtillery:ReSpawn(1) + local EscortArtillery = ESCORT + :New( Client, EscortGroupArtillery, "Escort Artillery" ) + :Menus() + end + + local function EventAlivePlane( Client ) + local EscortGroupPlane2 = SpawnEscortPlane:ReSpawn(1) + local EscortPlane2 = ESCORT + :New( Client, EscortGroupPlane2, "Escort Test Plane" ) + :MenuFollowAt( 100 ) + :MenuFollowAt( 200 ) + :MenuHoldAtEscortPosition( 20, 10, "Hold at %d meters for %d seconds" ) + :MenuHoldAtLeaderPosition( 120 ) + :MenuFlare( "Disperse Flares" ) + :MenuSmoke() + :MenuReportTargets( 60, 20 ) + :MenuResumeMission() + :MenuAssistedAttack() + :MenuROE() + :MenuEvasion() + + local EscortGroupGround2 = SpawnEscortGround:ReSpawn(1) + local EscortGround2 = ESCORT + :New( Client, EscortGroupGround2, "Test Ground" ) + :Menus() + + local EscortGroupShip2 = SpawnEscortShip:ReSpawn(1) + local EscortShip2 = ESCORT + :New( Client, EscortGroupShip2, "Test Ship" ) + :Menus() + end + + SpawnEscortHeli = SPAWN:New( "Escort Helicopter" ) + SpawnEscortPlane = SPAWN:New( "Escort Plane" ) + SpawnEscortGround = SPAWN:New( "Escort Ground" ) + SpawnEscortShip = SPAWN:New( "Escort Ship" ) + SpawnEscortArtillery = SPAWN:New( "Ground Attack Assistance" ) + + EscortHeliSetGroup = SET_GROUP:New():FilterPrefixes("Escort Helicopter"):FilterStart() + EscortHeliDetection = DETECTION_AREAS:New( EscortHeliSetGroup, 1000, 500 ) + + EscortHeliDetection:BoundDetectedZones() + EscortHeliDetection:SetRefreshTimeInterval( 15 ) + + EscortClientHeli = CLIENT:FindByName( "Lead Helicopter", "Fly around and observe the behaviour of the escort helicopter" ):Alive( EventAliveHelicopter ) + EscortClientPlane = CLIENT:FindByName( "Lead Plane", "Fly around and observe the behaviour of the escort airplane. Select Navigate->Joun-Up and airplane should follow you. Change speed and directions." ) + :Alive( EventAlivePlane ) + +end + +env.info( "Test Mission loaded" ) diff --git a/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz b/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz new file mode 100644 index 0000000000..b7d8e384fe Binary files /dev/null and b/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz differ diff --git a/ESC - Escorting/ESC-001 - Escorting Helicopters/pack.ps1 b/ESC - Escorting/ESC-001 - Escorting Helicopters/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ESC - Escorting/ESC-001 - Escorting Helicopters/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ESC - Escorting/ESC-001 - Escorting Helicopters/unpack.ps1 b/ESC - Escorting/ESC-001 - Escorting Helicopters/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ESC - Escorting/ESC-001 - Escorting Helicopters/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua b/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua new file mode 100644 index 0000000000..b2257c66ae --- /dev/null +++ b/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua @@ -0,0 +1,40 @@ +--- +-- Name: EVT-001 - API Demo 1 +-- Author: FlightControl +-- Date Created: 7 February 2017 +-- +-- # Situation: +-- +-- A task shoots another tank. If one of the is dead, the event will be catched. +-- +-- # Test cases: +-- +-- 1. Observe the tanks shooting each other. +-- 2. If one of the tanks die, an event will be catched. +-- 3. Observe the surviving unit smoking. + + +local Tank1 = UNIT:FindByName( "Tank A" ) +local Tank2 = UNIT:FindByName( "Tank B" ) + +Tank1:HandleEvent( EVENTS.Dead ) + +Tank2:HandleEvent( EVENTS.Dead ) + +--- @param Wrapper.Unit#UNIT self +function Tank1:OnEventDead( EventData ) + + self:SmokeGreen() +end + +--- @param Wrapper.Unit#UNIT self +function Tank2:OnEventDead( EventData ) + + self:SmokeBlue() +end + +function Tank2:OnEventCrash(EventData) + +end + + diff --git a/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz b/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz new file mode 100644 index 0000000000..0548cb6368 Binary files /dev/null and b/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz differ diff --git a/EVT - Event Handling/EVT-001 - API Demo 1/pack.ps1 b/EVT - Event Handling/EVT-001 - API Demo 1/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-001 - API Demo 1/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-001 - API Demo 1/unpack.ps1 b/EVT - Event Handling/EVT-001 - API Demo 1/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-001 - API Demo 1/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua b/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua new file mode 100644 index 0000000000..01d65f45ca --- /dev/null +++ b/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua @@ -0,0 +1,74 @@ +--- +-- Name: EVT-001 - UNIT OnEventShot Stability Test +-- Author: FlightControl +-- Date Created: 9 Apr 2017 +-- +-- # Situation: +-- +-- A couple of planes are firing to each other. Monitor the shot events. +-- I am doing a collectgarbage to test the stability of the event handling. +-- Also when the planes are destroyed, the event handling should stop etc. +-- The tests are on GROUP level. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missiles. +-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. +-- 3. Check the stability of the event handlings. + +PlaneGroupsBlue = {} + +PlaneGroupsRed = {} + +PlaneSpawnBlue = SPAWN + :New( "Planes Blue" ) + :InitLimit( 2, 0 ) + :SpawnScheduled( 10,0 ) + :OnSpawnGroup( + function( SpawnGroup ) + SpawnGroupName = SpawnGroup:GetName() + PlaneGroupsBlue[SpawnGroupName] = SpawnGroup + PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Shot ) + PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Hit ) + collectgarbage() + PlaneGroupsBlue[SpawnGroupName].OnEventShot = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) + end + PlaneGroupsBlue[SpawnGroupName].OnEventHit = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just got hit!", 15, "Alert!" ) + end + end + ) + +PlaneSpawnRed = SPAWN + :New( "Planes Red" ) + :InitLimit( 2, 0 ) + :SpawnScheduled(10,0) + :OnSpawnGroup( + function( SpawnGroup ) + SpawnGroupName = SpawnGroup:GetName() + PlaneGroupsRed[SpawnGroupName] = SpawnGroup + PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Shot ) + PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Hit ) + collectgarbage() + --- @param self + -- @param Core.Event#EVENTDATA EventData + PlaneGroupsRed[SpawnGroupName].OnEventShot = function ( self, EventData ) + self:F( EventData ) + + self:MessageToAll( "I just got hit!", 15, "Alert!" ) + end + PlaneGroupsRed[SpawnGroupName].OnEventHit = function( self, EventData ) + self:F( EventData ) + self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) + end + end + ) + +collectgarbage() +BASE:E( "Collected garbage" ) + + + diff --git a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz b/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz new file mode 100644 index 0000000000..75b6b0433c Binary files /dev/null and b/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz differ diff --git a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/pack.ps1 b/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/unpack.ps1 b/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua b/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua new file mode 100644 index 0000000000..5056baa534 --- /dev/null +++ b/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua @@ -0,0 +1,40 @@ +--- +-- Name: EVT-002 - UNIT OnEventLand ReSpawn Test +-- Author: FlightControl +-- Date Created: 9 Apr 2017 +-- +-- # Situation: +-- +-- A couple of planes are taking off from an airbase. +-- When they land, they send out a message that they landed. +-- But! They are automatically respawned upon landing. +-- The 2nd time the same plane lands, they should send the message again!!! +-- +-- # Test cases: +-- +-- 1. Observe in the logging, that the event subscriptions are reset when the respawn happens! +-- 2. Observe the 2nd time the same plane lands, they should send the message again!!! +-- 3. Check the stability of the event handlings. + +PlaneBlueSpawn = SPAWN + :New( "PlaneBlue" ) + :InitLimit(2,0) + :InitRepeatOnEngineShutDown() + :SpawnScheduled(60,0) + :OnSpawnGroup( + --- @param Wrapper.Group#GROUP SpawnGroup + function( SpawnGroup ) + SpawnGroup:HandleEvent( EVENTS.Land ) + --- @param self + -- @param Core.Event#EVENTDATA EventData + function SpawnGroup:OnEventLand(EventData) + EventData.IniGroup:MessageToAll("Landed",15,"Land Event") + end + end + ) + +collectgarbage() +BASE:E( "Collected garbage" ) + + + diff --git a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz b/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz new file mode 100644 index 0000000000..c277af35f6 Binary files /dev/null and b/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz differ diff --git a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/pack.ps1 b/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/unpack.ps1 b/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua b/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua new file mode 100644 index 0000000000..2f84ad795d --- /dev/null +++ b/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua @@ -0,0 +1,25 @@ +--- +-- Name: EVT-100 - UNIT OnEventShot Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- A plane is flying in the air and shoots an missile to a ground target. +-- +-- # Test cases: +-- +-- 1. Observe the plane shooting the missile. +-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_SHOT entry. + +Plane = UNIT:FindByName( "Plane" ) + +Plane:HandleEvent( EVENTS.Shot ) + +function Plane:OnEventShot( EventData ) + + Plane:MessageToAll( "I just fired a missile!", 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz b/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz new file mode 100644 index 0000000000..9356571711 Binary files /dev/null and b/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz differ diff --git a/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/pack.ps1 b/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/unpack.ps1 b/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua b/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua new file mode 100644 index 0000000000..03c8435ab3 --- /dev/null +++ b/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua @@ -0,0 +1,32 @@ +--- +-- Name: EVT-101 - UNIT OnEventHit Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- A plane is flying in the air and shoots an missile to a ground target. +-- +-- # Test cases: +-- +-- 1. Observe the plane shooting the missile. +-- 2. Observe when the missile hits the target, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_HIT entry. + +Plane = UNIT:FindByName( "Plane" ) + +Tank = UNIT:FindByName( "Tank" ) + +Plane:HandleEvent( EVENTS.Hit ) +Tank:HandleEvent( EVENTS.Hit ) + +function Plane:OnEventHit( EventData ) + + Plane:MessageToAll( "I just got hit!", 15, "Alert!" ) +end + +function Tank:OnEventHit( EventData ) + Tank:MessageToAll( "I just got hit!", 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz b/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz new file mode 100644 index 0000000000..73aa8559eb Binary files /dev/null and b/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz differ diff --git a/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/pack.ps1 b/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/unpack.ps1 b/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua b/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua new file mode 100644 index 0000000000..203d946db3 --- /dev/null +++ b/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua @@ -0,0 +1,33 @@ +--- +-- Name: EVT-102 - UNIT OnEventTakeoff Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- A human plane and an AI plane are taking off from an airfield. +-- +-- # Test cases: +-- +-- 1. Take-Off the planes from the runway. +-- 2. When the planes take-off, observe the message being sent. +-- 3. Check the contents of the fields of the S_EVENT_TAKEOFF entry in the dcs.log file. + +PlaneAI = UNIT:FindByName( "PlaneAI" ) + +PlaneHuman = UNIT:FindByName( "PlaneHuman" ) + +PlaneAI:HandleEvent( EVENTS.Takeoff ) +PlaneHuman:HandleEvent( EVENTS.Takeoff ) + +function PlaneAI:OnEventTakeoff( EventData ) + + PlaneHuman:MessageToAll( "AI Taking Off", 15, "Alert!" ) +end + +function PlaneHuman:OnEventTakeoff( EventData ) + + PlaneHuman:MessageToAll( "Player " .. PlaneHuman:GetPlayerName() .. " is Taking Off", 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz b/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz new file mode 100644 index 0000000000..b8ffed5ccc Binary files /dev/null and b/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz differ diff --git a/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/pack.ps1 b/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/unpack.ps1 b/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua b/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua new file mode 100644 index 0000000000..ba4e7608c6 --- /dev/null +++ b/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua @@ -0,0 +1,38 @@ +--- +-- Name: EVT-103 - UNIT OnEventLand Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- An AI plane is landing on an airfield. +-- When the plane landed, a new plane is spawned. +-- +-- # Test cases: +-- +-- 1. Observe the plane landing. +-- 2. When the AI plane lands, observe the new plane being spawned. +-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. + +-- Create a variable PlaneAI that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneAI". +PlaneAI = UNIT:FindByName( "PlaneAI" ) + +-- Create a SPAWN object to spawn a new plane once the hold one lands. +SpawnPlane = SPAWN:New( "SpawnPlaneAI" ) + +-- Declare a new variable that will hold the new spawned SpawnPlaneAI +local NewPlane + + +-- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. +PlaneAI:HandleEvent( EVENTS.Land ) + +-- Because the PlaneAI object is subscribed to the Land event, the following method will be automatically +-- called when the land event is happening FOR THE PlaneAI UNIT only! +function PlaneAI:OnEventLand( EventData ) + + -- Okay, the PlaneAI has landed, now spawn the new plane ( a predator ) + NewPlane = SpawnPlane:Spawn() +end + + diff --git a/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz b/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz new file mode 100644 index 0000000000..b2e1eccfa6 Binary files /dev/null and b/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz differ diff --git a/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/pack.ps1 b/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/unpack.ps1 b/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua b/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua new file mode 100644 index 0000000000..9a66753157 --- /dev/null +++ b/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua @@ -0,0 +1,35 @@ +--- +-- Name: EVT-104 - UNIT OnEventCrash Example +-- Author: FlightControl +-- Date Created: 7 Feb 2017 +-- +-- # Situation: +-- +-- A human plane is fyling in the air. Crash it into the ground. +-- Once you are crashed into the ground, at the place where you crashed, a smoke should start burning ... +-- +-- # Test cases: +-- +-- 1. Fly the plane into the ground. +-- 2. When your plane crashes, observe a smoke starting to burn right were you crashed. +-- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file. + +-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman". +PlaneHuman = UNIT:FindByName( "PlaneHuman" ) + +-- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else). +PlaneHuman:HandleEvent( EVENTS.Crash ) + +-- Because the PlaneHuman object is subscribed to the Crash event, the following method will be automatically +-- called when the Crash event is happening FOR THE PlaneHuman UNIT only! + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function PlaneHuman:OnEventCrash( EventData ) + + -- Okay, the PlaneHuman has crashed, now smoke at the x, z position. + self:E( "Smoking at the position" ) + EventData.IniUnit:SmokeOrange() +end + + diff --git a/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz b/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz new file mode 100644 index 0000000000..4b0708a913 Binary files /dev/null and b/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz differ diff --git a/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/pack.ps1 b/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/unpack.ps1 b/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua b/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua new file mode 100644 index 0000000000..a65d319057 --- /dev/null +++ b/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua @@ -0,0 +1,107 @@ +--- +-- Name: EVT-105 - UNIT OnEventPlayerEnterUnit Example +-- Author: FlightControl +-- Date Created: 15 Dec 2017 +-- +-- 2 planes and 2 tanks are located on and near the airport. +-- The test is about checking if S_EVENT_PLAYER_ENTER_UNIT is correctly working in DCS single player and multi player. +-- The test requires you to jump into the 2 planes and into the 2 tanks using CA. +-- Please execute the following scenarios in Single and Multi-Player: +-- +-- 1. Test in Single Player: +-- +-- First we need to get the mission running... To do this, do the following actions: +-- - At mission startup, once you get the slots, press the ESC key... The slot selection window will disappear. +-- - Then press the ESC key again, and in the window, select the menu option "Select Slot". +-- +-- Next, we select the 2 planes... +-- - Select Plane 1 slot. Go to external view. Once you are in the SU-25T, an orange smoke and a message should appear. +-- - Select Plane 2 slot. Go to external view. Once you are in the SU-25T, a red smoke and a message should appear. +-- +-- Next, we select the 2 tanks... Select the MAP view using F10, and: +-- - Select the Tank 1 unit using the arrow. And then press RALT-J which should jump you into Tank 1. Go to external view. Once you are in the Tank, a blue smoke and a message should appear. +-- - Select the Tank 2 unit using the arrow. And then press RALT-J which should jump you into Tank 2. Go to external view. Once you are in the Tank, a green smoke and a message should appear. +-- +-- +-- 2. Test in Multi Player: +-- +-- Run the mission on a server, and connect to the mission with a client... +-- +-- On the client machine, we select the 2 planes... +-- - Select Plane 1 slot. Go to external view. Once you are in the SU-25T, an orange smoke and a message should appear. +-- - Select Plane 2 slot. Go to external view. Once you are in the SU-25T, a red smoke and a message should appear. +-- +-- On the client machine, we select the 2 tanks... Select the MAP view using F10, and: +-- - Select the Tank 1 unit using the arrow. And then press RALT-J which should jump you into Tank 1. Go to external view. Once you are in the Tank, a blue smoke and a message should appear. +-- - Select the Tank 2 unit using the arrow. And then press RALT-J which should jump you into Tank 2. Go to external view. Once you are in the Tank, a green smoke and a message should appear. +-- +-- +-- If all of this is working correctly, then the fix is correctly patched! + + + +-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "Plane x". +Plane1 = CLIENT:FindByName( "Plane 1" ) +Plane2 = CLIENT:FindByName( "Plane 2" ) + +-- Subscribe to the event. The event occurs when a player enters a slot. +Plane1:HandleEvent( EVENTS.PlayerEnterUnit ) +Plane2:HandleEvent( EVENTS.PlayerEnterUnit ) + +-- Because the Plane object is subscribed to the PlayerEnterUnit event, the following method will be automatically +-- called when the event is happening! + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function Plane1:OnEventPlayerEnterUnit( EventData ) + + -- Okay, the Human has entered the unit, now smoke at the x, z position. + EventData.IniUnit:SmokeOrange() + MESSAGE:NewType( "A human has entered Plane 1", MESSAGE.Type.Information ):ToAll() +end + + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function Plane2:OnEventPlayerEnterUnit( EventData ) + + -- Okay, the Human has entered the unit, now smoke at the x, z position. + EventData.IniUnit:SmokeRed() + MESSAGE:NewType( "A human has entered Plane 2", MESSAGE.Type.Information ):ToAll() +end + + + + + +--- Now for the ground units +Tank1 = UNIT:FindByName( "Tank 1" ) +Tank2 = UNIT:FindByName( "Tank 2" ) + +-- Subscribe to the event. The event occurs when a player enters a slot. +Tank1:HandleEvent( EVENTS.PlayerEnterUnit ) +Tank2:HandleEvent( EVENTS.PlayerEnterUnit ) + + +-- Because the Tank object is subscribed to the PlayerEnterUnit event, the following method will be automatically +-- called when the event is happening! + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function Tank1:OnEventPlayerEnterUnit( EventData ) + + -- Okay, the Human has entered the unit, now smoke at the x, z position. + EventData.IniUnit:SmokeBlue() + MESSAGE:NewType( "A human has entered Tank 1", MESSAGE.Type.Information ):ToAll() +end + + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function Tank2:OnEventPlayerEnterUnit( EventData ) + + -- Okay, the Human has entered the unit, now smoke at the x, z position. + EventData.IniUnit:SmokeGreen() + MESSAGE:NewType( "A human has entered Tank 2", MESSAGE.Type.Information ):ToAll() +end + diff --git a/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz b/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz new file mode 100644 index 0000000000..001245564f Binary files /dev/null and b/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz differ diff --git a/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/pack.ps1 b/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/unpack.ps1 b/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua b/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua new file mode 100644 index 0000000000..7afed4b7d0 --- /dev/null +++ b/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua @@ -0,0 +1,28 @@ +--- +-- Name: EVT-200 - GROUP OnEventShot Example +-- Author: FlightControl +-- Date Created: 07 Mar 2017 +-- +-- # Situation: +-- +-- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missile. +-- 2. Observe when the planes shoots the missile, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_SHOT entry. +-- 4. The planes of GROUP "Group Plane A", should only send a message when they shoot a missile. +-- 5. The planes of GROUP "Group Plane B", should NOT send a message when they shoot a missile. + +PlaneGroup = GROUP:FindByName( "Group Plane A" ) + +PlaneGroup:HandleEvent( EVENTS.Shot ) + +function PlaneGroup:OnEventShot( EventData ) + + self:E( "I just fired a missile and I am part of " .. EventData.IniGroupName ) + EventData.IniUnit:MessageToAll( "I just fired a missile and I am part of " .. EventData.IniGroupName, 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz b/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz new file mode 100644 index 0000000000..2f6c6c4103 Binary files /dev/null and b/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz differ diff --git a/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/pack.ps1 b/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/unpack.ps1 b/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua b/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua new file mode 100644 index 0000000000..765419409f --- /dev/null +++ b/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua @@ -0,0 +1,28 @@ +--- +-- Name: EVT-201 - GROUP OnEventHit Example +-- Author: FlightControl +-- Date Created: 08 Mar 2017 +-- +-- # Situation: +-- +-- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missile. +-- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_HIT entry. +-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. +-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. + +TanksGroup = GROUP:FindByName( "Group Tanks A" ) + +TanksGroup:HandleEvent( EVENTS.Hit ) + +function TanksGroup:OnEventHit( EventData ) + + self:E( "I just got hit and I am part of " .. EventData.TgtGroupName ) + EventData.TgtUnit:MessageToAll( "I just got hit and I am part of " .. EventData.TgtGroupName, 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz b/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz new file mode 100644 index 0000000000..943531c369 Binary files /dev/null and b/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz differ diff --git a/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/pack.ps1 b/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/unpack.ps1 b/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua b/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua new file mode 100644 index 0000000000..70aef8e2b6 --- /dev/null +++ b/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua @@ -0,0 +1,34 @@ +--- +-- Name: EVT-204 - GROUP OnEventCrash Example +-- Author: FlightControl +-- Date Created: 29 May 2017 +-- +-- # Situation: +-- +-- A human plane is fyling in the air. Crash it into the ground. +-- Once you are crashed into the ground, at the place where you crashed, a smoke should start burning ... +-- +-- # Test cases: +-- +-- 1. Fly the plane into the ground. +-- 2. When your plane crashes, observe a smoke starting to burn right were you crashed. +-- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file. + + +-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman". +PlaneHumanGroup = GROUP:FindByName( "PlaneGroup" ) + +-- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else). +PlaneHumanGroup:HandleEvent( EVENTS.Crash ) + +-- Because the PlaneHuman object is subscribed to the Crash event, the following method will be automatically +-- called when the Crash event is happening FOR THE PlaneHuman UNIT only! + +--- @param self +-- @param Core.Event#EVENTDATA EventData +function PlaneHumanGroup:OnEventCrash( EventData ) + + -- Okay, the PlaneHuman has crashed, now smoke at the x, z position. + self:E( "Smoking at the position" ) + EventData.IniUnit:SmokeOrange() +end diff --git a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz b/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz new file mode 100644 index 0000000000..a9bb6d8537 Binary files /dev/null and b/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz differ diff --git a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/pack.ps1 b/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/unpack.ps1 b/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua b/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua new file mode 100644 index 0000000000..0552161ee1 --- /dev/null +++ b/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua @@ -0,0 +1,28 @@ +--- +-- Name: EVT-205 - GROUP OnEventDead Example +-- Author: FlightControl +-- Date Created: 29 May 2017 +-- +-- # Situation: +-- +-- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. +-- +-- # Test cases: +-- +-- 1. Observe the planes shooting the missile. +-- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. +-- 3. Check the contents of the fields of the S_EVENT_HIT entry. +-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. +-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. + +TanksGroup = GROUP:FindByName( "Group Tanks A" ) + +TanksGroup:HandleEvent( EVENTS.Dead ) + +function TanksGroup:OnEventDead( EventData ) + + self:E( "I just got dead and I am part of " .. EventData.IniGroupName ) + EventData.IniUnit:MessageToAll( "I just got dead and I am part of " .. EventData.IniGroupName, 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz b/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz new file mode 100644 index 0000000000..77069ca1ea Binary files /dev/null and b/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz differ diff --git a/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/pack.ps1 b/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/unpack.ps1 b/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua b/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua new file mode 100644 index 0000000000..9847ce5008 --- /dev/null +++ b/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua @@ -0,0 +1,34 @@ +--- +-- Name: EVT-401 - Generic OnEventHit Example +-- Author: FlightControl +-- Date Created: 15 February 2017 +-- +-- # Situation: +-- +-- Ground targets are shooting each other. +-- +-- # Test cases: +-- +-- 1. Observe the ground forces shooting each other. +-- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging. +-- 3. The generic EventHandler objects should receive the hit events. + +CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" ) + +EventHandler1 = EVENTHANDLER:New() +EventHandler2 = EVENTHANDLER:New() + +EventHandler1:HandleEvent( EVENTS.Hit ) +EventHandler2:HandleEvent( EVENTS.Hit ) + +function EventHandler1:OnEventHit( EventData ) + self:E("hello 1") + CC:GetPositionable():MessageToAll( "I just got hit!", 15 , "Alert!" ) +end + +function EventHandler2:OnEventHit( EventData ) + self:E("hello 2") + CC:GetPositionable():MessageToAll( "I just got hit!", 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz b/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz new file mode 100644 index 0000000000..b4556d194b Binary files /dev/null and b/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz differ diff --git a/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/pack.ps1 b/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/unpack.ps1 b/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua b/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua new file mode 100644 index 0000000000..f4e6d2519d --- /dev/null +++ b/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua @@ -0,0 +1,26 @@ +--- +-- Name: EVT-402 - Generic OnEventMissionEnd Example +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- # Situation: +-- +-- Test mission end event handler. +-- +-- # Test cases: +-- +-- 1. Observe when the mission ends, a dcs.log entry is written in the logging. +-- 2. The generic EventHandler objects should be called, and a log entry in dcs.log should be written. + +CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" ) + +EventHandler = EVENTHANDLER:New() + +EventHandler:HandleEvent( EVENTS.MissionEnd ) + +function EventHandler:OnEventMissionEnd( EventData ) + self:E("Mission End") +end + + + diff --git a/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz b/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz new file mode 100644 index 0000000000..0b1e8d83a5 Binary files /dev/null and b/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz differ diff --git a/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/pack.ps1 b/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/unpack.ps1 b/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua b/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua new file mode 100644 index 0000000000..2d81929e26 --- /dev/null +++ b/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua @@ -0,0 +1,63 @@ +--- +-- Name: EVT-103 - OnEventLand Example +-- Author: CraigOwen +-- Date Created: 12 February 2017 +-- +-- # Situation: +-- +-- A client plane is landing on an airfield, trying to pick a rope in the landing zones. +-- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. +-- +-- # Test cases: +-- +-- 1. Land the plane. +-- 2. When the plane landed, observe your message and the signal. +-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. + +-- Create a unit which signalizes if the client landed good. +signal = UNIT:FindByName("LandingZoneChallenge - Signal") + +-- Create the zones used for the landing check +-- Init Zone +InitZone = ZONE:New("LandingChallange - InitZone") + +-- Ropes +zonegroup1 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 1" ) +zonegroup2 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 2" ) +zonegroup3 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 3" ) +LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) +LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) +LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) + +-- Create a variable Plane that holds a reference to CLIENT object (created by moose at the beginning of the mission) with the name "Plane". +Plane = CLIENT:FindByName( "Plane" ) +-- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. +Plane:HandleEvent( EVENTS.Land ) + +-- This function will be called whenever the Plane-Object (client) lands! +function Plane:OnEventLand( EventData ) + + -- check wether the client landet at the right airport, where the challenge is located + if not Plane:IsInZone(InitZone) then + return + end + + -- check if the touchdown took place inside of one of the zones + if Plane:IsInZone(LandZoneRope1) then + MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareGreen() + elseif Plane:IsInZone(LandZoneRope2) then + MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareYellow() + elseif Plane:IsInZone(LandZoneRope3) then + MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( Plane ) + signal:FlareRed() + else + MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( Plane ) + end + + +end + + +MESSAGE:New("Try to land on the runway in between the red trucks.", 15, "Landing challenge"):ToClient(Plane) \ No newline at end of file diff --git a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz b/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz new file mode 100644 index 0000000000..0fcd4937d3 Binary files /dev/null and b/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz differ diff --git a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/pack.ps1 b/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/unpack.ps1 b/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua b/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua new file mode 100644 index 0000000000..469122ac97 --- /dev/null +++ b/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua @@ -0,0 +1,151 @@ +--- +-- Name: EVT-103 - OnEventLand LandingChallengeComplex +-- Author: CraigOwen +-- Date Created: 12 February 2017 +-- +-- # Situation: +-- +-- Approaching the airfield the client gets a message and can try to land inside the landing zones. +-- Here we want all clients to participate in the challenge, not only one. +-- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. +-- +-- # Test cases: +-- +-- 1. Land one of the planes. +-- 2. While landing the plane, observe your message and the signal (flare). +-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. + +-- In this advanced challenge we want to make sure all the following. +-- 1. The challenge takes place at a certain airfield. +-- 2. All clients can repeat the challange at any time, try after try. +-- 3. All clients approaching the airport get a message indicating the challenge. +-- 4. There is no useraction needet to participate in this, providing full focus on the task. + +-- So lets go then... in five steps +-- 1. Create a unit to signalize (flare) whenever a client landed correctly +-- 2. Create Zones +-- 3. Create a set of clients +-- 4. Handle the EVENT.Land for all clients in the set using the signal unit +-- 5. Create a scheduler checking for clients in zones + +-- 1. Create a unit which signalizes if the client landed good. +signal = UNIT:FindByName("LandingZoneChallenge - Signal") + +-- 2. Create Zones +-- Init Zone - This is the global Zone for the LandingChallenge +InitZone = ZONE:New("LandingChallange - InitZone") + +--Ingress Zone - This Zone tries to asure the client approaches the runway from the right side +IngressZoneTemplate = GROUP:FindByName( "LandingZoneChallenge - IngressZone" ) +IngressZone = ZONE_POLYGON:New( "IngressZone", IngressZoneTemplate ) + +-- Ropes - theese zones will simulate the ropes on a carrier. +zonegroup1 = GROUP:FindByName("LandingZoneChallenge - Rope 1" ) +zonegroup2 = GROUP:FindByName("LandingZoneChallenge - Rope 2" ) +zonegroup3 = GROUP:FindByName("LandingZoneChallenge - Rope 3" ) +LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) +LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) +LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) + + +-- 3. Create a set of clients +-- In this example we do not want to handle the event for one specific client, but rather for all red plane clients. +-- To achieve this, we start with filtering the clients and saving those into the "BlueClients" variable +RedClients = SET_CLIENT:New():FilterCoalitions("red"):FilterStart() + + +-- 4. We want to let every client subscribe to the event EVENT.Land. This event occurs when a plane lands. Be aware that this could be any airfield at this point. +-- To do so, we run the ForEachClient method on our set of clients and call a function taking the client as parameter +RedClients:ForEachClient( + --- This function will be called for every single client in the set + -- @param MooseClient#CLIENT ClientInSet + function( ClientInSet ) + + -- Inside here we want to do two things. + -- 1. Write down the local function doing all the magic. + -- 2. Call this function for each ClientInSet + + -- 1. The magic + local function ResetClientForZone( MooseClient ) + --At first we set this client to a state, in wich she/he is not participating in this event + MooseClient:SetState( MooseClient, "ZoneStep", "0" ) + + --Now we subscribe to the event just like we did in the first example. + MooseClient:HandleEvent(EVENTS.Land) + + + --- Finally we set up the so called handler FOR the event. This is a function wich will determine what happens, whenever a client lands. + -- Note here, that the function has the MooseClient in front. So this function will literaly get a part of the client itself. + -- Therefore we can refere to "self" inside the function whenever meaning the MooseClient + -- The param EventData is a parameter given to all event handlers and providing several data about this particular event. + -- @param Core.Event#EVENTDATA EventData + function MooseClient:OnEventLand( EventData ) + + -- Ok now the client "MooseClient" definetly has landed. And beeing here means being the client. MooseClient <-> self + -- So now i want to know 2 things, to verify that i have done everything right. + -- 1. I want to know if my(self) landed in the challengeZone, so landing in other places will not react to this challenge + -- 2. Furthermore i want to know if my(self) came from the right side. + -- In all other cases nothing shell happen, so we reset the client state here and return doin nothing else. + if not self:IsInZone(InitZone) or self:GetState( self, "ZoneStep" ) ~= "2" then + self:SetState( self, "ZoneStep", "0" ) + return + end + + -- Here we check wich rope was picked and set the signal and message according to it. + if self:IsInZone(LandZoneRope1) then + MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( self ) + signal:FlareGreen() + elseif self:IsInZone(LandZoneRope2) then + MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( self ) + signal:FlareYellow() + elseif self:IsInZone(LandZoneRope3) then + MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( self ) + signal:FlareRed() + else + MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( self ) + end + + -- Finally we set the client back to step 1, allowing a new message for landing + self:SetState( self, "ZoneStep", "1" ) + + end + end + + -- 2. As we're now all set, we can finally call our function for every ClientInSet + ClientInSet:Alive( ResetClientForZone ) + + end + ) + +-- 5. Finally we use a scheduler checking wether clients are inside or outside these zones. +LandingChallangeActionsScheduler, LandingChallangeActionsSchedulerID = SCHEDULER:New( nil, + function () + + -- Flying by the airport there will be a message showing that the landing challange is currently in place. + -- This will make the ClientState shift from 0 -> 1 + RedClients:ForEachClientInZone( InitZone, + function( MooseClient ) + BASE:E( { Client = MooseClient, State = MooseClient:GetState( MooseClient, "ZoneStep" ) } ) + if MooseClient:IsAlive() and MooseClient:GetState( MooseClient, "ZoneStep" ) == "0" then + MooseClient:SetState( MooseClient, "ZoneStep", "1" ) + MESSAGE:New("Welcome to the Landing challenge. If you want to participate, get yourself a landing clearance by ATC and navigate to the landing corridor.", 20, "Landing challenge" ):ToClient( MooseClient ) + end + end + ) + + -- The client is approaching the runway from the correct side? + -- If yes, then shift state from 1 to 2 + RedClients:ForEachClientInZone( IngressZone, + function( MooseClient ) + BASE:E( { Client = MooseClient, State = MooseClient:GetState( MooseClient, "ZoneStep" ) } ) + if MooseClient:IsAlive() and MooseClient:GetState( MooseClient, "ZoneStep" ) == "1" then + MooseClient:SetState( MooseClient, "ZoneStep", "2" ) + MESSAGE:New("Ok, now its your turn. Land your airframe and try to get one of the ropes. Good luck!", 15, "Landing challenge" ):ToClient( MooseClient ) + end + end + ) + + end, {}, 5, 5 + ) + +MESSAGE:New("Try to land on the runway in between the red trucks located at the right side.", 15, "Landing challenge"):ToAll() \ No newline at end of file diff --git a/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz b/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz new file mode 100644 index 0000000000..694a467cd9 Binary files /dev/null and b/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz differ diff --git a/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/pack.ps1 b/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/unpack.ps1 b/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/unpack.ps1 @@ -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" * diff --git a/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua b/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua new file mode 100644 index 0000000000..e05d830818 --- /dev/null +++ b/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua @@ -0,0 +1,29 @@ +--- +-- Name: EVT-600 - OnEventHit Example with a Set of Units +-- Author: FlightControl +-- Date Created: 6 Mar 2017 +-- +-- # Situation: +-- +-- A plane is flying in the air and shoots an missile to a ground target. +-- It will shoot a couple of tanks units that are part of a Set. +-- +-- # Test cases: +-- +-- 1. Observe the plane shooting the missile. +-- 2. Observe when the plane hits a tank, a dcs.log entry is written in the logging. +-- 4. Observe the tanks hitting the targets and the messages appear. +-- 3. Check the contents of the fields of the S_EVENT_HIT entries. + +Plane = UNIT:FindByName( "Plane" ) + +UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart() + +UnitSet:HandleEvent( EVENTS.Hit ) + +function UnitSet:OnEventHit( EventData ) + + Plane:MessageToAll( "I just hit a tank! " .. EventData.IniUnit:GetName(), 15, "Alert!" ) +end + + diff --git a/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz b/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz new file mode 100644 index 0000000000..16bbf9d24c Binary files /dev/null and b/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz differ diff --git a/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/pack.ps1 b/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/unpack.ps1 b/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/unpack.ps1 @@ -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" * diff --git a/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua b/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua new file mode 100644 index 0000000000..7bb1852a55 --- /dev/null +++ b/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua @@ -0,0 +1,8 @@ + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Line Formation", "Briefing" ):TestSmokeDirectionVector(true) +LargeFormation:FormationLeftLine( 500, 0, 250, 0 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz b/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz new file mode 100644 index 0000000000..b7bc8367f8 Binary files /dev/null and b/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz differ diff --git a/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/pack.ps1 b/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/unpack.ps1 b/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/unpack.ps1 @@ -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" * diff --git a/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua b/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua new file mode 100644 index 0000000000..b6c474add3 --- /dev/null +++ b/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua @@ -0,0 +1,8 @@ + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Line Formation", "Briefing" ) +LargeFormation:FormationLeftLine( 0, 0, 250, 250 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz b/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz new file mode 100644 index 0000000000..2c155d22fa Binary files /dev/null and b/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz differ diff --git a/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/pack.ps1 b/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/unpack.ps1 b/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/unpack.ps1 @@ -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" * diff --git a/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua b/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua new file mode 100644 index 0000000000..1ae1013f78 --- /dev/null +++ b/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua @@ -0,0 +1,8 @@ + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Right Line Formation", "Briefing" ) +LargeFormation:FormationRightLine(500,0,250,250) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz b/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz new file mode 100644 index 0000000000..640596a0a4 Binary files /dev/null and b/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz differ diff --git a/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/pack.ps1 b/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/unpack.ps1 b/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/unpack.ps1 @@ -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" * diff --git a/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua b/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua new file mode 100644 index 0000000000..d5971c2c81 --- /dev/null +++ b/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua @@ -0,0 +1,8 @@ + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Wing Formation", "Briefing" ) +LargeFormation:FormationLeftWing( 500, 50, 0, 250, 250 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz b/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz new file mode 100644 index 0000000000..8d8e01e630 Binary files /dev/null and b/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz differ diff --git a/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/pack.ps1 b/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/unpack.ps1 b/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/unpack.ps1 @@ -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" * diff --git a/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua b/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua new file mode 100644 index 0000000000..65f7663d9f --- /dev/null +++ b/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua @@ -0,0 +1,8 @@ + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Right Wing Formation", "Briefing" ) +LargeFormation:FormationRightWing( 100, 50, 0, 500, 500 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz b/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz new file mode 100644 index 0000000000..f24f0317a9 Binary files /dev/null and b/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz differ diff --git a/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/pack.ps1 b/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/unpack.ps1 b/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/unpack.ps1 @@ -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" * diff --git a/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua b/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua new file mode 100644 index 0000000000..1524ec17e8 --- /dev/null +++ b/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua @@ -0,0 +1,8 @@ + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" ) +LargeFormation:FormationCenterWing( 500, 50, 0, 250, 250 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz b/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz new file mode 100644 index 0000000000..b66fcc8c25 Binary files /dev/null and b/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz differ diff --git a/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/pack.ps1 b/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/unpack.ps1 b/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/unpack.ps1 @@ -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" * diff --git a/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua b/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua new file mode 100644 index 0000000000..c17743225d --- /dev/null +++ b/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua @@ -0,0 +1,8 @@ + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Trail Formation", "Briefing" ) +LargeFormation:FormationTrail( 250, 750 , 0 ) +LargeFormation:__Start( 1 ) + diff --git a/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz b/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz new file mode 100644 index 0000000000..b2be71e419 Binary files /dev/null and b/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz differ diff --git a/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/pack.ps1 b/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/unpack.ps1 b/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/unpack.ps1 @@ -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" * diff --git a/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua b/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua new file mode 100644 index 0000000000..83f3cfbd95 --- /dev/null +++ b/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua @@ -0,0 +1,10 @@ + +local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() +FollowGroupSet:Flush() +local LeaderUnit = UNIT:FindByName( "Leader" ) +local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Trail Formation", "Briefing" ) +LargeFormation:FormationBox(150,120,0,-5,0,60,8) +LargeFormation:__Start( 1 ) + +collectgarbage() + diff --git a/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz b/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz new file mode 100644 index 0000000000..826a5e9936 Binary files /dev/null and b/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz differ diff --git a/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/pack.ps1 b/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/unpack.ps1 b/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/unpack.ps1 @@ -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" * diff --git a/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua b/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua new file mode 100644 index 0000000000..1ad43849b4 --- /dev/null +++ b/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua @@ -0,0 +1,122 @@ +--- Transition Explanation +-- +-- === +-- +-- Name: Transition Explanation +-- Author: FlightControl +-- Date Created: 05 Jan 2017 +-- +-- # Situation: +-- +-- Create a simple FSM. +-- Add 2 transitions that will switch state from "Green" to "Red" upon event "Switch". +-- +-- # Test cases: +-- +-- # Status: TESTED 05 Jan 2017 + +local FsmDemo = FSM:New() -- #FsmDemo +local FsmUnit = UNIT:FindByName( "FlareUnit" ) + +FsmDemo:SetStartState( "Green" ) + +do FsmDemo:AddTransition( "Green", "Switch", "Red" ) -- FSM Transition for type #FsmDemo. + + --- OnLeave State Transition for Green. + -- @function [parent=#FsmDemo] OnLeaveGreen + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @return #boolean Return false to cancel Transition. + + --- OnEnter State Transition for Red. + -- @function [parent=#FsmDemo] OnEnterRed + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + + --- OnBefore State Transition for Switch. + -- @function [parent=#FsmDemo] OnBeforeSwitch + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @return #boolean Return false to cancel Transition. + + --- OnAfter State Transition for Switch. + -- @function [parent=#FsmDemo] OnAfterSwitch + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + + --- Embedded Event Trigger for Switch. + -- @function [parent=#FsmDemo] Switch + -- @param #FsmDemo self + + --- Delayed Event Trigger for Switch + -- @function [parent=#FsmDemo] __Switch + -- @param #FsmDemo self + -- @param #number Delay The delay in seconds. + +end -- FsmDemo + +do FsmDemo:AddTransition( "Red", "Switch", "Green" ) -- FSM Transition for type #FsmDemo. + + --- OnLeave State Transition for Red. + -- @function [parent=#FsmDemo] OnLeaveRed + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @return #boolean Return false to cancel Transition. + + --- OnEnter State Transition for Green. + -- @function [parent=#FsmDemo] OnEnterGreen + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + + --- OnBefore State Transition for Switch. + -- @function [parent=#FsmDemo] OnBeforeSwitch + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + -- @return #boolean Return false to cancel Transition. + + --- OnAfter State Transition for Switch. + -- @function [parent=#FsmDemo] OnAfterSwitch + -- @param #FsmDemo self + -- @param #string From The From State string. + -- @param #string Event The Event string. + -- @param #string To The To State string. + + --- Embedded Event Trigger for Switch. + -- @function [parent=#FsmDemo] Switch + -- @param #FsmDemo self + + --- Delayed Event Trigger for Switch + -- @function [parent=#FsmDemo] __Switch + -- @param #FsmDemo self + -- @param #number Delay The delay in seconds. + +end -- FsmDemo + +function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit ) + self:E( { From, Event, To, FsmUnit } ) + if From == "Green" then + FsmUnit:Flare(FLARECOLOR.Green) + else + if From == "Red" then + FsmUnit:Flare(FLARECOLOR.Red) + end + end + FsmDemo:__Switch( 5, FsmUnit ) +end + +FsmDemo:__Switch( 5, FsmUnit ) + diff --git a/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz b/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz new file mode 100644 index 0000000000..7d4dbc3946 Binary files /dev/null and b/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz differ diff --git a/FSM - Finite State Machine/FSM-100 - Transition Explanation/pack.ps1 b/FSM - Finite State Machine/FSM-100 - Transition Explanation/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/FSM - Finite State Machine/FSM-100 - Transition Explanation/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/FSM - Finite State Machine/FSM-100 - Transition Explanation/unpack.ps1 b/FSM - Finite State Machine/FSM-100 - Transition Explanation/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/FSM - Finite State Machine/FSM-100 - Transition Explanation/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua b/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua new file mode 100644 index 0000000000..7f33d42f2d --- /dev/null +++ b/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua @@ -0,0 +1,32 @@ +--- +-- Name: GRP-100 - IsAlive +-- Author: FlightControl +-- Date Created: 23 Feb 2017 +-- +-- # Situation: +-- +-- This test is about checking if IsAlive on GROUP level is working correctly. +-- Two ground forces GROUPS are shooting each other. +-- Check the IsAlive status in the logging of the survivor and the defeat. +-- +-- # Test cases: +-- +-- 1. Observe the IsAlive statuses in the dcs.log file. + + + +--Create Spawn Groups +local GroupBlue = GROUP:FindByName( "Blue" ) +local GroupRed = GROUP:FindByName( "Red" ) + +local Schedule, ScheduleID = SCHEDULER:New( nil, + --- Variable Declarations + -- @param Wrapper.Group#GROUP GroupBlue + -- @param Wrapper.Group#GROUP GroupRed + function( GroupBlue, GroupRed ) + local IsAliveBlue = GroupBlue:IsAlive() + local IsAliveRed = GroupRed:IsAlive() + BASE:E( { IsAliveBlue = IsAliveBlue, IsAliveRed = IsAliveRed } ) + end, { GroupBlue, GroupRed }, 1, 1 +) + diff --git a/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz b/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz new file mode 100644 index 0000000000..e6c2908eba Binary files /dev/null and b/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz differ diff --git a/GRP - Group Commands/GRP-100 - IsAlive/pack.ps1 b/GRP - Group Commands/GRP-100 - IsAlive/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-100 - IsAlive/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-100 - IsAlive/unpack.ps1 b/GRP - Group Commands/GRP-100 - IsAlive/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-100 - IsAlive/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua b/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua new file mode 100644 index 0000000000..1a96f44e74 --- /dev/null +++ b/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua @@ -0,0 +1,30 @@ +--- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. + +local HeliGroup = GROUP:FindByName( "Helicopter" ) + +local AttackGroup = GROUP:FindByName( "AttackGroup" ) + +local AttackUnits = AttackGroup:GetUnits() + +local Tasks = {} + +for i = 1, #AttackUnits do + + local AttackUnit = AttackGroup:GetUnit( i ) + Tasks[#Tasks+1] = HeliGroup:TaskAttackUnit( AttackUnit ) +end + +Tasks[#Tasks+1] = HeliGroup:TaskFunction( "_Resume", { "''" } ) + +--- @param Wrapper.Group#GROUP HeliGroup +function _Resume( HeliGroup ) + env.info( '_Resume' ) + + HeliGroup:MessageToAll( "Resuming",10,"Info") +end + +HeliGroup:PushTask( + HeliGroup:TaskCombo( + Tasks + ), 30 +) \ No newline at end of file diff --git a/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz b/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz new file mode 100644 index 0000000000..14d0681f8e Binary files /dev/null and b/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz differ diff --git a/GRP - Group Commands/GRP-100 - TaskAttackUnit/pack.ps1 b/GRP - Group Commands/GRP-100 - TaskAttackUnit/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-100 - TaskAttackUnit/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-100 - TaskAttackUnit/unpack.ps1 b/GRP - Group Commands/GRP-100 - TaskAttackUnit/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-100 - TaskAttackUnit/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua b/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua new file mode 100644 index 0000000000..176f507c99 --- /dev/null +++ b/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua @@ -0,0 +1,24 @@ + +--Create Spawn Groups +local SpawnPlane1 = SPAWN:New("Plane 1") +local SpawnPlane2 = SPAWN:New("Plane 2") + +--Spawn Groups into world +local GroupPlane1 = SpawnPlane1:Spawn() +--local GroupPlane1 = GROUP:FindByName( "Plane 1" ) +local GroupPlane2 = SpawnPlane2:Spawn() +--local GroupPlane2 = GROUP:FindByName( "Plane 2" ) + +--Create Task for plane2 (follow groupPlane1 at Vec3 offset) (Note: I think I need to be using controllers here) +--i.e. cntrlPlane1 = groupPlane1.getController(groupPlane1) + +local PointVec3 = POINT_VEC3:New( 100, 0, -100 ) -- This is a Vec3 class. + +local FollowDCSTask = GroupPlane2:TaskFollow( GroupPlane1, PointVec3:GetVec3() ) + +--Activate Task (Either PushTask/SetTask?) +-- PushTask will push a task on the execution queue of the group. +-- SetTask will delete all tasks from the current group queue, and executes this task. + +GroupPlane2:SetTask( FollowDCSTask, 1 ) + diff --git a/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz b/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz new file mode 100644 index 0000000000..8287fbff2e Binary files /dev/null and b/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz differ diff --git a/GRP - Group Commands/GRP-200 - Follow Group/pack.ps1 b/GRP - Group Commands/GRP-200 - Follow Group/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-200 - Follow Group/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-200 - Follow Group/unpack.ps1 b/GRP - Group Commands/GRP-200 - Follow Group/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-200 - Follow Group/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua b/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua new file mode 100644 index 0000000000..03258b2cfb --- /dev/null +++ b/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua @@ -0,0 +1,12 @@ +--- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. + +HeliGroup = GROUP:FindByName( "Helicopter" ) + +--- Route the helicopter back to the FARP after 60 seconds. +-- We use the SCHEDULER class to do this. +SCHEDULER:New( nil, + function( HeliGroup ) + local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 ) + HeliGroup:SetCommand( CommandRTB ) + end, { HeliGroup }, 90 +) diff --git a/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz b/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz new file mode 100644 index 0000000000..3735ec3ebc Binary files /dev/null and b/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz differ diff --git a/GRP - Group Commands/GRP-300 - Switch WayPoints/pack.ps1 b/GRP - Group Commands/GRP-300 - Switch WayPoints/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-300 - Switch WayPoints/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-300 - Switch WayPoints/unpack.ps1 b/GRP - Group Commands/GRP-300 - Switch WayPoints/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-300 - Switch WayPoints/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua b/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua new file mode 100644 index 0000000000..1f7710d18c --- /dev/null +++ b/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua @@ -0,0 +1,39 @@ +--- +-- Name: GRP-310 - Command StopRoute +-- Author: FlightControl +-- Date Created: 25 Mar 2017 +-- +-- # Situation: +-- A ground unit is moving. +-- Using the command CommandStopMove it will stop moving after 10 seconds. +-- +-- # Test cases: +-- +-- 1. Observe the ground group stopping to move. +-- + +--- @param Wrapper.Group#GROUP GroundGroup +function StopMove( GroundGroup ) + + BASE:E("Stop") + local Command = GroundGroup:CommandStopRoute( true ) + GroundGroup:SetCommand(Command) + +end + +--- @param Wrapper.Group#GROUP GroundGroup +function StartMove( GroundGroup ) + + BASE:E("Start") + local Command = GroundGroup:CommandStopRoute( false ) + GroundGroup:SetCommand(Command) + +end + +GroundGroup = GROUP:FindByName( "Ground" ) + +Scheduler = SCHEDULER:New( nil ) +ScheduleIDStop = Scheduler:Schedule(nil, StopMove, { GroundGroup }, 10, 20 ) +ScheduleIDStart = Scheduler:Schedule(nil, StartMove, { GroundGroup }, 20, 20 ) + + diff --git a/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz b/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz new file mode 100644 index 0000000000..5a45a6f645 Binary files /dev/null and b/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz differ diff --git a/GRP - Group Commands/GRP-310 - Command StopRoute/pack.ps1 b/GRP - Group Commands/GRP-310 - Command StopRoute/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-310 - Command StopRoute/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-310 - Command StopRoute/unpack.ps1 b/GRP - Group Commands/GRP-310 - Command StopRoute/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-310 - Command StopRoute/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua b/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua new file mode 100644 index 0000000000..47ff792f44 --- /dev/null +++ b/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua @@ -0,0 +1,45 @@ +--- +-- Name: GRP-400 - RouteReturnToAirbase +-- Author: FlightControl +-- Date Created: 25 Mar 2017 +-- +-- # Situation: +-- Three air units are flying and are commanded to return a specific airbase. +-- +-- # Test cases: +-- +-- 1. Observe the Air1 group return to Batumi after 10 seconds. +-- 2. Observe the Air2 group returning to Kobuleti after 300 seconds. (It was planned to land at Kutaisi). +-- 3. Observe the Air3 group returning to the home (landing) airbase after 300 seconds. (It was planned to land at Kutaisi). +-- + +--- @param Wrapper.Group#GROUP AirGroup +function ReturnToBatumi( AirGroup ) + BASE:E("ReturnToBatumi") + AirGroup:RouteRTB( AIRBASE:FindByName("Batumi") ) +end + +--- @param Wrapper.Group#GROUP AirGroup +function ReturnToKobuleti( AirGroup ) + BASE:E("ReturnToKobuleti") + AirGroup:RouteRTB( AIRBASE:FindByName("Kobuleti") ) +end + +--- @param Wrapper.Group#GROUP AirGroup +function ReturnToHome( AirGroup ) + BASE:E("ReturnToHome") + AirGroup:RouteRTB() +end + +Air1Group = GROUP:FindByName( "Air1" ) +Air2Group = GROUP:FindByName( "Air2" ) +Air3Group = GROUP:FindByName( "Air3" ) + +Scheduler = SCHEDULER:New( nil ) +ScheduleIDAir1 = Scheduler:Schedule(nil, ReturnToBatumi, { Air1Group }, 10 ) +ScheduleIDAir2 = Scheduler:Schedule(nil, ReturnToKobuleti, { Air2Group }, 300 ) +ScheduleIDAir3 = Scheduler:Schedule(nil, ReturnToHome, { Air3Group }, 300 ) + + + + diff --git a/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz b/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz new file mode 100644 index 0000000000..7510225417 Binary files /dev/null and b/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz differ diff --git a/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/pack.ps1 b/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/unpack.ps1 b/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua b/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua new file mode 100644 index 0000000000..b8948304bb --- /dev/null +++ b/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua @@ -0,0 +1,21 @@ +-- This routes a GroundGroup 1km further with an angle of 180 degrees. + +local GroundGroup = GROUP:FindByName( "Vehicle" ) + +-- Get the current coordinate of GroundGroup +FromCoord = GroundGroup:GetCoordinate() + +-- From the current coordinate, calculate 1km away with an angle of 180 degrees. +ToCoord = FromCoord:Translate( 1000, 180 ) + +RoutePoints = {} + +-- Create a "grount route point", which is a "point" structure that can be given as a parameter to a Task +RoutePoints[#RoutePoints+1] = FromCoord:RoutePointGround( 0 ) +RoutePoints[#RoutePoints+1] = ToCoord:RoutePointGround( 60, "Cone" ) + +-- Create a combo task, that creates a route task to the RoutePoint +RouteTask = GroundGroup:TaskRoute( RoutePoints ) + +-- Set the task to be executed by the GroundGroup +GroundGroup:SetTask( RouteTask, 1 ) \ No newline at end of file diff --git a/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz b/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz new file mode 100644 index 0000000000..b5ac89dd81 Binary files /dev/null and b/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz differ diff --git a/GRP - Group Commands/GRP-500 - Ground TaskRoute/pack.ps1 b/GRP - Group Commands/GRP-500 - Ground TaskRoute/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-500 - Ground TaskRoute/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-500 - Ground TaskRoute/unpack.ps1 b/GRP - Group Commands/GRP-500 - Ground TaskRoute/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-500 - Ground TaskRoute/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua b/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua new file mode 100644 index 0000000000..3c27fa34c7 --- /dev/null +++ b/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua @@ -0,0 +1,16 @@ +-- This routes a GroundGroup 1km further with an angle of 180 degrees. + +local GroundGroup = GROUP:FindByName( "Vehicle" ) + +-- Get the current coordinate of GroundGroup +FromCoord = GroundGroup:GetCoordinate() + +-- From the current coordinate, calculate 1km away with an angle of 180 degrees. +ToCoord = FromCoord:Translate( 1000, 180 ) + + +-- Create a combo task, that creates a route task to the RoutePoint +RouteTask = GroundGroup:TaskRouteToVec2( ToCoord:GetVec2() ) + +-- Set the task to be executed by the GroundGroup +GroundGroup:SetTask( RouteTask, 1 ) \ No newline at end of file diff --git a/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz b/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz new file mode 100644 index 0000000000..bf9fd0c1d7 Binary files /dev/null and b/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz differ diff --git a/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/pack.ps1 b/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/unpack.ps1 b/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua b/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua new file mode 100644 index 0000000000..2718cafa9f --- /dev/null +++ b/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua @@ -0,0 +1,46 @@ +--- This makes a vehicle fly to random zones when a waypoint has been reached. +-- Name: GRP - Group Commands/GRP-502 - Route at waypoint to random point +-- Author: FlightControl +-- Date Created: 08 Aug 2017 + + +local ZoneList = { + ZONE:New( "ZONE1" ), + ZONE:New( "ZONE2" ), + ZONE:New( "ZONE3" ), + ZONE:New( "ZONE4" ), + ZONE:New( "ZONE5" ) +} + +GroundGroup = GROUP:FindByName( "Vehicle" ) + +--- @param Wrapper.Group#GROUP GroundGroup +function RouteToZone( Vehicle, ZoneRoute ) + + local Route = {} + + Vehicle:E( { ZoneRoute = ZoneRoute } ) + + Vehicle:MessageToAll( "Moving to zone " .. ZoneRoute:GetName(), 10 ) + + -- Get the current coordinate of the Vehicle + local FromCoord = Vehicle:GetCoordinate() + + -- Select a random Zone and get the Coordinate of the new Zone. + local RandomZone = ZoneList[ math.random( 1, #ZoneList ) ] -- Core.Zone#ZONE + local ToCoord = RandomZone:GetCoordinate() + + -- Create a "ground route point", which is a "point" structure that can be given as a parameter to a Task + Route[#Route+1] = FromCoord:RoutePointGround( 72 ) + Route[#Route+1] = ToCoord:RoutePointGround( 60, "Vee" ) + + local TaskRouteToZone = Vehicle:TaskFunction( "RouteToZone", RandomZone ) + + Vehicle:SetTaskAtWaypoint( Route, #Route, TaskRouteToZone ) -- Set for the given Route at Waypoint 2 the TaskRouteToZone. + + Vehicle:Route( Route, math.random( 10, 20 ) ) -- Move after a random seconds to the Route. See the Route method for details. + +end + +RouteToZone( GroundGroup, ZoneList[1] ) + diff --git a/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz b/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz new file mode 100644 index 0000000000..fb653ed62a Binary files /dev/null and b/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz differ diff --git a/GRP - Group Commands/GRP-502 - Route at waypoint to random point/pack.ps1 b/GRP - Group Commands/GRP-502 - Route at waypoint to random point/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-502 - Route at waypoint to random point/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-502 - Route at waypoint to random point/unpack.ps1 b/GRP - Group Commands/GRP-502 - Route at waypoint to random point/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-502 - Route at waypoint to random point/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua b/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua new file mode 100644 index 0000000000..021dc73518 --- /dev/null +++ b/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua @@ -0,0 +1,45 @@ +--- This makes a vehicle drive to random zones when a waypoint has been reached. +-- Name: GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point +-- Author: FlightControl +-- Date Created: 08 Aug 2017 + + +local ZoneList = { + ZONE:New( "ZONE1" ), + ZONE:New( "ZONE2" ), + ZONE:New( "ZONE3" ), + ZONE:New( "ZONE4" ), + ZONE:New( "ZONE5" ), +} + +VehicleGroup = GROUP:FindByName( "Vehicle #001" ) + +--- @param Wrapper.Group#GROUP RoutedGroup +function ReRoute( VehicleGroup ) + + VehicleGroup:E( "Routing" ) + + local ZoneNumber = math.random( 1, #ZoneList ) + VehicleGroup:E( ZoneNumber ) + + local FromCoord = VehicleGroup:GetCoordinate() -- Core.Point#COORDINATE + local FromWP = FromCoord:WaypointGround() + + local ZoneTo = ZoneList[ ZoneNumber ] -- Core.Zone#ZONE + local ToCoord = ZoneTo:GetCoordinate() + local ToWP = ToCoord:WaypointGround( 72, "Vee" ) + + local TaskReRoute = VehicleGroup:TaskFunction( "ReRoute" ) + VehicleGroup:SetTaskWaypoint( ToWP, TaskReRoute ) + + VehicleGroup:Route( { FromWP, ToWP }, 1 ) + +end + +ReRoute( VehicleGroup ) + + + + + + diff --git a/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz b/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz new file mode 100644 index 0000000000..fe6b8514f7 Binary files /dev/null and b/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz differ diff --git a/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/pack.ps1 b/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/unpack.ps1 b/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua b/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua new file mode 100644 index 0000000000..909d0f11c8 --- /dev/null +++ b/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua @@ -0,0 +1,17 @@ +--- This makes a vehicle drive its route in a repetitive way. +-- Name: GRP-550 - Patrol a route +-- Author: FlightControl +-- Date Created: 24 Sep 2017 + + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Patrol the route of the Vehicle. +Vehicle:PatrolRoute() + +-- Find the Ship and create a GROUP object. +Ship = GROUP:FindByName( "Ship" ) + +-- Patrol the route of the Ship. +Ship:PatrolRoute() diff --git a/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz b/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz new file mode 100644 index 0000000000..2d6323263b Binary files /dev/null and b/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz differ diff --git a/GRP - Group Commands/GRP-550 - Patrol a route/pack.ps1 b/GRP - Group Commands/GRP-550 - Patrol a route/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-550 - Patrol a route/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-550 - Patrol a route/unpack.ps1 b/GRP - Group Commands/GRP-550 - Patrol a route/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-550 - Patrol a route/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua b/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua new file mode 100644 index 0000000000..d934f1018f --- /dev/null +++ b/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua @@ -0,0 +1,17 @@ +--- This makes a vehicle drive its route using the waypoints of the route and selecing random points on the route. +-- Name: GRP-551 - Patrol to random points of a route +-- Author: FlightControl +-- Date Created: 24 Sep 2017 + + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Patrol to random points of the route at 120 km/h in "Vee" formation. +Vehicle:PatrolRouteRandom( 120, "Vee" ) + +-- Find the Ship and create a GROUP object. +Ship = GROUP:FindByName( "Ship" ) + +-- Patrol to random points of the route at 120 km/h in "Vee" formation. +Ship:PatrolRouteRandom( 120, "Vee" ) diff --git a/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz b/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz new file mode 100644 index 0000000000..5389df7907 Binary files /dev/null and b/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz differ diff --git a/GRP - Group Commands/GRP-551 - Patrol to random points of a route/pack.ps1 b/GRP - Group Commands/GRP-551 - Patrol to random points of a route/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-551 - Patrol to random points of a route/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-551 - Patrol to random points of a route/unpack.ps1 b/GRP - Group Commands/GRP-551 - Patrol to random points of a route/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-551 - Patrol to random points of a route/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua b/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua new file mode 100644 index 0000000000..c3dbcc73d6 --- /dev/null +++ b/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua @@ -0,0 +1,16 @@ +--- This makes a vehicle drive its route selecting random points in a zone. +-- Name: GRP-552 - Patrol in a zone +-- Author: FlightControl +-- Date Created: 24 Sep 2017 + + -- Find the Vehicle and create a GROUP object. + Vehicle = GROUP:FindByName( "Vehicle" ) + + -- Patrol to random points in the trigger zone ZONE, at 120 km/h in Vee format. + Vehicle:PatrolZones( { ZONE:New( "ZONEVEHICLE" ) }, 120, "Vee" ) + + -- Find the Vehicle and create a GROUP object. + Ship = GROUP:FindByName( "Ship" ) + + -- Patrol to random points in the trigger zone ZONE, at 120 km/h in Vee format. + Ship:PatrolZones( { ZONE:New( "ZONESHIP" ) }, 120, "Vee" ) diff --git a/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz b/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz new file mode 100644 index 0000000000..cb468e0fbb Binary files /dev/null and b/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz differ diff --git a/GRP - Group Commands/GRP-552 - Patrol in a zone/pack.ps1 b/GRP - Group Commands/GRP-552 - Patrol in a zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-552 - Patrol in a zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-552 - Patrol in a zone/unpack.ps1 b/GRP - Group Commands/GRP-552 - Patrol in a zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-552 - Patrol in a zone/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua b/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua new file mode 100644 index 0000000000..db2f18d112 --- /dev/null +++ b/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua @@ -0,0 +1,16 @@ +--- This makes a vehicle drive its route selecting random points in a zone. +-- Name: GRP-553 - Patrol in a list of zones +-- Author: FlightControl +-- Date Created: 24 Sep 2017 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Patrol to random points in the trigger zones ZONEVEHICLE1, ZONEVEHICLE2, ZONEVEHICLE3, at 120 km/h in Vee format. +Vehicle:PatrolZones( { ZONE:New( "ZONEVEHICLE1" ), ZONE:New( "ZONEVEHICLE2" ), ZONE:New( "ZONEVEHICLE3" ) }, 120, "Vee" ) + +-- Find the Ship and create a GROUP object. +Ship = GROUP:FindByName( "Ship" ) + +-- Patrol to random points in the trigger zones ZONESHIP1, ZONESHIP2, ZONESHIP3, at 120 km/h in Vee format. +Ship:PatrolZones( { ZONE:New( "ZONESHIP1" ), ZONE:New( "ZONESHIP2" ), ZONE:New( "ZONESHIP3" ) }, 120, "Vee" ) diff --git a/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz b/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz new file mode 100644 index 0000000000..ff13d16e95 Binary files /dev/null and b/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz differ diff --git a/GRP - Group Commands/GRP-553 - Patrol in a list of zones/pack.ps1 b/GRP - Group Commands/GRP-553 - Patrol in a list of zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-553 - Patrol in a list of zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-553 - Patrol in a list of zones/unpack.ps1 b/GRP - Group Commands/GRP-553 - Patrol in a list of zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-553 - Patrol in a list of zones/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua b/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua new file mode 100644 index 0000000000..2fb61d50b1 --- /dev/null +++ b/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua @@ -0,0 +1,11 @@ +--- This makes a vehicle respawn itself when the mission starts. +-- The vehicle is hidden, so you need to observe from the watch tower! +-- Name: GRP-601 - Respawn hidden +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Respawn the vehicle. +Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz b/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz new file mode 100644 index 0000000000..db10a4c922 Binary files /dev/null and b/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz differ diff --git a/GRP - Group Commands/GRP-601 - Respawn hidden/pack.ps1 b/GRP - Group Commands/GRP-601 - Respawn hidden/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-601 - Respawn hidden/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-601 - Respawn hidden/unpack.ps1 b/GRP - Group Commands/GRP-601 - Respawn hidden/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-601 - Respawn hidden/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua b/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua new file mode 100644 index 0000000000..e5fb8c0ab8 --- /dev/null +++ b/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua @@ -0,0 +1,16 @@ +--- This makes a vehicle respawn itself in zone ZONEVEHICLE1. +-- Name: GRP-610 - Respawn in Zone +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) + +-- Respawn the vehicle in RespawnZone1. +Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz b/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz new file mode 100644 index 0000000000..11b8bd4c54 Binary files /dev/null and b/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz differ diff --git a/GRP - Group Commands/GRP-610 - Respawn in Zone/pack.ps1 b/GRP - Group Commands/GRP-610 - Respawn in Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-610 - Respawn in Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-610 - Respawn in Zone/unpack.ps1 b/GRP - Group Commands/GRP-610 - Respawn in Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-610 - Respawn in Zone/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua b/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua new file mode 100644 index 0000000000..e88b31fb7a --- /dev/null +++ b/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua @@ -0,0 +1,18 @@ +--- This makes a vehicle respawn itself within ZONEVEHICLE1. +-- The vehicle group consists of multiple units and are spawned in relation to the original template position. +-- +-- Name: GRP-611 - Respawn multiple units in Zone +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) + +-- Respawn the vehicle in RespawnZone1. +Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz b/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz new file mode 100644 index 0000000000..b4301265d7 Binary files /dev/null and b/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz differ diff --git a/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/pack.ps1 b/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/unpack.ps1 b/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua b/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua new file mode 100644 index 0000000000..9eacddea4d --- /dev/null +++ b/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua @@ -0,0 +1,19 @@ +--- This makes a vehicle respawn itself within ZONEVEHICLE1. +-- The vehicle group consists of multiple units and are spawned in randomized within the new zone. +-- +-- Name: GRP-612 - Respawn multiple units in Zone randomized. +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) +Vehicle:InitRandomizePositionZone( true ) + +-- Respawn the vehicle in RespawnZone1. +Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz b/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz new file mode 100644 index 0000000000..bf620f4df1 Binary files /dev/null and b/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz differ diff --git a/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/pack.ps1 b/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/unpack.ps1 b/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua b/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua new file mode 100644 index 0000000000..15bd8837ea --- /dev/null +++ b/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua @@ -0,0 +1,17 @@ +--- This makes a vehicle respawn within ZONEVEHICLE1. +-- The vehicle is hidden, so you need to observe at the watch tower through external view. +-- Name: GRP-615 - Respawn in Zone hidden +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) + +-- Respawn the vehicle in RespawnZone1. +Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz b/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz new file mode 100644 index 0000000000..61649b00c6 Binary files /dev/null and b/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz differ diff --git a/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/pack.ps1 b/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/unpack.ps1 b/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua b/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua new file mode 100644 index 0000000000..bc2268a4c6 --- /dev/null +++ b/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua @@ -0,0 +1,19 @@ +--- This makes a vehicle respawn itself within ZONEVEHICLE1. +-- The vehicle group consists of multiple units and are spawned in relation to the original template position. +-- The vehicle is hidden, so you need to observe from the watch tower (external view). +-- +-- Name: GRP-616 - Respawn multiple units in Zone hidden +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) + +-- Respawn the vehicle in RespawnZone1. +Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz b/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz new file mode 100644 index 0000000000..0b8416a847 Binary files /dev/null and b/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz differ diff --git a/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/pack.ps1 b/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/unpack.ps1 b/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua b/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua new file mode 100644 index 0000000000..8df3b2487a --- /dev/null +++ b/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua @@ -0,0 +1,20 @@ +--- This makes a vehicle respawn itself within ZONEVEHICLE1 hidden. +-- The vehicle group consists of multiple units and are spawned in randomized within the new zone. +-- The vehicle is hidden, so you need to observe from the watch tower (external view). +-- +-- Name: GRP-617 - Respawn multiple units in Zone randomized hidden +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) +Vehicle:InitRandomizePositionZone( true ) + +-- Respawn the vehicle in RespawnZone1. +Vehicle:Respawn() \ No newline at end of file diff --git a/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz b/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz new file mode 100644 index 0000000000..beb9f80f57 Binary files /dev/null and b/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz differ diff --git a/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/pack.ps1 b/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/unpack.ps1 b/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua b/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua new file mode 100644 index 0000000000..16fc27ddd4 --- /dev/null +++ b/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua @@ -0,0 +1,29 @@ +--- This makes a vehicle respawn itself within ZONEVEHICLE1. +-- The vehicle group consists of multiple units and are spawned in randomized within the new zone. +-- When the last vehicle of the group is destroyed, the group will respawn. +-- +-- Name: GRP-620 - Respawn multiple units when destroyed +-- Author: FlightControl +-- Date Created: 01 Mar 2018 + +-- Find the Vehicle and create a GROUP object. +Vehicle = GROUP:FindByName( "Vehicle" ) + +-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. +RespawnZone1 = ZONE:New( "ZONEVEHICLE1") + +-- Prepare the spawning to be done in RespawnZone1. +Vehicle:InitZone( RespawnZone1 ) +Vehicle:InitRandomizePositionZone( true ) + +Vehicle:HandleEvent( EVENTS.Dead ) +function Vehicle:OnEventDead( EventData ) + + self:E( { "Size ", Size = Vehicle:GetSize() } ) + + -- When the last vehicle of the group is declared dead, respawn the group. + if Vehicle:GetSize() == 1 then + -- Respawn the vehicle in RespawnZone1. + Vehicle:Respawn() + end +end \ No newline at end of file diff --git a/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz b/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz new file mode 100644 index 0000000000..00251b78b0 Binary files /dev/null and b/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz differ diff --git a/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/pack.ps1 b/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/unpack.ps1 b/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/unpack.ps1 @@ -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" * diff --git a/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua b/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua new file mode 100644 index 0000000000..c5ae02e822 --- /dev/null +++ b/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua @@ -0,0 +1,27 @@ +--- +-- Name: GRP-900 - Option Green and Red State +-- Author: FlightControl +-- Date Created: 10 Dec 2017 +-- +-- This tests the option to set the alarm state of a group to RED or GREEN. +-- Both options are tested with two groups. +-- Please check the dcs.log in case of errors, and the time the group reacts to the approaching target. +-- The Red State Group should react much faster than the Green State Group. +-- +-- Join the Game Master to observe the reaction of the ground units. +-- +-- Blue is attacking. +-- Green is defending. +-- + + +RedStateGroup = GROUP:FindByName( "Red State" ) +GreenStateGroup = GROUP:FindByName( "Green State" ) + + +RedStateGroup:OptionAlarmStateRed() +GreenStateGroup:OptionAlarmStateGreen() + + + + diff --git a/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz b/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz new file mode 100644 index 0000000000..82c27c7d71 Binary files /dev/null and b/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz differ diff --git a/GRP - Group Commands/GRP-900 - Option Green and Red State/pack.ps1 b/GRP - Group Commands/GRP-900 - Option Green and Red State/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/GRP - Group Commands/GRP-900 - Option Green and Red State/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/GRP - Group Commands/GRP-900 - Option Green and Red State/unpack.ps1 b/GRP - Group Commands/GRP-900 - Option Green and Red State/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/GRP - Group Commands/GRP-900 - Option Green and Red State/unpack.ps1 @@ -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" * diff --git a/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua b/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua new file mode 100644 index 0000000000..11c0bbb028 --- /dev/null +++ b/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua @@ -0,0 +1,43 @@ + +do + -- This demo creates a menu structure for the planes within the red coalition. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + + local Plane1 = GROUP:FindByName( "Red Plane 1" ) + local Plane2 = GROUP:FindByName( "Red Plane 2" ) + local Plane3 = GROUP:FindByName( "Red Plane 3" ) + local Plane4 = GROUP:FindByName( "Red Plane 4" ) + + -- This would create a menu for the red coalition under the main DCS "Others" menu. + local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) + + + local function ShowStatus( StatusText, Coalition ) + + Plane1:MessageToRed( StatusText, 15 ) + Plane2:MessageToRed( StatusText, 15 ) + end + + local MenuStatus -- Menu#MENU_COALITION + local MenuStatusShow -- Menu#MENU_COALITION_COMMAND + + local function RemoveStatusMenu() + MenuStatus:Remove() + end + + local function AddStatusMenu() + + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) + MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) + end + + local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) + local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) + +end + + + + diff --git a/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz b/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz new file mode 100644 index 0000000000..0c299ac86d Binary files /dev/null and b/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz differ diff --git a/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/pack.ps1 b/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/unpack.ps1 b/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/unpack.ps1 @@ -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" * diff --git a/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua b/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua new file mode 100644 index 0000000000..fa483f1037 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua @@ -0,0 +1,56 @@ + +do + -- This demo creates a menu structure for the two clients of planes. + -- Each client will receive a different menu structure. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + -- And play with the Add and Remove menu options. + + -- Note that in multi player, this will only work after the DCS clients bug is solved. + + local function ShowStatus( PlaneClient, StatusText, Coalition ) + + MESSAGE:New( Coalition, 15 ):ToRed() + PlaneClient:Message( StatusText, 15 ) + end + + local MenuStatus = {} + + local function RemoveStatusMenu( MenuClient ) + local MenuClientName = MenuClient:GetName() + MenuStatus[MenuClientName]:Remove() + end + + --- @param Wrapper.Client#CLIENT MenuClient + local function AddStatusMenu( MenuClient ) + local MenuClientName = MenuClient:GetName() + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus[MenuClientName] = MENU_CLIENT:New( MenuClient, "Status for Planes" ) + MENU_CLIENT_COMMAND:New( MenuClient, "Show Status", MenuStatus[MenuClientName], ShowStatus, MenuClient, "Status of planes is ok!", "Message to Red Coalition" ) + end + + SCHEDULER:New( nil, + function() + local PlaneClient = CLIENT:FindByName( "Plane 1" ) + if PlaneClient and PlaneClient:IsAlive() then + local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" ) + MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneClient ) + MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneClient ) + end + end, {}, 10, 10 ) + + SCHEDULER:New( nil, + function() + local PlaneClient = CLIENT:FindByName( "Plane 2" ) + if PlaneClient and PlaneClient:IsAlive() then + local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" ) + MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneClient ) + MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient ) + end + end, {}, 10, 10 ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz b/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz new file mode 100644 index 0000000000..f94eeaee85 Binary files /dev/null and b/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz differ diff --git a/MEN - Menu Options/Normandy/MEN-001 - Menu Client/pack.ps1 b/MEN - Menu Options/Normandy/MEN-001 - Menu Client/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-001 - Menu Client/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/MEN - Menu Options/Normandy/MEN-001 - Menu Client/unpack.ps1 b/MEN - Menu Options/Normandy/MEN-001 - Menu Client/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-001 - Menu Client/unpack.ps1 @@ -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" * diff --git a/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua b/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua new file mode 100644 index 0000000000..f7ffaccefa --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua @@ -0,0 +1,43 @@ + +do + -- This demo creates a menu structure for the planes within the red coalition. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + + local Plane1 = CLIENT:FindByName( "Plane 1" ) + local Plane2 = CLIENT:FindByName( "Plane 2" ) + + + -- This would create a menu for the red coalition under the main DCS "Others" menu. + local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) + + + local function ShowStatus( StatusText, Coalition ) + + MESSAGE:New( Coalition, 15 ):ToRed() + Plane1:Message( StatusText, 15 ) + Plane2:Message( StatusText, 15 ) + end + + local MenuStatus -- Menu#MENU_COALITION + local MenuStatusShow -- Menu#MENU_COALITION_COMMAND + + local function RemoveStatusMenu() + MenuStatus:Remove() + end + + local function AddStatusMenu() + + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) + MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) + end + + local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) + local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz b/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz new file mode 100644 index 0000000000..0fa37d36f8 Binary files /dev/null and b/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz differ diff --git a/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/pack.ps1 b/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/unpack.ps1 b/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/unpack.ps1 @@ -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" * diff --git a/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua b/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua new file mode 100644 index 0000000000..94d602abf0 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua @@ -0,0 +1,56 @@ + +do + -- This demo creates a menu structure for the two groups of planes. + -- Each group will receive a different menu structure. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + -- And play with the Add and Remove menu options. + + -- Note that in multi player, this will only work after the DCS groups bug is solved. + + local function ShowStatus( PlaneGroup, StatusText, Coalition ) + + MESSAGE:New( Coalition, 15 ):ToRed() + PlaneGroup:Message( StatusText, 15 ) + end + + local MenuStatus = {} + + local function RemoveStatusMenu( MenuGroup ) + local MenuGroupName = MenuGroup:GetName() + MenuStatus[MenuGroupName]:Remove() + end + + --- @param Wrapper.Group#GROUP MenuGroup + local function AddStatusMenu( MenuGroup ) + local MenuGroupName = MenuGroup:GetName() + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" ) + MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" ) + end + + SCHEDULER:New( nil, + function() + local PlaneGroup = GROUP:FindByName( "Plane 1" ) + if PlaneGroup and PlaneGroup:IsAlive() then + local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" ) + MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup ) + MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup ) + end + end, {}, 10, 10 ) + + SCHEDULER:New( nil, + function() + local PlaneGroup = GROUP:FindByName( "Plane 2" ) + if PlaneGroup and PlaneGroup:IsAlive() then + local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" ) + MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup ) + MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup ) + end + end, {}, 10, 10 ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz b/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz new file mode 100644 index 0000000000..59194b793c Binary files /dev/null and b/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz differ diff --git a/MEN - Menu Options/Normandy/MEN-003 - Menu Group/pack.ps1 b/MEN - Menu Options/Normandy/MEN-003 - Menu Group/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-003 - Menu Group/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/MEN - Menu Options/Normandy/MEN-003 - Menu Group/unpack.ps1 b/MEN - Menu Options/Normandy/MEN-003 - Menu Group/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-003 - Menu Group/unpack.ps1 @@ -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" * diff --git a/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua b/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua new file mode 100644 index 0000000000..11c0bbb028 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua @@ -0,0 +1,43 @@ + +do + -- This demo creates a menu structure for the planes within the red coalition. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + + local Plane1 = GROUP:FindByName( "Red Plane 1" ) + local Plane2 = GROUP:FindByName( "Red Plane 2" ) + local Plane3 = GROUP:FindByName( "Red Plane 3" ) + local Plane4 = GROUP:FindByName( "Red Plane 4" ) + + -- This would create a menu for the red coalition under the main DCS "Others" menu. + local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) + + + local function ShowStatus( StatusText, Coalition ) + + Plane1:MessageToRed( StatusText, 15 ) + Plane2:MessageToRed( StatusText, 15 ) + end + + local MenuStatus -- Menu#MENU_COALITION + local MenuStatusShow -- Menu#MENU_COALITION_COMMAND + + local function RemoveStatusMenu() + MenuStatus:Remove() + end + + local function AddStatusMenu() + + -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. + MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) + MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) + end + + local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) + local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz b/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz new file mode 100644 index 0000000000..e3d2265cdf Binary files /dev/null and b/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz differ diff --git a/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/pack.ps1 b/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/unpack.ps1 b/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/unpack.ps1 @@ -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" * diff --git a/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua b/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua new file mode 100644 index 0000000000..ab24d82d08 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua @@ -0,0 +1,56 @@ + +TestMenus = {} + +Menu = MENU_MISSION:New( "Generate Menus" ) + +do + -- This demo creates a menu structure for the planes within the red coalition. + -- To test, join the planes, then look at the other radio menus (Option F10). + -- Then switch planes and check if the menu is still there. + + local Plane1 = GROUP:FindByName( "Red Plane 1" ) + local Plane2 = GROUP:FindByName( "Red Plane 2" ) + local Plane3 = GROUP:FindByName( "Red Plane 3" ) + local Plane4 = GROUP:FindByName( "Red Plane 4" ) + + local CoalitionText = { + [coalition.side.BLUE] = "BLUE", + [coalition.side.RED] = "RED", + } + + local function MenuMessage( Text, Parameter ) + MESSAGE:NewType( Text .. Parameter, MESSAGE.Type.Information ):ToAll() + end + + local function MenuRemove(m) + TestMenus[m]:Remove() + end + + local function GenerateMissionMenu() + local m = #TestMenus+1 + TestMenus[m] = MENU_MISSION:New( "Menu Mission "..m ) + for n = 1, 8 do + local MenuMissionCommand = MENU_MISSION_COMMAND:New( "Show Mission "..m.."."..n, TestMenus[m], MenuMessage, "Mission ", m.."."..n) + end + local MenuMissionRemoveCommand = MENU_MISSION_COMMAND:New( "Remove Mission "..m, TestMenus[m], MenuRemove, m) + end + + local function GenerateCoalitionMenu( Coalition ) + local m = #TestMenus+1 + TestMenus[m] = MENU_COALITION:New( Coalition, "Menu Coalition "..CoalitionText[Coalition].." ".. m ) + for n = 1, 8 do + local MenuMissionCommand = MENU_COALITION_COMMAND:New( Coalition, "Show Coalition "..CoalitionText[Coalition].." "..m.."."..n, TestMenus[m], MenuMessage, "Coalition ", CoalitionText[Coalition].." "..m.."."..n) + end + local MenuMissionRemoveCommand = MENU_COALITION_COMMAND:New( Coalition, "Remove Coalition "..CoalitionText[Coalition].." "..m, TestMenus[m], MenuRemove, m) + end + + -- Create a mission menu to generate the menus. + local MenuMission = MENU_MISSION_COMMAND:New( "Generate Mission Menus", Menu, GenerateMissionMenu ) + local MenuCoalitionBlue = MENU_MISSION_COMMAND:New( "Generate Blue Coalition Menus", Menu, GenerateCoalitionMenu, coalition.side.BLUE ) + local MenucoalitionRed = MENU_MISSION_COMMAND:New( "Generate Red Coalition Menus", Menu, GenerateCoalitionMenu, coalition.side.RED ) + +end + + + + diff --git a/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz b/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz new file mode 100644 index 0000000000..541f1accd0 Binary files /dev/null and b/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz differ diff --git a/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/pack.ps1 b/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/unpack.ps1 b/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/unpack.ps1 @@ -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" * diff --git a/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua b/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua new file mode 100644 index 0000000000..b28f6644d7 --- /dev/null +++ b/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua @@ -0,0 +1,20 @@ + +-- Only use Include.File when developing new MOOSE classes. +-- When using Moose.lua in the DO SCIPTS FILE initialization box, +-- these Include.File statements are not needed, because all classes within Moose will be loaded. + + +-- This is an example of a global +local Trainer = MISSILETRAINER + :New( 200, "Trainer: Welcome to the missile training, trainee! Missiles will be fired at you. Try to evade them. Good luck!" ) + :InitMessagesOnOff(true) + :InitAlertsToAll(true) + :InitAlertsHitsOnOff(true) + :InitAlertsLaunchesOnOff(false) -- I'll put it on below ... + :InitBearingOnOff(true) + :InitRangeOnOff(true) + :InitTrackingOnOff(true) + :InitTrackingToAll(true) + :InitMenusOnOff(false) + +Trainer:InitAlertsToAll(true) -- Now alerts are also on diff --git a/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz b/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz new file mode 100644 index 0000000000..12f824cdba Binary files /dev/null and b/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz differ diff --git a/MIT - Missile Trainer/MIT-001 - Missile Trainer/pack.ps1 b/MIT - Missile Trainer/MIT-001 - Missile Trainer/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/MIT - Missile Trainer/MIT-001 - Missile Trainer/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/MIT - Missile Trainer/MIT-001 - Missile Trainer/unpack.ps1 b/MIT - Missile Trainer/MIT-001 - Missile Trainer/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/MIT - Missile Trainer/MIT-001 - Missile Trainer/unpack.ps1 @@ -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" * diff --git a/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua b/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua new file mode 100644 index 0000000000..cd25ae5576 --- /dev/null +++ b/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua @@ -0,0 +1,80 @@ +-- This test mission models the behaviour of the AI_PATROL_ZONE class. +-- +-- It creates a 2 AI_PATROL_ZONE objects with the name Patrol1 and Patrol2. +-- Patrol1 will govern a GROUP object to patrol the zone defined by PatrolZone1, within 3000 meters and 6000 meters, within a speed of 400 and 600 km/h. +-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 60 secondes, before returning to base. +-- +-- Patrol2 will goven a GROUP object to patrol the zone defined by PatrolZone2, within 600 meters and 1000 meters, within a speed of 300 and 400 km/h. +-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 0 secondes, before returning to base. +-- +-- The Patrol1 and Patrol2 object have 2 state transition functions defined, which customize the default behaviour of the RTB state. +-- When Patrol1 goes RTB, it will create a new GROUP object, that will be assigned to Patrol2. +-- When Patrol2 goes RTB, it will create a new GROUP object, that will be assgined to Patrol1. +-- +-- In this way, the Patrol1 and Patrol2 objects are fluctuating the patrol pattern from PatrolZone1 and PatrolZone2 :-) + + +PatrolZoneGroup1 = GROUP:FindByName( "Patrol Zone 1" ) +PatrolZone1 = ZONE_POLYGON:New( "Patrol Zone 1", PatrolZoneGroup1 ) + +PatrolZoneGroup2 = GROUP:FindByName( "Patrol Zone 2" ) +PatrolZone2 = ZONE_POLYGON:New( "Patrol Zone 2", PatrolZoneGroup2 ) + +PatrolSpawn = SPAWN:New( "Patrol Group" ) +PatrolGroup = PatrolSpawn:Spawn() + +Patrol1 = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 ) +Patrol1:ManageFuel( 0.2, 60 ) +Patrol1:SetControllable( PatrolGroup ) +Patrol1:__Start( 5 ) + +Patrol2 = AI_PATROL_ZONE:New( PatrolZone2, 600, 1000, 300, 400 ) +Patrol2:ManageFuel( 0.2, 0 ) + +--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object +-- @param #AI_PATROL_ZONE self +-- @param Wrapper.Group#GROUP AIGroup +-- @return #boolean If false is returned, then the OnAfter state transition function will not be called. +function Patrol1:OnLeaveRTB( AIGroup ) + AIGroup:MessageToRed( "Returning to base", 20 ) +end + +--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object +-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self +-- @param Wrapper.Group#GROUP AIGroup +function Patrol1:OnAfterRTB( AIGroup ) + local NewGroup = PatrolSpawn:Spawn() + Patrol2:SetControllable( NewGroup ) + Patrol2:__Start( 1 ) +end + +--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object +-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self +-- @param Wrapper.Group#GROUP AIGroup +function Patrol1:OnEnterPatrol( AIGroup ) + AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone1:GetName() , 20 ) +end + +--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object +-- @param #AI_PATROL_ZONE self +-- @param Wrapper.Group#GROUP AIGroup +-- @return #boolean If false is returned, then the OnEnter state transition function will not be called. +function Patrol2:OnBeforeRTB( AIGroup ) + AIGroup:MessageToRed( "Returning to base", 20 ) +end + +--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object +-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self +-- @param Wrapper.Group#GROUP AIGroup +function Patrol2:OnEnterRTB( AIGroup ) + local NewGroup = PatrolSpawn:Spawn() + Patrol1:SetControllable( NewGroup ) + Patrol1:__Start( 1 ) +end + +--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object +-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self +-- @param Wrapper.Group#GROUP AIGroup +function Patrol2:OnEnterPatrol( AIGroup ) + AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone2:GetName() , 20 ) +end diff --git a/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz b/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz new file mode 100644 index 0000000000..85cbd83987 Binary files /dev/null and b/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz differ diff --git a/PAT - Patrolling/PAT-001 - Switching Patrol Zones/pack.ps1 b/PAT - Patrolling/PAT-001 - Switching Patrol Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/PAT - Patrolling/PAT-001 - Switching Patrol Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/PAT - Patrolling/PAT-001 - Switching Patrol Zones/unpack.ps1 b/PAT - Patrolling/PAT-001 - Switching Patrol Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/PAT - Patrolling/PAT-001 - Switching Patrol Zones/unpack.ps1 @@ -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" * diff --git a/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.lua b/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.lua new file mode 100644 index 0000000000..296604a1dc --- /dev/null +++ b/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.lua @@ -0,0 +1,19 @@ +-- This test mission demonstrates the RADIO class, particularily when the transmiter is anything but a UNIT or a GROUP (a STATIC in this case) +-- The Player is in a Su25T parked on Batumi, and a Russian command center named "Russian Command Center" is placed 12km east of Batumi. + +-- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important. +-- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (108AM here) + +CommandCenter = STATIC:FindByName("Russian Command Center") + +-- Let's get a reference to the Command Center's RADIO +CommandCenterRadio = CommandCenter:GetRadio() + +-- Now, we'll set up the next transmission +CommandCenterRadio:SetFileName("Noise.ogg") -- We first need the file name of a sound, +CommandCenterRadio:SetFrequency(108) -- then a frequency in MHz, +CommandCenterRadio:SetModulation(radio.modulation.AM) -- a modulation (we use DCS' enumartion, this way we don't have to type numbers)... +CommandCenterRadio:SetPower(100) -- and finally a power in Watts. A "normal" ground TACAN station has a power of 120W. + +-- We have finished tinkering with our transmission, now is the time to broadcast it ! +CommandCenterRadio:Broadcast() \ No newline at end of file diff --git a/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.miz b/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.miz new file mode 100644 index 0000000000..7ab639ea82 Binary files /dev/null and b/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.miz differ diff --git a/RAD - Radio/RAD-000 - Transmission from Static/pack.ps1 b/RAD - Radio/RAD-000 - Transmission from Static/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAD - Radio/RAD-000 - Transmission from Static/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAD - Radio/RAD-000 - Transmission from Static/unpack.ps1 b/RAD - Radio/RAD-000 - Transmission from Static/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAD - Radio/RAD-000 - Transmission from Static/unpack.ps1 @@ -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" * diff --git a/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.lua b/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.lua new file mode 100644 index 0000000000..53b86eccbb --- /dev/null +++ b/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.lua @@ -0,0 +1,25 @@ +-- This test mission demonstrates the RADIO class, particularily when the transmiter is a UNIT or a GROUP +-- The Player is in a Su25T parked on Batumi, and a Russian MiG-29 creatively named "Sergey" is placed above Kobuleti and is +-- inbound for a landing on Batumi + +-- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important. +-- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (108AM here) + +Sergey = UNIT:FindByName("Sergey") + +-- Let's get a reference to Sergey's RADIO +SergeyRadio = Sergey:GetRadio() + +-- Now, we'll set up the next transmission +SergeyRadio:SetFileName("Noise.ogg") -- We first need the file name of a sound, +SergeyRadio:SetFrequency(108) -- then a frequency in MHz, +SergeyRadio:SetModulation(radio.modulation.AM) -- and a modulation (we use DCS' enumartion, this way we don't have to type numbers). + +-- Since Sergey is a UNIT, we can add a subtitle (displayed on the top left) to the transmission, and loop the transmission +SergeyRadio:SetSubtitle("Hey, hear that noise ?", 5) -- The subtitle "Noise" will be displayed for 5 secs +SergeyRadio:SetLoop(false) + +-- Notice that we didn't have to imput a power ? If the broadcater is a UNIT or a GROUP, DCS automatically guesses the power to use depending on the type of UNIT or GROUP + +-- We have finished tinkering with our transmission, now is the time to broadcast it ! +SergeyRadio:Broadcast() \ No newline at end of file diff --git a/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.miz b/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.miz new file mode 100644 index 0000000000..5d5808785a Binary files /dev/null and b/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.miz differ diff --git a/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/pack.ps1 b/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/unpack.ps1 b/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/unpack.ps1 @@ -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" * diff --git a/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.lua b/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.lua new file mode 100644 index 0000000000..0d7a473f1b --- /dev/null +++ b/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.lua @@ -0,0 +1,91 @@ +-- This test mission demonstrates the RADIO class in a practical scenario. +-- It also focuses on how to create transmissions faster and more efficiently +-- Please Read both RAD-000 and RAD-001, as well as SCH-000 code first. + +-- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important. +-- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (115AM here) + +-- The Player is in a Su25T parked on Batumi, and a Russian command center named "Batumi Tower" placed near Batumi will act as Batumi's Radio Tower. +-- This mission also features the "Viktor" flight, a Russian Su25, who is inbound for landing on Batumi. +-- The goal of this script is to manage the dialog between Viktor and Batumi Tower. + +-- The (short) conversation between Viktor and Batumi Tower will happen on 115 AM +-- Time 0 : Batumi Tower "Viktor flight, this is Batumi Tower, enter left base runway one two five, report 5 kilometers final. Over." +-- Time 10 : Viktor "Report 5 kilometers final, one two five, viktor" +-- Time 145 : Viktor "Batumi Tower, Viktor is 5 kilomters final, request landing clearance. Over?" +-- Time 154 : Batumi Tower "Viktor flight, you are claer to land, runway one two five. Check gear down." +-- Time 160 : Viktor "Clear to land, One two five, Viktor" +-- Time 210 : Viktor "Viktor, touchdown" +-- Time 215 : Batumi Tower "Viktor, confirmed touchdown, taxi to parking area, Batumi Tower out." + + +BatumiRadio = STATIC:FindByName("Batumi Tower"):GetRadio() +ViktorRadio = UNIT:FindByName("Viktor"):GetRadio() + +-- Let's first explore different shortcuts to setup a transmission before broadcastiong it +------------------------------------------------------------------------------------------------------------------------------------------------------ +-- First, the long way. +BatumiRadio:SetFileName("Batumi Tower - Enter left base.ogg") +BatumiRadio:SetFrequency(115) +BatumiRadio:SetModulation(radio.modulation.AM) +BatumiRadio:SetPower(100) + +-- Every RADIO.SetXXX() function returns the radio, so we can rewrite the code above this way : +BatumiRadio:SetFileName("Batumi Tower - Enter left base.ogg"):SetFrequency(115):SetModulation(radio.modulation.AM):SetPower(100) + +-- We can also use the shortcut RADIO:NewGenericTransmission() to set multiple parameters in one function call +-- If our broadcaster was a UNIT or a GROUP, the more appropriate shortcut to use would have been NewUnitTransmission() +-- it works for both UNIT and GROUP, despite its name ! +BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115, radio.modulation.AM, 100) + +-- If you already set some parameters previously, you don't have to redo it ! +-- NewGenericTransmission's paramter have to be set in order +BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115) -- Modulation is still AM and power is still 100 (set previously) + +--If you want to change only the sound file, the frequency and the power for exemple, you can still use the appropriate Set function +BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115):SetPower(100) + +-- We have finished tinkering with our transmission, now is the time to broadcast it ! +BatumiRadio:Broadcast() + +-- Now, if Viktor answered imedately, the two radio broadcasts would overlap. We need to delay Viktor's answer. +------------------------------------------------------------------------------------------------------------------------------------------------------ +CommunitcationScheduler = SCHEDULER:New( nil, + function() + ViktorRadio:SetFileName("Viktor - Enter left base ack.ogg"):SetFrequency(115):SetModulation(radio.modulation.AM):Broadcast() -- We don't specify a subtitle since we don't want one + end, {}, 10 -- 10s delay + ) + +-- Viktor takes 145s to be 5km final, and need to contact Batumi Tower. +------------------------------------------------------------------------------------------------------------------------------------------------------ +CommunitcationScheduler:Schedule( nil, + function() + ViktorRadio:SetFileName("Viktor - Request landing clearance.ogg"):Broadcast() --We only specify the new file name, since frequency and modulation didn't change + end, {}, 145 + ) + +-- Now that you understand everything about the RADIO class, the rest is pretty trivial +------------------------------------------------------------------------------------------------------------------------------------------------------- +CommunitcationScheduler:Schedule( nil, + function() + BatumiRadio:SetFileName("Batumi Tower - Clear to land.ogg"):Broadcast() + end, {}, 154 + ) + +CommunitcationScheduler:Schedule( nil, + function() + ViktorRadio:SetFileName("Viktor - Clear to land ack.ogg"):Broadcast() + end, {}, 160 + ) + +CommunitcationScheduler:Schedule( nil, + function() + ViktorRadio:SetFileName("Viktor - Touchdown.ogg"):Broadcast() + end, {}, 210 + ) + +CommunitcationScheduler:Schedule( nil, + function() + BatumiRadio:SetFileName("Batumi Tower - Taxi to parking.ogg"):Broadcast() + end, {}, 215 + ) \ No newline at end of file diff --git a/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.miz b/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.miz new file mode 100644 index 0000000000..fd1b2806d7 Binary files /dev/null and b/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.miz differ diff --git a/RAD - Radio/RAD-002 - Transmission Tips and Tricks/pack.ps1 b/RAD - Radio/RAD-002 - Transmission Tips and Tricks/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAD - Radio/RAD-002 - Transmission Tips and Tricks/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAD - Radio/RAD-002 - Transmission Tips and Tricks/unpack.ps1 b/RAD - Radio/RAD-002 - Transmission Tips and Tricks/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAD - Radio/RAD-002 - Transmission Tips and Tricks/unpack.ps1 @@ -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" * diff --git a/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.lua b/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.lua new file mode 100644 index 0000000000..f34f4c1132 --- /dev/null +++ b/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.lua @@ -0,0 +1,22 @@ +-- This test mission demonstrates the BEACON class. +-- The goal is to activate 2 types of beacons : 1 TACAN beacon attach to an aircraft, and 1 generic radio beacon attach to a ground UNIT + +-- The player aircraft needs to be ASM and TACAN compatible. Please replace the M2000C by an aircraft you own and can receive TACAN signals + +-- Activates the trace to see what BEACON does in the log +--BASE:TraceClass("BEACON") +BASE:TraceLevel(3) + +-- Create our UNITs on which we'll attach a BEACON +local Aircraft = UNIT:FindByName("Unit1") +local LandUnit = UNIT:FindByName("Unit2") + +-- Now, let's start with the TACAN Beacon. +-- Note that they are limited to Y band. Notice also that this particular TACAN can be homed on. +local BeaconAircraft = Aircraft:GetBeacon() +BeaconAircraft:AATACAN(6, "UNIT1", true) + +-- And let's setup the ground based radio beacon ! +-- Notice how this beacon will stop in 20 sec (last parameter). +local BeaconLand = LandUnit:GetBeacon() +BeaconLand:RadioBeacon("Morse.ogg", 129, radio.modulation.AM, 100, 20) \ No newline at end of file diff --git a/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.miz b/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.miz new file mode 100644 index 0000000000..7fda6df044 Binary files /dev/null and b/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.miz differ diff --git a/RAD - Radio/RAD-010 - Beacons/pack.ps1 b/RAD - Radio/RAD-010 - Beacons/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAD - Radio/RAD-010 - Beacons/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAD - Radio/RAD-010 - Beacons/unpack.ps1 b/RAD - Radio/RAD-010 - Beacons/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAD - Radio/RAD-010 - Beacons/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.lua b/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.lua new file mode 100644 index 0000000000..cdec7034ca --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.lua @@ -0,0 +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. +yak:Spawn(5) \ No newline at end of file diff --git a/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.miz b/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.miz new file mode 100644 index 0000000000..c608a43b89 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.lua b/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.lua new file mode 100644 index 0000000000..e6929993df --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.lua @@ -0,0 +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) + diff --git a/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.miz b/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.miz new file mode 100644 index 0000000000..32a86a8fc6 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.lua b/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.lua new file mode 100644 index 0000000000..7664e1da24 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.lua @@ -0,0 +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) + diff --git a/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.miz b/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.miz new file mode 100644 index 0000000000..2ec4818768 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.lua b/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.lua new file mode 100644 index 0000000000..7a7e2bdd09 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.lua @@ -0,0 +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. +yak:Spawn(5) \ No newline at end of file diff --git a/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.miz b/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.miz new file mode 100644 index 0000000000..458f7d0c3d Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Resticted Coalition.miz b/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Resticted Coalition.miz new file mode 100644 index 0000000000..1fc35867e8 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Resticted Coalition.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Restricted Coalition.lua b/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Restricted Coalition.lua new file mode 100644 index 0000000000..29d5bede63 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Restricted Coalition.lua @@ -0,0 +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. +yakblue:Spawn(3) \ No newline at end of file diff --git a/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.lua b/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.lua new file mode 100644 index 0000000000..087629ca4f --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.lua @@ -0,0 +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. +yak:Spawn(5) \ No newline at end of file diff --git a/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.miz b/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.miz new file mode 100644 index 0000000000..f175c8131d Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.lua b/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.lua new file mode 100644 index 0000000000..51d2584af3 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.lua @@ -0,0 +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. +c17:Spawn(2) \ No newline at end of file diff --git a/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.miz b/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.miz new file mode 100644 index 0000000000..939ad61992 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.lua b/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.lua new file mode 100644 index 0000000000..e50b6f1663 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.lua @@ -0,0 +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. +il76:Spawn(8) \ No newline at end of file diff --git a/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.miz b/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.miz new file mode 100644 index 0000000000..49c57cbf58 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.lua b/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.lua new file mode 100644 index 0000000000..ab5a020ec7 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.lua @@ -0,0 +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) diff --git a/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.miz b/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.miz new file mode 100644 index 0000000000..45b2ddd155 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.lua b/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.lua new file mode 100644 index 0000000000..844caabe27 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.lua @@ -0,0 +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. +huey3:Spawn() \ No newline at end of file diff --git a/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.miz b/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.miz new file mode 100644 index 0000000000..da2a381234 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.lua b/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.lua new file mode 100644 index 0000000000..d6b1684b24 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.lua @@ -0,0 +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. +f14:Spawn(2) \ No newline at end of file diff --git a/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.miz b/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.miz new file mode 100644 index 0000000000..e115bfd406 Binary files /dev/null and b/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.miz differ diff --git a/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/pack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/unpack.ps1 b/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.lua b/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.lua new file mode 100644 index 0000000000..8f7bf39dc7 --- /dev/null +++ b/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.lua @@ -0,0 +1,68 @@ +-- Name: RAT-010 - Traffic at McCarran International +-- Author: funkyfranky +-- Date Created: 24 Sep 2017 +-- +-- # 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") + +-- 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("McCarran International Airport") + +-- Spawn two aircraft. +kc135:Spawn(2) + + +-- Create RAT object from E-3A template. +local e3=RAT:New("RAT_E3") + +-- Aircraft are spawned at McCarran. Destinations are random. +e3:SetDeparture("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({"Tonopah Airport", "Tonopah Test Range Airfield", "Henderson Executive Airport", "Nellis AFB", "Groom Lake", "Laughlin Airport"}) + +-- Destination McCarran. +yak:SetDestination("McCarran International Airport") + +-- Spawn eight Yak-40. +yak:Spawn(8) + + +-- Create RAT object from E-3A template. +local tf51=RAT:New("RAT_TF51") + +-- Departure airport will be chosen from this list. +tf51:SetDeparture({"Henderson Executive Airport", "Boulder City Airport", "Echo Bay"}) + +-- All will fly to McCarran. +tf51:SetDestination("McCarran International Airport") + +-- Spawn four TF-51D +tf51:Spawn(4) diff --git a/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.miz b/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.miz new file mode 100644 index 0000000000..64a9b829f6 Binary files /dev/null and b/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.miz differ diff --git a/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/pack.ps1 b/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/unpack.ps1 b/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.lua b/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.lua new file mode 100644 index 0000000000..67f5caa604 --- /dev/null +++ b/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.lua @@ -0,0 +1,96 @@ +-- Name: RAT-011 - Traffic at Nellis AFB +-- Author: funkyfranky +-- Date Created: 24 Sep 2017 +-- +-- # 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("Nellis AFB") + +-- Destination Tonopah, Groom Lake or Creech. +f15:SetDestination({"Tonopah Test Range Airfield", "Groom Lake AFB", "Creech AFB"}) + +-- Spawn three flights. +f15:Spawn(3) + +-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- + +local a10=RAT:New("RAT_A10C") + +-- Departure Nellis. +a10:SetDeparture("Nellis AFB") + +-- Destination Tonopa, Groom Lake or Creech. +a10:SetDestination({"Tonopah Test Range Airfield", "Groom Lake AFB", "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") + +-- Departure airports. +f18:SetDeparture({"Tonopah Test Range Airfield", "Groom Lake AFB", "Creech AFB"}) + +-- Destination Nellis. +f18:SetDestination("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("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) \ No newline at end of file diff --git a/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.miz b/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.miz new file mode 100644 index 0000000000..3b6af1c04e Binary files /dev/null and b/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.miz differ diff --git a/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/pack.ps1 b/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/unpack.ps1 b/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/unpack.ps1 @@ -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" * diff --git a/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.lua b/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.lua new file mode 100644 index 0000000000..e2b905c049 --- /dev/null +++ b/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.lua @@ -0,0 +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() + +-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.miz b/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.miz new file mode 100644 index 0000000000..a1ae71bfbd Binary files /dev/null and b/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.miz differ diff --git a/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/pack.ps1 b/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/unpack.ps1 b/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/unpack.ps1 @@ -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" * diff --git a/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.lua b/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.lua new file mode 100644 index 0000000000..be50637aa0 --- /dev/null +++ b/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.lua @@ -0,0 +1,33 @@ +--- Simple function scheduling +-- +-- === +-- +-- Author: FlightControl +-- Date Created: 12 Dec 2016 +-- +-- # Situation +-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. +-- Create a new SCHEDULER object. +-- Check the DCS.log. +-- +-- # Test cases: +-- +-- 1. The log should contain a "Hello World" line that is fired off 10 seconds after mission start. +-- +-- +-- # Status: TESTED - 12 Dec 2016 + +local TestScheduler = SCHEDULER:New( nil, + function() + BASE:E( "Hello World 1") + end, {}, 1 + ) + +SCHEDULER:New( nil, + function() + BASE:E( "Hello World 2") + end, {}, 2 + ) + +collectgarbage() + diff --git a/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz b/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz new file mode 100644 index 0000000000..c236c51ffc Binary files /dev/null and b/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz differ diff --git a/SCH - Scheduler/SCH-000 - Simple Scheduling/pack.ps1 b/SCH - Scheduler/SCH-000 - Simple Scheduling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCH - Scheduler/SCH-000 - Simple Scheduling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCH - Scheduler/SCH-000 - Simple Scheduling/unpack.ps1 b/SCH - Scheduler/SCH-000 - Simple Scheduling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCH - Scheduler/SCH-000 - Simple Scheduling/unpack.ps1 @@ -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" * diff --git a/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.lua b/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.lua new file mode 100644 index 0000000000..e759b7017e --- /dev/null +++ b/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.lua @@ -0,0 +1,34 @@ +--- Simple Object Scheduling +-- +-- === +-- +-- Author: FlightControl +-- Date Created: 12 Dec 2016 +-- +-- # Situation +-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. +-- Create a new SCHEDULER object. +-- Check the DCS.log. +-- +-- # Test cases: +-- +-- 1. Tracing of a scheduler in an Object. +-- The log should contain a "Hello World" line of the object, that is fired off 1 seconds after mission start. +-- +-- # Status: TESTED - 12 Dec 2016 + +local TEST_BASE = { + ClassName = "TEST_BASE", + } + +function TEST_BASE:New( Message ) + self = BASE:Inherit( self, BASE:New() ) + + local TestScheduler = SCHEDULER:New( self, + function( Object, Message ) + Object:E( Message ) + end, { Message }, 1 + ) +end + +local Test = TEST_BASE:New( "Hello World" ) \ No newline at end of file diff --git a/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz b/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz new file mode 100644 index 0000000000..d3919de009 Binary files /dev/null and b/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz differ diff --git a/SCH - Scheduler/SCH-001 - Simple Object Scheduling/pack.ps1 b/SCH - Scheduler/SCH-001 - Simple Object Scheduling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCH - Scheduler/SCH-001 - Simple Object Scheduling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCH - Scheduler/SCH-001 - Simple Object Scheduling/unpack.ps1 b/SCH - Scheduler/SCH-001 - Simple Object Scheduling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCH - Scheduler/SCH-001 - Simple Object Scheduling/unpack.ps1 @@ -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" * diff --git a/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.lua b/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.lua new file mode 100644 index 0000000000..4e1c84183c --- /dev/null +++ b/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.lua @@ -0,0 +1,24 @@ +--- Simple repeat scheduling of a function. +-- +-- === +-- +-- Author: FlightControl +-- Date Created: 13 Dec 2016 +-- +-- # Situation +-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. +-- Create a new SCHEDULER object. +-- Check the DCS.log. +-- +-- # Test cases: +-- +-- 1. The log should contain "Hello World Repeat" lines that is fired off 1 second after mission start and is repeated every 1 seconds. +-- +-- +-- # Status: TESTED - 13 Dec 2016 + +local TestScheduler = SCHEDULER:New( nil, + function() + BASE:E( "Hello World Repeat") + end, {}, 1, 1 + ) \ No newline at end of file diff --git a/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz b/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz new file mode 100644 index 0000000000..170270b55c Binary files /dev/null and b/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz differ diff --git a/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/pack.ps1 b/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/unpack.ps1 b/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/unpack.ps1 @@ -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" * diff --git a/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.lua b/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.lua new file mode 100644 index 0000000000..67f721125b --- /dev/null +++ b/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.lua @@ -0,0 +1,44 @@ +--- Object Repeat Scheduling. +-- +-- === +-- +-- Author: FlightControl +-- Date Created: 13 Dec 2016 +-- +-- # Situation +-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. +-- Create a new SCHEDULER object. +-- Check the DCS.log. +-- +-- Three Test objects are created. +-- +-- # Test cases: +-- +-- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1". +-- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute. +-- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute. +-- +-- # Status: TESTED - 13 Dec 2016 + +local TEST_BASE = { + ClassName = "TEST_BASE", + } + +function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop ) + self = BASE:Inherit( self, BASE:New() ) + + self.TestScheduler = SCHEDULER:New( self, + function( Object, Message ) + Object:E( Message ) + end, { Message }, Start, Repeat, Randomize, Stop + ) + return self +end + +do +local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 ) +end + +local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 ) + +local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 ) diff --git a/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz b/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz new file mode 100644 index 0000000000..b08447f3c5 Binary files /dev/null and b/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz differ diff --git a/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/pack.ps1 b/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/unpack.ps1 b/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/unpack.ps1 @@ -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" * diff --git a/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.lua b/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.lua new file mode 100644 index 0000000000..107ba46d1c --- /dev/null +++ b/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.lua @@ -0,0 +1,41 @@ +--- Simple repeat scheduling of a function. +-- +-- === +-- +-- Author: FlightControl +-- Date Created: 14 Dec 2016 +-- +-- # Situation +-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. +-- Create a new SCHEDULER object. +-- Check the DCS.log. +-- +-- Start a schedule called TestScheduler. TestScheduler will repeat the words "Hello World Repeat" every second in the log. +-- After 10 seconds, TestScheduler will stop the scheduler. +-- After 20 seconds, TestScheduler will restart the scheduler. +-- +-- # Test cases: +-- +-- 1. Check that the "Hello World Repeat" lines are consistent with the scheduling timing. They should stop showing after 10 seconds, and restart after 20 seconds. +-- +-- +-- # Status: TESTED - 14 Dec 2016 + +local TestScheduler = SCHEDULER:New( nil, + function() + BASE:E( timer.getTime() .. " - Hello World Repeat") + end, {}, 1, 1 + ) + +SCHEDULER:New( nil, + function() + TestScheduler:Stop() + end, {}, 10 + ) + +SCHEDULER:New( nil, + function() + TestScheduler:Start() + end, {}, 20 + ) + \ No newline at end of file diff --git a/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz b/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz new file mode 100644 index 0000000000..dcf57c3405 Binary files /dev/null and b/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz differ diff --git a/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/pack.ps1 b/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/unpack.ps1 b/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/unpack.ps1 @@ -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" * diff --git a/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.lua b/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.lua new file mode 100644 index 0000000000..f5e5dab2d3 --- /dev/null +++ b/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.lua @@ -0,0 +1,60 @@ +--- No Object Scheduling because of garbage collect and Object nillification. +-- +-- === +-- +-- Author: FlightControl +-- Date Created: 12 Dec 2016 +-- +-- # Situation +-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. +-- Create a new SCHEDULER object. +-- Check the DCS.log. +-- +-- A Test object is created. +-- It is nillified directly after the Schedule has been planned. +-- There should be no schedule fired. +-- The Test object should be garbage collected! +-- +-- THIS IS A VERY IMPORTANT TEST! +-- +-- # Test cases: +-- +-- 1. No schedule should be fired! The destructors of the Test object should be shown. +-- 2. Commend the nillification of the Test object in the source, and test again. +-- The schedule should now be fired and Hello World should be logged through the Test object. +-- +-- # Status: STARTED - 12 Dec 2016 + +local TEST_BASE = { + ClassName = "TEST_BASE", + } + +function TEST_BASE:New( Message ) + self = BASE:Inherit( self, BASE:New() ) + + self.TestScheduler = SCHEDULER:New( self, + function( Object, Message ) + Object:E( Message ) + end, { Message }, 1 + ) + return self +end + +do +local Test1 = TEST_BASE:New( "Hello World Test 1" ) +Test1 = nil +BASE:E( Test1 ) +end + +local Test2 = TEST_BASE:New( "Hello World Test 2" ) +BASE:E( Test2 ) + +local Test3 = TEST_BASE:New( "Hello World Test 3" ) +Test3 = nil +BASE:E( Test3 ) + +collectgarbage() + +BASE:E( "Collect Garbage executed." ) +BASE:E( "You should only see a Hello Worlld message for Test 2!" ) +BASE:E( "Check if Test 1 and Test 3 are garbage collected!" ) \ No newline at end of file diff --git a/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz b/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz new file mode 100644 index 0000000000..a5470e7ee3 Binary files /dev/null and b/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz differ diff --git a/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/pack.ps1 b/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/unpack.ps1 b/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/unpack.ps1 @@ -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" * diff --git a/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.lua b/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.lua new file mode 100644 index 0000000000..54faeb6024 --- /dev/null +++ b/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.lua @@ -0,0 +1,80 @@ +--- Object Repeat Scheduling. +-- +-- === +-- +-- Author: FlightControl +-- Date Created: 13 Dec 2016 +-- +-- # Situation +-- Three objects Test1, Test2, Test 3 are created with schedule a function. +-- After 15 seconds, Test1 is nillified and Garbage Collect is done. +-- After 30 seconds, Test2 is nillified and Garbage Collect is done. +-- After 45 seconds, Test3 is nillified and Garbage Collect is done. +-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. +-- Create a new SCHEDULER object. +-- Check the DCS.log. +-- +-- +-- Three Test objects are created. +-- +-- # Test cases: +-- +-- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1". +-- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute. +-- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute. +-- 4. After 15 seconds, Test1 should stop working. No "Hello World Repeat 1" may be shown after 15 seconds. +-- 5. After 30 seconds, Test2 should stop working. No "Hello World Repeat 2" may be shown after 30 seconds. +-- 6. After 45 seconds, Test3 should stop working. No "Hello World Repeat 3" may be shown after 45 seconds. +-- +-- # Status: TESTED - 13 Dec 2016 + +local TEST_BASE = { + ClassName = "TEST_BASE", + } + +function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop ) + self = BASE:Inherit( self, BASE:New() ) + + self.TestScheduler = SCHEDULER:New( self, + function( Object, Message ) + Object:E( Message ) + end, { Message }, Start, Repeat, Randomize, Stop + ) + return self +end + +do +local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 ) + +-- Nillify Test1 after 15 seconds and garbage collect. +local Nil1 = SCHEDULER:New( nil, + function() + BASE:E( "Nillify Test1 and Garbage Collect" ) + Test1 = nil + collectgarbage() + end, {}, 15 ) + +end + +local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 ) + + +local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 ) + +-- Nillify Test2 after 30 seconds and garbage collect. +local Nil2 = SCHEDULER:New( nil, + function() + BASE:E( "Nillify Test2 and Garbage Collect" ) + Test2 = nil + collectgarbage() + end, {}, 30 ) + +-- Nillify Test3 after 45 seconds and garbage collect. +local Nil3 = SCHEDULER:New( nil, + function() + BASE:E( "Nillify Test3 and Garbage Collect" ) + Test3 = nil + collectgarbage() + end, {}, 45 ) + +collectgarbage() diff --git a/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz b/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz new file mode 100644 index 0000000000..03552a0f99 Binary files /dev/null and b/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz differ diff --git a/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/pack.ps1 b/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/unpack.ps1 b/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/unpack.ps1 @@ -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" * diff --git a/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.lua b/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.lua new file mode 100644 index 0000000000..a64c35bdf2 --- /dev/null +++ b/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.lua @@ -0,0 +1,38 @@ +--- +-- Name: SCO-100 - Scoring Demo +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A shooting range has been setup. Fly the Ka-50 or the Su-25T to the statics and units located near the airport, and shoot them. +-- +-- # Test cases: +-- +-- 1. Observe the scoring granted to your flight when you hit and kill targets. + + +HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + +Scoring = SCORING:New( "Shooting Range 1" ) + +Scoring:SetScaleDestroyScore( 10 ) + +Scoring:SetScaleDestroyPenalty( 40 ) + +Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 ) + +-- Test for zone scores. + +-- This one is to test scoring on normal units. +ShootingRangeZone = ZONE:New( "ScoringZone1" ) +Scoring:AddZoneScore( ShootingRangeZone, 200 ) + +-- This one is to test scoring on scenery. +-- Note that you can only destroy scenery with heavy weapons. +SceneryZone = ZONE:New( "ScoringZone2" ) +Scoring:AddZoneScore( SceneryZone, 200 ) + +Scoring:AddStaticScore(STATIC:FindByName( "Shooting Range #010" ), 100 ) diff --git a/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.miz b/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.miz new file mode 100644 index 0000000000..554f55b826 Binary files /dev/null and b/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.miz differ diff --git a/SCO - Scoring/SCO-100 - Scoring Demo/pack.ps1 b/SCO - Scoring/SCO-100 - Scoring Demo/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCO - Scoring/SCO-100 - Scoring Demo/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCO - Scoring/SCO-100 - Scoring Demo/unpack.ps1 b/SCO - Scoring/SCO-100 - Scoring Demo/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCO - Scoring/SCO-100 - Scoring Demo/unpack.ps1 @@ -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" * diff --git a/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.lua b/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.lua new file mode 100644 index 0000000000..176e709ab2 --- /dev/null +++ b/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.lua @@ -0,0 +1,21 @@ +--- +-- Name: SCO-101 - Scoring Client to Client +-- Author: FlightControl +-- Date Created: 24 Feb 2017 +-- +-- # Situation: +-- +-- A shooting range has been setup to test client to client scoring. +-- +-- # Test cases: +-- +-- 1. Observe the scoring granted to your flight when you hit and kill other clients. + + +HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) + +Scoring = SCORING:New( "Detect Demo" ) + + diff --git a/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz b/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz new file mode 100644 index 0000000000..465ce32abd Binary files /dev/null and b/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz differ diff --git a/SCO - Scoring/SCO-101 - Scoring Client to Client/pack.ps1 b/SCO - Scoring/SCO-101 - Scoring Client to Client/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCO - Scoring/SCO-101 - Scoring Client to Client/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCO - Scoring/SCO-101 - Scoring Client to Client/unpack.ps1 b/SCO - Scoring/SCO-101 - Scoring Client to Client/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCO - Scoring/SCO-101 - Scoring Client to Client/unpack.ps1 @@ -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" * diff --git a/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.lua b/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.lua new file mode 100644 index 0000000000..0161bdd339 --- /dev/null +++ b/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.lua @@ -0,0 +1,41 @@ +--- +-- Name: SCO-200 - Telemetry +-- Author: FlightControl +-- Date Created: 24 Sep 2017 +-- +-- # Situation: +-- +-- A shooting range has been setup. Fly the Ka-50 or the Su-25T to the statics and objects located near the airport, and shoot them. +-- +-- # Test cases: +-- +-- 1. Observe the scoring granted to your flight when you hit and kill targets. +-- 2. Check the scoring telemetry communicated to the website. + + +HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + +Scoring = SCORING:New( "Shooting Range 1" ) + +Scoring:SetTelemetryServer( "96.49.78.227", 5010 ) + +Scoring:SetScaleDestroyScore( 10 ) + +Scoring:SetScaleDestroyPenalty( 40 ) + +Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 ) + +-- Test for zone scores. + +-- This one is to test scoring on normal units. +ShootingRangeZone = ZONE:New( "ScoringZone1" ) +Scoring:AddZoneScore( ShootingRangeZone, 200 ) + +-- This one is to test scoring on scenery. +-- Note that you can only destroy scenery with heavy weapons. +SceneryZone = ZONE:New( "ScoringZone2" ) +Scoring:AddZoneScore( SceneryZone, 200 ) + +Scoring:AddStaticScore(STATIC:FindByName( "Shooting Range #010" ), 100 ) diff --git a/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.miz b/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.miz new file mode 100644 index 0000000000..f0db42f8f0 Binary files /dev/null and b/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.miz differ diff --git a/SCO - Scoring/SCO-200 - Telemetry/pack.ps1 b/SCO - Scoring/SCO-200 - Telemetry/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCO - Scoring/SCO-200 - Telemetry/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCO - Scoring/SCO-200 - Telemetry/unpack.ps1 b/SCO - Scoring/SCO-200 - Telemetry/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCO - Scoring/SCO-200 - Telemetry/unpack.ps1 @@ -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" * diff --git a/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua b/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua new file mode 100644 index 0000000000..127735351b --- /dev/null +++ b/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua @@ -0,0 +1,139 @@ +--- +-- Name: SCO-500 - Scoring Multi Player Demo Mission 1 +-- Author: Pikey and FlightControl +-- Date Created: 1 Mar 2017 +-- +-- # Situation: +-- +-- A demo mission for the scoring. Read the briefing and have fun. +-- +-- # Test cases: +-- +-- 1. Observe the scoring granted to your flight when you hit and kill targets. + +-- Define the patrol zones +BlueCapZone = ZONE_POLYGON:New( "BlueCapZone", GROUP:FindByName( "Blue CAP Zone Patrol" ) ) +RedCapZone = ZONE_POLYGON:New( "RedCapZone", GROUP:FindByName( "Red CAP Zone Patrol" ) ) + +-- Define the engage zones +BlueEngageZone = ZONE_POLYGON:New( "BlueEngageZone", GROUP:FindByName( "Blue CAP Zone Engage" ) ) +RedEngageZone = ZONE_POLYGON:New( "RedEngageZone", GROUP:FindByName( "Red CAP Zone Engage" ) ) + +-- Define the Spawn zones for ground vehicles +BlueSpawnGroundZone = ZONE_POLYGON:New( "BlueSpawnGroundZone", GROUP:FindByName( "Blue Spawn Zone" ) ) +--RedSpawnGroundZone = ZONE_POLYGON:New( "RedSpawnGroundZone", GROUP:FindByName( "Red Spawn Zone" ) ) + +RedSpawnGroundZone = ZONE:New( "Red Spawn Zone" ) + +-- Define the Scoring zones that define the shelters +BlueShelterZone = ZONE_POLYGON:New( "Blue Shelters", GROUP:FindByName( "Blue Shelters" ) ) +RedShelterZone = ZONE_POLYGON:New( "Red Shelters", GROUP:FindByName( "Red Shelters" ) ) + +-- Define the Set of Clients that are used for the AI Balancers +BluePlanesClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterCategories( "plane" ):FilterPrefixes( "Blue Player") +RedPlanesClientSet = SET_CLIENT:New():FilterCoalitions( "red" ):FilterCategories( "plane" ):FilterPrefixes( "Red Player") + +-- Define the Spawn objects for the AI planes +BluePlanesSpawn = SPAWN:New( "BlueAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 ) +RedPlanesSpawn = SPAWN:New( "RedAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 ) + +-- Define the AI Balancers for the planes +BlueAIB = AI_BALANCER:New( BluePlanesClientSet, BluePlanesSpawn ):InitSpawnInterval( 60, 1200 ) +RedAIB = AI_BALANCER:New( RedPlanesClientSet, RedPlanesSpawn ):InitSpawnInterval( 60, 1200 ) + +-- Define the Spawn objects for the airbase defenses +BlueAirbaseDefense1Spawn = SPAWN:New( "Blue Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 ) +BlueAirbaseDefense2Spawn = SPAWN:New( "Blue Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 ) +RedAirbaseDefense1Spawn = SPAWN:New( "Red Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 ) +RedAirbaseDefense2Spawn = SPAWN:New( "Red Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 ) + +-- Define the ground forces spawning engines... + +-- First define the template arrays. +BlueGroundTemplates = { "Blue Ground Forces 1", "Blue Ground Forces 2", "Blue Ground Forces 3" } +RedGroundTemplates = { "Red Ground Forces 2", "Red Ground Forces 2", "Red Ground Forces 3" } + +-- New we are using these templates to define the spawn objects for the ground forces. +-- We spawn them at random places into the define zone. +BlueGroundSpawn = SPAWN + :New( "Blue Ground Forces" ) + :InitLimit( 12, 30 ) + :InitRandomizeZones( { BlueSpawnGroundZone } ) + :InitRandomizeTemplate( BlueGroundTemplates ) + :SpawnScheduled( 60, 0.2 ) + +RedGroundSpawn = SPAWN + :New( "Red Ground Forces" ) + :InitLimit( 12, 30 ) + :InitRandomizeTemplate( RedGroundTemplates ) + :InitRandomizeZones( { RedSpawnGroundZone } ) + :SpawnScheduled( 60, 0.2 ) + + + +BlueCap = {} +RedCap = {} + +-- Define the OnAfterSpawned events of the AI balancer Spawn Groups +function BlueAIB:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) + if AIGroup then + BlueCap[AIGroup] = BlueCap[AIGroup] or AI_CAP_ZONE:New( BlueCapZone, 500, 3000, 450, 1200 ) + local Cap = BlueCap[AIGroup] -- AI.AI_CAP#AI_CAP_ZONE + + Cap:ManageFuel( 0.4, 180 ) + Cap:SetEngageZone( BlueEngageZone ) + Cap:SetControllable( AIGroup ) + Cap:Start() + end +end + +function RedAIB:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) + + if AIGroup then + RedCap[AIGroup] = RedCap[AIGroup] or AI_CAP_ZONE:New( RedCapZone, 500, 3000, 450, 1200 ) + local Cap = RedCap[AIGroup] -- AI.AI_CAP#AI_CAP_ZONE + + Cap:ManageFuel( 0.4, 180 ) + Cap:SetEngageZone( BlueEngageZone ) + Cap:SetControllable( AIGroup ) + Cap:Start() + end +end + + + + +-- Okay, now that we defined all this stuff, now make the SCORING setup ... + +-- First define a Scoring object +local Scoring = SCORING:New( "SCO-500 - Scoring Demonstration Mission" ) + +-- Define within the scoring the shelter designated targets. +Scoring:AddZoneScore( BlueShelterZone, 50 ) -- Per shelter destroyed, 50 extra points are granted. +Scoring:AddZoneScore( RedShelterZone, 50 ) -- Per shelter destroyed, 50 extra points are granted. + +-- Define the static objects that give extra scores +Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 1"), 100 ) +Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 2"), 100 ) +Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 3"), 100 ) +Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 4"), 100 ) + +Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #001"), 80 ) +Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #002"), 80 ) +Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #003"), 80 ) +Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #004"), 80 ) + +Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 1" ), 100 ) +Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 2" ), 100 ) +Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 3" ), 100 ) +Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 4" ), 100 ) + +Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #001" ), 80 ) +Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #002" ), 80 ) +Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #003" ), 80 ) +Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #004" ), 80 ) + +-- Scale the scoring rewarded. +Scoring:SetScaleDestroyScore( 30 ) +Scoring:SetScaleDestroyPenalty( 90 ) -- Penalties are punished more than normal destroys. + diff --git a/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz b/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz new file mode 100644 index 0000000000..36f9c09512 Binary files /dev/null and b/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz differ diff --git a/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/pack.ps1 b/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/unpack.ps1 b/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.lua b/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.lua new file mode 100644 index 0000000000..e53f6d9367 --- /dev/null +++ b/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.lua @@ -0,0 +1,16 @@ + +BlueAirbaseSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterStart() + +RedAirbaseSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart() + +RedAirbaseHelipadSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterCategories("helipad"):FilterStart() + +BlueAirbaseShipSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterCategories("ship"):FilterStart() + +BlueAirbaseSet:Flush() + +RedAirbaseSet:Flush() + +RedAirbaseHelipadSet:Flush() + +BlueAirbaseShipSet:Flush() \ No newline at end of file diff --git a/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz b/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz new file mode 100644 index 0000000000..3e03507433 Binary files /dev/null and b/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz differ diff --git a/SET - Data Sets/SET-001 - Airbase Sets/pack.ps1 b/SET - Data Sets/SET-001 - Airbase Sets/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-001 - Airbase Sets/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-001 - Airbase Sets/unpack.ps1 b/SET - Data Sets/SET-001 - Airbase Sets/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-001 - Airbase Sets/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.lua b/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.lua new file mode 100644 index 0000000000..98700a4be3 --- /dev/null +++ b/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.lua @@ -0,0 +1,34 @@ +--- +-- Name: SET-102 - Test SET_GROUP object against ZONE +-- Author: FlightControl +-- Date Created: 31 Mar 2017 +-- +-- # Situation: +-- +-- A ZONE has been defined, and the SET_GROUP object is checked against the zone. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter, and place the SET_GROUP object in or out of the zone. +-- 2. Observe the results of the functions. + + +SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart() + +Zone = ZONE:New( "Zone" ) + +SetGroupObject:ForEachGroupCompletelyInZone( Zone, + function( GroupObject ) + GroupObject:E( { GroupObject:GetName(), "I am completely in Zone" } ) + end ) + +SetGroupObject:ForEachGroupPartlyInZone( Zone, + function( GroupObject ) + GroupObject:E( { GroupObject:GetName(), "I am partially in Zone" } ) + end ) + +SetGroupObject:ForEachGroupNotInZone( Zone, + function( GroupObject ) + GroupObject:E( { GroupObject:GetName(), "I am not in Zone" } ) + end ) + diff --git a/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.miz b/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.miz new file mode 100644 index 0000000000..0bf3e2ee54 Binary files /dev/null and b/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.miz differ diff --git a/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/pack.ps1 b/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/unpack.ps1 b/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.lua b/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.lua new file mode 100644 index 0000000000..985aee42b8 --- /dev/null +++ b/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.lua @@ -0,0 +1,17 @@ +--- +-- Name: SET-103 - Test SET_GROUP players added and deleted +-- Author: FlightControl +-- Date Created: 31 Mar 2017 +-- +-- # Situation: +-- +-- Multiple groups of ground vehicles have been defined. +-- There are collected in a SET_GROUP. +-- A human player is jumping into the seat on one of these vehicles of the SET_GROUP. +-- +-- # Test cases: +-- +-- 1. Observe the player added and deleted from the SET_GROUP depending on the behaviour. + + +SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart() diff --git a/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.miz b/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.miz new file mode 100644 index 0000000000..b93ff4b7f7 Binary files /dev/null and b/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.miz differ diff --git a/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/pack.ps1 b/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/unpack.ps1 b/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.lua b/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.lua new file mode 100644 index 0000000000..af79af84f2 --- /dev/null +++ b/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.lua @@ -0,0 +1,3 @@ + +SetClient = SET_CLIENT:New():FilterCoalitions("blue"):FilterCategories("plane"):FilterCountries("USA"):FilterStart() + diff --git a/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz b/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz new file mode 100644 index 0000000000..42e093886d Binary files /dev/null and b/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz differ diff --git a/SET - Data Sets/SET-201 - Client Sets/pack.ps1 b/SET - Data Sets/SET-201 - Client Sets/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-201 - Client Sets/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-201 - Client Sets/unpack.ps1 b/SET - Data Sets/SET-201 - Client Sets/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-201 - Client Sets/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-101 - Group Sets.lua b/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-101 - Group Sets.lua new file mode 100644 index 0000000000..6321134071 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-101 - Group Sets.lua @@ -0,0 +1,163 @@ + + + + +SetVehicles = SET_GROUP:New() + +SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } ) + +SetVehicles:ForEachGroup( + --- @param Wrapper.Group#GROUP MooseGroup + function( MooseGroup ) + for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do + local UnitAction = UnitData -- Wrapper.Unit#UNIT + UnitAction:SmokeGreen() + end + end +) + + + +SetBluePlanesGroup = SET_GROUP:New() + :FilterCoalitions( "blue" ) + :FilterCategories( "plane" ) + :FilterStart() + +SetNorthKoreaGroup = SET_GROUP:New() + :FilterCountries( "RUSSIA" ) + :FilterStart() + +SetSAMGroup = SET_GROUP:New() + :FilterPrefixes( "SAM" ) + :FilterStart() + :SetIteratorIntervals( 5, 10 ) + +SetGroundGroup = SET_GROUP:New() + :FilterCategories( "ground" ) + :FilterStart() + +SetGroundGroup:Flush() + +SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane') +GroupUS_Plane = SpawnUS_Plane:Spawn() + +SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle') +GroupUS_Vehicle = SpawnUS_Vehicle:Spawn() + +SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship') +GroupUS_Ship = SpawnUS_Ship:Spawn() + +SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle') +GroupRU_Vehicle = SpawnRU_Vehicle:Spawn() + +SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship') +GroupRU_Ship = SpawnRU_Ship:Spawn() + +SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 ) +SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 ) + +for i = 1, 30 do + GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") ) + GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") ) +end + +SetVehicleCompletely = SET_GROUP:New() + :FilterPrefixes( "Spawn Vehicle Zone Completely" ) + :FilterStart() + +SetVehiclePartly = SET_GROUP:New() + :FilterPrefixes( "Spawn Vehicle Zone Partly" ) + :FilterStart() + +SetVehicleNot = SET_GROUP:New() + :FilterPrefixes( "Spawn Vehicle Zone Not" ) + :FilterStart() + +Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4) +Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 ) +Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 ) +for i = 1, 30 do + Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") ) + Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") ) + Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") ) +end + +--DBBlue:TraceDatabase() +--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 ) +--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 ) +--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 ) +--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 ) +--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 ) +--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 ) +-- +--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 ) +--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 ) + +SetBluePlanesGroup:ForEachGroup( + --- @param Wrapper.Group#GROUP MooseGroup + function( MooseGroup ) + for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do + local UnitAction = UnitData -- Wrapper.Unit#UNIT + UnitAction:SmokeBlue() + end + end +) + +SetNorthKoreaGroup:ForEachGroup( + --- @param Wrapper.Group#GROUP MooseGroup + function( MooseGroup ) + for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do + local UnitAction = UnitData -- Wrapper.Unit#UNIT + UnitAction:SmokeRed() + end + end +) + +SetSAMGroup:ForEachGroup( + --- @param Wrapper.Group#GROUP MooseGroup + function( MooseGroup ) + for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do + local UnitAction = UnitData -- Wrapper.Unit#UNIT + UnitAction:SmokeOrange() + end + end +) + +GroupZoneCompletely = GROUP:FindByName( "Zone Completely" ) +GroupZonePartly = GROUP:FindByName( "Zone Partly" ) +GroupZoneNot = GROUP:FindByName( "Zone Not" ) + +ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White ) +ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White ) +ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White ) + +SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely, + --- @param Wrapper.Group#GROUP MooseGroup + function( MooseGroup ) + for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do + local UnitAction = UnitData -- Wrapper.Unit#UNIT + UnitAction:SmokeBlue() + end + end +) + +SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly, + --- @param Wrapper.Group#GROUP MooseGroup + function( MooseGroup ) + for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do + local UnitAction = UnitData -- Wrapper.Unit#UNIT + UnitAction:SmokeBlue() + end + end +) + +SetVehicleNot:ForEachGroupNotInZone( ZoneNot, + --- @param Wrapper.Group#GROUP MooseGroup + function( MooseGroup ) + for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do + local UnitAction = UnitData -- Wrapper.Unit#UNIT + UnitAction:SmokeBlue() + end + end +) + \ No newline at end of file diff --git a/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-GRP-101 - Group Sets.miz b/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-GRP-101 - Group Sets.miz new file mode 100644 index 0000000000..d46ddc8161 Binary files /dev/null and b/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-GRP-101 - Group Sets.miz differ diff --git a/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/pack.ps1 b/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/unpack.ps1 b/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.lua b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.lua new file mode 100644 index 0000000000..a851d9ac86 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.lua @@ -0,0 +1,8 @@ +-- The mission contains templates, which are late activated groups. Only the active groups should be included. +-- It should count 3 groups in DCS.log. + +SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce() +SetGroup:Flush() +SetGroup:I( { Count = SetGroup:Count() } ) + +MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll() diff --git a/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.miz b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.miz new file mode 100644 index 0000000000..170810ab5a Binary files /dev/null and b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.miz differ diff --git a/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/pack.ps1 b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/unpack.ps1 b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.lua b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.lua new file mode 100644 index 0000000000..6d8db5d616 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.lua @@ -0,0 +1,8 @@ +-- The mission contains templates, which are late activated groups. All groups should be included. +-- It should count 7 groups in DCS.log. + +SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() +SetGroup:Flush() +SetGroup:I( { Count = SetGroup:Count() } ) + +MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll() diff --git a/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.miz b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.miz new file mode 100644 index 0000000000..c926f94e8e Binary files /dev/null and b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.miz differ diff --git a/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/pack.ps1 b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/unpack.ps1 b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - FilterOnce Scenario 1.miz b/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - FilterOnce Scenario 1.miz new file mode 100644 index 0000000000..7e2e4b6ed3 Binary files /dev/null and b/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - FilterOnce Scenario 1.miz differ diff --git a/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - Unit Sets.lua b/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - Unit Sets.lua new file mode 100644 index 0000000000..9b2806f476 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - Unit Sets.lua @@ -0,0 +1,7 @@ + +SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() + +SetUnit:Flush() + +SetUnit:I(SetUnit:Count()) + diff --git a/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/pack.ps1 b/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/unpack.ps1 b/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Ground.lua b/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Ground.lua new file mode 100644 index 0000000000..da158a4dda --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Ground.lua @@ -0,0 +1,11 @@ +SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() +SetUnit:Flush() +SetUnit:I( { Count = SetUnit:Count() } ) + +SCHEDULER:New( nil, + function() + SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() + SetUnit:Flush() + SetUnit:I( { Count = SetUnit:Count() } ) + end, {}, 60 ) + diff --git a/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Scenario 2.miz b/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Scenario 2.miz new file mode 100644 index 0000000000..4d00ef1657 Binary files /dev/null and b/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Scenario 2.miz differ diff --git a/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/pack.ps1 b/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/unpack.ps1 b/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.lua b/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.lua new file mode 100644 index 0000000000..0be25eb3a5 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.lua @@ -0,0 +1,16 @@ +SCHEDULER:New( nil, + function() + SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() + SetUnit:Flush() + SetUnit:I( { Count = SetUnit:Count() } ) + end, {}, 0, 30 ) + +GroupPlanes = GROUP:FindByName( "Planes #001" ) + +GroupPlanes:HandleEvent( EVENTS.EngineShutdown ) + +function GroupPlanes:OnEventEngineShutdown( EventData ) + + EventData.IniUnit:Destroy() + +end \ No newline at end of file diff --git a/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.miz b/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.miz new file mode 100644 index 0000000000..13cb7993b3 Binary files /dev/null and b/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.miz differ diff --git a/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/pack.ps1 b/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/unpack.ps1 b/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/unpack.ps1 @@ -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" * diff --git a/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.lua b/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.lua new file mode 100644 index 0000000000..d85a435745 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.lua @@ -0,0 +1,8 @@ +-- The mission contains templates, which are late activated groups. Only the active units should be included. +-- It should count 24 units in DCS.log. + +SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce() +SetUnit:Flush() +SetUnit:I( { Count = SetUnit:Count() } ) + +MESSAGE:NewType( "There are " .. SetUnit:Count() .. " units in the SetUnit.", MESSAGE.Type.Information ):ToAll() diff --git a/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.miz b/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.miz new file mode 100644 index 0000000000..522df9d470 Binary files /dev/null and b/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.miz differ diff --git a/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/pack.ps1 b/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/unpack.ps1 b/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/unpack.ps1 @@ -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" * diff --git a/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.lua b/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.lua new file mode 100644 index 0000000000..ea28a16be7 --- /dev/null +++ b/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.lua @@ -0,0 +1,11 @@ + + + +-- CCCP SEAD Defenses +SEAD_RU_SAM_Defenses = SEAD + :New( + { 'SAM Test' + } + ) + + \ No newline at end of file diff --git a/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz b/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz new file mode 100644 index 0000000000..3fa0dfb554 Binary files /dev/null and b/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz differ diff --git a/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/pack.ps1 b/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/unpack.ps1 b/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.lua b/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.lua new file mode 100644 index 0000000000..4272c98f0b --- /dev/null +++ b/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.lua @@ -0,0 +1,22 @@ +-- Name: SPA-011 - Ground Ops - Simple Spawning +-- Author: FlightControl +-- Date Created: 10 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn a ground vehicle. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicle is spawned. + + + +-- Tests Gudauta +-- ------------- +-- Spawn a gound vehicle... +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) +Spawn_Group_1 = Spawn_Vehicle_1:Spawn() + + + diff --git a/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz b/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz new file mode 100644 index 0000000000..c89698fce0 Binary files /dev/null and b/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz differ diff --git a/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/pack.ps1 b/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/unpack.ps1 b/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.lua b/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.lua new file mode 100644 index 0000000000..36ce824e35 --- /dev/null +++ b/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.lua @@ -0,0 +1,26 @@ +-- Name: SPA-012 - Ground Ops - Multiple Spawns +-- Author: FlightControl +-- Date Created: 10 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. + + + +-- Tests Gudauta +-- ------------- +-- Spawn a gound vehicle... +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) +Spawn_Group_1 = Spawn_Vehicle_1:Spawn() +Spawn_Group_2 = Spawn_Vehicle_1:Spawn() +Spawn_Group_3 = Spawn_Vehicle_1:Spawn() +Spawn_Group_4 = Spawn_Vehicle_1:Spawn() +Spawn_Group_5 = Spawn_Vehicle_1:Spawn() + + + diff --git a/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz b/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz new file mode 100644 index 0000000000..5f6b34fc6e Binary files /dev/null and b/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz differ diff --git a/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/pack.ps1 b/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/unpack.ps1 b/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.lua b/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.lua new file mode 100644 index 0000000000..3549c9a4ee --- /dev/null +++ b/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.lua @@ -0,0 +1,22 @@ +-- Name: SPA-013 - Ground Ops - Scheduled Spawns +-- Author: FlightControl +-- Date Created: 10 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the scheduler parameters. + + + +-- Tests Gudauta +-- ------------- +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 ) + + + + diff --git a/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz b/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz new file mode 100644 index 0000000000..36e6b22faf Binary files /dev/null and b/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz differ diff --git a/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/pack.ps1 b/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/unpack.ps1 b/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.lua b/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.lua new file mode 100644 index 0000000000..2f8ccdc9fa --- /dev/null +++ b/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.lua @@ -0,0 +1,21 @@ +-- Name: SPA-014 - Ground Ops - Scheduled Spawns Limited +-- Author: FlightControl +-- Date Created: 10 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the scheduler parameters. +-- 3. There should not be more than 5 groups spawned. + + + +-- Tests Gudauta +-- ------------- +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 5, 10 ):SpawnScheduled( 5, .5 ) + + diff --git a/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz b/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz new file mode 100644 index 0000000000..c441bfd7e9 Binary files /dev/null and b/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz differ diff --git a/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/pack.ps1 b/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/unpack.ps1 b/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.lua b/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.lua new file mode 100644 index 0000000000..c6c88f56a0 --- /dev/null +++ b/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.lua @@ -0,0 +1,27 @@ +-- Name: SPA-015 - Ground Ops - Randomize Route +-- Author: FlightControl +-- Date Created: 10 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the scheduler parameters. +-- 3. There should not be more than 5 groups spawned. +-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3. + + + +-- Tests Gudauta +-- ------------- +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) + :InitLimit( 10, 10 ) + :InitRandomizeRoute( 1, 1, 200 ) -- Randomize route starting from point 1 till point 3, with a radius of 200 meters around each point. + :SpawnScheduled( 5, .5 ) + + + + diff --git a/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz b/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz new file mode 100644 index 0000000000..3ba5124757 Binary files /dev/null and b/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz differ diff --git a/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/pack.ps1 b/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/unpack.ps1 b/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.lua b/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.lua new file mode 100644 index 0000000000..3bf1f8bfbe --- /dev/null +++ b/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.lua @@ -0,0 +1,29 @@ +-- Name: SPA-016 - Ground Ops - Randomize Zones +-- Author: FlightControl +-- Date Created: 10 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the scheduler parameters. +-- 3. There should not be more than 5 groups spawned. +-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3. +-- 5. Observe that the position where the units are spawned, is randomized according the zones. + + + +-- Tests Gudauta +-- ------------- +-- Create a zone table of the 2 zones. +ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } + +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) + :InitLimit( 10, 10 ) + :InitRandomizeRoute( 1, 1, 200 ) + :InitRandomizeZones( ZoneTable ) + :SpawnScheduled( 5, .5 ) + diff --git a/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz b/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz new file mode 100644 index 0000000000..ed0aae2df9 Binary files /dev/null and b/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz differ diff --git a/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/pack.ps1 b/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/unpack.ps1 b/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.lua b/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.lua new file mode 100644 index 0000000000..54d89d920f --- /dev/null +++ b/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.lua @@ -0,0 +1,31 @@ +-- Name: SPA-017 - Ground Ops - Set AI inactive while spawning +-- Author: FlightControl +-- Date Created: 24 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- But set the AI inactive when spawning. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the scheduler parameters. +-- 3. There should not be more than 5 groups spawned. +-- 4. Observe that the AI is inactivated, and thus, the vehicles aren't moving. +-- 5. Observe that the position where the units are spawned, is randomized in the zones perimeters. + + + +-- Tests Gudauta +-- ------------- +-- Create a zone table of the 2 zones. +ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } + +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) + :InitLimit( 10, 10 ) + :InitRandomizeRoute( 1, 1, 200 ) + :InitRandomizeZones( ZoneTable ) + :InitAIOnOff( false ) -- This will disable the AI. You can also use :InitAIOff(). Set AI On (for those groups with AI Off in the ME), with :InitAIOn(). + :SpawnScheduled( 5, .5 ) + diff --git a/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.miz b/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.miz new file mode 100644 index 0000000000..aed73f1681 Binary files /dev/null and b/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.miz differ diff --git a/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/pack.ps1 b/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/unpack.ps1 b/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.lua b/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.lua new file mode 100644 index 0000000000..4258bd86c6 --- /dev/null +++ b/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.lua @@ -0,0 +1,28 @@ +--- +-- Name: SPA-018 - Ground Ops - Randomize Templates +-- Author: FlightControl +-- Date Created: 10 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned with randomized templates. + + +-- Tests Gudauta +-- ------------- +-- Create a zone table of the 2 zones. +ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } + +TemplateTable = { "A", "B", "C" } + +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) + :InitLimit( 10, 10 ) + :InitRandomizeRoute( 1, 1, 200 ) + :InitRandomizeTemplate( TemplateTable ) + --:InitRandomizeZones( ZoneTable ) + :SpawnScheduled( 5, .5 ) + diff --git a/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.miz b/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.miz new file mode 100644 index 0000000000..eada25e16a Binary files /dev/null and b/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.miz differ diff --git a/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/pack.ps1 b/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/unpack.ps1 b/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.lua b/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.lua new file mode 100644 index 0000000000..e636abb572 --- /dev/null +++ b/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.lua @@ -0,0 +1,27 @@ +--- +-- Name: SPA-019 - Ground Ops - Randomize Templates with Waypoints +-- Author: FlightControl +-- Date Created: 24 Feb 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned with randomized templates. +-- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other. + + +-- Tests Gudauta +-- ------------- +-- Create a zone table of the 2 zones. +ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } + +TemplateTable = { "A", "B", "C" } + +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) + :InitLimit( 10, 10 ) + :InitRandomizeTemplate( TemplateTable ) + :SpawnScheduled( 5, .5 ) + diff --git a/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.miz b/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.miz new file mode 100644 index 0000000000..c32aa4d093 Binary files /dev/null and b/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.miz differ diff --git a/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/pack.ps1 b/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/unpack.ps1 b/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.lua b/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.lua new file mode 100644 index 0000000000..ba61228a34 --- /dev/null +++ b/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.lua @@ -0,0 +1,29 @@ +--- +-- Name: SPA-020 - Ground Ops - Randomize Templates in Random Zones without Waypoints +-- Author: FlightControl +-- Date Created: 24 Feb 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned with randomized templates. +-- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other. +-- 3. Observe that the ground vehicles are spread over the random zones, and that the initial templates formations are kept. + + +-- Tests Gudauta +-- ------------- +-- Create a zone table of the 2 zones. +ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } + +TemplateTable = { "A", "B", "C" } + +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) + :InitLimit( 100, 10 ) + :InitRandomizeTemplate( TemplateTable ) + :InitRandomizeZones( ZoneTable ) + :SpawnScheduled( 5, .5 ) + diff --git a/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.miz b/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.miz new file mode 100644 index 0000000000..4628ff7fed Binary files /dev/null and b/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.miz differ diff --git a/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/pack.ps1 b/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/unpack.ps1 b/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.lua b/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.lua new file mode 100644 index 0000000000..f3f1ad8d1c --- /dev/null +++ b/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.lua @@ -0,0 +1,27 @@ +--- +-- Name: SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names +-- Author: FlightControl +-- Date Created: 14 Mar 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the scheduler parameters. +-- 3. There should not be more than 5 groups spawned. +-- 4. Observe the unit names, they should have the name as defined within the ME. + + + +-- Tests Gudauta +-- ------------- +Spawn_Vehicle_1 = SPAWN + :New( "Spawn Vehicle 1" ) + :InitKeepUnitNames() + :InitLimit( 5, 10 ) + :SpawnScheduled( 5, .5 ) + + diff --git a/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.miz b/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.miz new file mode 100644 index 0000000000..c8c98fd885 Binary files /dev/null and b/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.miz differ diff --git a/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/pack.ps1 b/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/unpack.ps1 b/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua b/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua new file mode 100644 index 0000000000..5096cddc56 --- /dev/null +++ b/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua @@ -0,0 +1,23 @@ +-- Name: SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval +-- Author: FlightControl +-- Date Created: 18 Mar 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- The vehicle should respawn when killed. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the scheduler parameters. + + + +-- Tests Gudauta +-- ------------- +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 1, 0 ):SpawnScheduled( 30, .5 ) + + + + diff --git a/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz b/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz new file mode 100644 index 0000000000..c804deb6b5 Binary files /dev/null and b/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz differ diff --git a/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 b/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 b/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua b/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua new file mode 100644 index 0000000000..17c3d32d80 --- /dev/null +++ b/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua @@ -0,0 +1,26 @@ +--- +-- Name: SPA-023 - Ground Ops - SpawnStart and SpawnStop +-- Author: FlightControl +-- Date Created: 10 Jan 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. +-- The schedule is immediately stopped and started. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the scheduler parameters. + + + +-- Tests Gudauta +-- ------------- +Spawn_Vehicle = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 ):SpawnScheduleStop() + +Spawn_Vehicle:SpawnScheduleStart() + + + + diff --git a/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz b/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz new file mode 100644 index 0000000000..cb9d139aeb Binary files /dev/null and b/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz differ diff --git a/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 b/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 b/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua b/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua new file mode 100644 index 0000000000..43730154a9 --- /dev/null +++ b/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua @@ -0,0 +1,27 @@ +--- +-- Name: SPA-024 - Ground Ops - Arrays +-- Author: FlightControl +-- Date Created: 19 Jul 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in an array. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the array parameters. + + + +-- Tests Gudauta +-- ------------- +Spawn_Vehicle = SPAWN + :New( "Spawn Vehicles" ) + :InitLimit( 12, 60 ) + :InitArray( 90, 10, 10, 10 ) + + + + + diff --git a/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz b/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz new file mode 100644 index 0000000000..0f677bfecb Binary files /dev/null and b/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz differ diff --git a/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 b/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 b/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua b/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua new file mode 100644 index 0000000000..43730154a9 --- /dev/null +++ b/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua @@ -0,0 +1,27 @@ +--- +-- Name: SPA-024 - Ground Ops - Arrays +-- Author: FlightControl +-- Date Created: 19 Jul 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn multiple ground vehicles, in an array. +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. +-- 2. The vehicles should spawn according the array parameters. + + + +-- Tests Gudauta +-- ------------- +Spawn_Vehicle = SPAWN + :New( "Spawn Vehicles" ) + :InitLimit( 12, 60 ) + :InitArray( 90, 10, 10, 10 ) + + + + + diff --git a/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz b/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz new file mode 100644 index 0000000000..3b21755fdd Binary files /dev/null and b/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz differ diff --git a/SPA - Spawning/SPA-024 - Ground Ops - Arrays/pack.ps1 b/SPA - Spawning/SPA-024 - Ground Ops - Arrays/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-024 - Ground Ops - Arrays/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-024 - Ground Ops - Arrays/unpack.ps1 b/SPA - Spawning/SPA-024 - Ground Ops - Arrays/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-024 - Ground Ops - Arrays/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua b/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua new file mode 100644 index 0000000000..58c162e33d --- /dev/null +++ b/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua @@ -0,0 +1,22 @@ +-- Name: SPA-025 - Ground Ops - Spawn Hidden +-- Author: FlightControl +-- Date Created: 06 Sep 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn a ground vehicle, hidden +-- +-- # Test cases: +-- +-- 1. Observe that the ground vehicle is spawned and his hidden. + + + +-- Tests Gudauta +-- ------------- +-- Spawn a gound vehicle... +Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) +Spawn_Group_1 = Spawn_Vehicle_1:Spawn() + + + diff --git a/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz b/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz new file mode 100644 index 0000000000..7cc5580c2a Binary files /dev/null and b/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz differ diff --git a/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 b/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 b/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua b/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua new file mode 100644 index 0000000000..50e602b532 --- /dev/null +++ b/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua @@ -0,0 +1,26 @@ +-- Name: SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden +-- Author: FlightControl +-- Date Created: 06 Sep 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn a ground vehicle, hidden, based on a randomized template. +-- +-- # Test cases: +-- +-- 1. Observe that a random ground vehicle is spawned and his hidden. + + + +-- Tests Gudauta +-- ------------- +-- Spawn a gound vehicle... + +Templates = { "A", "B" } + +Spawn_Vehicle_1 = SPAWN:New( "Vehicle" ) +Spawn_Vehicle_1:InitRandomizeTemplate( Templates ) +Spawn_Group_1 = Spawn_Vehicle_1:Spawn() + + + diff --git a/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz b/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz new file mode 100644 index 0000000000..d766fd7699 Binary files /dev/null and b/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz differ diff --git a/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 b/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 b/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua b/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua new file mode 100644 index 0000000000..75d481066d --- /dev/null +++ b/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua @@ -0,0 +1,25 @@ +-- Name: SPA-027 - Ground Ops - Respawning After Destroy +-- Author: FlightControl +-- Date Created: 10 Dec 2017 +-- +-- At Gudauta spawns ground vehicle, in a scheduled fashion. +-- There can only be a maximum of 2 grond vehicles alive. +-- When a ground vehicle is destroyed, a new one needs to be spawned at a different location in the zone. +-- Until that one is also destroyed. +-- +-- Red is attacking the spawned blue vehicles. +-- Once blue is destroyed, a new blue needs to spawn. +-- Until all 10 blue vehicles are spawned. +-- The position of blue is randomized in the zone. +-- Blue has ROE hold weapons. +-- + + +BlueVehicleSpawn = SPAWN + :New( "Tank" ) + :InitLimit( 2, 10 ) + :InitRandomizePosition( true, 200, 50 ) + :SpawnScheduled( 5, .5 ) + + + diff --git a/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz b/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz new file mode 100644 index 0000000000..bb1732dbd3 Binary files /dev/null and b/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz differ diff --git a/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 b/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 b/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua b/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua new file mode 100644 index 0000000000..c7d62a568c --- /dev/null +++ b/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua @@ -0,0 +1,8 @@ +-- Tests Kutaisi +-- ------------- +-- Tests the CleanUp functionality. +-- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground. +-- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn. +Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):InitCleanUp( 60 ):SpawnScheduled( 10, 0 ) +Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 ) + diff --git a/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz b/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz new file mode 100644 index 0000000000..e74b101258 Binary files /dev/null and b/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz differ diff --git a/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 b/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 b/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua b/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua new file mode 100644 index 0000000000..1ff4c90c02 --- /dev/null +++ b/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua @@ -0,0 +1,17 @@ +--- +-- Tests Gudauta +-- ------------- +-- Limited scheduled spawning of groups... +Spawn_Plane_Limited_Scheduled = SPAWN:New( "Spawn Plane Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 ) +Spawn_Helicopter_Limited_Scheduled = SPAWN:New( "Spawn Helicopter Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 ) +Spawn_Ground_Limited_Scheduled = SPAWN:New( "Spawn Vehicle Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 90, 0 ) + +--- +-- Tests Sukhumi +-- ------------- +-- Limited scheduled spawning of groups with destruction... +Spawn_Plane_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Plane Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) +Spawn_Helicopter_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Helicopter Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) +Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) + + diff --git a/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz b/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz new file mode 100644 index 0000000000..22e188a260 Binary files /dev/null and b/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz differ diff --git a/SPA - Spawning/SPA-110 - Limit Spawning/pack.ps1 b/SPA - Spawning/SPA-110 - Limit Spawning/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-110 - Limit Spawning/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-110 - Limit Spawning/unpack.ps1 b/SPA - Spawning/SPA-110 - Limit Spawning/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-110 - Limit Spawning/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua b/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua new file mode 100644 index 0000000000..7001950cca --- /dev/null +++ b/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua @@ -0,0 +1,41 @@ +--- +-- Name: SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit +-- Author: FlightControl +-- Date Created: 05 Feb 2017 +-- +-- # Situation: +-- +-- One airplane and one helicopter will be spawned. +-- Only one airplane and one helicopter can be alive at the same time. +-- Upon landing, the airplane and helicopter will respawn at Kutaisi. +-- +-- # Test cases: +-- +-- 1. Observe the spawning of the airplane and helicopter +-- 2. There should not be more airplanes alive than there are set by InitLimit. +-- 3. Upon landing, the planes should respawn. +-- 4. The KA-50 should respawn itself directly when landed. +-- 5. The A-10C should respawn itself when the air unit has parked at the ramp. + + +do + + -- Declare SPAWN objects + Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 1, 10 ) + Spawn_A_10C = SPAWN:New("A-10C"):InitLimit( 1, 10 ) + + -- Choose repeat functionality + + -- Repeat on landing + Spawn_KA_50:InitRepeatOnLanding() + + -- Repeat on enging shutdown (when landed on the airport) + Spawn_A_10C:InitRepeatOnEngineShutDown() + + -- Now SPAWN the GROUPs + Spawn_KA_50:SpawnScheduled(30,0) + Spawn_A_10C:SpawnScheduled(30,0) + + -- Now run the mission and observe the behaviour. + +end diff --git a/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz b/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz new file mode 100644 index 0000000000..e89f890d31 Binary files /dev/null and b/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz differ diff --git a/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 b/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 b/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz b/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz new file mode 100644 index 0000000000..bdbcebfd63 Binary files /dev/null and b/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz differ diff --git a/SPA - Spawning/SPA-120 - Repeat Spawning/pack.ps1 b/SPA - Spawning/SPA-120 - Repeat Spawning/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-120 - Repeat Spawning/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-120 - Repeat Spawning/unpack.ps1 b/SPA - Spawning/SPA-120 - Repeat Spawning/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-120 - Repeat Spawning/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua b/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua new file mode 100644 index 0000000000..e65470a72d --- /dev/null +++ b/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua @@ -0,0 +1,51 @@ +--- +-- Name: SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit +-- Author: FlightControl +-- Date Created: 05 Feb 2017 +-- +-- # Situation: +-- +-- Multiple airplanes will be spawned at a scheduled interval. +-- There is a limit on how many airplanes can be alive at the same time. +-- Upon landing, the airplanes will respawn at Kutaisi. +-- +-- # Test cases: +-- +-- 1. Observe the spawning of the airplanes +-- 2. There should not be more airplanes alive than there are set by InitLimit. +-- 3. Upon landing, the planes should respawn. +-- 4. The KA-50 and the C-101EB should respawn itself directly when landed. +-- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. + + +do + + -- Declare SPAWN objects + Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 2, 10 ) + Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 2, 10 ) + Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 2, 10 ) + Spawn_A_10C = SPAWN:New("A-10C") + :InitLimit( 2, 10 ) + + -- Choose repeat functionality + + -- Repeat on landing + Spawn_KA_50:InitRepeatOnLanding() + Spawn_KA_50:InitDelayOff() + + Spawn_C_101EB:InitRepeatOnLanding() + Spawn_C_101EB:InitDelayOff() + + -- Repeat on enging shutdown (when landed on the airport) + Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() + Spawn_A_10C:InitRepeatOnEngineShutDown() + + -- Now SPAWN the GROUPs + Spawn_KA_50:SpawnScheduled(180,0) + Spawn_C_101EB:SpawnScheduled(180,0) + Spawn_MI_8MTV2:SpawnScheduled(180,0) + Spawn_A_10C:SpawnScheduled(180,0) + + -- Now run the mission and observe the behaviour. + +end diff --git a/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz b/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz new file mode 100644 index 0000000000..803f953c84 Binary files /dev/null and b/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz differ diff --git a/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 b/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 b/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua b/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua new file mode 100644 index 0000000000..b2e2028c1b --- /dev/null +++ b/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua @@ -0,0 +1,47 @@ +--- +-- Name: SPA-122 - Air Ops - OnLand test for Scheduled Spawns +-- Author: FlightControl +-- Date Created: 21 Mar 2017 +-- +-- # Situation: +-- +-- An airplane is spawned at a scheduled interval. +-- There is a limit on how many airplanes can be alive at the same time. +-- Upon landing, the airplane will respawn in the air. +-- +-- # Test cases: +-- +-- 1. Observe the spawning of the airplanes +-- 2. There should not be more airplanes alive than there are set by InitLimit. +-- 3. Upon landing, the planes should respawn. +-- 4. The KA-50 and the C-101EB should respawn itself directly when landed. +-- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. + + +do + + -- Declare SPAWN objects + Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 1, 0 ) + Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 1, 0 ) + Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 1, 0 ) + Spawn_A_10C = SPAWN:New("A-10C"):InitLimit( 1, 0 ) + + -- Choose repeat functionality + + -- Repeat on landing + Spawn_KA_50:InitRepeatOnLanding() + Spawn_C_101EB:InitRepeatOnLanding() + + -- Repeat on enging shutdown (when landed on the airport) + Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() + Spawn_A_10C:InitRepeatOnEngineShutDown() + + -- Now SPAWN the GROUPs + Spawn_KA_50:SpawnScheduled(30,0) + Spawn_C_101EB:SpawnScheduled(30,0) + Spawn_MI_8MTV2:SpawnScheduled(30,0) + Spawn_A_10C:SpawnScheduled(30,0) + + -- Now run the mission and observe the behaviour. + +end diff --git a/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz b/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz new file mode 100644 index 0000000000..ccec68ce93 Binary files /dev/null and b/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz differ diff --git a/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 b/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 b/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua b/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua new file mode 100644 index 0000000000..59fa26f1eb --- /dev/null +++ b/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua @@ -0,0 +1,28 @@ +--- +-- Name: SPA-123 - Air Ops - Repeat on Landing and InitCleanUp +-- Author: FlightControl +-- Date Created: 15 Sep 2018 +-- +-- # Situation: +-- +-- Helicpters spawn and are lightly shot until the crash land, but don't really destroy. +-- The should be respawned after a while. +-- No performance overhead should be noticed. + +do + + -- Declare SPAWN objects + Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 2, 10 ) + :InitLimit( 2, 0 ) + + -- Choose repeat functionality + + -- Repeat on landing + Spawn_KA_50:InitRepeatOnLanding() + Spawn_KA_50:InitDelayOff() + Spawn_KA_50:InitCleanUp( 300 ) + Spawn_KA_50:SpawnScheduled( 180, 0.2 ) + + -- Now run the mission and observe the behaviour. + +end diff --git a/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz b/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz new file mode 100644 index 0000000000..8bdcc44d3e Binary files /dev/null and b/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz differ diff --git a/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 b/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 b/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua b/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua new file mode 100644 index 0000000000..6eb08c7921 --- /dev/null +++ b/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua @@ -0,0 +1,47 @@ +--- +-- Name: SPA-130 - Uncontrolled Spawning +-- Author: FlightControl +-- Date Created: 04 Feb 2017 +-- +-- # Situation: +-- +-- A plane will be spawned Uncontrolled and later one will be spawned Controlled. +-- Only the Controlled plane will move, the other will remain idle at the parking spot. +-- +-- # Test cases: +-- +-- 1. Observe the spawning of the UnControlled Plane. +-- 2. Observe the spawning of the Controlled Plane. + + +-- Create the SPAWN object looking for the group (template) "Plane". +SpawnPlane = SPAWN:New( "Plane" ) + +-- Set the spawn mode to UnControlled. +SpawnPlane:InitUnControlled( true ) + +-- Spawn the UnControlled Group +UnControlledPlane = SpawnPlane:Spawn() + +-- Set the spawn mode back to Controlled. +SpawnPlane:InitUnControlled( false ) + +ControlledPlane = SpawnPlane:Spawn() + +-- Now, let's create a menu option at a player slot plane... +-- We can only create the menu option if the player has joined the slot ... +PlayerPlane = CLIENT:FindByName( "PlayerPlane", "Select Menu item to activate UnControlled plane" ) + +PlayerPlane:Alive( + function( Client, SpawnPlane ) + + --- @param Functional.Spawn#SPAWN SpawnPlane + local function ActivatePlane( SpawnPlane ) + SpawnPlane:InitUnControlled( false ) + SpawnPlane:ReSpawn( 1 ) + end + + local Menu = MENU_CLIENT_COMMAND:New( Client, "Select to activate UnControlled plane", nil, ActivatePlane, SpawnPlane ) + end + , SpawnPlane +) \ No newline at end of file diff --git a/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz b/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz new file mode 100644 index 0000000000..5c471b0a0a Binary files /dev/null and b/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz differ diff --git a/SPA - Spawning/SPA-130 - Uncontrolled Spawning/pack.ps1 b/SPA - Spawning/SPA-130 - Uncontrolled Spawning/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-130 - Uncontrolled Spawning/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-130 - Uncontrolled Spawning/unpack.ps1 b/SPA - Spawning/SPA-130 - Uncontrolled Spawning/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-130 - Uncontrolled Spawning/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Caucasus - SpawnAtAirbase.lua b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Caucasus - SpawnAtAirbase.lua new file mode 100644 index 0000000000..071ca834ec --- /dev/null +++ b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Caucasus - SpawnAtAirbase.lua @@ -0,0 +1,20 @@ +-- Name: SPA-131 - Air Ops - SpawnAtAirbase +-- Author: FlightControl +-- Date Created: 14 Sep 2017 +-- +Spawn_Plane = SPAWN:New( "Plane" ) +Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Cold ) +Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Hot ) +Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Runway ) + +Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold ) + +Spawn_Heli = SPAWN:New( "Heli") + +Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Cold" ), SPAWN.Takeoff.Cold ) +Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Hot" ), SPAWN.Takeoff.Hot ) +Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Runway" ), SPAWN.Takeoff.Runway ) +Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Air" ), SPAWN.Takeoff.Air ) + +Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold ) + diff --git a/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua new file mode 100644 index 0000000000..b7b1df3a94 --- /dev/null +++ b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua @@ -0,0 +1,11 @@ +-- Name: SPA-131 - Air Ops - SpawnAtAirbase +-- Author: FlightControl +-- Date Created: 14 Sep 2017 +-- +Spawn_Plane = SPAWN:New( "Plane" ) +Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Cold ) +Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Hot ) +Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Runway ) + + + diff --git a/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz new file mode 100644 index 0000000000..93224a797f Binary files /dev/null and b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz differ diff --git a/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua b/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua new file mode 100644 index 0000000000..ddb5f4a80c --- /dev/null +++ b/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua @@ -0,0 +1,19 @@ +--- +-- Name: SPA-140 - Spawn Client Slots +-- Author: FlightControl +-- Date Created: 30 Aug 2017 +-- +-- # Situation: +-- +-- A plane will be spawned Uncontrolled and later one will be spawned Controlled. +-- Only the Controlled plane will move, the other will remain idle at the parking spot. +-- +-- # Test cases: +-- + +-- Create the SPAWN object looking for the group (template) "Plane". +SpawnPlane = SPAWN:New( "Plane" ) + +-- Spawn the UnControlled Group +UnControlledPlane = SpawnPlane:SpawnClientAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Kutaisi ) ) + diff --git a/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz b/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz new file mode 100644 index 0000000000..6d5d954554 Binary files /dev/null and b/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz differ diff --git a/SPA - Spawning/SPA-140 - Spawn Client Slots/pack.ps1 b/SPA - Spawning/SPA-140 - Spawn Client Slots/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-140 - Spawn Client Slots/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-140 - Spawn Client Slots/unpack.ps1 b/SPA - Spawning/SPA-140 - Spawn Client Slots/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-140 - Spawn Client Slots/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua b/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua new file mode 100644 index 0000000000..4302dd371c --- /dev/null +++ b/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua @@ -0,0 +1,11 @@ +--- +-- Tests Gudauta +-- -------------- +-- Limited and scheduled spawning of groups, with RandomizeTemplate ... + +Templates = { "Template1", "Template2", "Template3", "Template4" } + +Spawn_Ground1 = SPAWN:New( "Spawn Vehicle1" ):InitLimit( 4, 20 ):InitRandomizeTemplate(Templates):SpawnScheduled( 15, 0 ) +Spawn_Ground2 = SPAWN:New( "Spawn Vehicle2" ):InitLimit( 4, 20 ):InitRandomizeTemplate(Templates):SpawnScheduled( 15, 0 ) + + diff --git a/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz b/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz new file mode 100644 index 0000000000..9647c82e1c Binary files /dev/null and b/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz differ diff --git a/SPA - Spawning/SPA-200 - Randomize Unit Types/pack.ps1 b/SPA - Spawning/SPA-200 - Randomize Unit Types/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-200 - Randomize Unit Types/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-200 - Randomize Unit Types/unpack.ps1 b/SPA - Spawning/SPA-200 - Randomize Unit Types/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-200 - Randomize Unit Types/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz b/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz new file mode 100644 index 0000000000..be56f15009 Binary files /dev/null and b/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz differ diff --git a/SPA - Spawning/SPA-220 - Randomize Zones/pack.ps1 b/SPA - Spawning/SPA-220 - Randomize Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-220 - Randomize Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-220 - Randomize Zones/unpack.ps1 b/SPA - Spawning/SPA-220 - Randomize Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-220 - Randomize Zones/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua b/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua new file mode 100644 index 0000000000..f33af118ab --- /dev/null +++ b/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua @@ -0,0 +1,52 @@ + +local Iterations = 10 +local Iteration = 1 + +GroundStatics = { "GroundStatic1", "GroundStatic2", "GroundStatic3" } +AirplaneStatics = { "AirplaneStatic1", "AirplaneStatic2", "AirplaneStatic3" } +HelicopterStatics = { "HelicopterStatic1", "HelicopterStatic2", "HelicopterStatic3" } +ShipStatics = { "ShipStatic1", "ShipStatic2", "ShipStatic3" } + +HeightLimit = 500 + +SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) +SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) +SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) +SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) + +--- Spawns these groups slowly. +SCHEDULER:New( nil, + + function( Interation, Iterations ) + do + -- Spawn Ground + local StaticName = GroundStatics[ math.random( 1, 3 ) ] + local SpawnStatic = STATIC:FindByName( StaticName ) + SpawnGrounds:SpawnFromUnit( SpawnStatic ) + end + + do + -- Spawn Airplanes + local StaticName = AirplaneStatics[ math.random( 1, 3 ) ] + local SpawnStatic = STATIC:FindByName( StaticName ) + SpawnAirplanes:SpawnFromUnit( SpawnStatic ) + SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 ) + end + + do + -- Spawn Helicopters + local StaticName = HelicopterStatics[ math.random( 1, 3 ) ] + local SpawnStatic = STATIC:FindByName( StaticName ) + SpawnHelicopters:SpawnFromUnit( SpawnStatic ) + SpawnHelicopters:SpawnFromUnit( SpawnStatic, 200, 500 ) -- Spawn between 200 and 500 meters. + end + + do + -- Spawn Ships + local StaticName = ShipStatics[ math.random( 1, 3 ) ] + local SpawnStatic = STATIC:FindByName( StaticName ) + SpawnShips:SpawnFromUnit( SpawnStatic ) + end + + end, {}, 0, 15, 0.5 +) diff --git a/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz b/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz new file mode 100644 index 0000000000..3cc3944078 Binary files /dev/null and b/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz differ diff --git a/SPA - Spawning/SPA-310 - Spawn at Static position/pack.ps1 b/SPA - Spawning/SPA-310 - Spawn at Static position/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-310 - Spawn at Static position/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-310 - Spawn at Static position/unpack.ps1 b/SPA - Spawning/SPA-310 - Spawn at Static position/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-310 - Spawn at Static position/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua b/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua new file mode 100644 index 0000000000..01e52eda02 --- /dev/null +++ b/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua @@ -0,0 +1,52 @@ + +local Iterations = 10 +local Iteration = 1 + +GroundUnits = { "GroundUnit1", "GroundUnit2", "GroundUnit3" } +AirplaneUnits = { "AirplaneUnit1", "AirplaneUnit2", "AirplaneUnit3" } +HelicopterUnits = { "HelicopterUnit1", "HelicopterUnit2", "HelicopterUnit3" } +ShipUnits = { "ShipUnit1", "ShipUnit2", "ShipUnit3" } + +HeightLimit = 500 + +SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 10, 3 ) +SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) +SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) +SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) + +--- Spawns these groups slowly. +SCHEDULER:New( nil, + + function( Interation, Iterations ) + do + -- Spawn Ground + local UnitName = GroundUnits[ math.random( 1, 3 ) ] + local SpawnUnit = UNIT:FindByName( UnitName ) + SpawnGrounds:SpawnFromUnit( SpawnUnit ) + end + + do + -- Spawn Airplanes + local UnitName = AirplaneUnits[ math.random( 1, 3 ) ] + local SpawnUnit = UNIT:FindByName( UnitName ) + SpawnAirplanes:SpawnFromUnit( SpawnUnit ) + SpawnAirplanes:SpawnFromUnit( SpawnUnit, 200, 500 ) + end + + do + -- Spawn Helicopters + local UnitName = HelicopterUnits[ math.random( 1, 3 ) ] + local SpawnUnit = UNIT:FindByName( UnitName ) + SpawnHelicopters:SpawnFromUnit( SpawnUnit ) + SpawnHelicopters:SpawnFromUnit( SpawnUnit, 500, 2000 ) + end + + do + -- Spawn Ships + local UnitName = ShipUnits[ math.random( 1, 3 ) ] + local SpawnUnit = UNIT:FindByName( UnitName ) + SpawnShips:SpawnFromUnit( SpawnUnit ) + end + + end, {}, 0, 15, 0.5 +) diff --git a/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz b/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz new file mode 100644 index 0000000000..2fb90cbd8d Binary files /dev/null and b/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz differ diff --git a/SPA - Spawning/SPA-320 - Spawn at Unit position/pack.ps1 b/SPA - Spawning/SPA-320 - Spawn at Unit position/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-320 - Spawn at Unit position/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-320 - Spawn at Unit position/unpack.ps1 b/SPA - Spawning/SPA-320 - Spawn at Unit position/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-320 - Spawn at Unit position/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua b/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua new file mode 100644 index 0000000000..fbb754c873 --- /dev/null +++ b/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua @@ -0,0 +1,61 @@ + +local Iterations = 10 +local Iteration = 1 + +GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } +GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } +AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } +HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } +ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } + +HeightLimit = 500 + +SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ) +SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) +SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) +SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) +SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) + +--- Spawns these groups slowly. +SCHEDULER:New( nil, + + function( Interation, Iterations ) + do + -- Spawn Ground + local ZoneName = GroundZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnGrounds:SpawnFromVec2( SpawnVec3:GetVec2() ) + end + + do + -- Spawn Ground Randomize + local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnRandomizeGrounds:SpawnFromVec2( SpawnVec3:GetVec2() ) + end + + do + -- Spawn Airplanes + local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnAirplanes:SpawnFromVec2( SpawnVec3:GetVec2() ) + SpawnAirplanes:SpawnFromVec2( SpawnVec3:GetVec2(), 200, 500 ) + end + + do + -- Spawn Helicopters + local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnHelicopters:SpawnFromVec2( SpawnVec3:GetVec2() ) + SpawnHelicopters:SpawnFromVec2( SpawnVec3:GetVec2(), 2000, 4000 ) + end + + do + -- Spawn Ships + local ZoneName = ShipZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnShips:SpawnFromVec2( SpawnVec3:GetVec2() ) + end + + end, {}, 0, 15, 0.5 +) diff --git a/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz b/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz new file mode 100644 index 0000000000..9a8a93d4e5 Binary files /dev/null and b/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz differ diff --git a/SPA - Spawning/SPA-330 - Spawn at Vec2 position/pack.ps1 b/SPA - Spawning/SPA-330 - Spawn at Vec2 position/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-330 - Spawn at Vec2 position/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-330 - Spawn at Vec2 position/unpack.ps1 b/SPA - Spawning/SPA-330 - Spawn at Vec2 position/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-330 - Spawn at Vec2 position/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua b/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua new file mode 100644 index 0000000000..df0d253ef1 --- /dev/null +++ b/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua @@ -0,0 +1,59 @@ + +local Iterations = 10 +local Iteration = 1 + +GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } +GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } +AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } +HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } +ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } + +HeightLimit = 500 + +SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ) +SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) +SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) +SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) +SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) + +--- Spawns these groups slowly. +SCHEDULER:New( nil, + + function( Interation, Iterations ) + do + -- Spawn Ground + local ZoneName = GroundZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + do + -- Spawn Ground Randomize + local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnRandomizeGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + do + -- Spawn Airplanes + local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnAirplanes:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + do + -- Spawn Helicopters + local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnHelicopters:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + do + -- Spawn Ships + local ZoneName = ShipZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnShips:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + end, {}, 0, 15, 0.5 +) diff --git a/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz b/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz new file mode 100644 index 0000000000..49dc4906e6 Binary files /dev/null and b/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz differ diff --git a/SPA - Spawning/SPA-340 - Spawn at Vec3 position/pack.ps1 b/SPA - Spawning/SPA-340 - Spawn at Vec3 position/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-340 - Spawn at Vec3 position/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-340 - Spawn at Vec3 position/unpack.ps1 b/SPA - Spawning/SPA-340 - Spawn at Vec3 position/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-340 - Spawn at Vec3 position/unpack.ps1 @@ -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" * diff --git a/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua b/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua new file mode 100644 index 0000000000..e3ea496327 --- /dev/null +++ b/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua @@ -0,0 +1,73 @@ +--- +-- Name: SPA-350 - Spawn at Vec3 position RandomzePosition +-- Author: FlightControl +-- Date Created: 14 Mar 2017 +-- +-- # Situation: +-- +-- Ground troops, Airplanes, Helicopters and Ships are spawning from Vec3 points. +-- The API InitRandomizePosition is tested here, ensure that groups are replaced within a 900 to 1000 zone band at random positions. +-- +-- # Test cases: +-- +-- 1. Observe the random positioning of the groups. There should be no scattering of units. +-- + +local Iterations = 10 +local Iteration = 1 + +GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } +GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } +AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } +HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } +ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } + +HeightLimit = 500 + +SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) +SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) +SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) +SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) +SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) + +--- Spawns these groups slowly. +SCHEDULER:New( nil, + + function( Interation, Iterations ) + do + -- Spawn Ground + local ZoneName = GroundZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + do + -- Spawn Ground Randomize + local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnRandomizeGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + do + -- Spawn Airplanes + local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnAirplanes:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + do + -- Spawn Helicopters + local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnHelicopters:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + do + -- Spawn Ships + local ZoneName = ShipZones[ math.random( 1, 3 ) ] + local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) + SpawnShips:SpawnFromVec3( SpawnVec3:GetVec3() ) + end + + end, {}, 0, 15, 0.5 +) diff --git a/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz b/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz new file mode 100644 index 0000000000..1402e753cf Binary files /dev/null and b/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz differ diff --git a/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 b/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 b/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 @@ -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" * diff --git a/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.lua b/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.lua new file mode 100644 index 0000000000..a533d78eef --- /dev/null +++ b/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.lua @@ -0,0 +1,31 @@ +--- Name: SPS-100 - Simple Spawning +-- Author: FlightControl +-- Date Created: 09 Apr 2017 +-- +-- # Situation: +-- +-- At Gudauta spawn a static. +-- +-- # Test cases: +-- +-- 1. Observe that the static is spawned. + + +local ZonePosition = ZONE:New( "Position" ) + +local SpawnBuilding = SPAWNSTATIC:NewFromStatic( "Building", country.id.GERMANY ) +local SpawnBarrack = SPAWNSTATIC:NewFromStatic( "Barrack", country.id.GERMANY ) + +local ZonePointVec2 = ZonePosition:GetPointVec2() + +local Building = SpawnBuilding:SpawnFromZone( ZonePosition, 0 ) + +for Heading = 0, 360,60 do + local Radial = Heading * ( math.pi*2 ) / 360 + local x = ZonePointVec2:GetLat() + math.cos( Radial ) * 150 + local y = ZonePointVec2:GetLon() + math.sin( Radial ) * 150 + SpawnBarrack:SpawnFromPointVec2( POINT_VEC2:New( x, y ), Heading + 90 ) +end + + + diff --git a/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.miz b/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.miz new file mode 100644 index 0000000000..cd3c215e52 Binary files /dev/null and b/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.miz differ diff --git a/SPS - Spawning Statics/SPS-100 - Simple Spawning/pack.ps1 b/SPS - Spawning Statics/SPS-100 - Simple Spawning/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/SPS - Spawning Statics/SPS-100 - Simple Spawning/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/SPS - Spawning Statics/SPS-100 - Simple Spawning/unpack.ps1 b/SPS - Spawning Statics/SPS-100 - Simple Spawning/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/SPS - Spawning Statics/SPS-100 - Simple Spawning/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - A2A - AREAS detection test.lua b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - A2A - AREAS detection test.lua new file mode 100644 index 0000000000..75bdd7fa92 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - A2A - AREAS detection test.lua @@ -0,0 +1,73 @@ +--- +-- Name: TAD-A2A-001 - A2A - AREAS detection test +-- Author: FlightControl +-- Date Created: 17 May 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for Air to Air operations. +-- Intruders are flying towards the EWR units. +-- The detection method used is the DETECTION_AREAS method, which groups detected targets per detected area. +-- +-- # Test cases: +-- +-- 1. Observe the EWR's detecting targets and grouping them. +-- 2. Check that the HQ provides menus to engage on a task set by the EWRs. +-- +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) + +Scoring = SCORING:New( "A2A Dispatching demo" ) + +Mission = MISSION + :New( CommandCenter, "A2A Mission", "High", "Watch the air enemy units being detected.", coalition.side.RED ) + :AddScoring( Scoring ) + +EWRSet = SET_GROUP:New():FilterPrefixes( "EWR Red" ):FilterCoalitions("red"):FilterStart() + +EWRDetection = DETECTION_AREAS:New( EWRSet, 30000 ) +EWRDetection:SetFriendliesRange( 80000 ) +EWRDetection:SetRefreshTimeInterval( 30 ) + + +AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Defender" ):FilterStart() + +TaskDispatcher = TASK_A2A_DISPATCHER:New( Mission, AttackGroups, EWRDetection ) +TaskDispatcher:SetRefreshTimeInterval( 10 ) + +AIDispatcher = AI_A2A_GCICAP:New( { "EWR Blue" } ) + +BlueTemplates = { + "Defender-1", + "Defender-2" + } + +AIDispatcher:SetSquadron( "001", AIRBASE.Caucasus.Batumi, BlueTemplates, 20 ) +AIDispatcher:SetSquadronGci( "001", 600, 800 ) + +AIDispatcher:SetSquadron( "002", AIRBASE.Caucasus.Senaki_Kolkhi, BlueTemplates, 20 ) +AIDispatcher:SetSquadronGci( "002", 600, 800 ) + +AIDispatcher:SetSquadron( "003", AIRBASE.Caucasus.Kobuleti, BlueTemplates,20 ) +AIDispatcher:SetSquadronGci( "003", 600, 800 ) + +AIDispatcher:SetSquadron( "004", AIRBASE.Caucasus.Kutaisi, BlueTemplates, 20 ) +AIDispatcher:SetSquadronGci( "004", 600, 800 ) + + + + +--- @param #TaskDispatcher self +-- @param From +-- @param Event +-- @param To +-- @param Tasking.Task_A2A#TASK_A2A Task +-- @param Wrapper.Unit#UNIT TaskUnit +-- @param #string PlayerName +function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) + Task:SetScoreOnProgress( PlayerName, 20, TaskUnit ) + Task:SetScoreOnSuccess( PlayerName, 200, TaskUnit ) + Task:SetScoreOnFail( PlayerName, -100, TaskUnit ) +end + diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.miz b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.miz new file mode 100644 index 0000000000..dcd9dd6df1 Binary files /dev/null and b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.miz differ diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/pack.ps1 b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/unpack.ps1 b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.lua b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.lua new file mode 100644 index 0000000000..3cdd368d54 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.lua @@ -0,0 +1,36 @@ +--- +-- Name: TAD-A2A-010 - AREAS - Intercept Task +-- Author: FlightControl +-- Date Created: 13 Mar 2017 +-- +-- This mission demonstrates the dynamic task dispatching for Air to Air operations. +-- Intruders are flying towards the EWR units. +-- The detection method used is the DETECTION_AREAS method, which groups detected targets per detected area. +-- +-- Observe the planes flying towards the EWR. +-- Upon detection, an INTERCEPT task should be created. +-- Join the task and destroy the intruders. +-- Check if the task is successful after destroying the target. +-- +-- +local HQ = GROUP:FindByName( "HQ", "Bravo" ) + +local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + +local Scoring = SCORING:New( "A2A Dispatching Demo" ) + +local Mission = MISSION + :New( CommandCenter, "A2A Intercept Mission", "Primary", "INTERCEPT Task Test. Observe the planes flying towards the EWR. Upon detection, an INTERCEPT task should be created. Join the task and destroy the intruders.Check if the task is successful after destroying the target.", coalition.side.RED ) + :AddScoring( Scoring ) + +local EWRSet = SET_GROUP:New():FilterPrefixes( "EWR" ):FilterCoalitions("red"):FilterStart() + +local EWRDetection = DETECTION_AREAS:New( EWRSet, 6000 ) +EWRDetection:SetFriendliesRange( 10000 ) +EWRDetection:SetRefreshTimeInterval( 10 ) + + +local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TaskDispatcher = TASK_A2A_DISPATCHER:New( Mission, AttackGroups, EWRDetection ) +TaskDispatcher:SetRefreshTimeInterval( 10 ) diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.miz b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.miz new file mode 100644 index 0000000000..553e114cb8 Binary files /dev/null and b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.miz differ diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/pack.ps1 b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/unpack.ps1 b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.lua b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.lua new file mode 100644 index 0000000000..1b626ac2d5 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.lua @@ -0,0 +1,47 @@ +--- +-- Name: TAD-A2A-020 - AREAS - Sweep Task +-- Author: FlightControl +-- Date Created: 17 May 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for Air to Air operations. +-- Intruders are flying towards the EWR units. +-- The detection method used is the DETECTION_AREAS method, which groups detected targets per detected area. +-- +-- # Test cases: +-- +-- Observe the EWR's detecting targets and grouping them. +-- Check that the HQ provides menus to engage on a task set by the EWRs. +-- Once the intruder is detected, an INTERCEPT task is created. +-- Observe that it goes back into the mountains. +-- And the task should return to a SWEEP task. +-- +local HQ = GROUP:FindByName( "HQ", "Bravo" ) + +local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + +local Scoring = SCORING:New( "A2A Dispatching Demo" ) + +local Mission = MISSION + :New( CommandCenter, "A2A Sweep Mission", "Primary", + "SWEEP Task Test. " .. + "Observe the EWR's detecting targets and grouping them. " .. + "Check that the HQ provides menus to engage on a task set by the EWRs. " .. + "Once the intruder is detected, an INTERCEPT task is created. " .. + "Observe that it goes back into the mountains. " .. + "And the task should return to a SWEEP task.", + coalition.side.RED ) + :AddScoring( Scoring ) + +local EWRSet = SET_GROUP:New():FilterPrefixes( "EWR" ):FilterCoalitions("red"):FilterStart() + +local EWRDetection = DETECTION_AREAS:New( EWRSet, 6000 ) +EWRDetection:SetFriendliesRange( 10000 ) +EWRDetection:SetRefreshTimeInterval(30) + + +local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TaskDispatcher = TASK_A2A_DISPATCHER:New( Mission, AttackGroups, EWRDetection ) +TaskDispatcher:SetRefreshTimeInterval( 10 ) diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.miz b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.miz new file mode 100644 index 0000000000..a438cd33ec Binary files /dev/null and b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.miz differ diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/pack.ps1 b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/unpack.ps1 b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.lua new file mode 100644 index 0000000000..0c1c246ba6 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.lua @@ -0,0 +1,51 @@ + --- +-- Name: TAD-A2G-000 - AREAS - Detection test +-- Author: FlightControl +-- Date Created: 15 Mar 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. +-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas. +-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. +-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. +-- Observe that A2G Tasks are being dispatched to the player. + + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_AREAS + :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.miz new file mode 100644 index 0000000000..6bb3ceef49 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.lua new file mode 100644 index 0000000000..aea23069d0 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.lua @@ -0,0 +1,52 @@ + --- +-- Name: TAD-A2G-001 - AREAS - Destroy Test +-- Author: FlightControl +-- Date Created: 15 Mar 2018 +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. +-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas. +-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. +-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. +-- Observe that A2G Tasks are being dispatched to the player. +-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets. +-- Join the A2G Task that was dispatched to you. +-- Once the AI in your group destroys the target, you should see that the A2G task got success. + + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_AREAS + :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.miz new file mode 100644 index 0000000000..a4881bb80f Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.lua new file mode 100644 index 0000000000..9376e92086 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.lua @@ -0,0 +1,66 @@ + --- +-- Name: TAD-A2G-002 - AREAS - Task Success Test +-- Author: FlightControl +-- Date Created: 15 Mar 2018 +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. +-- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas. +-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. +-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. +-- Observe that A2G Tasks are being dispatched to the player. +-- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets. +-- Join the A2G Task that was dispatched to you. +-- Once the AI in your group destroys the target, you should see that the A2G task got success. + + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_AREAS + :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + + + +--- Success Handler OnAfter for TaskDispatcher +-- @function [parent=#TaskDispatcher] OnAfterSuccess +-- @param #TaskDispatcher self +-- @param #string From +-- @param #string Event +-- @param #string To +-- @param Tasking.Task#TASK Task +function TaskDispatcher:OnAfterSuccess( From, Event, To, Task ) + self:E( "Task Success!!!" ) +end + + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.miz new file mode 100644 index 0000000000..a3ef387ded Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.lua new file mode 100644 index 0000000000..bc1b6964a1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.lua @@ -0,0 +1,50 @@ +-- Name: TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD +-- Author: FlightControl +-- Date Created: 05 Dec 2017 +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. +-- While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! +-- This is only applicable for AREA detections. Other detection methods won't have this dynamic. + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", + "This mission demonstrates the dynamic task dispatching for Air to Ground operations. " .. + "This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " .. + "While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " .. + "This is only applicable for AREA detections. Other detection methods won't have this dynamic.", + coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_AREAS + :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.miz new file mode 100644 index 0000000000..8811a6dd9f Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.lua new file mode 100644 index 0000000000..69171660fd --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.lua @@ -0,0 +1,50 @@ +-- Name: TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD +-- Author: FlightControl +-- Date Created: 05 Dec 2017 +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- This test is about a SEAD task, dispatched, that is split into a SEAD and CAS task, when units are moving away from the zone. +-- While the units are moving away, monitor if the task is correctly split into a SEAD and CAS task! +-- This is only applicable for AREA detections. Other detection methods won't have this dynamic. + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", + "This mission demonstrates the dynamic task dispatching for Air to Ground operations. " .. + "This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " .. + "While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " .. + "This is only applicable for AREA detections. Other detection methods won't have this dynamic.", + coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_AREAS + :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.miz new file mode 100644 index 0000000000..7d957e5179 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.lua new file mode 100644 index 0000000000..1122cdc124 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.lua @@ -0,0 +1,52 @@ +-- Name: TAD-A2G-020 - AREAS - Remain BAI as a Player +-- Author: FlightControl +-- Date Created: 20 Dec 2017 +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- This test is about checking that if a player in the air is approaching a BAI task zone, that the task is not converted to a CAS! +-- Jump into the helicopter. Fly to the blue targets. They won't fire at you. +-- The su-34 will detect the blue targets, but will report a BAI task, even if you are in the helicopter are near to the targets. +-- This is a very important aspect of BAI. +-- Only ground units should be considered as friendlies and would convert a task in CAS if near the enemy. + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", + "This mission demonstrates the dynamic task dispatching for Air to Ground operations. " .. + "This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " .. + "While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " .. + "This is only applicable for AREA detections. Other detection methods won't have this dynamic.", + coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_AREAS + :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.miz new file mode 100644 index 0000000000..13a724af77 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.lua new file mode 100644 index 0000000000..cdc3c37280 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.lua @@ -0,0 +1,52 @@ +-- Name: TAD-A2G-021 - AREAS - Remain BAI as AI +-- Author: FlightControl +-- Date Created: 20 Dec 2017 +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- This test is about checking that if a player in the air is approaching a BAI task zone, that the task is not converted to a CAS! +-- Jump into the su-25T. The AI Helicopter Attack will fly to the detected blue targets. They won't fire at the helicopters. +-- The su-34 will detect the blue targets, but will report a BAI task, even if the AI helicopters is near the targets. +-- This is a very important aspect of BAI. +-- Only ground units should be considered as friendlies and would convert a task in CAS if near the enemy. + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", + "This mission demonstrates the dynamic task dispatching for Air to Ground operations. " .. + "This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " .. + "While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " .. + "This is only applicable for AREA detections. Other detection methods won't have this dynamic.", + coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_AREAS + :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.miz new file mode 100644 index 0000000000..2b3bc744e7 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.lua new file mode 100644 index 0000000000..11c30eeaa1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.lua @@ -0,0 +1,34 @@ +-- Name: TAD-A2G-090 - AREAS - WWII - Reference Points +-- Author: FlightControl +-- Date Created: 17 Mar 2017 +-- +-- Test if the Command Center is working in WWII mode, and that it selects the closest Reference points for each target... +-- Join both tasks sequentially (abort when done), and see if the reference points are selected correctly, following the closest ref point logic. +-- +-- 1. Join the Attack group of RED. +-- 2. Wait until the blue tank is detected. +-- 3. Three tasks will de defined, CAS and BAI tasks. +-- 4. Join each task using the radio menus. +-- 5. Observe that the correct WWII compatible reference points are shown. + +local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) +CommandCenter:SetModeWWII() +CommandCenter:SetReferenceZones( "Village" ) + +local Mission = MISSION + :New( CommandCenter, + "Overlord", + "Primary", + "Join each task as a result of the detected targets reported. " .. + "Observe that the correct Targets are reported from the correct reference points! " .. + "\n1. Target #001 -> Village#Dziguri" .. + "\n2. Target #002 -> Village#Horshi" .. + "\n3. Target #003 -> Village#Machkhvareti" + , coalition.side.RED ) + +local RecceSet = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterCoalitions( "red" ):FilterStart() +local DetectionAreas = DETECTION_AREAS:New( RecceSet, 500 ) +local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() +TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, DetectionAreas ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.miz new file mode 100644 index 0000000000..87df363c84 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.lua new file mode 100644 index 0000000000..b36cd3dc9d --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.lua @@ -0,0 +1,51 @@ + --- +-- Name: TAD-A2G-100 - TYPES - Detection Test +-- Author: FlightControl +-- Date Created: 15 Mar 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. +-- The detection method used is the DETECTION_TYPES method, which groups detected targets into Unit Types that were detected. +-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. +-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. +-- Observe that A2G Tasks are being dispatched to the player. + + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_TYPES + :New( RecceSet ) -- The RecceSet will detect the enemies, and group them into unit types that were detected. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.miz new file mode 100644 index 0000000000..6f0d885235 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.lua new file mode 100644 index 0000000000..87eb406db5 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.lua @@ -0,0 +1,35 @@ + --- +-- Name: TAD-100 - A2G Task Dispatching DETECTION_AREAS +-- Author: FlightControl +-- Date Created: 06 Mar 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- FACA's and FAC's are patrolling around the battle zone, while detecting targets. +-- The detection method used is the DETECTION_AREAS method, which groups detected targets into zones. +-- +-- # Test cases: +-- +-- 1. Observe the FAC(A)'s detecting targets and grouping them. +-- For test, each zone will have a circle of tyres, that are visible on the map too. +-- 2. Check that the HQ provides menus to engage on a task set by the FACs. +-- +local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) + +local Scoring = SCORING:New( "Detect Demo" ) + +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) + :AddScoring( Scoring ) + +local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() + +local FACAreas = DETECTION_TYPES:New( FACSet ) + + +local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() +TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas ) + diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.miz new file mode 100644 index 0000000000..1dd9a77a3b Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.lua new file mode 100644 index 0000000000..bf6e824aa6 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.lua @@ -0,0 +1,64 @@ +--- +-- Name: TAD-220 - A2G Task Dispatching per TYPE and SCORING +-- Author: FlightControl +-- Date Created: 20 Mar 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations. +-- +-- # Test cases: +-- +-- 1. Observe the FAC(A)'s detecting targets and grouping them. +-- 2. Check that the HQ provides menus to engage on a task set by the FACs. +-- 3. Engage on a task and destroy a target. Check if scoring is given for that target. +-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given. +-- 5. Restart the mission, and crash into the ground, check if you can get penalties. +-- +local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) + +local Scoring = SCORING:New( "Detect Demo" ) + +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) + :AddScoring( Scoring ) + +local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() + +local DetectionTypes = DETECTION_TYPES:New( FACSet ) + +local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, DetectionTypes ) + +--- @param #TaskDispatcher self +-- @param From +-- @param Event +-- @param To +-- @param Tasking.Task_A2G#TASK_A2G Task +-- @param Wrapper.Unit#UNIT TaskUnit +-- @param #string PlayerName +function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) + self:E( "I am in assigned ... " ) + Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 50, TaskUnit ) + Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit ) + Task:SetScoreOnFail( "The task has failed completion!", 100, TaskUnit ) +end + +-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004. +-- This is just an example, but many more examples can follow... + +-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission. +-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion +-- too early! + +function Mission:OnBeforeComplete( From, Event, To ) + local Group004 = GROUP:FindByName( "Target #004" ) + if Group004:IsAlive() == false then + Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" ) + return true + end + return false +end \ No newline at end of file diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.miz new file mode 100644 index 0000000000..ae79c0c5a3 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.lua new file mode 100644 index 0000000000..cb710ab67e --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.lua @@ -0,0 +1,51 @@ + --- +-- Name: TAD-A2G-200 - UNITS - Detection Test +-- Author: FlightControl +-- Date Created: 15 Mar 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. +-- The detection method used is the DETECTION_UNITS method, which groups detected targets per detected unit. +-- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. +-- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. +-- Observe that A2G Tasks are being dispatched to the player. + + +-- Declare the Command Center +local HQ = GROUP + :FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) -- Create the CommandCenter. + +-- Declare the Mission for the Command Center. +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. + +-- Define the RecceSet that will detect the enemy. +local RecceSet = SET_GROUP + :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. + :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". + :FilterCoalitions("red") -- only the red coalition. + :FilterStart() -- Start the dynamic building of the set. + +-- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. +local DetectionAreas = DETECTION_UNITS + :New( RecceSet ) -- The RecceSet will detect the enemies, and group them per detected unit. + +-- Setup the AttackSet, which is a SET_GROUP. +-- The SET_GROUP is a dynamic collection of GROUP objects. +local AttackSet = SET_GROUP + :New() -- Create the SET_GROUP object. + :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. + :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. + :FilterStart() -- Start the dynamic building of the set. + +-- Now we have everything to setup the main A2G TaskDispatcher. +TaskDispatcher = TASK_A2G_DISPATCHER + :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. + +-- We use the MISSILETRAINER for demonstration purposes. +MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.miz new file mode 100644 index 0000000000..4bd8edf584 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.lua new file mode 100644 index 0000000000..0583165a13 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.lua @@ -0,0 +1,50 @@ +--- +-- Name: TAD-120 - A2G Task Dispatching DETECTION_UNITS +-- Author: FlightControl +-- Date Created: 13 Mar 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for Air to Ground operations. +-- FACA's and FAC's are patrolling around the battle field, while detecting targets. +-- The detection method used is the DETECTION_UNITS method, which groups detected targets per detected unit. +-- +-- # Test cases: +-- +-- 1. Observe the FAC(A)'s detecting targets and grouping them. +-- 2. Check that the HQ provides menus to engage on a task set by the FACs. +-- +local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) + +local Scoring = SCORING:New( "Detect Demo" ) + +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) + :AddScoring( Scoring ) + +local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() + +local FACAreas = DETECTION_UNITS:New( FACSet ) + + +local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas ) + +-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004. +-- This is just an example, but many more examples can follow... + +-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission. +-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion +-- too early! + +function Mission:OnBeforeComplete( From, Event, To ) + local Group004 = GROUP:FindByName( "Target #004" ) + if Group004:IsAlive() == false then + Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" ) + return true + end + return false +end \ No newline at end of file diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.miz new file mode 100644 index 0000000000..de103c40c6 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.lua new file mode 100644 index 0000000000..157f8b6540 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.lua @@ -0,0 +1,64 @@ +--- +-- Name: TAD-200 - A2G Task Dispatching with SCORING +-- Author: FlightControl +-- Date Created: 19 Mar 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations. +-- +-- # Test cases: +-- +-- 1. Observe the FAC(A)'s detecting targets and grouping them. +-- 2. Check that the HQ provides menus to engage on a task set by the FACs. +-- 3. Engage on a task and destroy a target. Check if scoring is given for that target. +-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given. +-- 5. Restart the mission, and crash into the ground, check if you can get penalties. +-- +local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) + +local Scoring = SCORING:New( "Detect Demo" ) + +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) + :AddScoring( Scoring ) + +local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() + +local FACAreas = DETECTION_UNITS:New( FACSet ) + + +local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas ) + +--- @param #TaskDispatcher self +-- @param From +-- @param Event +-- @param To +-- @param Tasking.Task_A2G#TASK_A2G Task +-- @param Wrapper.Unit#UNIT TaskUnit +-- @param #string PlayerName +function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) + Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit ) + Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit ) + Task:SetScoreOnFail( "The task has failed completion!", -100, TaskUnit ) +end + +-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004. +-- This is just an example, but many more examples can follow... + +-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission. +-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion +-- too early! + +function Mission:OnBeforeComplete( From, Event, To ) + local Group004 = GROUP:FindByName( "Target #004" ) + if Group004:IsAlive() == false then + Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" ) + return true + end + return false +end \ No newline at end of file diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.miz new file mode 100644 index 0000000000..9dd96e4e31 Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.lua b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.lua new file mode 100644 index 0000000000..edd47b76a7 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.lua @@ -0,0 +1,65 @@ +--- +-- Name: TAD-210 - A2G Task Dispatching for AREAS and SCORING +-- Author: FlightControl +-- Date Created: 19 Mar 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations. +-- +-- # Test cases: +-- +-- 1. Observe the FAC(A)'s detecting targets and grouping them. +-- 2. Check that the HQ provides menus to engage on a task set by the FACs. +-- 3. Engage on a task and destroy a target. Check if scoring is given for that target. +-- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given. +-- 5. Restart the mission, and crash into the ground, check if you can get penalties. +-- +local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) + +local Scoring = SCORING:New( "Detect Demo" ) + +local Mission = MISSION + :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) + :AddScoring( Scoring ) + +local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() + +local FACAreas = DETECTION_AREAS:New( FACSet, 400 ) +FACAreas:BoundDetectedZones() + + +local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas ) + +--- @param #TaskDispatcher self +-- @param From +-- @param Event +-- @param To +-- @param Tasking.Task_A2G#TASK_A2G Task +-- @param Wrapper.Unit#UNIT TaskUnit +-- @param #string PlayerName +function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) + Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit ) + Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit ) + Task:SetScoreOnFail( "The task has failed completion!", -100, TaskUnit ) +end + +-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004. +-- This is just an example, but many more examples can follow... + +-- Every time a Task becomes Successful, it will trigger the Complete event in the Mission. +-- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion +-- too early! + +function Mission:OnBeforeComplete( From, Event, To ) + local Group004 = GROUP:FindByName( "Target #004" ) + if Group004:IsAlive() == false then + Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" ) + return true + end + return false +end \ No newline at end of file diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.miz b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.miz new file mode 100644 index 0000000000..4f1f4a3e5f Binary files /dev/null and b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.miz differ diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/pack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/unpack.ps1 b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.lua new file mode 100644 index 0000000000..874d590d70 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.lua @@ -0,0 +1,34 @@ +--- +-- Name: TAD-CGO-000 - CSAR Test +-- Author: FlightControl +-- Date Created: 31 Mar 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo CSAR operations. +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "CSAR Missions", "Tactical", "Rescue downed pilots.", coalition.side.RED ) + +AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Rescue" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, AttackGroups ) + +TaskDispatcher:StartCSARTasks( + "CSAR", + { ZONE_UNIT:New( "Hospital", STATIC:FindByName( "Hospital" ), 100 ) }, + "One of our pilots has ejected. Go out to Search and Rescue our pilot!\n" .. + "Use the radio menu to let the command center assist you with the CSAR tasking." +) + +function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone ) + + MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll() + +end diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.miz new file mode 100644 index 0000000000..c5e826c63f Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.lua new file mode 100644 index 0000000000..2a7247906b --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.lua @@ -0,0 +1,50 @@ +--- +-- Name: TAD-CGO-001 - Transport Test +-- Author: FlightControl +-- Date Created: 31 Mar 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations. + + +local HQ = GROUP:FindByName( "HQ", "Bravo" ) + +local CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +local Mission = MISSION + :New( CommandCenter, "Infantry Transportation", "Tactical", + "Board the engineers into your MIL-8MTV.", coalition.side.RED ) + +-- Within the mission file, there is a helicopter defined with a player slot (client). +-- It has the name "Transport Helicopter". +-- The SET_GROUP filter will search for all groups that start with the name "Transport" and will add them to the set. +-- The TransportGroups object of type SET_GROUP will be added to the TaskDispatcher as a parameter, to indicate the groups that will transport the cargo. +local TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart() + +-- This is the task dispatcher main object! +-- It takes a role in the Mission, for the pilots seated in TransportGroups. +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + +-- This zone indicates the location where the engineers can be transported towards. +-- After boarding the engineers, the pilot can ask the HQ to provide routing assistance towards this zone. +TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Stadium" ) ) + + +-- Here we define the "cargo set", which is a collection of cargo objects. +-- The cargo set will be the input for the cargo transportation task. +-- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. +local EngineersSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + +-- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. +-- We name this group "Engineers", and is of type "SAM Engineers". +-- The cargoset "EngineersSet" will embed all defined cargo of type Engineers (prefix) into its set. +local EngineerGroup1 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#001" ), "Engineers", "SAM Engineers 1", 500 ) +local EngineerGroup2 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#002" ), "Engineers", "SAM Engineers 2", 500 ) +local EngineerGroup3 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#003" ), "Engineers", "SAM Engineers 3", 500 ) + +-- +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport", EngineersSet, "Transport the SAM Engineers and its equipment to the Stadium." ) + + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.miz new file mode 100644 index 0000000000..a76317cead Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.lua new file mode 100644 index 0000000000..6829b41793 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.lua @@ -0,0 +1,40 @@ +--- +-- Name: TAD-CGO-002 - Transport Test - Crate +-- Author: FlightControl +-- Date Created: 04 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate. +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + +TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Hangar" ) ) + + +-- Here we define the "cargo set", which is a collection of cargo objects. +-- The cargo set will be the input for the cargo transportation task. +-- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. +local CargoSet = SET_CARGO:New():FilterTypes( "Crates" ):FilterStart() + +-- Now we add cargo into the battle scene. +local CrateStatic = STATIC:FindByName( "Crate" ) + +-- CARGO_CRATE can be used to setup cargo as a crate or any other static cargo object. +-- We name this group "Important things", and is of type "Crates". +-- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set. +local CrateCargo = CARGO_CRATE:New( CrateStatic, "Crates", "Important things", 1000, 25 ) + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Crates", CargoSet, "Transport the Crates near the Hangar." ) + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.miz new file mode 100644 index 0000000000..00ed64af3b Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.lua new file mode 100644 index 0000000000..b5417a7c7c --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.lua @@ -0,0 +1,49 @@ +--- +-- Name: TAD-CGO-003 - Transport Test - Infantry and Crate +-- Author: FlightControl +-- Date Created: 05 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate and infantry. +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + +TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Hangar" ) ) + + +-- Now we add cargo into the battle scene. +local CrateStatic = STATIC:FindByName( "Crate" ) + +-- CARGO_CRATE can be used to setup cargo as a crate or any other static cargo object. +-- We name this group "Important things", and is of type "Crates". +-- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set. +local CrateCargo = CARGO_CRATE:New( CrateStatic, "Football", "Important things", 1000, 25 ) + +-- Here we define the "cargo set", which is a collection of cargo objects. +-- The cargo set will be the input for the cargo transportation task. +-- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. +local FootballSet = SET_CARGO:New():FilterTypes( "Football" ):FilterStart() + +-- Now we add cargo into the battle scene. +local FootballGroup = GROUP:FindByName( "Anderlecht#001" ) + +-- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. +-- We name this group "FC Anderlecht", and is of type "Football Players". +-- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. +local FootballPlayerGroup = CARGO_GROUP:New( FootballGroup, "Football", "FC Anderlecht", 500 ) + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", FootballSet, "Transport FC Anderlecht and the equipment near the Hangar." ) + + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.miz new file mode 100644 index 0000000000..6707bfc239 Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.lua new file mode 100644 index 0000000000..3c9b373831 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.lua @@ -0,0 +1,50 @@ +--- +-- Name: TAD-CGO-004 - Transport Test - Infantry and Slingload +-- Author: FlightControl +-- Date Created: 05 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate and infantry. +-- Slingload the concrete and board the infantry. +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + +TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) ) + + +-- Now we add cargo into the battle scene. +local CrateStatic = STATIC:FindByName( "Tetrapod" ) + +-- CARGO_SLINGLOAD can be used to setup cargo as a crate or any other static cargo object. +-- We name this group "Important Concrete", and is of type "Workmaterials". +-- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set. +local CrateCargo = CARGO_SLINGLOAD:New( CrateStatic, "Workmaterials", "Concrete", 1000, 25 ) + +-- Here we define the "cargo set", which is a collection of cargo objects. +-- The cargo set will be the input for the cargo transportation task. +-- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. +local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() + +-- Now we add cargo into the battle scene. +local WorkerGroup = GROUP:FindByName( "Workers" ) + +-- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. +-- We name this group "Workers", and is of type "Workmaterials". +-- The cargoset "CargoSet" will embed all defined cargo of type Workmaterials (prefix) into its set. +local WorkerCargoGroup = CARGO_GROUP:New( WorkerGroup, "Workmaterials", "Workers", 500 ) + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers and the equipment near the Workplace." ) + + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.miz new file mode 100644 index 0000000000..bb2459ca48 Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.lua new file mode 100644 index 0000000000..f4bef7993c --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.lua @@ -0,0 +1,51 @@ +--- +-- Name: TAD-CGO-005 - Transport Test - Various Cargo +-- Author: FlightControl +-- Date Created: 05 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.BLUE ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + +TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) ) + + +local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() + +local WorkerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Workers" ), "Workmaterials", "Workers", 250 ) +WorkerCargoGroup:ReportSmoke( SMOKECOLOR.Green ) + +local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 100 ) +EngineerCargoGroup:ReportSmoke( SMOKECOLOR.Red ) + +local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 100, 25 ) +ConcreteCargo:ReportSmoke( SMOKECOLOR.White ) + +local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 50, 25 ) +CrateCargo:ReportSmoke( SMOKECOLOR.Orange ) + +local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 25 ) +EnginesCargo:ReportFlare( FLARECOLOR.Red ) + +local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Workmaterials", "Fuel", 200, 25 ) +FuelCargo:ReportFlare( FLARECOLOR.Green ) + +local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 500, 25 ) +MetalCargo:ReportFlare( FLARECOLOR.Yellow ) + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers, engineers and the equipment near the Workplace." ) + + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.miz new file mode 100644 index 0000000000..b68029899e Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.lua new file mode 100644 index 0000000000..8099bb25a1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.lua @@ -0,0 +1,38 @@ +--- +-- Name: TAD-CGO-006 - Transport Test - Multiple Clients +-- Author: FlightControl +-- Date Created: 05 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + +TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) ) + + +local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() + +local WorkerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Workers" ), "Workmaterials", "Workers", 250 ) +local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 100 ) +local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 100, 50 ) +local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ) +local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ) +local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Workmaterials", "Fuel", 150, 50 ) +local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ) + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers, engineers and the equipment near the Workplace." ) + + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.miz new file mode 100644 index 0000000000..5214f29522 Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.lua new file mode 100644 index 0000000000..430921d6dc --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.lua @@ -0,0 +1,53 @@ +--- +-- Name: TAD-CGO-007 - Transport Test - Cargo Fun +-- Author: FlightControl +-- Date Created: 05 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + + + +local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() +local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 ) +local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 ) +local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ) +local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ) +local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ) + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport workmaterials", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." ) +TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) ) + +local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart() +local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 ) +local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 ) +local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 ) + +local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." ) +TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) ) + + +local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart() +local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 ) +local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 ) +local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 ) +local GoodCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 ) +local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 ) + +local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." ) +TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) ) + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.miz new file mode 100644 index 0000000000..239ce4c8e9 Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.lua new file mode 100644 index 0000000000..d0c88b6fd2 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.lua @@ -0,0 +1,66 @@ +--- +-- Name: TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling +-- Author: FlightControl +-- Date Created: 05 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. +-- +-- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ... +-- When cargo is deployed at the Factory, a SAM site is activated ... +-- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ... +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + + +local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() +local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 ) +local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 ) +local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ) +local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ) +local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ) + + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." ) +TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) ) + + +local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart() +local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 ) +local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 ) +local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 ) + +local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." ) +TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) ) + + +local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart() +local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 ) +local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 ) +local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 ) +local FoodCargo = CARGO_CRATE:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 ) +local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 ) + +local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." ) +TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) ) + +-- Here we tailor the CargoDeployed event of the TaskDispatcher. + +function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone ) + + MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll() + +end + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.miz new file mode 100644 index 0000000000..ffc66190a4 Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.lua new file mode 100644 index 0000000000..bf6c297a6e --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.lua @@ -0,0 +1,82 @@ +--- +-- Name: TAD-CGO-009 - Transport Test - Respawning Cargo +-- Author: FlightControl +-- Date Created: 05 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. +-- +-- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ... +-- When cargo is deployed at the Factory, a SAM site is activated ... +-- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ... +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + + +local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() +local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 ):RespawnOnDestroyed( true ) +local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 ):RespawnOnDestroyed( true ) +local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ):RespawnOnDestroyed( true ) +local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ):RespawnOnDestroyed( true ) +local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ):RespawnOnDestroyed(true) + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." ) +TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) ) + +Helos = { SPAWN:New( "Helicopters 1" ), SPAWN:New( "Helicopters 2" ), SPAWN:New( "Helicopters 3" ), SPAWN:New( "Helicopters 4" ), SPAWN:New( "Helicopters 5" ) } + +EnemyHelos = { SPAWN:New( "Enemy Helicopters 1" ), SPAWN:New( "Enemy Helicopters 2" ), SPAWN:New( "Enemy Helicopters 3" ) } + +function WorkplaceTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + Helos[ math.random(1,#Helos) ]:Spawn() + EnemyHelos[ math.random(1,#EnemyHelos) ]:Spawn() + +end + + + +local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart() +local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 ):RespawnOnDestroyed( true ) +local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 ):RespawnOnDestroyed( true ) +local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 ):RespawnOnDestroyed( true ) + +local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." ) +TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) ) + +SAMSites = { SPAWN:New( "SAM Site 1" ), SPAWN:New( "SAM Site 2" ), SPAWN:New( "SAM Site 3" ), SPAWN:New( "SAM Site 4" ), SPAWN:New( "SAM Site 5" ) } + +AirAttack = { SPAWN:New( "Russia Air Attack 1" ), SPAWN:New( "Russia Air Attack 2" ), SPAWN:New( "Russia Air Attack 3" ), SPAWN:New( "Russia Air Attack 4" ) } + +function FactoryTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + SAMSites[ math.random(1,#SAMSites) ]:Spawn() + AirAttack[ math.random(1,#AirAttack) ]:Spawn() +end + +local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart() +local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 ):RespawnOnDestroyed( true ) +local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 ):RespawnOnDestroyed( true ) +local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 ):RespawnOnDestroyed( true ) +local FoodCargo = CARGO_CRATE:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 ) +local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 ) + +local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." ) +TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) ) + +Hungry = { SPAWN:New( "Hungry 1" ), SPAWN:New( "Hungry 2" ), SPAWN:New( "Hungry 3" ), SPAWN:New( "Hungry 4" ), SPAWN:New( "Hungry 5" ) } + +function FoodTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + Hungry[ math.random(1,#Hungry) ]:Spawn() +end + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.miz new file mode 100644 index 0000000000..a261da7ffb Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/unpack.ps1 @@ -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" * diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.lua b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.lua new file mode 100644 index 0000000000..33165c12b1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.lua @@ -0,0 +1,84 @@ +--- +-- Name: TAD-CGO-010 - Transport Test - Register Cargos +-- Author: FlightControl +-- Date Created: 15 Apr 2018 +-- +-- # Situation: +-- +-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. +-- +-- The cargo is defined within the mission editor. +-- Each cargo is identified with a ~CARGO tag in the group name. +-- +-- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ... +-- When cargo is deployed at the Factory, a SAM site is activated ... +-- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ... +-- + +HQ = GROUP:FindByName( "HQ", "Bravo" ) + +CommandCenter = COMMANDCENTER + :New( HQ, "Lima" ) + +Mission = MISSION + :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) + +TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() + +TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) + + +-- This is the most important now. You setup a new SET_CARGO filtering the relevant type. +-- The actual cargo objects are now created by MOOSE in the background. +-- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name. +-- This allows a truly dynamic setup. +local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() + +local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." ) +TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) ) + +Helos = { SPAWN:New( "Helicopters 1" ), SPAWN:New( "Helicopters 2" ), SPAWN:New( "Helicopters 3" ), SPAWN:New( "Helicopters 4" ), SPAWN:New( "Helicopters 5" ) } + +EnemyHelos = { SPAWN:New( "Enemy Helicopters 1" ), SPAWN:New( "Enemy Helicopters 2" ), SPAWN:New( "Enemy Helicopters 3" ) } + +function WorkplaceTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + Helos[ math.random(1,#Helos) ]:Spawn() + EnemyHelos[ math.random(1,#EnemyHelos) ]:Spawn() + +end + + + +-- This is the most important now. You setup a new SET_CARGO filtering the relevant type. +-- The actual cargo objects are now created by MOOSE in the background. +-- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name. +-- This allows a truly dynamic setup. +local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart() + +local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." ) +TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) ) + +SAMSites = { SPAWN:New( "SAM Site 1" ), SPAWN:New( "SAM Site 2" ), SPAWN:New( "SAM Site 3" ), SPAWN:New( "SAM Site 4" ), SPAWN:New( "SAM Site 5" ) } + +AirAttack = { SPAWN:New( "Russia Air Attack 1" ), SPAWN:New( "Russia Air Attack 2" ), SPAWN:New( "Russia Air Attack 3" ), SPAWN:New( "Russia Air Attack 4" ) } + +function FactoryTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + SAMSites[ math.random(1,#SAMSites) ]:Spawn() + AirAttack[ math.random(1,#AirAttack) ]:Spawn() +end + +-- This is the most important now. You setup a new SET_CARGO filtering the relevant type. +-- The actual cargo objects are now created by MOOSE in the background. +-- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name. +-- This allows a truly dynamic setup. +local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart() + +local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." ) +TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) ) + +Hungry = { SPAWN:New( "Hungry 1" ), SPAWN:New( "Hungry 2" ), SPAWN:New( "Hungry 3" ), SPAWN:New( "Hungry 4" ), SPAWN:New( "Hungry 5" ) } + +function FoodTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) + Hungry[ math.random(1,#Hungry) ]:Spawn() +end + diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.miz b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.miz new file mode 100644 index 0000000000..c856458fa8 Binary files /dev/null and b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.miz differ diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/pack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/unpack.ps1 b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.lua b/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.lua new file mode 100644 index 0000000000..a3740b11c6 --- /dev/null +++ b/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.lua @@ -0,0 +1,31 @@ +--- +-- Name: TSK-300 - A2A - SWEEP +-- Author: FlightControl +-- Date Created: 28 May 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the Sweeping of target areas. +-- +-- # Test cases: + + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Target Sweeping Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Sweeping", "Primary", "Wait until the detected targets get undetected. And see if a SWEEP task is allocated.", coalition.side.BLUE ) + :AddScoring( Scoring ) + + AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + + TargetSetUnit = SET_UNIT:New():FilterCoalitions( "blue" ):FilterPrefixes( "Target" ):FilterStart() + + TaskSWEEP = TASK_A2A_SWEEP:New( Mission, AttackGroups, "SWEEP", TargetSetUnit ) + +end + diff --git a/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.miz b/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.miz new file mode 100644 index 0000000000..b6f1cdee0f Binary files /dev/null and b/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.miz differ diff --git a/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/pack.ps1 b/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/unpack.ps1 b/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.lua b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.lua new file mode 100644 index 0000000000..42c56c1ed0 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.lua @@ -0,0 +1,27 @@ +--- +-- Name: TSK-010 - Task Modelling - SEAD.lua +-- Author: FlightControl +-- Date Created: 31 Mar 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the Task_SEAD. +-- +-- # Test cases: +-- + +HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) + +Scoring = SCORING:New( "Detect Demo" ) + +Mission = MISSION + :New( CommandCenter, "Overlord", "High", "SEAD the area!", coalition.side.RED ) + :AddScoring( Scoring ) + +AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TargetSetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterPrefixes("Target"):FilterStart() + +TaskSEAD = TASK_A2G_SEAD:New(Mission,AttackGroups,"SEAD",TargetSetUnit) diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.miz b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.miz new file mode 100644 index 0000000000..09db86083f Binary files /dev/null and b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.miz differ diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/pack.ps1 b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/unpack.ps1 b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.lua b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.lua new file mode 100644 index 0000000000..cdec1d3237 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.lua @@ -0,0 +1,27 @@ +--- +-- Name: TSK-100 - A2G - BAI +-- Author: FlightControl +-- Date Created: 28 May 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the Task_BAI. +-- +-- # Test cases: +-- + +HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + +Scoring = SCORING:New( "BAI Demo" ) + +Mission = MISSION + :New( CommandCenter, "Overlord", "Primary", "Perform a Battlefield Air Interdiction in the area!", coalition.side.RED ) + :AddScoring( Scoring ) + +AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TargetSetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterPrefixes( "Target" ):FilterStart() + +TaskBAI = TASK_A2G_BAI:New( Mission, AttackGroups,"BAI", TargetSetUnit ) diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.miz b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.miz new file mode 100644 index 0000000000..b6ebce87ef Binary files /dev/null and b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.miz differ diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/pack.ps1 b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/unpack.ps1 b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.lua b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.lua new file mode 100644 index 0000000000..439800abd8 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.lua @@ -0,0 +1,29 @@ +--- +-- Name: TSK-101 - A2G - BAI - WWII Mode +-- Author: FlightControl +-- Date Created: 28 May 2017 +-- +-- # Situation: +-- +-- This mission demonstrates the Task_BAI. +-- +-- # Test cases: +-- + +HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + +CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) +CommandCenter:SetModeWWII() +CommandCenter:SetReferenceZones( "Airbase" ) + +Scoring = SCORING:New( "BAI Demo" ) + +Mission = MISSION + :New( CommandCenter, "Overlord", "Primary", "Perform a Battlefield Air Interdiction in the area!", coalition.side.RED ) + :AddScoring( Scoring ) + +AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() + +TargetSetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterPrefixes( "Target" ):FilterStart() + +TaskBAI = TASK_A2G_BAI:New( Mission, AttackGroups,"BAI", TargetSetUnit ) diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.miz b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.miz new file mode 100644 index 0000000000..465b836b8e Binary files /dev/null and b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.miz differ diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/pack.ps1 b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/unpack.ps1 b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.lua b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.lua new file mode 100644 index 0000000000..3821de4ec7 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.lua @@ -0,0 +1,78 @@ +--- +-- Name: TSK-CGO-000 - Boarding Test +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- This mission demonstrates the transport of a cargo group using an APC. +-- +-- There is: +-- - 1 APC. +-- - 2 Transport Tasks - Transport Workers and Transport Engineers. +-- - 2 Cargo - Workers and Engineers. +-- - 2 Deployment Zones - Alpha and Beta. +-- +-- Task Engineers: Transport the Engineers to Deployment Zone Alpha or Zone Beta. +-- Task Workers: Transport the Workers to Deployment Zone Beta. +-- + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) + :AddScoring( Scoring ) + + -- Allocate the Transport, which is an APC in the field. + local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + + -- We will setup the transportation for Engineers. + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + + -- Now we add cargo into the battle scene. + local EngineersGroup = GROUP:FindByName( "Engineers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Engineers". + -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. + local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) + + + -- We setup the task to transport engineers. + EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local WorkersCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() + + local WorkersGroup = GROUP:FindByName( "Workers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Workers". + -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. + local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Workers", "Mechanics", 500 ) + + + -- We setup the task to transport workers. + WorkersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Workers", WorkersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1. + WorkersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + +end + diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.miz b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.miz new file mode 100644 index 0000000000..ac7bfdd9d4 Binary files /dev/null and b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.miz differ diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/pack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/unpack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.lua b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.lua new file mode 100644 index 0000000000..282ba4c27b --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.lua @@ -0,0 +1,78 @@ +--- +-- Name: TSK-CGO-100 - Ground - APC Test +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- This mission demonstrates the transport of a cargo group using an APC. +-- +-- There is: +-- - 1 APC. +-- - 2 Transport Tasks - Transport Workers and Transport Engineers. +-- - 2 Cargo - Workers and Engineers. +-- - 2 Deployment Zones - Alpha and Beta. +-- +-- Task Engineers: Transport the Engineers to Deployment Zone Alpha or Zone Beta. +-- Task Workers: Transport the Workers to Deployment Zone Beta. +-- + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) + :AddScoring( Scoring ) + + -- Allocate the Transport, which is an APC in the field. + local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + + -- We will setup the transportation for Engineers. + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + + -- Now we add cargo into the battle scene. + local EngineersGroup = GROUP:FindByName( "Engineers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Engineers". + -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. + local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ):RespawnOnDestroyed( true ) + + + -- We setup the task to transport engineers. + EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local WorkersCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() + + local WorkersGroup = GROUP:FindByName( "Workers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Workers". + -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. + local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Workers", "Mechanics", 500 ):RespawnOnDestroyed( true ) + + + -- We setup the task to transport workers. + WorkersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Workers", WorkersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1. + WorkersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + +end + diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.miz b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.miz new file mode 100644 index 0000000000..28181b4cff Binary files /dev/null and b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.miz differ diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/pack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/unpack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.lua b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.lua new file mode 100644 index 0000000000..48f81cb6a7 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.lua @@ -0,0 +1,78 @@ +--- +-- Name: TSK-CGO-100 - Ground - APC Test +-- Author: FlightControl +-- Date Created: 12 Apr 2017 +-- +-- This mission demonstrates the transport of a cargo group using an APC. +-- +-- There is: +-- - 1 APC. +-- - 2 Transport Tasks - Transport Workers and Transport Engineers. +-- - 2 Cargo - Workers and Engineers. +-- - 2 Deployment Zones - Alpha and Beta. +-- +-- Task Engineers: Transport the Engineers to Deployment Zone Alpha or Zone Beta. +-- Task Workers: Transport the Workers to Deployment Zone Beta. +-- + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) + :AddScoring( Scoring ) + + -- Allocate the Transport, which is an APC in the field. + local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + + -- We will setup the transportation for Engineers. + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + + -- Now we add cargo into the battle scene. + local EngineersGroup = GROUP:FindByName( "Engineers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Engineers". + -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. + local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) + + + -- We setup the task to transport engineers. + EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local WorkersCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() + + local WorkersGroup = GROUP:FindByName( "Workers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Workers". + -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. + local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Workers", "Mechanics", 500 ) + + + -- We setup the task to transport workers. + WorkersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Workers", WorkersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1. + WorkersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + +end + diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.miz b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.miz new file mode 100644 index 0000000000..8cb434398d Binary files /dev/null and b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.miz differ diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/pack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/unpack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.lua b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.lua new file mode 100644 index 0000000000..f739d22fad --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.lua @@ -0,0 +1,55 @@ +--- +-- Name: TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone +-- Author: FlightControl +-- Date Created: 12 Mar 2018 +-- +-- This mission demonstrates the transport of a cargo group using an Helicopter. +-- +-- There is: +-- - 1 Helicopter. +-- - 1 Transport Task - Transport Workers. +-- - 1 Cargo - Workers. +-- - 1 Deployment Zone - Alpha. +-- +-- Task Workers: Transport the Workers to Deployment Zone Alpha. +-- + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) + :AddScoring( Scoring ) + + -- Allocate the Transport, which is an APC in the field. + local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + + -- We will setup the transportation for Engineers. + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + + -- Now we add cargo into the battle scene. + local EngineersGroup = GROUP:FindByName( "Engineers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Engineers". + -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. + local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) + + -- We setup the task to transport engineers. + EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + + +end + diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.miz b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.miz new file mode 100644 index 0000000000..6de9e827e9 Binary files /dev/null and b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.miz differ diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/pack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/unpack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.lua b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.lua new file mode 100644 index 0000000000..01b08e9881 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.lua @@ -0,0 +1,56 @@ +--- +-- Name: TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone +-- Author: FlightControl +-- Date Created: 12 Mar 2018 +-- +-- This mission demonstrates the transport of a cargo group using an Helicopter. +-- +-- There is: +-- - 1 Helicopter. +-- - 1 Transport Task - Transport Workers. +-- - 1 Cargo - Workers. +-- - 1 Deployment Zone - Alpha. +-- +-- Task Workers: Transport the Workers to Deployment Zone Alpha. +-- + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) + :AddScoring( Scoring ) + + -- Allocate the Transport, which is an APC in the field. + local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + + -- We will setup the transportation for Engineers. + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + + -- Now we add cargo into the battle scene. + local EngineersGroup = GROUP:FindByName( "Engineers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Engineers". + -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. + local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) + + -- We setup the task to transport engineers. + EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + + +end + diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.miz b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.miz new file mode 100644 index 0000000000..aeedf9bdba Binary files /dev/null and b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.miz differ diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/pack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/unpack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.lua b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.lua new file mode 100644 index 0000000000..d2bb0f8919 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.lua @@ -0,0 +1,64 @@ +--- +-- Name: TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone +-- Author: FlightControl +-- Date Created: 12 Mar 2018 +-- +-- This mission demonstrates the transport of a cargo group using an Helicopter. +-- +-- There is: +-- - 1 Helicopter. +-- - 1 Transport Task - Transport Workers. +-- - 1 Cargo - Workers. +-- - 1 Deployment Zone - Alpha. +-- +-- Task Workers: Transport the Workers to Deployment Zone Alpha. +-- + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) + :AddScoring( Scoring ) + + -- Allocate the Transport, which is an APC in the field. + local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + + -- We will setup the transportation for Engineers. + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + + -- Now we add cargo into the battle scene. + local EngineersGroup = GROUP:FindByName( "Engineers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Engineers". + -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. + local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) + + local WorkersGroup = GROUP:FindByName( "Workers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Workers". + -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. + local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Engineers", "Workers", 500 ) + + + -- We setup the task to transport engineers. + EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) + + +end + diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.miz b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.miz new file mode 100644 index 0000000000..3e21430818 Binary files /dev/null and b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.miz differ diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/pack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/unpack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.lua b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.lua new file mode 100644 index 0000000000..04d4edf580 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.lua @@ -0,0 +1,66 @@ +--- +-- Name: TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones +-- Author: FlightControl +-- Date Created: 12 Mar 2018 +-- +-- This mission demonstrates the transport of a cargo group using an Helicopter. +-- +-- There is: +-- - 1 Helicopter. +-- - 1 Transport Task - Transport Workers. +-- - 1 Cargo - Workers. +-- - 1 Deployment Zone - Alpha. +-- +-- Task Workers: Transport the Workers to Deployment Zone Alpha. +-- + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) + :AddScoring( Scoring ) + + -- Allocate the Transport, which is an APC in the field. + local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + + -- We will setup the transportation for Engineers. + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + + -- Now we add cargo into the battle scene. + local EngineersGroup = GROUP:FindByName( "Engineers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Engineers". + -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. + local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) + + + local WorkersGroup = GROUP:FindByName( "Workers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Workers". + -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. + local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Engineers", "Workers", 500 ) + + -- We setup the task to transport engineers. + EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + + + +end + diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.miz b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.miz new file mode 100644 index 0000000000..0283500165 Binary files /dev/null and b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.miz differ diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/pack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/unpack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/unpack.ps1 @@ -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" * diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.lua b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.lua new file mode 100644 index 0000000000..c9c142dcba --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.lua @@ -0,0 +1,77 @@ +--- +-- Name: TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones +-- Author: FlightControl +-- Date Created: 12 Mar 2018 +-- +-- This mission demonstrates the transport of a cargo group using an Helicopter. +-- +-- There is: +-- - 1 Helicopter. +-- - 2 Transport Tasks - Transport Workers and Transport Engineers. +-- - 2 Cargo - Workers and Engineers. +-- - 2 Deployment Zones - Alpha and Beta. +-- +-- Task Engineers: Transport the Engineers to Deployment Zone Alpha or Zone Beta. +-- Task Workers: Transport the Workers to Deployment Zone Beta. + +do + local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) + + local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) + + local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) + + local Mission = MISSION + :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) + :AddScoring( Scoring ) + + -- Allocate the Transport, which is an APC in the field. + local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() + + -- We will setup the transportation for Engineers. + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() + + -- Now we add cargo into the battle scene. + local EngineersGroup = GROUP:FindByName( "Engineers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Engineers". + -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. + local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) + + + -- We setup the task to transport engineers. + EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) + EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + + + -- Here we define the "cargo set", which is a collection of cargo objects. + -- The cargo set will be the input for the cargo transportation task. + -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. + local WorkersCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() + + local WorkersGroup = GROUP:FindByName( "Workers" ) + + -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. + -- We name this group Engineers. + -- Note that the name of the cargo is "Workers". + -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. + local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Workers", "Mechanics", 500 ) + + + -- We setup the task to transport workers. + WorkersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Workers", WorkersCargoSet ) + + -- We setup to deploy workers in the deploy zone 1. + WorkersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) + +end + diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.miz b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.miz new file mode 100644 index 0000000000..52f940b35f Binary files /dev/null and b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.miz differ diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/pack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/unpack.ps1 b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua b/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua new file mode 100644 index 0000000000..82baa19771 --- /dev/null +++ b/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua @@ -0,0 +1,32 @@ +--- +-- Name: ZON-100 - Normal Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + + +GroupInside = GROUP:FindByName( "Test Inside Polygon" ) +GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) + +ZoneA = ZONE:New( "Zone A" ) +ZoneA:SmokeZone( SMOKECOLOR.White, 90 ) + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupInside:IsCompletelyInZone( ZoneA ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + diff --git a/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz b/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz new file mode 100644 index 0000000000..d0202f1df5 Binary files /dev/null and b/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz differ diff --git a/ZON - Zones/ZON-100 - Normal Zone/pack.ps1 b/ZON - Zones/ZON-100 - Normal Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-100 - Normal Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-100 - Normal Zone/unpack.ps1 b/ZON - Zones/ZON-100 - Normal Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-100 - Normal Zone/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.lua b/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.lua new file mode 100644 index 0000000000..60f255fcda --- /dev/null +++ b/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.lua @@ -0,0 +1,43 @@ +--- +-- Name: ZON-101 - Normal Zone - Random Point +-- Author: FlightControl +-- Date Created: 18 Feb 2017 +-- +-- # Situation: +-- +-- Three zones are defined. +-- 15 points are smoked in each zone. +-- The first 15 points are blue smoked using the GetRandomVec2() API. +-- The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- The third 15 points are red smoked using the GetRandomPointVec3() API. +-- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view. +-- +-- # Test cases: +-- +-- 1. Observe smoking of Blue smoke in Zone 1. +-- 2. Observe smoking of Orange smoke in Zone 2. +-- 3. Observe smoking of Red smoke in Zone 3. + +Zone1 = ZONE:New( "Zone 1" ) +Zone2 = ZONE:New( "Zone 2" ) +Zone3 = ZONE:New( "Zone 3" ) + +Zone1:SmokeZone( SMOKECOLOR.White, 18 ) +Zone2:SmokeZone( SMOKECOLOR.White, 18 ) +Zone3:SmokeZone( SMOKECOLOR.White, 18 ) + +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz b/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz new file mode 100644 index 0000000000..bcae6d2ac0 Binary files /dev/null and b/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz differ diff --git a/ZON - Zones/ZON-101 - Normal Zone - Random Point/pack.ps1 b/ZON - Zones/ZON-101 - Normal Zone - Random Point/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-101 - Normal Zone - Random Point/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-101 - Normal Zone - Random Point/unpack.ps1 b/ZON - Zones/ZON-101 - Normal Zone - Random Point/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-101 - Normal Zone - Random Point/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.lua b/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.lua new file mode 100644 index 0000000000..361f2a7f91 --- /dev/null +++ b/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.lua @@ -0,0 +1,32 @@ +--- +-- Name: ZON-100 - Normal Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + + +GroupInside = GROUP:FindByName( "Test Inside Polygon" ) +GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) + +ZoneA = ZONE:New( "Zone A" ) +ZoneA:BoundZone( 90 ) + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupInside:IsCompletelyInZone( ZoneA ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + diff --git a/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.miz b/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.miz new file mode 100644 index 0000000000..29fe5eb8e6 Binary files /dev/null and b/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.miz differ diff --git a/ZON - Zones/ZON-102 - Normal Zone Boundary/pack.ps1 b/ZON - Zones/ZON-102 - Normal Zone Boundary/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-102 - Normal Zone Boundary/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-102 - Normal Zone Boundary/unpack.ps1 b/ZON - Zones/ZON-102 - Normal Zone Boundary/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-102 - Normal Zone Boundary/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.lua b/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.lua new file mode 100644 index 0000000000..1a893154b1 --- /dev/null +++ b/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.lua @@ -0,0 +1,24 @@ +--- +-- Name: ZON-103 - Test if GROUP object is in ZONE +-- Author: FlightControl +-- Date Created: 31 Mar 2017 +-- +-- # Situation: +-- +-- A ZONE has been defined, and it is checked if a GROUP object is within the zone. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter, and place the GROUP object in or out of the zone. +-- 2. Observe the results of the functions. + + +GroupObject = GROUP:FindByName( "Group Object" ) + +Zone = ZONE:New( "Zone" ) + + +Zone:E( { "Group is completely in Zone:", GroupObject:IsCompletelyInZone( Zone ) } ) +Zone:E( { "Group is partially in Zone:", GroupObject:IsPartlyInZone( Zone ) } ) +Zone:E( { "Group is not in Zone:", GroupObject:IsNotInZone( Zone ) } ) + diff --git a/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.miz b/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.miz new file mode 100644 index 0000000000..f12f42713d Binary files /dev/null and b/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.miz differ diff --git a/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/pack.ps1 b/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/unpack.ps1 b/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.lua b/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.lua new file mode 100644 index 0000000000..eabb547448 --- /dev/null +++ b/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.lua @@ -0,0 +1,34 @@ +--- +-- Name: ZON-110 - ZONE declared in ME +-- Author: FlightControl +-- Date Created: 21 May 2018 +-- +-- # Situation: +-- +-- A ZONE has been defined using the Mission Editor, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + + +GroupInside = GROUP:FindByName( "Test Inside" ) +GroupOutside = GROUP:FindByName( "Test Outside" ) + +-- Now I can find the zone instead of doing ZONE:New, because the ZONE object is already in MOOSE. +--ZoneA = ZONE:New( "Zone A" ) +ZoneA = ZONE:FindByName( "Zone A" ) +ZoneA:SmokeZone( SMOKECOLOR.White, 30 ) + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupInside:IsCompletelyInZone( ZoneA ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + diff --git a/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.miz b/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.miz new file mode 100644 index 0000000000..424ab2ff4d Binary files /dev/null and b/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.miz differ diff --git a/ZON - Zones/ZON-110 - ZONE declared in ME/pack.ps1 b/ZON - Zones/ZON-110 - ZONE declared in ME/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-110 - ZONE declared in ME/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-110 - ZONE declared in ME/unpack.ps1 b/ZON - Zones/ZON-110 - ZONE declared in ME/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-110 - ZONE declared in ME/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.lua b/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.lua new file mode 100644 index 0000000000..3455efb90e --- /dev/null +++ b/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.lua @@ -0,0 +1,22 @@ +--- +-- Name: ZON-190 - Return SCENERY objects in Zone +-- Author: FlightControl +-- Date Created: 08 Oct 2017 +-- +-- # Situation: +-- +-- # Test cases: +-- + + +Zone = ZONE:New( "Zone" ) + + +Zone:Scan( Object.Category.SCENERY ) + +for SceneryTypeName, SceneryData in pairs( Zone:GetScannedScenery() ) do + for SceneryName, SceneryObject in pairs( SceneryData ) do + local SceneryObject = SceneryObject -- Wrapper.Scenery#SCENERY + MESSAGE:NewType( "Scenery: " .. SceneryObject:GetTypeName() .. ", Coord LL DMS: " .. SceneryObject:GetCoordinate():ToStringLLDMS(), MESSAGE.Type.Information ):ToAll() + end +end \ No newline at end of file diff --git a/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.miz b/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.miz new file mode 100644 index 0000000000..17956ba1c3 Binary files /dev/null and b/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.miz differ diff --git a/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/pack.ps1 b/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/unpack.ps1 b/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua b/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua new file mode 100644 index 0000000000..c59865b094 --- /dev/null +++ b/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua @@ -0,0 +1,36 @@ +--- +-- Name: ZON-200 - Group Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_GROUP has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + +GroupInside = GROUP:FindByName( "Test Inside Polygon" ) +GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) + +Tank = GROUP:FindByName( "Tank" ) +ZoneA = ZONE_GROUP:New( "Zone A", Tank, 100 ) + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupInside:IsCompletelyInZone( ZoneA ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + +TankZoneColoring = SCHEDULER:New( nil, + function() + ZoneA:FlareZone( FLARECOLOR.White, 90, 60 ) + end, + {}, 0, 5 ) \ No newline at end of file diff --git a/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz b/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz new file mode 100644 index 0000000000..8d860d4c65 Binary files /dev/null and b/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz differ diff --git a/ZON - Zones/ZON-200 - Group Zone/pack.ps1 b/ZON - Zones/ZON-200 - Group Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-200 - Group Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-200 - Group Zone/unpack.ps1 b/ZON - Zones/ZON-200 - Group Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-200 - Group Zone/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.lua b/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.lua new file mode 100644 index 0000000000..38d0736890 --- /dev/null +++ b/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.lua @@ -0,0 +1,43 @@ +--- +-- Name: ZON-201 - Group Zone - Random Point +-- Author: FlightControl +-- Date Created: 18 Feb 2017 +-- +-- # Situation: +-- +-- Three zones are defined. +-- 15 points are smoked in each zone. +-- The first 15 points are blue smoked using the GetRandomVec2() API. +-- The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- The third 15 points are red smoked using the GetRandomPointVec3() API. +-- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view. +-- +-- # Test cases: +-- +-- 1. Observe smoking of Blue smoke in Zone 1. +-- 2. Observe smoking of Orange smoke in Zone 2. +-- 3. Observe smoking of Red smoke in Zone 3. + +Zone1 = ZONE_GROUP:New( "Zone 1", GROUP:FindByName( "Zone 1" ), 300 ) +Zone2 = ZONE_GROUP:New( "Zone 2", GROUP:FindByName( "Zone 2" ), 300 ) +Zone3 = ZONE_GROUP:New( "Zone 3", GROUP:FindByName( "Zone 3" ), 300 ) + +Zone1:SmokeZone( SMOKECOLOR.White, 18 ) +Zone2:SmokeZone( SMOKECOLOR.White, 18 ) +Zone3:SmokeZone( SMOKECOLOR.White, 18 ) + +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz b/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz new file mode 100644 index 0000000000..04ddeee294 Binary files /dev/null and b/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz differ diff --git a/ZON - Zones/ZON-201 - Group Zone - Random Point/pack.ps1 b/ZON - Zones/ZON-201 - Group Zone - Random Point/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-201 - Group Zone - Random Point/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-201 - Group Zone - Random Point/unpack.ps1 b/ZON - Zones/ZON-201 - Group Zone - Random Point/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-201 - Group Zone - Random Point/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua b/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua new file mode 100644 index 0000000000..e27334e356 --- /dev/null +++ b/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua @@ -0,0 +1,36 @@ +--- +-- Name: ZON-300 - Unit Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_UNIT has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + +GroupInside = GROUP:FindByName( "Test Inside Polygon" ) +GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) + +Tank = UNIT:FindByName( "Tank" ) +ZoneA = ZONE_UNIT:New( "Zone A", Tank, 100 ) + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupInside:IsCompletelyInZone( ZoneA ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + +TankZoneColoring = SCHEDULER:New( nil, + function() + ZoneA:FlareZone( FLARECOLOR.White, 90, 60 ) + end, + {}, 0, 5 ) \ No newline at end of file diff --git a/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz b/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz new file mode 100644 index 0000000000..34d667f300 Binary files /dev/null and b/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz differ diff --git a/ZON - Zones/ZON-300 - Unit Zone/pack.ps1 b/ZON - Zones/ZON-300 - Unit Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-300 - Unit Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-300 - Unit Zone/unpack.ps1 b/ZON - Zones/ZON-300 - Unit Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-300 - Unit Zone/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.lua b/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.lua new file mode 100644 index 0000000000..db53722a8c --- /dev/null +++ b/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.lua @@ -0,0 +1,43 @@ +--- +-- Name: ZON-301 - Unit Zone - Random Point +-- Author: FlightControl +-- Date Created: 18 Feb 2017 +-- +-- # Situation: +-- +-- Three zones are defined. +-- 15 points are smoked in each zone. +-- The first 15 points are blue smoked using the GetRandomVec2() API. +-- The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- The third 15 points are red smoked using the GetRandomPointVec3() API. +-- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view. +-- +-- # Test cases: +-- +-- 1. Observe smoking of Blue smoke in Zone 1. +-- 2. Observe smoking of Orange smoke in Zone 2. +-- 3. Observe smoking of Red smoke in Zone 3. + +Zone1 = ZONE_UNIT:New( "Zone 1", UNIT:FindByName( "Zone 1" ), 300 ) +Zone2 = ZONE_UNIT:New( "Zone 2", UNIT:FindByName( "Zone 2" ), 300 ) +Zone3 = ZONE_UNIT:New( "Zone 3", UNIT:FindByName( "Zone 3" ), 300 ) + +Zone1:SmokeZone( SMOKECOLOR.White, 18 ) +Zone2:SmokeZone( SMOKECOLOR.White, 18 ) +Zone3:SmokeZone( SMOKECOLOR.White, 18 ) + +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz b/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz new file mode 100644 index 0000000000..e7feb9efff Binary files /dev/null and b/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz differ diff --git a/ZON - Zones/ZON-301 - Unit Zone - Random Point/pack.ps1 b/ZON - Zones/ZON-301 - Unit Zone - Random Point/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-301 - Unit Zone - Random Point/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-301 - Unit Zone - Random Point/unpack.ps1 b/ZON - Zones/ZON-301 - Unit Zone - Random Point/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-301 - Unit Zone - Random Point/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua b/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua new file mode 100644 index 0000000000..c73a6360ea --- /dev/null +++ b/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua @@ -0,0 +1,32 @@ +--- +-- Name: ZON-400 - Radius Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_RADIUS has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the polygon perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + +GroupInside = GROUP:FindByName( "Test Inside Polygon" ) +GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) + +House = STATIC:FindByName( "House" ) +ZoneA = ZONE_RADIUS:New( "Zone A", House:GetVec2(), 300 ) +ZoneA:SmokeZone( SMOKECOLOR.White, 90 ) + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) + if GroupInside:IsCompletelyInZone( ZoneA ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + diff --git a/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz b/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz new file mode 100644 index 0000000000..c3b118dc67 Binary files /dev/null and b/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz differ diff --git a/ZON - Zones/ZON-400 - Radius Zone/pack.ps1 b/ZON - Zones/ZON-400 - Radius Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-400 - Radius Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-400 - Radius Zone/unpack.ps1 b/ZON - Zones/ZON-400 - Radius Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-400 - Radius Zone/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.lua b/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.lua new file mode 100644 index 0000000000..b3d5112673 --- /dev/null +++ b/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.lua @@ -0,0 +1,48 @@ +--- +-- Name: ZON-401 - Radius Zone - Random Point +-- Author: FlightControl +-- Date Created: 18 Feb 2017 +-- +-- # Situation: +-- +-- Three zones are defined. +-- 15 points are smoked in each zone. +-- The first 15 points are blue smoked using the GetRandomVec2() API. +-- The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- The third 15 points are red smoked using the GetRandomPointVec3() API. +-- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view. +-- +-- # Test cases: +-- +-- 1. Observe smoking of Blue smoke in Zone 1. +-- 2. Observe smoking of Orange smoke in Zone 2. +-- 3. Observe smoking of Red smoke in Zone 3. + +Unit1 = UNIT:FindByName( "Zone 1" ) +Unit2 = UNIT:FindByName( "Zone 2" ) +Unit3 = UNIT:FindByName( "Zone 3" ) + + +Zone1 = ZONE_RADIUS:New( "Zone 1", Unit1:GetVec2(), 300 ) +Zone2 = ZONE_RADIUS:New( "Zone 2", Unit2:GetVec2(), 300 ) +Zone3 = ZONE_RADIUS:New( "Zone 3", Unit3:GetVec2(), 300 ) + +Zone1:SmokeZone( SMOKECOLOR.White, 18 ) +Zone2:SmokeZone( SMOKECOLOR.White, 18 ) +Zone3:SmokeZone( SMOKECOLOR.White, 18 ) + +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz b/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz new file mode 100644 index 0000000000..2bb16ae307 Binary files /dev/null and b/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz differ diff --git a/ZON - Zones/ZON-401 - Radius Zone - Random Point/pack.ps1 b/ZON - Zones/ZON-401 - Radius Zone - Random Point/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-401 - Radius Zone - Random Point/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-401 - Radius Zone - Random Point/unpack.ps1 b/ZON - Zones/ZON-401 - Radius Zone - Random Point/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-401 - Radius Zone - Random Point/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua b/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua new file mode 100644 index 0000000000..b5201c1f01 --- /dev/null +++ b/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua @@ -0,0 +1,33 @@ +--- +-- Name: ZON-500 - Polygon Zone +-- Author: FlightControl +-- Date Created: 18 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_POLYGON has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the polygon perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + +GroupInside = GROUP:FindByName( "Test Inside Polygon" ) +GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) + +GroupPolygon = GROUP:FindByName( "Polygon A" ) + +PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ) +PolygonZone:SmokeZone( SMOKECOLOR.White, 20 ) + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) + if GroupInside:IsCompletelyInZone( PolygonZone ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + diff --git a/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz b/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz new file mode 100644 index 0000000000..455f686342 Binary files /dev/null and b/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz differ diff --git a/ZON - Zones/ZON-500 - Polygon Zone/pack.ps1 b/ZON - Zones/ZON-500 - Polygon Zone/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-500 - Polygon Zone/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-500 - Polygon Zone/unpack.ps1 b/ZON - Zones/ZON-500 - Polygon Zone/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-500 - Polygon Zone/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.lua b/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.lua new file mode 100644 index 0000000000..545c7d9b6c --- /dev/null +++ b/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.lua @@ -0,0 +1,43 @@ +--- +-- Name: ZON-501 - Polygon Zone - Random Point +-- Author: FlightControl +-- Date Created: 18 Feb 2017 +-- +-- # Situation: +-- +-- Three zones are defined. +-- 15 points are smoked in each zone. +-- The first 15 points are blue smoked using the GetRandomVec2() API. +-- The second 15 points are orange smoked using the GetRandomPointVec2() API. +-- The third 15 points are red smoked using the GetRandomPointVec3() API. +-- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. +-- Note: At each zone an vehicle is placed, so you can view the smoking in external view. +-- +-- # Test cases: +-- +-- 1. Observe smoking of Blue smoke in Zone 1. +-- 2. Observe smoking of Orange smoke in Zone 2. +-- 3. Observe smoking of Red smoke in Zone 3. + +Zone1 = ZONE_POLYGON:New( "Zone 1", GROUP:FindByName( "Zone 1" ) ) +Zone2 = ZONE_POLYGON:New( "Zone 2", GROUP:FindByName( "Zone 2" ) ) +Zone3 = ZONE_POLYGON:New( "Zone 3", GROUP:FindByName( "Zone 3" ) ) + +Zone1:SmokeZone( SMOKECOLOR.White, 4 ) +Zone2:SmokeZone( SMOKECOLOR.White, 4 ) +Zone3:SmokeZone( SMOKECOLOR.White, 4 ) + +for i = 1, 15 do + -- Zone 1 + local Vec2 = Zone1:GetRandomVec2() + local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) + PointVec2:SmokeBlue() + + -- Zone 2 + local PointVec2 = Zone2:GetRandomPointVec2() + PointVec2:SmokeOrange() + + -- Zone 3 + local PointVec3 = Zone3:GetRandomPointVec3() + PointVec3:SmokeRed() +end diff --git a/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz b/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz new file mode 100644 index 0000000000..e2a7f4e805 Binary files /dev/null and b/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz differ diff --git a/ZON - Zones/ZON-501 - Polygon Zone - Random Point/pack.ps1 b/ZON - Zones/ZON-501 - Polygon Zone - Random Point/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-501 - Polygon Zone - Random Point/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-501 - Polygon Zone - Random Point/unpack.ps1 b/ZON - Zones/ZON-501 - Polygon Zone - Random Point/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-501 - Polygon Zone - Random Point/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.lua b/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.lua new file mode 100644 index 0000000000..c3075153ce --- /dev/null +++ b/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.lua @@ -0,0 +1,33 @@ +--- +-- Name: ZON-502 - Polygon Zone Boundary +-- Author: FlightControl +-- Date Created: 18 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_POLYGON has been defined, which boundaries are tires. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the polygon perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + +GroupInside = GROUP:FindByName( "Test Inside Polygon" ) +GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) + +GroupPolygon = GROUP:FindByName( "Polygon A" ) + +PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ) +PolygonZone:BoundZone() + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) + if GroupInside:IsCompletelyInZone( PolygonZone ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + diff --git a/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.miz b/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.miz new file mode 100644 index 0000000000..b6cbe20066 Binary files /dev/null and b/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.miz differ diff --git a/ZON - Zones/ZON-502 - Polygon Zone Boundary/pack.ps1 b/ZON - Zones/ZON-502 - Polygon Zone Boundary/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-502 - Polygon Zone Boundary/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-502 - Polygon Zone Boundary/unpack.ps1 b/ZON - Zones/ZON-502 - Polygon Zone Boundary/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-502 - Polygon Zone Boundary/unpack.ps1 @@ -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" * diff --git a/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.lua b/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.lua new file mode 100644 index 0000000000..f81020e71f --- /dev/null +++ b/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.lua @@ -0,0 +1,32 @@ +--- +-- Name: ZON-510 - ZONE_POLYGON declared in ME +-- Author: FlightControl +-- Date Created: 21 May 2018 +-- +-- # Situation: +-- +-- A ZONE_POLYGON has been defined, within the mission editor using ~ZONE_POLYGON in the group name. +-- Its boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the polygon perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + +GroupInside = GROUP:FindByName( "Test Inside Polygon" ) +GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) + +PolygonZone = ZONE_POLYGON:FindByName( "Polygon A" ) +PolygonZone:SmokeZone( SMOKECOLOR.White, 10 ) + +Messager = SCHEDULER:New( nil, + function() + GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) + if GroupInside:IsCompletelyInZone( PolygonZone ) then + GroupInside:GetUnit(1):SmokeRed() + end + end, + {}, 0, 1 ) + diff --git a/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.miz b/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.miz new file mode 100644 index 0000000000..30c5be4c28 Binary files /dev/null and b/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.miz differ diff --git a/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/pack.ps1 b/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/unpack.ps1 b/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/unpack.ps1 @@ -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" *