mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Updated documentation in AI_CAP, AI_CAS, AI_BALANCER, AI_PATROL
This commit is contained in:
parent
a89c469130
commit
040a342e25
@ -4,62 +4,22 @@
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ===
|
||||
-- ====
|
||||
--
|
||||
-- # 1) @{AI_Balancer#AI_BALANCER} class, extends @{Fsm#FSM_SET}
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- The @{AI_Balancer#AI_BALANCER} class monitors and manages as many replacement AI groups as there are
|
||||
-- CLIENTS in a SET_CLIENT collection, which are not occupied by human players.
|
||||
-- In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.
|
||||
-- ### [AI_BALANCER Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/AIB%20-%20AI%20Balancing)
|
||||
--
|
||||
-- The parent class @{Fsm#FSM_SET} manages the functionality to control the Finite State Machine (FSM).
|
||||
-- The mission designer can tailor the behaviour of the AI_BALANCER, by defining event and state transition methods.
|
||||
-- An explanation about state and event transition methods can be found in the @{FSM} module documentation.
|
||||
-- ### [AI_BALANCER Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AIB%20-%20AI%20Balancing)
|
||||
--
|
||||
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
|
||||
--
|
||||
-- The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:
|
||||
-- ====
|
||||
--
|
||||
-- * **@{#AI_BALANCER.OnAfterSpawned}**( AISet, From, Event, To, AIGroup ): Define to add extra logic when an AI is spawned.
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ## 1.1) AI_BALANCER construction
|
||||
-- ### [AI_BALANCER YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl2CJVIrL1TdAumuVS8n64B7)
|
||||
--
|
||||
-- Create a new AI_BALANCER object with the @{#AI_BALANCER.New}() method:
|
||||
--
|
||||
-- ## 1.2) AI_BALANCER is a FSM
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ### 1.2.1) AI_BALANCER States
|
||||
--
|
||||
-- * **Monitoring** ( Set ): Monitoring the Set if all AI is spawned for the Clients.
|
||||
-- * **Spawning** ( Set, ClientName ): There is a new AI group spawned with ClientName as the name of reference.
|
||||
-- * **Spawned** ( Set, AIGroup ): A new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
|
||||
-- * **Destroying** ( Set, AIGroup ): The AI is being destroyed.
|
||||
-- * **Returning** ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods. Handle this state to customize the return behaviour of the AI, if any.
|
||||
--
|
||||
-- ### 1.2.2) AI_BALANCER Events
|
||||
--
|
||||
-- * **Monitor** ( Set ): Every 10 seconds, the Monitor event is triggered to monitor the Set.
|
||||
-- * **Spawn** ( Set, ClientName ): Triggers when there is a new AI group to be spawned with ClientName as the name of reference.
|
||||
-- * **Spawned** ( Set, AIGroup ): Triggers when a new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
|
||||
-- * **Destroy** ( Set, AIGroup ): The AI is being destroyed.
|
||||
-- * **Return** ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods.
|
||||
--
|
||||
-- ## 1.3) AI_BALANCER spawn interval for replacement AI
|
||||
--
|
||||
-- Use the method @{#AI_BALANCER.InitSpawnInterval}() to set the earliest and latest interval in seconds that is waited until a new replacement AI is spawned.
|
||||
--
|
||||
-- ## 1.4) AI_BALANCER returns AI to Airbases
|
||||
--
|
||||
-- By default, When a human player joins a slot that is AI_BALANCED, the AI group will be destroyed by default.
|
||||
-- However, there are 2 additional options that you can use to customize the destroy behaviour.
|
||||
-- When a human player joins a slot, you can configure to let the AI return to:
|
||||
--
|
||||
-- * @{#AI_BALANCER.ReturnToHomeAirbase}: Returns the AI to the **home** @{Airbase#AIRBASE}.
|
||||
-- * @{#AI_BALANCER.ReturnToNearestAirbases}: Returns the AI to the **nearest friendly** @{Airbase#AIRBASE}.
|
||||
--
|
||||
-- Note that when AI returns to an airbase, the AI_BALANCER will trigger the **Return** event and the AI will return,
|
||||
-- otherwise the AI_BALANCER will trigger a **Destroy** event, and the AI will be destroyed.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
@ -90,12 +50,68 @@
|
||||
--
|
||||
-- @module AI_Balancer
|
||||
|
||||
--- AI_BALANCER class
|
||||
-- @type AI_BALANCER
|
||||
--- @type AI_BALANCER
|
||||
-- @field Core.Set#SET_CLIENT SetClient
|
||||
-- @field Functional.Spawn#SPAWN SpawnAI
|
||||
-- @field Wrapper.Group#GROUP Test
|
||||
-- @extends Core.Fsm#FSM_SET
|
||||
|
||||
|
||||
--- # AI_BALANCER class, extends @{Fsm#FSM_SET}
|
||||
--
|
||||
-- The AI_BALANCER class monitors and manages as many replacement AI groups as there are
|
||||
-- CLIENTS in a SET_CLIENT collection, which are not occupied by human players.
|
||||
-- In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.
|
||||
--
|
||||
-- The parent class @{Fsm#FSM_SET} manages the functionality to control the Finite State Machine (FSM).
|
||||
-- The mission designer can tailor the behaviour of the AI_BALANCER, by defining event and state transition methods.
|
||||
-- An explanation about state and event transition methods can be found in the @{FSM} module documentation.
|
||||
--
|
||||
-- The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:
|
||||
--
|
||||
-- * @{#AI_BALANCER.OnAfterSpawned}( AISet, From, Event, To, AIGroup ): Define to add extra logic when an AI is spawned.
|
||||
--
|
||||
-- ## 1. AI_BALANCER construction
|
||||
--
|
||||
-- Create a new AI_BALANCER object with the @{#AI_BALANCER.New}() method:
|
||||
--
|
||||
-- ## 2. AI_BALANCER is a FSM
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ### 2.1. AI_BALANCER States
|
||||
--
|
||||
-- * **Monitoring** ( Set ): Monitoring the Set if all AI is spawned for the Clients.
|
||||
-- * **Spawning** ( Set, ClientName ): There is a new AI group spawned with ClientName as the name of reference.
|
||||
-- * **Spawned** ( Set, AIGroup ): A new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
|
||||
-- * **Destroying** ( Set, AIGroup ): The AI is being destroyed.
|
||||
-- * **Returning** ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods. Handle this state to customize the return behaviour of the AI, if any.
|
||||
--
|
||||
-- ### 2.2. AI_BALANCER Events
|
||||
--
|
||||
-- * **Monitor** ( Set ): Every 10 seconds, the Monitor event is triggered to monitor the Set.
|
||||
-- * **Spawn** ( Set, ClientName ): Triggers when there is a new AI group to be spawned with ClientName as the name of reference.
|
||||
-- * **Spawned** ( Set, AIGroup ): Triggers when a new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
|
||||
-- * **Destroy** ( Set, AIGroup ): The AI is being destroyed.
|
||||
-- * **Return** ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods.
|
||||
--
|
||||
-- ## 3. AI_BALANCER spawn interval for replacement AI
|
||||
--
|
||||
-- Use the method @{#AI_BALANCER.InitSpawnInterval}() to set the earliest and latest interval in seconds that is waited until a new replacement AI is spawned.
|
||||
--
|
||||
-- ## 4. AI_BALANCER returns AI to Airbases
|
||||
--
|
||||
-- By default, When a human player joins a slot that is AI_BALANCED, the AI group will be destroyed by default.
|
||||
-- However, there are 2 additional options that you can use to customize the destroy behaviour.
|
||||
-- When a human player joins a slot, you can configure to let the AI return to:
|
||||
--
|
||||
-- * @{#AI_BALANCER.ReturnToHomeAirbase}: Returns the AI to the **home** @{Airbase#AIRBASE}.
|
||||
-- * @{#AI_BALANCER.ReturnToNearestAirbases}: Returns the AI to the **nearest friendly** @{Airbase#AIRBASE}.
|
||||
--
|
||||
-- Note that when AI returns to an airbase, the AI_BALANCER will trigger the **Return** event and the AI will return,
|
||||
-- otherwise the AI_BALANCER will trigger a **Destroy** event, and the AI will be destroyed.
|
||||
--
|
||||
-- @field #AI_BALANCER
|
||||
AI_BALANCER = {
|
||||
ClassName = "AI_BALANCER",
|
||||
PatrolZones = {},
|
||||
|
||||
@ -11,6 +11,22 @@
|
||||
-- * @{#AI_CAP_ZONE}: Perform a CAP in a zone.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [AI_CAP Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/CAP%20-%20Combat%20Air%20Patrol)
|
||||
--
|
||||
-- ### [AI_CAP Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAP%20-%20Combat%20Air%20Patrol)
|
||||
--
|
||||
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [AI_CAP YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1YCyPxJgoZn-CfhwyeW65L)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
--
|
||||
@ -48,9 +64,9 @@
|
||||
-- @extends AI.AI_Patrol#AI_PATROL_ZONE
|
||||
|
||||
|
||||
--- # 1) @{#AI_CAP_ZONE} class, extends @{AI_CAP#AI_PATROL_ZONE}
|
||||
--- # AI_CAP_ZONE class, extends @{AI_CAP#AI_PATROL_ZONE}
|
||||
--
|
||||
-- The @{#AI_CAP_ZONE} class implements the core functions to patrol a @{Zone} by an AI @{Controllable} or @{Group}
|
||||
-- The AI_CAP_ZONE class implements the core functions to patrol a @{Zone} by an AI @{Controllable} or @{Group}
|
||||
-- and automatically engage any airborne enemies that are within a certain range or within a certain zone.
|
||||
--
|
||||
-- 
|
||||
@ -81,22 +97,22 @@
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ## 1.1) AI_CAP_ZONE constructor
|
||||
-- ## 1. AI_CAP_ZONE constructor
|
||||
--
|
||||
-- * @{#AI_CAP_ZONE.New}(): Creates a new AI_CAP_ZONE object.
|
||||
--
|
||||
-- ## 1.2) AI_CAP_ZONE is a FSM
|
||||
-- ## 2. AI_CAP_ZONE is a FSM
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ### 1.2.1) AI_CAP_ZONE States
|
||||
-- ### 2.1 AI_CAP_ZONE States
|
||||
--
|
||||
-- * **None** ( Group ): The process is not started yet.
|
||||
-- * **Patrolling** ( Group ): The AI is patrolling the Patrol Zone.
|
||||
-- * **Engaging** ( Group ): The AI is engaging the bogeys.
|
||||
-- * **Returning** ( Group ): The AI is returning to Base..
|
||||
--
|
||||
-- ### 1.2.2) AI_CAP_ZONE Events
|
||||
-- ### 2.2 AI_CAP_ZONE Events
|
||||
--
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
|
||||
@ -109,7 +125,7 @@
|
||||
-- * **@{#AI_CAP_ZONE.Destroyed}**: The AI has destroyed all bogeys @{Unit}s assigned in the CAS task.
|
||||
-- * **Status** ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
|
||||
--
|
||||
-- ## 1.3) Set the Range of Engagement
|
||||
-- ## 3. Set the Range of Engagement
|
||||
--
|
||||
-- 
|
||||
--
|
||||
@ -119,7 +135,7 @@
|
||||
-- The range is applied at the position of the AI.
|
||||
-- Use the method @{AI_CAP#AI_CAP_ZONE.SetEngageRange}() to define that range.
|
||||
--
|
||||
-- ## 1.4) Set the Zone of Engagement
|
||||
-- ## 4. Set the Zone of Engagement
|
||||
--
|
||||
-- 
|
||||
--
|
||||
@ -129,8 +145,7 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #AI_CAP_ZONE AI_CAP_ZONE
|
||||
--
|
||||
-- @field #AI_CAP_ZONE
|
||||
AI_CAP_ZONE = {
|
||||
ClassName = "AI_CAP_ZONE",
|
||||
}
|
||||
|
||||
@ -10,6 +10,22 @@
|
||||
--
|
||||
-- * @{#AI_CAS_ZONE}: Perform a CAS in a zone.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [AI_CAS Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/CAS%20-%20Close%20Air%20Support)
|
||||
--
|
||||
-- ### [AI_CAS Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAS%20-%20Close%20Air%20Support)
|
||||
--
|
||||
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [AI_CAS YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3JBO1WDqqpyYRRmIkR2ir2)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
@ -46,11 +62,11 @@
|
||||
-- @field Core.Zone#ZONE_BASE TargetZone The @{Zone} where the patrol needs to be executed.
|
||||
-- @extends AI.AI_Patrol#AI_PATROL_ZONE
|
||||
|
||||
--- # 1) @{#AI_CAS_ZONE} class, extends @{AI_Patrol#AI_PATROL_ZONE}
|
||||
--- # AI_CAS_ZONE class, extends @{AI_Patrol#AI_PATROL_ZONE}
|
||||
--
|
||||
-- @{#AI_CAS_ZONE} derives from the @{AI_Patrol#AI_PATROL_ZONE}, inheriting its methods and behaviour.
|
||||
-- AI_CAS_ZONE derives from the @{AI_Patrol#AI_PATROL_ZONE}, inheriting its methods and behaviour.
|
||||
--
|
||||
-- The @{#AI_CAS_ZONE} class implements the core functions to provide Close Air Support in an Engage @{Zone} by an AIR @{Controllable} or @{Group}.
|
||||
-- The AI_CAS_ZONE class implements the core functions to provide Close Air Support in an Engage @{Zone} by an AIR @{Controllable} or @{Group}.
|
||||
-- The AI_CAS_ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.
|
||||
--
|
||||
-- 
|
||||
@ -104,22 +120,22 @@
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- # 1.1) AI_CAS_ZONE constructor
|
||||
-- # 1. AI_CAS_ZONE constructor
|
||||
--
|
||||
-- * @{#AI_CAS_ZONE.New}(): Creates a new AI_CAS_ZONE object.
|
||||
--
|
||||
-- ## 1.2) AI_CAS_ZONE is a FSM
|
||||
-- ## 2. AI_CAS_ZONE is a FSM
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ### 1.2.1) AI_CAS_ZONE States
|
||||
-- ### 2.1. AI_CAS_ZONE States
|
||||
--
|
||||
-- * **None** ( Group ): The process is not started yet.
|
||||
-- * **Patrolling** ( Group ): The AI is patrolling the Patrol Zone.
|
||||
-- * **Engaging** ( Group ): The AI is engaging the targets in the Engage Zone, executing CAS.
|
||||
-- * **Returning** ( Group ): The AI is returning to Base..
|
||||
--
|
||||
-- ### 1.2.2) AI_CAS_ZONE Events
|
||||
-- ### 2.2. AI_CAS_ZONE Events
|
||||
--
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
|
||||
@ -134,8 +150,7 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #AI_CAS_ZONE AI_CAS_ZONE
|
||||
--
|
||||
-- @field #AI_CAS_ZONE
|
||||
AI_CAS_ZONE = {
|
||||
ClassName = "AI_CAS_ZONE",
|
||||
}
|
||||
|
||||
@ -12,6 +12,22 @@
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [AI_PATROL Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/PAT%20-%20Patrolling)
|
||||
--
|
||||
-- ### [AI_PATROL Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/PAT%20-%20Patrolling)
|
||||
--
|
||||
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [AI_PATROL YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl35HvYZKA6G22WMt7iI3zky)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # **OPEN ISSUES**
|
||||
--
|
||||
-- 2017-01-17: When Spawned AI is located at an airbase, it will be routed first back to the airbase after take-off.
|
||||
@ -64,9 +80,9 @@
|
||||
-- @field Functional.Spawn#SPAWN CoordTest
|
||||
-- @extends Core.Fsm#FSM_CONTROLLABLE
|
||||
|
||||
--- # 1) @{#AI_PATROL_ZONE} class, extends @{Fsm#FSM_CONTROLLABLE}
|
||||
--- # AI_PATROL_ZONE class, extends @{Fsm#FSM_CONTROLLABLE}
|
||||
--
|
||||
-- The @{#AI_PATROL_ZONE} class implements the core functions to patrol a @{Zone} by an AI @{Controllable} or @{Group}.
|
||||
-- The AI_PATROL_ZONE class implements the core functions to patrol a @{Zone} by an AI @{Controllable} or @{Group}.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
@ -97,15 +113,15 @@
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ## 1.1) AI_PATROL_ZONE constructor
|
||||
-- ## 1. AI_PATROL_ZONE constructor
|
||||
--
|
||||
-- * @{#AI_PATROL_ZONE.New}(): Creates a new AI_PATROL_ZONE object.
|
||||
--
|
||||
-- ## 1.2) AI_PATROL_ZONE is a FSM
|
||||
-- ## 2. AI_PATROL_ZONE is a FSM
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ### 1.2.1) AI_PATROL_ZONE States
|
||||
-- ### 2.1. AI_PATROL_ZONE States
|
||||
--
|
||||
-- * **None** ( Group ): The process is not started yet.
|
||||
-- * **Patrolling** ( Group ): The AI is patrolling the Patrol Zone.
|
||||
@ -113,7 +129,7 @@
|
||||
-- * **Stopped** ( Group ): The process is stopped.
|
||||
-- * **Crashed** ( Group ): The AI has crashed or is dead.
|
||||
--
|
||||
-- ### 1.2.2) AI_PATROL_ZONE Events
|
||||
-- ### 2.2. AI_PATROL_ZONE Events
|
||||
--
|
||||
-- * **Start** ( Group ): Start the process.
|
||||
-- * **Stop** ( Group ): Stop the process.
|
||||
@ -123,17 +139,17 @@
|
||||
-- * **Detected** ( Group ): The AI has detected new targets.
|
||||
-- * **Status** ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
|
||||
--
|
||||
-- ## 1.3) Set or Get the AI controllable
|
||||
-- ## 3. Set or Get the AI controllable
|
||||
--
|
||||
-- * @{#AI_PATROL_ZONE.SetControllable}(): Set the AIControllable.
|
||||
-- * @{#AI_PATROL_ZONE.GetControllable}(): Get the AIControllable.
|
||||
--
|
||||
-- ## 1.4) Set the Speed and Altitude boundaries of the AI controllable
|
||||
-- ## 4. Set the Speed and Altitude boundaries of the AI controllable
|
||||
--
|
||||
-- * @{#AI_PATROL_ZONE.SetSpeed}(): Set the patrol speed boundaries of the AI, for the next patrol.
|
||||
-- * @{#AI_PATROL_ZONE.SetAltitude}(): Set altitude boundaries of the AI, for the next patrol.
|
||||
--
|
||||
-- ## 1.5) Manage the detection process of the AI controllable
|
||||
-- ## 5. Manage the detection process of the AI controllable
|
||||
--
|
||||
-- The detection process of the AI controllable can be manipulated.
|
||||
-- Detection requires an amount of CPU power, which has an impact on your mission performance.
|
||||
@ -150,7 +166,7 @@
|
||||
-- Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected
|
||||
-- according the weather conditions.
|
||||
--
|
||||
-- ## 1.6) Manage the "out of fuel" in the AI_PATROL_ZONE
|
||||
-- ## 6. Manage the "out of fuel" in the AI_PATROL_ZONE
|
||||
--
|
||||
-- When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.
|
||||
-- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated.
|
||||
@ -159,7 +175,7 @@
|
||||
-- Once the time is finished, the old AI will return to the base.
|
||||
-- Use the method @{#AI_PATROL_ZONE.ManageFuel}() to have this proces in place.
|
||||
--
|
||||
-- ## 1.7) Manage "damage" behaviour of the AI in the AI_PATROL_ZONE
|
||||
-- ## 7. Manage "damage" behaviour of the AI in the AI_PATROL_ZONE
|
||||
--
|
||||
-- When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on.
|
||||
-- Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB).
|
||||
@ -167,8 +183,7 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #AI_PATROL_ZONE AI_PATROL_ZONE
|
||||
--
|
||||
-- @field #AI_PATROL_ZONE
|
||||
AI_PATROL_ZONE = {
|
||||
ClassName = "AI_PATROL_ZONE",
|
||||
}
|
||||
|
||||
@ -101,75 +101,28 @@ even when there are hardly any players in the mission.</strong></p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="AI_Balancer.html##(AI_BALANCER)">AI<em>Balancer#AI</em>BALANCER</a> class, extends <a href="Fsm.html##(FSM_SET)">Fsm#FSM_SET</a></h1>
|
||||
<h1>Demo Missions</h1>
|
||||
|
||||
<p>The <a href="AI_Balancer.html##(AI_BALANCER)">AI<em>Balancer#AI</em>BALANCER</a> class monitors and manages as many replacement AI groups as there are
|
||||
CLIENTS in a SET_CLIENT collection, which are not occupied by human players.</p>
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/AIB%20-%20AI%20Balancing">AI_BALANCER Demo Missions source code</a></h3>
|
||||
|
||||
|
||||
<p>In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.</p>
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AIB%20-%20AI%20Balancing">AI_BALANCER Demo Missions, only for beta testers</a></h3>
|
||||
|
||||
<p>The parent class <a href="Fsm.html##(FSM_SET)">Fsm#FSM_SET</a> manages the functionality to control the Finite State Machine (FSM).
|
||||
The mission designer can tailor the behaviour of the AI_BALANCER, by defining event and state transition methods.
|
||||
An explanation about state and event transition methods can be found in the <a href="FSM.html">FSM</a> module documentation.</p>
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the last release</a></h3>
|
||||
|
||||
<p>The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:</p>
|
||||
<hr/>
|
||||
|
||||
<ul>
|
||||
<li>**<a href="##(AI_BALANCER).OnAfterSpawned">AI_BALANCER.OnAfterSpawned</a>**( AISet, From, Event, To, AIGroup ): Define to add extra logic when an AI is spawned.</li>
|
||||
</ul>
|
||||
<h1>YouTube Channel</h1>
|
||||
|
||||
<h2>1.1) AI_BALANCER construction</h2>
|
||||
|
||||
<p>Create a new AI_BALANCER object with the <a href="##(AI_BALANCER).New">AI_BALANCER.New</a>() method:</p>
|
||||
|
||||
<h2>1.2) AI_BALANCER is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_Balancer\Dia13.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI_BALANCER States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Monitoring</strong> ( Set ): Monitoring the Set if all AI is spawned for the Clients.</li>
|
||||
<li><strong>Spawning</strong> ( Set, ClientName ): There is a new AI group spawned with ClientName as the name of reference.</li>
|
||||
<li><strong>Spawned</strong> ( Set, AIGroup ): A new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.</li>
|
||||
<li><strong>Destroying</strong> ( Set, AIGroup ): The AI is being destroyed.</li>
|
||||
<li><strong>Returning</strong> ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods. Handle this state to customize the return behaviour of the AI, if any.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI_BALANCER Events</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Monitor</strong> ( Set ): Every 10 seconds, the Monitor event is triggered to monitor the Set.</li>
|
||||
<li><strong>Spawn</strong> ( Set, ClientName ): Triggers when there is a new AI group to be spawned with ClientName as the name of reference.</li>
|
||||
<li><strong>Spawned</strong> ( Set, AIGroup ): Triggers when a new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.</li>
|
||||
<li><strong>Destroy</strong> ( Set, AIGroup ): The AI is being destroyed.</li>
|
||||
<li><strong>Return</strong> ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) AI_BALANCER spawn interval for replacement AI</h2>
|
||||
|
||||
<p>Use the method <a href="##(AI_BALANCER).InitSpawnInterval">AI_BALANCER.InitSpawnInterval</a>() to set the earliest and latest interval in seconds that is waited until a new replacement AI is spawned.</p>
|
||||
|
||||
<h2>1.4) AI_BALANCER returns AI to Airbases</h2>
|
||||
|
||||
<p>By default, When a human player joins a slot that is AI_BALANCED, the AI group will be destroyed by default.
|
||||
However, there are 2 additional options that you can use to customize the destroy behaviour.
|
||||
When a human player joins a slot, you can configure to let the AI return to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_BALANCER).ReturnToHomeAirbase">AI_BALANCER.ReturnToHomeAirbase</a>: Returns the AI to the <strong>home</strong> <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</li>
|
||||
<li><a href="##(AI_BALANCER).ReturnToNearestAirbases">AI_BALANCER.ReturnToNearestAirbases</a>: Returns the AI to the <strong>nearest friendly</strong> <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note that when AI returns to an airbase, the AI<em>BALANCER will trigger the <strong>Return</strong> event and the AI will return,
|
||||
otherwise the AI</em>BALANCER will trigger a <strong>Destroy</strong> event, and the AI will be destroyed.</p>
|
||||
<h3><a href="https://www.youtube.com/playlist?list=PL7ZUrU4zZUl2CJVIrL1TdAumuVS8n64B7">AI_BALANCER YouTube Channel</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
|
||||
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
|
||||
<p>The underlying change log documents the API changes.</p>
|
||||
|
||||
|
||||
<p>Please read this carefully. The following notation is used:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Added</strong> parts are expressed in bold type face.</li>
|
||||
@ -205,25 +158,16 @@ otherwise the AI</em>BALANCER will trigger a <strong>Destroy</strong> event, and
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_BALANCER">AI_BALANCER</a></td>
|
||||
<td class="summary">
|
||||
<h1>AI_BALANCER class, extends <a href="Fsm.html##(FSM_SET)">Fsm#FSM_SET</a></h1>
|
||||
|
||||
<p>The AI<em>BALANCER class monitors and manages as many replacement AI groups as there are
|
||||
CLIENTS in a SET</em>CLIENT collection, which are not occupied by human players.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(AI_BALANCER)">Type <code>AI_BALANCER</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_BALANCER).AIGroups">AI_BALANCER.AIGroups</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_BALANCER).ClassName">AI_BALANCER.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_BALANCER).Earliest">AI_BALANCER.Earliest</a></td>
|
||||
<td class="summary">
|
||||
|
||||
@ -245,12 +189,6 @@ otherwise the AI</em>BALANCER will trigger a <strong>Destroy</strong> event, and
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_BALANCER).New">AI_BALANCER:New(SetClient, SpawnAI)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new AI_BALANCER object</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_BALANCER).PatrolZones">AI_BALANCER.PatrolZones</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -344,6 +282,69 @@ otherwise the AI</em>BALANCER will trigger a <strong>Destroy</strong> event, and
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>AI_BALANCER class, extends <a href="Fsm.html##(FSM_SET)">Fsm#FSM_SET</a></h1>
|
||||
|
||||
<p>The AI<em>BALANCER class monitors and manages as many replacement AI groups as there are
|
||||
CLIENTS in a SET</em>CLIENT collection, which are not occupied by human players.</p>
|
||||
|
||||
|
||||
<p>In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.</p>
|
||||
|
||||
<p>The parent class <a href="Fsm.html##(FSM_SET)">Fsm#FSM_SET</a> manages the functionality to control the Finite State Machine (FSM).
|
||||
The mission designer can tailor the behaviour of the AI_BALANCER, by defining event and state transition methods.
|
||||
An explanation about state and event transition methods can be found in the <a href="FSM.html">FSM</a> module documentation.</p>
|
||||
|
||||
<p>The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_BALANCER).OnAfterSpawned">AI_BALANCER.OnAfterSpawned</a>( AISet, From, Event, To, AIGroup ): Define to add extra logic when an AI is spawned.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1. AI_BALANCER construction</h2>
|
||||
|
||||
<p>Create a new AI_BALANCER object with the <a href="##(AI_BALANCER).New">AI_BALANCER.New</a>() method:</p>
|
||||
|
||||
<h2>2. AI_BALANCER is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_Balancer\Dia13.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>2.1. AI_BALANCER States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Monitoring</strong> ( Set ): Monitoring the Set if all AI is spawned for the Clients.</li>
|
||||
<li><strong>Spawning</strong> ( Set, ClientName ): There is a new AI group spawned with ClientName as the name of reference.</li>
|
||||
<li><strong>Spawned</strong> ( Set, AIGroup ): A new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.</li>
|
||||
<li><strong>Destroying</strong> ( Set, AIGroup ): The AI is being destroyed.</li>
|
||||
<li><strong>Returning</strong> ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods. Handle this state to customize the return behaviour of the AI, if any.</li>
|
||||
</ul>
|
||||
|
||||
<h3>2.2. AI_BALANCER Events</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Monitor</strong> ( Set ): Every 10 seconds, the Monitor event is triggered to monitor the Set.</li>
|
||||
<li><strong>Spawn</strong> ( Set, ClientName ): Triggers when there is a new AI group to be spawned with ClientName as the name of reference.</li>
|
||||
<li><strong>Spawned</strong> ( Set, AIGroup ): Triggers when a new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.</li>
|
||||
<li><strong>Destroy</strong> ( Set, AIGroup ): The AI is being destroyed.</li>
|
||||
<li><strong>Return</strong> ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods.</li>
|
||||
</ul>
|
||||
|
||||
<h2>3. AI_BALANCER spawn interval for replacement AI</h2>
|
||||
|
||||
<p>Use the method <a href="##(AI_BALANCER).InitSpawnInterval">AI_BALANCER.InitSpawnInterval</a>() to set the earliest and latest interval in seconds that is waited until a new replacement AI is spawned.</p>
|
||||
|
||||
<h2>4. AI_BALANCER returns AI to Airbases</h2>
|
||||
|
||||
<p>By default, When a human player joins a slot that is AI_BALANCED, the AI group will be destroyed by default.
|
||||
However, there are 2 additional options that you can use to customize the destroy behaviour.
|
||||
When a human player joins a slot, you can configure to let the AI return to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_BALANCER).ReturnToHomeAirbase">AI_BALANCER.ReturnToHomeAirbase</a>: Returns the AI to the <strong>home</strong> <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</li>
|
||||
<li><a href="##(AI_BALANCER).ReturnToNearestAirbases">AI_BALANCER.ReturnToNearestAirbases</a>: Returns the AI to the <strong>nearest friendly</strong> <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note that when AI returns to an airbase, the AI<em>BALANCER will trigger the <strong>Return</strong> event and the AI will return,
|
||||
otherwise the AI</em>BALANCER will trigger a <strong>Destroy</strong> event, and the AI will be destroyed.</p>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -351,38 +352,7 @@ otherwise the AI</em>BALANCER will trigger a <strong>Destroy</strong> event, and
|
||||
<h2><a id="#(AI_Balancer)" >Type <code>AI_Balancer</code></a></h2>
|
||||
|
||||
<h2><a id="#(AI_BALANCER)" >Type <code>AI_BALANCER</code></a></h2>
|
||||
|
||||
<p>AI_BALANCER class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_BALANCER).AIGroups" >
|
||||
<strong>AI_BALANCER.AIGroups</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AI_BALANCER).ClassName" >
|
||||
<strong>AI_BALANCER.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@ -478,20 +448,6 @@ The default Spawn object to spawn new AI Groups when needed.</p>
|
||||
<p><em><a href="##(AI_BALANCER)">#AI_BALANCER</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_BALANCER).PatrolZones" >
|
||||
<strong>AI_BALANCER.PatrolZones</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -111,6 +111,22 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>Demo Missions</h1>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/CAP%20-%20Combat%20Air%20Patrol">AI_CAP Demo Missions source code</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAP%20-%20Combat%20Air%20Patrol">AI_CAP Demo Missions, only for beta testers</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the last release</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>YouTube Channel</h1>
|
||||
|
||||
<h3><a href="https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1YCyPxJgoZn-CfhwyeW65L">AI_CAP YouTube Channel</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
|
||||
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
|
||||
@ -150,9 +166,9 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_CAP_ZONE">AI_CAP_ZONE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class, extends <a href="AI_CAP.html##(AI_PATROL_ZONE)">AI<em>CAP#AI</em>PATROL_ZONE</a></h1>
|
||||
<h1>AI<em>CAP</em>ZONE class, extends <a href="AI_CAP.html##(AI_PATROL_ZONE)">AI<em>CAP#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>
|
||||
<p>The AI<em>CAP</em>ZONE class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>
|
||||
and automatically engage any airborne enemies that are within a certain range or within a certain zone.</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -412,9 +428,9 @@ and automatically engage any airborne enemies that are within a certain range or
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class, extends <a href="AI_CAP.html##(AI_PATROL_ZONE)">AI<em>CAP#AI</em>PATROL_ZONE</a></h1>
|
||||
<h1>AI<em>CAP</em>ZONE class, extends <a href="AI_CAP.html##(AI_PATROL_ZONE)">AI<em>CAP#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_CAP_ZONE)">#AI<em>CAP</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>
|
||||
<p>The AI<em>CAP</em>ZONE class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>
|
||||
and automatically engage any airborne enemies that are within a certain range or within a certain zone.</p>
|
||||
|
||||
|
||||
@ -447,17 +463,17 @@ When the fuel treshold has been reached, the airplane will fly towards the neare
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia13.JPG" alt="Process"/></p>
|
||||
|
||||
<h2>1.1) AI<em>CAP</em>ZONE constructor</h2>
|
||||
<h2>1. AI<em>CAP</em>ZONE constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_CAP_ZONE).New">AI<em>CAP</em>ZONE.New</a>(): Creates a new AI<em>CAP</em>ZONE object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>CAP</em>ZONE is a FSM</h2>
|
||||
<h2>2. AI<em>CAP</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>CAP</em>ZONE States</h3>
|
||||
<h3>2.1 AI<em>CAP</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
@ -466,7 +482,7 @@ When the fuel treshold has been reached, the airplane will fly towards the neare
|
||||
<li><strong>Returning</strong> ( Group ): The AI is returning to Base..</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>CAP</em>ZONE Events</h3>
|
||||
<h3>2.2 AI<em>CAP</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Start">AI<em>Patrol#AI</em>PATROL_ZONE.Start</a>**: Start the process.</li>
|
||||
@ -481,7 +497,7 @@ When the fuel treshold has been reached, the airplane will fly towards the neare
|
||||
<li><strong>Status</strong> ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) Set the Range of Engagement</h2>
|
||||
<h2>3. Set the Range of Engagement</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia11.JPG" alt="Range"/></p>
|
||||
|
||||
@ -491,7 +507,7 @@ The range can be beyond or smaller than the range of the Patrol Zone.
|
||||
The range is applied at the position of the AI.
|
||||
Use the method <a href="AI_CAP.html##(AI_CAP_ZONE).SetEngageRange">AI<em>CAP#AI</em>CAP_ZONE.SetEngageRange</a>() to define that range.</p>
|
||||
|
||||
<h2>1.4) Set the Zone of Engagement</h2>
|
||||
<h2>4. Set the Zone of Engagement</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAP\Dia12.JPG" alt="Zone"/></p>
|
||||
|
||||
|
||||
@ -111,6 +111,22 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>Demo Missions</h1>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/CAS%20-%20Close%20Air%20Support">AI_CAS Demo Missions source code</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAS%20-%20Close%20Air%20Support">AI_CAS Demo Missions, only for beta testers</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the last release</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>YouTube Channel</h1>
|
||||
|
||||
<h3><a href="https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3JBO1WDqqpyYRRmIkR2ir2">AI_CAS YouTube Channel</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
|
||||
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
|
||||
@ -148,9 +164,9 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_CAS_ZONE">AI_CAS_ZONE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class, extends <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a></h1>
|
||||
<h1>AI<em>CAS</em>ZONE class, extends <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p><a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> derives from the <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a>, inheriting its methods and behaviour.</p>
|
||||
<p>AI<em>CAS</em>ZONE derives from the <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a>, inheriting its methods and behaviour.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -421,13 +437,13 @@
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class, extends <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a></h1>
|
||||
<h1>AI<em>CAS</em>ZONE class, extends <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a></h1>
|
||||
|
||||
<p><a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> derives from the <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a>, inheriting its methods and behaviour.</p>
|
||||
<p>AI<em>CAS</em>ZONE derives from the <a href="AI_Patrol.html##(AI_PATROL_ZONE)">AI<em>Patrol#AI</em>PATROL_ZONE</a>, inheriting its methods and behaviour.</p>
|
||||
|
||||
|
||||
<p>
|
||||
The <a href="##(AI_CAS_ZONE)">#AI<em>CAS</em>ZONE</a> class implements the core functions to provide Close Air Support in an Engage <a href="Zone.html">Zone</a> by an AIR <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.
|
||||
The AI<em>CAS</em>ZONE class implements the core functions to provide Close Air Support in an Engage <a href="Zone.html">Zone</a> by an AIR <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.
|
||||
The AI<em>CAS</em>ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia3.JPG" alt="HoldAndEngage"/></p>
|
||||
@ -483,17 +499,17 @@ It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia12.JPG" alt="Engage Event"/></p>
|
||||
|
||||
<h1>1.1) AI<em>CAS</em>ZONE constructor</h1>
|
||||
<h1>1. AI<em>CAS</em>ZONE constructor</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_CAS_ZONE).New">AI<em>CAS</em>ZONE.New</a>(): Creates a new AI<em>CAS</em>ZONE object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>CAS</em>ZONE is a FSM</h2>
|
||||
<h2>2. AI<em>CAS</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_CAS\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>CAS</em>ZONE States</h3>
|
||||
<h3>2.1. AI<em>CAS</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
@ -502,7 +518,7 @@ It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
<li><strong>Returning</strong> ( Group ): The AI is returning to Base..</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>CAS</em>ZONE Events</h3>
|
||||
<h3>2.2. AI<em>CAS</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Start">AI<em>Patrol#AI</em>PATROL_ZONE.Start</a>**: Start the process.</li>
|
||||
|
||||
@ -111,6 +111,22 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>Demo Missions</h1>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/PAT%20-%20Patrolling">AI_PATROL Demo Missions source code</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/PAT%20-%20Patrolling">AI_PATROL Demo Missions, only for beta testers</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the last release</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>YouTube Channel</h1>
|
||||
|
||||
<h3><a href="https://www.youtube.com/playlist?list=PL7ZUrU4zZUl35HvYZKA6G22WMt7iI3zky">AI_PATROL YouTube Channel</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>OPEN ISSUES</strong></h1>
|
||||
|
||||
<p>2017-01-17: When Spawned AI is located at an airbase, it will be routed first back to the airbase after take-off.</p>
|
||||
@ -162,9 +178,9 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_PATROL_ZONE">AI_PATROL_ZONE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class, extends <a href="Fsm.html##(FSM_CONTROLLABLE)">Fsm#FSM_CONTROLLABLE</a></h1>
|
||||
<h1>AI<em>PATROL</em>ZONE class, extends <a href="Fsm.html##(FSM_CONTROLLABLE)">Fsm#FSM_CONTROLLABLE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.</p>
|
||||
<p>The AI<em>PATROL</em>ZONE class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -657,9 +673,9 @@
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class, extends <a href="Fsm.html##(FSM_CONTROLLABLE)">Fsm#FSM_CONTROLLABLE</a></h1>
|
||||
<h1>AI<em>PATROL</em>ZONE class, extends <a href="Fsm.html##(FSM_CONTROLLABLE)">Fsm#FSM_CONTROLLABLE</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_PATROL_ZONE)">#AI<em>PATROL</em>ZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.</p>
|
||||
<p>The AI<em>PATROL</em>ZONE class implements the core functions to patrol a <a href="Zone.html">Zone</a> by an AI <a href="Controllable.html">Controllable</a> or <a href="Group.html">Group</a>.</p>
|
||||
|
||||
|
||||
|
||||
@ -692,17 +708,17 @@ When the fuel treshold has been reached, the airplane will fly towards the neare
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia11.JPG" alt="Process"/></p>
|
||||
|
||||
<h2>1.1) AI<em>PATROL</em>ZONE constructor</h2>
|
||||
<h2>1. AI<em>PATROL</em>ZONE constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).New">AI<em>PATROL</em>ZONE.New</a>(): Creates a new AI<em>PATROL</em>ZONE object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) AI<em>PATROL</em>ZONE is a FSM</h2>
|
||||
<h2>2. AI<em>PATROL</em>ZONE is a FSM</h2>
|
||||
|
||||
<p><img src="..\Presentations\AI_PATROL\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>1.2.1) AI<em>PATROL</em>ZONE States</h3>
|
||||
<h3>2.1. AI<em>PATROL</em>ZONE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong> ( Group ): The process is not started yet.</li>
|
||||
@ -712,7 +728,7 @@ When the fuel treshold has been reached, the airplane will fly towards the neare
|
||||
<li><strong>Crashed</strong> ( Group ): The AI has crashed or is dead.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) AI<em>PATROL</em>ZONE Events</h3>
|
||||
<h3>2.2. AI<em>PATROL</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Start</strong> ( Group ): Start the process.</li>
|
||||
@ -724,21 +740,21 @@ When the fuel treshold has been reached, the airplane will fly towards the neare
|
||||
<li><strong>Status</strong> ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) Set or Get the AI controllable</h2>
|
||||
<h2>3. Set or Get the AI controllable</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetControllable">AI<em>PATROL</em>ZONE.SetControllable</a>(): Set the AIControllable.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE).GetControllable">AI<em>PATROL</em>ZONE.GetControllable</a>(): Get the AIControllable.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.4) Set the Speed and Altitude boundaries of the AI controllable</h2>
|
||||
<h2>4. Set the Speed and Altitude boundaries of the AI controllable</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetSpeed">AI<em>PATROL</em>ZONE.SetSpeed</a>(): Set the patrol speed boundaries of the AI, for the next patrol.</li>
|
||||
<li><a href="##(AI_PATROL_ZONE).SetAltitude">AI<em>PATROL</em>ZONE.SetAltitude</a>(): Set altitude boundaries of the AI, for the next patrol.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.5) Manage the detection process of the AI controllable</h2>
|
||||
<h2>5. Manage the detection process of the AI controllable</h2>
|
||||
|
||||
<p>The detection process of the AI controllable can be manipulated.
|
||||
Detection requires an amount of CPU power, which has an impact on your mission performance.
|
||||
@ -757,7 +773,7 @@ Use the method <a href="##(AI_PATROL_ZONE).SetDetectionZone">AI<em>PATROL</em>ZO
|
||||
Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected
|
||||
according the weather conditions.</p>
|
||||
|
||||
<h2>1.6) Manage the "out of fuel" in the AI<em>PATROL</em>ZONE</h2>
|
||||
<h2>6. Manage the "out of fuel" in the AI<em>PATROL</em>ZONE</h2>
|
||||
|
||||
<p>When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.
|
||||
Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated.
|
||||
@ -766,7 +782,7 @@ while a new AI is targetted to the AI<em>PATROL</em>ZONE.
|
||||
Once the time is finished, the old AI will return to the base.
|
||||
Use the method <a href="##(AI_PATROL_ZONE).ManageFuel">AI<em>PATROL</em>ZONE.ManageFuel</a>() to have this proces in place.</p>
|
||||
|
||||
<h2>1.7) Manage "damage" behaviour of the AI in the AI<em>PATROL</em>ZONE</h2>
|
||||
<h2>7. Manage "damage" behaviour of the AI in the AI<em>PATROL</em>ZONE</h2>
|
||||
|
||||
<p>When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on.
|
||||
Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB).
|
||||
@ -933,9 +949,6 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
|
||||
|
||||
|
||||
|
||||
<p> This table contains the targets detected during patrol.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -2819,6 +2819,7 @@ The range till cargo will board.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CARGO_UNIT).CargoCarrier" >
|
||||
<strong>CARGO_UNIT.CargoCarrier</strong>
|
||||
</a>
|
||||
|
||||
@ -2172,7 +2172,6 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemCount" >
|
||||
<strong>DETECTION_BASE.DetectedItemCount</strong>
|
||||
</a>
|
||||
@ -2186,7 +2185,6 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemMax" >
|
||||
<strong>DETECTION_BASE.DetectedItemMax</strong>
|
||||
</a>
|
||||
@ -2300,7 +2298,7 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(DETECTION_BASE).DetectionInterval" >
|
||||
<strong>DETECTION_BASE.DetectionInterval</strong>
|
||||
</a>
|
||||
|
||||
@ -1620,7 +1620,7 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<em></em>
|
||||
<a id="#(FSM)._StartState" >
|
||||
<strong>FSM._StartState</strong>
|
||||
</a>
|
||||
@ -1919,6 +1919,7 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM).current" >
|
||||
<strong>FSM.current</strong>
|
||||
</a>
|
||||
|
||||
@ -810,6 +810,12 @@ and any spaces before and after the resulting name are removed.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -2111,9 +2117,6 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2567,9 +2570,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Overwrite unit names by default with group name.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2991,7 +2991,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
|
||||
|
||||
|
||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
||||
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -3557,6 +3557,20 @@ True = Continue Scheduler</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).uncontrolled" >
|
||||
<strong>SPAWN.uncontrolled</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -442,6 +442,7 @@ ptional) The name of the new static.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWNSTATIC).SpawnIndex" >
|
||||
<strong>SPAWNSTATIC.SpawnIndex</strong>
|
||||
</a>
|
||||
|
||||
@ -451,7 +451,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
|
||||
<em></em>
|
||||
<a id="#(FSM_PROCESS).Cargo" >
|
||||
<strong>FSM_PROCESS.Cargo</strong>
|
||||
</a>
|
||||
|
||||
@ -104,10 +104,25 @@ even when there are hardly any players in the mission.</strong></p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="AI_Balancer.html##(AI_BALANCER)">AI<em>Balancer#AI</em>BALANCER</a> class, extends <a href="Fsm.html##(FSM_SET)">Fsm#FSM_SET</a></h1>
|
||||
<h1>Demo Missions</h1>
|
||||
|
||||
<p>The <a href="AI_Balancer.html##(AI_BALANCER)">AI<em>Balancer#AI</em>BALANCER</a> class monitors and manages as many replacement AI groups as there are
|
||||
CLIENTS in a SET_CLIENT collection, which are not occupied by human players.</p>
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/AIB%20-%20AI%20Balancing">AI_BALANCER Demo Missions source code</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AIB%20-%20AI%20Balancing">AI_BALANCER Demo Missions, only for beta testers</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the last release</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>YouTube Channel</h1>
|
||||
|
||||
<h3><a href="https://www.youtube.com/playlist?list=PL7ZUrU4zZUl2CJVIrL1TdAumuVS8n64B7">AI_BALANCER YouTube Channel</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
|
||||
<p>The underlying change log documents the API changes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user