mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
519 lines
14 KiB
HTML
519 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div>
|
|
<div id="main">
|
|
<div id="navigation">
|
|
<h2>Modules</h2>
|
|
<ul><li>
|
|
<a href="index.html">index</a>
|
|
</li></ul>
|
|
<ul>
|
|
<li>AIBalancer</li>
|
|
<li><a href="Airbase.html">Airbase</a></li>
|
|
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
|
|
<li><a href="Base.html">Base</a></li>
|
|
<li><a href="CARGO.html">CARGO</a></li>
|
|
<li><a href="CleanUp.html">CleanUp</a></li>
|
|
<li><a href="Client.html">Client</a></li>
|
|
<li><a href="Controllable.html">Controllable</a></li>
|
|
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
|
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
|
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
|
<li><a href="DCSController.html">DCSController</a></li>
|
|
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
|
<li><a href="DCSObject.html">DCSObject</a></li>
|
|
<li><a href="DCSTask.html">DCSTask</a></li>
|
|
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
|
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
|
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
|
<li><a href="DCScountry.html">DCScountry</a></li>
|
|
<li><a href="DCStimer.html">DCStimer</a></li>
|
|
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
|
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
|
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
|
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
|
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
|
<li><a href="Database.html">Database</a></li>
|
|
<li><a href="Detection.html">Detection</a></li>
|
|
<li><a href="Escort.html">Escort</a></li>
|
|
<li><a href="Event.html">Event</a></li>
|
|
<li><a href="Fac.html">Fac</a></li>
|
|
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
|
<li><a href="Group.html">Group</a></li>
|
|
<li><a href="Identifiable.html">Identifiable</a></li>
|
|
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
|
<li><a href="Menu.html">Menu</a></li>
|
|
<li><a href="Message.html">Message</a></li>
|
|
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
|
<li><a href="Mission.html">Mission</a></li>
|
|
<li><a href="NOTASK.html">NOTASK</a></li>
|
|
<li><a href="Object.html">Object</a></li>
|
|
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
|
<li><a href="PatrolZone.html">PatrolZone</a></li>
|
|
<li><a href="Point.html">Point</a></li>
|
|
<li><a href="Positionable.html">Positionable</a></li>
|
|
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
|
<li><a href="STAGE.html">STAGE</a></li>
|
|
<li><a href="Scheduler.html">Scheduler</a></li>
|
|
<li><a href="Scoring.html">Scoring</a></li>
|
|
<li><a href="Sead.html">Sead</a></li>
|
|
<li><a href="Set.html">Set</a></li>
|
|
<li><a href="Spawn.html">Spawn</a></li>
|
|
<li><a href="Static.html">Static</a></li>
|
|
<li><a href="StaticObject.html">StaticObject</a></li>
|
|
<li><a href="TASK.html">TASK</a></li>
|
|
<li><a href="Unit.html">Unit</a></li>
|
|
<li><a href="Zone.html">Zone</a></li>
|
|
<li><a href="env.html">env</a></li>
|
|
<li><a href="land.html">land</a></li>
|
|
<li><a href="routines.html">routines</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<h1>Module <code>AIBalancer</code></h1>
|
|
|
|
<p>This module contains the AIBALANCER class.</p>
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<h1>1) <a href="AIBalancer.html##(AIBALANCER)">AIBalancer#AIBALANCER</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
|
<p>The <a href="AIBalancer.html##(AIBALANCER)">AIBalancer#AIBALANCER</a> class controls the dynamic spawning of AI GROUPS depending on a SET<em>CLIENT.
|
|
There will be as many AI GROUPS spawned as there at CLIENTS in SET</em>CLIENT not spawned.</p>
|
|
|
|
<h2>1.1) AIBALANCER construction method:</h2>
|
|
<p>Create a new AIBALANCER object with the <a href="##(AIBALANCER).New">AIBALANCER.New</a> method:</p>
|
|
|
|
<ul>
|
|
<li><a href="##(AIBALANCER).New">AIBALANCER.New</a>: Creates a new AIBALANCER object.</li>
|
|
</ul>
|
|
|
|
<h2>1.2) AIBALANCER returns AI to Airbases:</h2>
|
|
<p>You can configure to have the AI to return to:</p>
|
|
|
|
<ul>
|
|
<li><a href="##(AIBALANCER).ReturnToHomeAirbase">AIBALANCER.ReturnToHomeAirbase</a>: Returns the AI to the home <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</li>
|
|
<li><a href="##(AIBALANCER).ReturnToNearestAirbases">AIBALANCER.ReturnToNearestAirbases</a>: Returns the AI to the nearest friendly <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</li>
|
|
</ul>
|
|
|
|
<h2>1.3) AIBALANCER allows AI to patrol specific zones:</h2>
|
|
<p>Use <a href="AIBalancer.html##(AIBALANCER).SetPatrolZone">AIBalancer#AIBALANCER.SetPatrolZone</a>() to specify a zone where the AI needs to patrol.</p>
|
|
|
|
|
|
<hr/>
|
|
|
|
<h1>CREDITS</h1>
|
|
<p><strong>Dutch_Baron (James)</strong> Who you can search on the Eagle Dynamics Forums.
|
|
Working together with James has resulted in the creation of the AIBALANCER class.
|
|
James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)</p>
|
|
|
|
<p><strong>SNAFU</strong>
|
|
Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE.
|
|
None of the script code has been used however within the new AIBALANCER moose class.</p>
|
|
|
|
|
|
<h2>Global(s)</h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#AIBALANCER">AIBALANCER</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a id="#(AIBALANCER)">Type <code>AIBALANCER</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).AIGroups">AIBALANCER.AIGroups</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).ClassName">AIBALANCER.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).New">AIBALANCER:New(SetClient, SpawnAI)</a></td>
|
|
<td class="summary">
|
|
<p>Creates a new AIBALANCER object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).PatrolZone">AIBALANCER.PatrolZone</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).PatrolZones">AIBALANCER.PatrolZones</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).ReturnAirbaseSet">AIBALANCER.ReturnAirbaseSet</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).ReturnToHomeAirbase">AIBALANCER:ReturnToHomeAirbase(ReturnTresholdRange)</a></td>
|
|
<td class="summary">
|
|
<p>Returns the AI to the home <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).ReturnToNearestAirbases">AIBALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet)</a></td>
|
|
<td class="summary">
|
|
<p>Returns the AI to the nearest friendly <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).ReturnTresholdRange">AIBALANCER.ReturnTresholdRange</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).SetClient">AIBALANCER.SetClient</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).SetPatrolZone">AIBALANCER:SetPatrolZone(PatrolZone)</a></td>
|
|
<td class="summary">
|
|
<p>Let the AI patrol a <a href="Zone.html">Zone</a> with a given Speed range and Altitude range.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).SpawnAI">AIBALANCER.SpawnAI</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).ToHomeAirbase">AIBALANCER.ToHomeAirbase</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).ToNearestAirbase">AIBALANCER.ToNearestAirbase</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER)._ClientAliveMonitorScheduler">AIBALANCER:_ClientAliveMonitorScheduler()</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Global(s)</h2>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(AIBALANCER)">#AIBALANCER</a></em>
|
|
<a id="AIBALANCER" >
|
|
<strong>AIBALANCER</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a id="#(AIBalancer)" >Type <code>AIBalancer</code></a></h2>
|
|
|
|
<h2><a id="#(AIBALANCER)" >Type <code>AIBALANCER</code></a></h2>
|
|
|
|
<p>AIBALANCER class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(AIBALANCER).AIGroups" >
|
|
<strong>AIBALANCER.AIGroups</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(AIBALANCER).ClassName" >
|
|
<strong>AIBALANCER.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AIBALANCER).New" >
|
|
<strong>AIBALANCER:New(SetClient, SpawnAI)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Creates a new AIBALANCER object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SetClient </em></code>:
|
|
A SET_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player).</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> SpawnAI </em></code>:
|
|
A SPAWN object that will spawn the AI units required, balancing the SetClient.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(AIBALANCER)">#AIBALANCER</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="PatrolZone.html##(PATROLZONE)">PatrolZone#PATROLZONE</a></em>
|
|
<a id="#(AIBALANCER).PatrolZone" >
|
|
<strong>AIBALANCER.PatrolZone</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(AIBALANCER).PatrolZones" >
|
|
<strong>AIBALANCER.PatrolZones</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Set.html##(SET_AIRBASE)">Set#SET_AIRBASE</a></em>
|
|
<a id="#(AIBALANCER).ReturnAirbaseSet" >
|
|
<strong>AIBALANCER.ReturnAirbaseSet</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AIBALANCER).ReturnToHomeAirbase" >
|
|
<strong>AIBALANCER:ReturnToHomeAirbase(ReturnTresholdRange)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Returns the AI to the home <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="DCSTypes.html##(Distance)">DCSTypes#Distance</a> ReturnTresholdRange </em></code>:
|
|
If there is an enemy <a href="Client.html##(CLIENT)">Client#CLIENT</a> within the ReturnTresholdRange given in meters, the AI will not return to the nearest <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AIBALANCER).ReturnToNearestAirbases" >
|
|
<strong>AIBALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Returns the AI to the nearest friendly <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="DCSTypes.html##(Distance)">DCSTypes#Distance</a> ReturnTresholdRange </em></code>:
|
|
If there is an enemy <a href="Client.html##(CLIENT)">Client#CLIENT</a> within the ReturnTresholdRange given in meters, the AI will not return to the nearest <a href="Airbase.html##(AIRBASE)">Airbase#AIRBASE</a>.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Set.html##(SET_AIRBASE)">Set#SET_AIRBASE</a> ReturnAirbaseSet </em></code>:
|
|
The SET of <a href="Set.html##(SET_AIRBASE)">Set#SET_AIRBASE</a>s to evaluate where to return to.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="DCSTypes.html##(Distance)">DCSTypes#Distance</a></em>
|
|
<a id="#(AIBALANCER).ReturnTresholdRange" >
|
|
<strong>AIBALANCER.ReturnTresholdRange</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Set.html##(SET_CLIENT)">Set#SET_CLIENT</a></em>
|
|
<a id="#(AIBALANCER).SetClient" >
|
|
<strong>AIBALANCER.SetClient</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AIBALANCER).SetPatrolZone" >
|
|
<strong>AIBALANCER:SetPatrolZone(PatrolZone)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Let the AI patrol a <a href="Zone.html">Zone</a> with a given Speed range and Altitude range.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="PatrolZone.html##(PATROLZONE)">PatrolZone#PATROLZONE</a> PatrolZone </em></code>:
|
|
The <a href="PatrolZone.html">PatrolZone</a> where the AI needs to patrol.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="PatrolZone.html##(PATROLZONE)">PatrolZone#PATROLZONE</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Spawn.html##(SPAWN)">Spawn#SPAWN</a></em>
|
|
<a id="#(AIBALANCER).SpawnAI" >
|
|
<strong>AIBALANCER.SpawnAI</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(AIBALANCER).ToHomeAirbase" >
|
|
<strong>AIBALANCER.ToHomeAirbase</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(AIBALANCER).ToNearestAirbase" >
|
|
<strong>AIBALANCER.ToNearestAirbase</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(AIBALANCER)._ClientAliveMonitorScheduler" >
|
|
<strong>AIBALANCER:_ClientAliveMonitorScheduler()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|