mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Revised documentation for AI_BALANCER
-- Added new SPAWN test missions. -- Added new AI_BALANCER test missions. -- Revised the MOOSE launch page.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,10 +19,6 @@
|
||||
-- 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.
|
||||
--
|
||||
-- # Status: DEVELOP 07 Dec 2016
|
||||
--
|
||||
-- @module TEST.AI_BALANCER.T002
|
||||
|
||||
-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup.
|
||||
local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" )
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,51 @@
|
||||
-- Name: AIB-006 - Declutter AI at Airbases
|
||||
-- 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.
|
||||
local 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.
|
||||
local RU_PlanesSpawn = SPAWN:New( "AI RU" )
|
||||
|
||||
-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter.
|
||||
local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
||||
|
||||
-- Create the first polygon zone ...
|
||||
local PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" )
|
||||
local PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 )
|
||||
|
||||
-- Create the second polygon zone ...
|
||||
local PatrolZoneGroup2 = GROUP:FindByName( "PatrolZone2" )
|
||||
local PatrolZone2 = ZONE_POLYGON:New( "PatrolZone2", PatrolZoneGroup2 )
|
||||
|
||||
-- Now, create an array of these zones ...
|
||||
local PatrolZoneArray = { PatrolZone1, PatrolZone2 }
|
||||
|
||||
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||
|
||||
local Patrol = AI_PATROLZONE:New( PatrolZoneArray[math.random( 1, 2 )], 3000, 6000, 400, 600 )
|
||||
Patrol:ManageFuel( 0.2, 60 )
|
||||
Patrol:SetControllable( AIGroup )
|
||||
Patrol:__Start( 5 )
|
||||
|
||||
end
|
||||
Binary file not shown.
@@ -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.
|
||||
local 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.
|
||||
local 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.
|
||||
local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn )
|
||||
|
||||
-- Create the first polygon zone ...
|
||||
local PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" )
|
||||
local PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 )
|
||||
|
||||
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||
|
||||
local Patrol = AI_PATROLZONE:New( PatrolZone1, 3000, 6000, 400, 600 )
|
||||
Patrol:ManageFuel( 0.2, 60 )
|
||||
Patrol:SetControllable( AIGroup )
|
||||
Patrol:__Start( 5 )
|
||||
|
||||
end
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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()
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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()
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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 )
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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 )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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 )
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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 )
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user