MOOSE/docs/Documentation/Database.html
FlightControl_Master 74951f4237 Documentation
2017-10-26 11:17:11 +02:00

2089 lines
46 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><a href="AI_A2A.html">AI_A2A</a></li>
<li><a href="AI_A2A_Cap.html">AI_A2A_Cap</a></li>
<li><a href="AI_A2A_Dispatcher.html">AI_A2A_Dispatcher</a></li>
<li><a href="AI_A2A_GCI.html">AI_A2A_GCI</a></li>
<li><a href="AI_A2A_Patrol.html">AI_A2A_Patrol</a></li>
<li><a href="AI_Bai.html">AI_Bai</a></li>
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
<li><a href="AI_Cap.html">AI_Cap</a></li>
<li><a href="AI_Cas.html">AI_Cas</a></li>
<li><a href="AI_Formation.html">AI_Formation</a></li>
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
<li><a href="ATC_Ground.html">ATC_Ground</a></li>
<li><a href="Account.html">Account</a></li>
<li><a href="Airbase.html">Airbase</a></li>
<li><a href="Assign.html">Assign</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="CommandCenter.html">CommandCenter</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="DCSVec3.html">DCSVec3</a></li>
<li><a href="DCSWorld.html">DCSWorld</a></li>
<li><a href="DCSZone.html">DCSZone</a></li>
<li><a href="DCScountry.html">DCScountry</a></li>
<li><a href="DCStimer.html">DCStimer</a></li>
<li><a href="DCStrigger.html">DCStrigger</a></li>
<li>Database</li>
<li><a href="Designate.html">Designate</a></li>
<li><a href="Detection.html">Detection</a></li>
<li><a href="DetectionManager.html">DetectionManager</a></li>
<li><a href="Escort.html">Escort</a></li>
<li><a href="Event.html">Event</a></li>
<li><a href="Fsm.html">Fsm</a></li>
<li><a href="Goal.html">Goal</a></li>
<li><a href="Group.html">Group</a></li>
<li><a href="Identifiable.html">Identifiable</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="Movement.html">Movement</a></li>
<li><a href="Object.html">Object</a></li>
<li><a href="Point.html">Point</a></li>
<li><a href="Positionable.html">Positionable</a></li>
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Protect.html">Protect</a></li>
<li><a href="Radio.html">Radio</a></li>
<li><a href="Rat.html">Rat</a></li>
<li><a href="Route.html">Route</a></li>
<li><a href="Scenery.html">Scenery</a></li>
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</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="Settings.html">Settings</a></li>
<li><a href="Smoke.html">Smoke</a></li>
<li><a href="Spawn.html">Spawn</a></li>
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
<li><a href="Spot.html">Spot</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="TaskZoneCapture.html">TaskZoneCapture</a></li>
<li><a href="Task_A2A.html">Task_A2A</a></li>
<li><a href="Task_A2A_Dispatcher.html">Task_A2A_Dispatcher</a></li>
<li><a href="Task_A2G.html">Task_A2G</a></li>
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
<li><a href="Unit.html">Unit</a></li>
<li><a href="UserFlag.html">UserFlag</a></li>
<li><a href="UserSound.html">UserSound</a></li>
<li><a href="Utils.html">Utils</a></li>
<li><a href="Zone.html">Zone</a></li>
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
<li><a href="ZoneGoal.html">ZoneGoal</a></li>
<li><a href="ZoneGoalCargo.html">ZoneGoalCargo</a></li>
<li><a href="ZoneGoalCoalition.html">ZoneGoalCoalition</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>Database</code></h1>
<p><strong>Core</strong> -- DATABASE manages the database of mission objects.</p>
<hr/>
<h3>Author: <strong>Sven Van de Velde (FlightControl)</strong></h3>
<h3>Contributions:</h3>
<hr/>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#DATABASE">DATABASE</a></td>
<td class="summary">
<h1>DATABASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>Mission designers can use the DATABASE class to refer to:</p>
<ul>
<li>STATICS</li>
<li>UNITS</li>
<li>GROUPS</li>
<li>CLIENTS</li>
<li>AIRBASES</li>
<li>PLAYERSJOINED</li>
<li>PLAYERS</li>
<li>CARGOS</li>
</ul>
<p>On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#PlayerCheckSchedule">PlayerCheckSchedule</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(DATABASE)">Type <code>DATABASE</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AccountDestroys">DATABASE:AccountDestroys(Event)</a></td>
<td class="summary">
<p>Account the destroys.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AccountHits">DATABASE:AccountHits(Event)</a></td>
<td class="summary">
<p>Account the Hits of the Players.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddAirbase">DATABASE:AddAirbase(AirbaseName)</a></td>
<td class="summary">
<p>Adds a Airbase based on the Airbase Name in the DATABASE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddCargo">DATABASE:AddCargo(CargoName, Cargo)</a></td>
<td class="summary">
<p>Adds a Cargo based on the Cargo Name in the DATABASE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddClient">DATABASE:AddClient(ClientName)</a></td>
<td class="summary">
<p>Adds a CLIENT based on the ClientName in the DATABASE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddGroup">DATABASE:AddGroup(GroupName)</a></td>
<td class="summary">
<p>Adds a GROUP based on the GroupName in the DATABASE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddPlayer">DATABASE:AddPlayer(UnitName, PlayerName)</a></td>
<td class="summary">
<p>Adds a player based on the Player Name in the DATABASE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddStatic">DATABASE:AddStatic(DCSStaticName)</a></td>
<td class="summary">
<p>Adds a Static based on the Static Name in the DATABASE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddUnit">DATABASE:AddUnit(DCSUnitName)</a></td>
<td class="summary">
<p>Adds a Unit based on the Unit Name in the DATABASE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeleteAirbase">DATABASE:DeleteAirbase(AirbaseName)</a></td>
<td class="summary">
<p>Deletes a Airbase from the DATABASE based on the Airbase Name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeleteCargo">DATABASE:DeleteCargo(CargoName)</a></td>
<td class="summary">
<p>Deletes a Cargo from the DATABASE based on the Cargo Name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeletePlayer">DATABASE:DeletePlayer(UnitName, PlayerName)</a></td>
<td class="summary">
<p>Deletes a player from the DATABASE based on the Player Name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeleteStatic">DATABASE:DeleteStatic(DCSStaticName)</a></td>
<td class="summary">
<p>Deletes a Static from the DATABASE based on the Static Name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeleteUnit">DATABASE:DeleteUnit(DCSUnitName)</a></td>
<td class="summary">
<p>Deletes a Unit from the DATABASE based on the Unit Name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindAirbase">DATABASE:FindAirbase(AirbaseName)</a></td>
<td class="summary">
<p>Finds a AIRBASE based on the AirbaseName.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindCargo">DATABASE:FindCargo(CargoName)</a></td>
<td class="summary">
<p>Finds an CARGO based on the CargoName.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindClient">DATABASE:FindClient(ClientName)</a></td>
<td class="summary">
<p>Finds a CLIENT based on the ClientName.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindGroup">DATABASE:FindGroup(GroupName)</a></td>
<td class="summary">
<p>Finds a GROUP based on the GroupName.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindStatic">DATABASE:FindStatic(StaticName)</a></td>
<td class="summary">
<p>Finds a STATIC based on the StaticName.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindUnit">DATABASE:FindUnit(UnitName)</a></td>
<td class="summary">
<p>Finds a Unit based on the Unit Name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEach">DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachCargo">DATABASE:ForEachCargo(IteratorFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachClient">DATABASE:ForEachClient(IteratorFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachGroup">DATABASE:ForEachGroup(IteratorFunction, FinalizeFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> GROUP, providing the GROUP and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachPlayer">DATABASE:ForEachPlayer(IteratorFunction, FinalizeFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each <strong>ALIVE</strong> player, providing the player name and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachPlayerJoined">DATABASE:ForEachPlayerJoined(IteratorFunction, FinalizeFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachPlayerUnit">DATABASE:ForEachPlayerUnit(IteratorFunction, FinalizeFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each <strong>ALIVE</strong> player UNIT, providing the player UNIT and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachStatic">DATABASE:ForEachStatic(IteratorFunction, FinalizeFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> STATIC, providing the STATIC and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachUnit">DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...)</a></td>
<td class="summary">
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> UNIT, providing the UNIT and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetCategoryFromAirbase">DATABASE:GetCategoryFromAirbase(AirbaseName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetCategoryFromClientTemplate">DATABASE:GetCategoryFromClientTemplate(ClientName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetCoalitionFromAirbase">DATABASE:GetCoalitionFromAirbase(AirbaseName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetCoalitionFromClientTemplate">DATABASE:GetCoalitionFromClientTemplate(ClientName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetCountryFromClientTemplate">DATABASE:GetCountryFromClientTemplate(ClientName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetGroupNameFromUnitName">DATABASE:GetGroupNameFromUnitName(UnitName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetGroupTemplate">DATABASE:GetGroupTemplate(GroupName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetGroupTemplateFromUnitName">DATABASE:GetGroupTemplateFromUnitName(UnitName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetPlayerSettings">DATABASE:GetPlayerSettings(PlayerName)</a></td>
<td class="summary">
<p>Gets the player settings</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetStaticUnitTemplate">DATABASE:GetStaticUnitTemplate(StaticName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetStatusGroup">DATABASE:GetStatusGroup(GroupName)</a></td>
<td class="summary">
<p>Get a status to a Group within the Database, this to check crossing events for example.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Navpoints">DATABASE.Navpoints</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).New">DATABASE:New()</a></td>
<td class="summary">
<p>Creates a new DATABASE 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="##(DATABASE).OnEventDeleteCargo">DATABASE:OnEventDeleteCargo(EventData)</a></td>
<td class="summary">
<p>Handles the OnEventDeleteCargo.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).OnEventNewCargo">DATABASE:OnEventNewCargo(EventData)</a></td>
<td class="summary">
<p>Handles the OnEventNewCargo event.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).SetPlayerSettings">DATABASE:SetPlayerSettings(PlayerName, Settings)</a></td>
<td class="summary">
<p>Sets the player settings</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).SetStatusGroup">DATABASE:SetStatusGroup(GroupName, Status)</a></td>
<td class="summary">
<p>Set a status to a Group within the Database, this to check crossing events for example.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Spawn">DATABASE:Spawn(SpawnTemplate)</a></td>
<td class="summary">
<p>Instantiate new Groups within the DCSRTE.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).UNITS">DATABASE.UNITS</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE).UNITS_Position">DATABASE.UNITS_Position</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._EventOnBirth">DATABASE:_EventOnBirth(Event)</a></td>
<td class="summary">
<p>Handles the OnBirth event for the alive units set.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._EventOnDeadOrCrash">DATABASE:_EventOnDeadOrCrash(Event)</a></td>
<td class="summary">
<p>Handles the OnDead or OnCrash event for alive units set.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._EventOnPlayerEnterUnit">DATABASE:_EventOnPlayerEnterUnit(Event)</a></td>
<td class="summary">
<p>Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._EventOnPlayerLeaveUnit">DATABASE:_EventOnPlayerLeaveUnit(Event)</a></td>
<td class="summary">
<p>Handles the OnPlayerLeaveUnit event to clean the active players table.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterAirbases">DATABASE:_RegisterAirbases()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterClients">DATABASE:_RegisterClients()</a></td>
<td class="summary">
<p>Private method that registers all Units of skill Client or Player within in the mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterGroupTemplate">DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID, GroupName)</a></td>
<td class="summary">
<p>Private method that registers new Group Templates within the DATABASE Object.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterGroupsAndUnits">DATABASE:_RegisterGroupsAndUnits()</a></td>
<td class="summary">
<p>Private method that registers all Groups and Units within in the mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterPlayers">DATABASE:_RegisterPlayers()</a></td>
<td class="summary">
<p>Private method that registers all alive players in the mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterStaticTemplate">DATABASE:_RegisterStaticTemplate(GroupTemplate, StaticTemplate, CoalitionID, CategoryID, CountryID)</a></td>
<td class="summary">
<p>Private method that registers new Static Templates within the DATABASE Object.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterStatics">DATABASE:_RegisterStatics()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterTemplates">DATABASE:_RegisterTemplates()</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(DATABASE)">#DATABASE</a></em>
<a id="DATABASE" >
<strong>DATABASE</strong>
</a>
</dt>
<dd>
<h1>DATABASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>Mission designers can use the DATABASE class to refer to:</p>
<ul>
<li>STATICS</li>
<li>UNITS</li>
<li>GROUPS</li>
<li>CLIENTS</li>
<li>AIRBASES</li>
<li>PLAYERSJOINED</li>
<li>PLAYERS</li>
<li>CARGOS</li>
</ul>
<p>On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.</p>
<p>The singleton object <strong>_DATABASE</strong> is automatically created by MOOSE, that administers all objects within the mission.
Moose refers to <strong>_DATABASE</strong> within the framework extensively, but you can also refer to the _DATABASE object within your missions if required.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="PlayerCheckSchedule" >
<strong>PlayerCheckSchedule</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(Database)" >Type <code>Database</code></a></h2>
<h2><a id="#(DATABASE)" >Type <code>DATABASE</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(DATABASE).AccountDestroys" >
<strong>DATABASE:AccountDestroys(Event)</strong>
</a>
</dt>
<dd>
<p>Account the destroys.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).AccountHits" >
<strong>DATABASE:AccountHits(Event)</strong>
</a>
</dt>
<dd>
<p>Account the Hits of the Players.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).AddAirbase" >
<strong>DATABASE:AddAirbase(AirbaseName)</strong>
</a>
</dt>
<dd>
<p>Adds a Airbase based on the Airbase Name in the DATABASE.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string AirbaseName </em></code>:
The name of the airbase</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).AddCargo" >
<strong>DATABASE:AddCargo(CargoName, Cargo)</strong>
</a>
</dt>
<dd>
<p>Adds a Cargo based on the Cargo Name in the DATABASE.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string CargoName </em></code>:
The name of the airbase</p>
</li>
<li>
<p><code><em> Cargo </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).AddClient" >
<strong>DATABASE:AddClient(ClientName)</strong>
</a>
</dt>
<dd>
<p>Adds a CLIENT based on the ClientName in the DATABASE.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> ClientName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).AddGroup" >
<strong>DATABASE:AddGroup(GroupName)</strong>
</a>
</dt>
<dd>
<p>Adds a GROUP based on the GroupName in the DATABASE.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> GroupName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).AddPlayer" >
<strong>DATABASE:AddPlayer(UnitName, PlayerName)</strong>
</a>
</dt>
<dd>
<p>Adds a player based on the Player Name in the DATABASE.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> UnitName </em></code>: </p>
</li>
<li>
<p><code><em> PlayerName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).AddStatic" >
<strong>DATABASE:AddStatic(DCSStaticName)</strong>
</a>
</dt>
<dd>
<p>Adds a Static based on the Static Name in the DATABASE.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> DCSStaticName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).AddUnit" >
<strong>DATABASE:AddUnit(DCSUnitName)</strong>
</a>
</dt>
<dd>
<p>Adds a Unit based on the Unit Name in the DATABASE.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> DCSUnitName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).DeleteAirbase" >
<strong>DATABASE:DeleteAirbase(AirbaseName)</strong>
</a>
</dt>
<dd>
<p>Deletes a Airbase from the DATABASE based on the Airbase Name.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string AirbaseName </em></code>:
The name of the airbase</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).DeleteCargo" >
<strong>DATABASE:DeleteCargo(CargoName)</strong>
</a>
</dt>
<dd>
<p>Deletes a Cargo from the DATABASE based on the Cargo Name.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string CargoName </em></code>:
The name of the airbase</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).DeletePlayer" >
<strong>DATABASE:DeletePlayer(UnitName, PlayerName)</strong>
</a>
</dt>
<dd>
<p>Deletes a player from the DATABASE based on the Player Name.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> UnitName </em></code>: </p>
</li>
<li>
<p><code><em> PlayerName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).DeleteStatic" >
<strong>DATABASE:DeleteStatic(DCSStaticName)</strong>
</a>
</dt>
<dd>
<p>Deletes a Static from the DATABASE based on the Static Name.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> DCSStaticName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).DeleteUnit" >
<strong>DATABASE:DeleteUnit(DCSUnitName)</strong>
</a>
</dt>
<dd>
<p>Deletes a Unit from the DATABASE based on the Unit Name.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> DCSUnitName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).FindAirbase" >
<strong>DATABASE:FindAirbase(AirbaseName)</strong>
</a>
</dt>
<dd>
<p>Finds a AIRBASE based on the AirbaseName.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string AirbaseName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Wrapper.Airbase.html##(AIRBASE)">Wrapper.Airbase#AIRBASE</a>:</em>
The found AIRBASE.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).FindCargo" >
<strong>DATABASE:FindCargo(CargoName)</strong>
</a>
</dt>
<dd>
<p>Finds an CARGO based on the CargoName.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string CargoName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Wrapper.Cargo.html##(CARGO)">Wrapper.Cargo#CARGO</a>:</em>
The found CARGO.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).FindClient" >
<strong>DATABASE:FindClient(ClientName)</strong>
</a>
</dt>
<dd>
<p>Finds a CLIENT based on the ClientName.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string ClientName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Wrapper.Client.html##(CLIENT)">Wrapper.Client#CLIENT</a>:</em>
The found CLIENT.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).FindGroup" >
<strong>DATABASE:FindGroup(GroupName)</strong>
</a>
</dt>
<dd>
<p>Finds a GROUP based on the GroupName.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string GroupName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
The found GROUP.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).FindStatic" >
<strong>DATABASE:FindStatic(StaticName)</strong>
</a>
</dt>
<dd>
<p>Finds a STATIC based on the StaticName.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string StaticName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Wrapper.Static.html##(STATIC)">Wrapper.Static#STATIC</a>:</em>
The found STATIC.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).FindUnit" >
<strong>DATABASE:FindUnit(UnitName)</strong>
</a>
</dt>
<dd>
<p>Finds a Unit based on the Unit Name.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string UnitName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a>:</em>
The found Unit.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEach" >
<strong>DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called when there is an alive player in the database.</p>
</li>
<li>
<p><code><em> FinalizeFunction </em></code>: </p>
</li>
<li>
<p><code><em> arg </em></code>: </p>
</li>
<li>
<p><code><em> Set </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachCargo" >
<strong>DATABASE:ForEachCargo(IteratorFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called for each object in the database. The function needs to accept a CLIENT parameter.</p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachClient" >
<strong>DATABASE:ForEachClient(IteratorFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called object in the database. The function needs to accept a CLIENT parameter.</p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachGroup" >
<strong>DATABASE:ForEachGroup(IteratorFunction, FinalizeFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> GROUP, providing the GROUP and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called for each object in the database. The function needs to accept a GROUP parameter.</p>
</li>
<li>
<p><code><em> FinalizeFunction </em></code>: </p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachPlayer" >
<strong>DATABASE:ForEachPlayer(IteratorFunction, FinalizeFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each <strong>ALIVE</strong> player, providing the player name and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called for each object in the database. The function needs to accept the player name.</p>
</li>
<li>
<p><code><em> FinalizeFunction </em></code>: </p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachPlayerJoined" >
<strong>DATABASE:ForEachPlayerJoined(IteratorFunction, FinalizeFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called for each object in the database. The function needs to accept a UNIT parameter.</p>
</li>
<li>
<p><code><em> FinalizeFunction </em></code>: </p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachPlayerUnit" >
<strong>DATABASE:ForEachPlayerUnit(IteratorFunction, FinalizeFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each <strong>ALIVE</strong> player UNIT, providing the player UNIT and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called for each object in the database. The function needs to accept the player name.</p>
</li>
<li>
<p><code><em> FinalizeFunction </em></code>: </p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachStatic" >
<strong>DATABASE:ForEachStatic(IteratorFunction, FinalizeFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> STATIC, providing the STATIC and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called for each object in the database. The function needs to accept a STATIC parameter.</p>
</li>
<li>
<p><code><em> FinalizeFunction </em></code>: </p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).ForEachUnit" >
<strong>DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> UNIT, providing the UNIT and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called for each object in the database. The function needs to accept a UNIT parameter.</p>
</li>
<li>
<p><code><em> FinalizeFunction </em></code>: </p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetCategoryFromAirbase" >
<strong>DATABASE:GetCategoryFromAirbase(AirbaseName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> AirbaseName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetCategoryFromClientTemplate" >
<strong>DATABASE:GetCategoryFromClientTemplate(ClientName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> ClientName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetCoalitionFromAirbase" >
<strong>DATABASE:GetCoalitionFromAirbase(AirbaseName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> AirbaseName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetCoalitionFromClientTemplate" >
<strong>DATABASE:GetCoalitionFromClientTemplate(ClientName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> ClientName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetCountryFromClientTemplate" >
<strong>DATABASE:GetCountryFromClientTemplate(ClientName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> ClientName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetGroupNameFromUnitName" >
<strong>DATABASE:GetGroupNameFromUnitName(UnitName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> UnitName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetGroupTemplate" >
<strong>DATABASE:GetGroupTemplate(GroupName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> GroupName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetGroupTemplateFromUnitName" >
<strong>DATABASE:GetGroupTemplateFromUnitName(UnitName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> UnitName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetPlayerSettings" >
<strong>DATABASE:GetPlayerSettings(PlayerName)</strong>
</a>
</dt>
<dd>
<p>Gets the player settings</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string PlayerName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Core.Settings.html##(SETTINGS)">Core.Settings#SETTINGS</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetStaticUnitTemplate" >
<strong>DATABASE:GetStaticUnitTemplate(StaticName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> StaticName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).GetStatusGroup" >
<strong>DATABASE:GetStatusGroup(GroupName)</strong>
</a>
</dt>
<dd>
<p>Get a status to a Group within the Database, this to check crossing events for example.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> GroupName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(DATABASE).Navpoints" >
<strong>DATABASE.Navpoints</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).New" >
<strong>DATABASE:New()</strong>
</a>
</dt>
<dd>
<p>Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>-- Define a new DATABASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = DATABASE:New()</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).OnEventDeleteCargo" >
<strong>DATABASE:OnEventDeleteCargo(EventData)</strong>
</a>
</dt>
<dd>
<p>Handles the OnEventDeleteCargo.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).OnEventNewCargo" >
<strong>DATABASE:OnEventNewCargo(EventData)</strong>
</a>
</dt>
<dd>
<p>Handles the OnEventNewCargo event.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).SetPlayerSettings" >
<strong>DATABASE:SetPlayerSettings(PlayerName, Settings)</strong>
</a>
</dt>
<dd>
<p>Sets the player settings</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string PlayerName </em></code>: </p>
</li>
<li>
<p><code><em><a href="Core.Settings.html##(SETTINGS)">Core.Settings#SETTINGS</a> Settings </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Core.Settings.html##(SETTINGS)">Core.Settings#SETTINGS</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).SetStatusGroup" >
<strong>DATABASE:SetStatusGroup(GroupName, Status)</strong>
</a>
</dt>
<dd>
<p>Set a status to a Group within the Database, this to check crossing events for example.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> GroupName </em></code>: </p>
</li>
<li>
<p><code><em> Status </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE).Spawn" >
<strong>DATABASE:Spawn(SpawnTemplate)</strong>
</a>
</dt>
<dd>
<p>Instantiate new Groups within the DCSRTE.</p>
<p>This method expects EXACTLY the same structure as a structure within the ME, and needs 2 additional fields defined:
SpawnCountryID, SpawnCategoryID
This method is used by the SPAWN class.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#table SpawnTemplate </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(DATABASE).UNITS" >
<strong>DATABASE.UNITS</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(DATABASE).UNITS_Position" >
<strong>DATABASE.UNITS_Position</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._EventOnBirth" >
<strong>DATABASE:_EventOnBirth(Event)</strong>
</a>
</dt>
<dd>
<p>Handles the OnBirth event for the alive units set.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._EventOnDeadOrCrash" >
<strong>DATABASE:_EventOnDeadOrCrash(Event)</strong>
</a>
</dt>
<dd>
<p>Handles the OnDead or OnCrash event for alive units set.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._EventOnPlayerEnterUnit" >
<strong>DATABASE:_EventOnPlayerEnterUnit(Event)</strong>
</a>
</dt>
<dd>
<p>Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._EventOnPlayerLeaveUnit" >
<strong>DATABASE:_EventOnPlayerLeaveUnit(Event)</strong>
</a>
</dt>
<dd>
<p>Handles the OnPlayerLeaveUnit event to clean the active players table.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._RegisterAirbases" >
<strong>DATABASE:_RegisterAirbases()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._RegisterClients" >
<strong>DATABASE:_RegisterClients()</strong>
</a>
</dt>
<dd>
<p>Private method that registers all Units of skill Client or Player within in the mission.</p>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._RegisterGroupTemplate" >
<strong>DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID, GroupName)</strong>
</a>
</dt>
<dd>
<p>Private method that registers new Group Templates within the DATABASE Object.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#table GroupTemplate </em></code>: </p>
</li>
<li>
<p><code><em><a href="Dcs.DCScoalition.html##(coalition.side)">Dcs.DCScoalition#coalition.side</a> CoalitionSide </em></code>:
The coalition.side of the object.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSObject.html##(Object.Category)">Dcs.DCSObject#Object.Category</a> CategoryID </em></code>:
The Object.category of the object.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCScountry.html##(country.id)">Dcs.DCScountry#country.id</a> CountryID </em></code>:
the country.id of the object</p>
</li>
<li>
<p><code><em> GroupName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._RegisterGroupsAndUnits" >
<strong>DATABASE:_RegisterGroupsAndUnits()</strong>
</a>
</dt>
<dd>
<p>Private method that registers all Groups and Units within in the mission.</p>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._RegisterPlayers" >
<strong>DATABASE:_RegisterPlayers()</strong>
</a>
</dt>
<dd>
<p>Private method that registers all alive players in the mission.</p>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._RegisterStaticTemplate" >
<strong>DATABASE:_RegisterStaticTemplate(GroupTemplate, StaticTemplate, CoalitionID, CategoryID, CountryID)</strong>
</a>
</dt>
<dd>
<p>Private method that registers new Static Templates within the DATABASE Object.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#table GroupTemplate </em></code>: </p>
</li>
<li>
<p><code><em> StaticTemplate </em></code>: </p>
</li>
<li>
<p><code><em> CoalitionID </em></code>: </p>
</li>
<li>
<p><code><em> CategoryID </em></code>: </p>
</li>
<li>
<p><code><em> CountryID </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._RegisterStatics" >
<strong>DATABASE:_RegisterStatics()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DATABASE)._RegisterTemplates" >
<strong>DATABASE:_RegisterTemplates()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
</div>
</div>
</body>
</html>