Updated documentation in AI_CAP, AI_CAS, AI_BALANCER, AI_PATROL

This commit is contained in:
FlightControl
2017-04-17 11:18:01 +02:00
parent a89c469130
commit 040a342e25
15 changed files with 347 additions and 255 deletions

View File

@@ -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">