diff --git a/Dcs/DCSCoalitionObject.lua b/Dcs/DCSCoalitionObject.lua index 14ba57abf..92b201349 100644 --- a/Dcs/DCSCoalitionObject.lua +++ b/Dcs/DCSCoalitionObject.lua @@ -4,14 +4,25 @@ --- @type CoalitionObject -- @extends DCSObject#Object +--- @type coalition +-- @field #coalition.side side + +--- @type coalition.side +-- @field NEUTRAL +-- @field RED +-- @field BLUE + +coalition = {} --#coalition + --- Returns coalition of the object. -- @function [parent=#CoalitionObject] getCoalition --- @param self --- @return #coalition.side +-- @param #CoalitionObject self +-- @return DCSTypes#coalition.side --- Returns object country. -- @function [parent=#CoalitionObject] getCountry --- @param self +-- @param #CoalitionObject self -- @return #country.id + CoalitionObject = {} --#CoalitionObject diff --git a/Dcs/DCSTypes.lua b/Dcs/DCSTypes.lua index ae23eb737..b11d4a87b 100644 --- a/Dcs/DCSTypes.lua +++ b/Dcs/DCSTypes.lua @@ -2,6 +2,7 @@ -- @module DCSTypes + --- Time is given in seconds. -- @type Time -- @extends #number diff --git a/Documentation/Base.html b/Documentation/Base.html index de608bcaf..38a98cec0 100644 --- a/Documentation/Base.html +++ b/Documentation/Base.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/CARGO.html b/Documentation/CARGO.html index 30d778ea2..4af5e6241 100644 --- a/Documentation/CARGO.html +++ b/Documentation/CARGO.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/CLEANUP.html b/Documentation/CLEANUP.html index 4d2aa04a7..2e2642f68 100644 --- a/Documentation/CLEANUP.html +++ b/Documentation/CLEANUP.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Client.html b/Documentation/Client.html index 6ea751dae..84d7e426c 100644 --- a/Documentation/Client.html +++ b/Documentation/Client.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSAirbase.html b/Documentation/DCSAirbase.html index 5ba906d1e..c99bf8245 100644 --- a/Documentation/DCSAirbase.html +++ b/Documentation/DCSAirbase.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSCoalitionObject.html b/Documentation/DCSCoalitionObject.html index e0a1741e8..2bea5a1b5 100644 --- a/Documentation/DCSCoalitionObject.html +++ b/Documentation/DCSCoalitionObject.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • @@ -73,6 +73,12 @@ CoalitionObject + + + + coalition + + @@ -88,6 +94,38 @@ CoalitionObject:getCountry()

    Returns object country.

    + + + + +

    Type coalition

    + + + + + +
    coalition.side + +
    + +

    Type coalition.side

    + + + + + + + + + + + +
    coalition.side.BLUE + +
    coalition.side.NEUTRAL + +
    coalition.side.RED +
    @@ -105,6 +143,20 @@ + + +
    +
    + + #coalition + +coalition + +
    +
    + + +

    Type DCSCoalitionObject

    @@ -124,7 +176,7 @@

    Return value

    -

    #coalition.side:

    +

    DCSTypes#coalition.side:

    @@ -145,11 +197,68 @@

    #country.id:

    + + + +

    Type coalition

    +

    Field(s)

    +
    +
    + + #coalition.side + +coalition.side + +
    +
    + + +

    Type coalition.side

    - +

    Field(s)

    +
    +
    + + +coalition.side.BLUE + +
    +
    + + + +
    +
    +
    +
    + + +coalition.side.NEUTRAL + +
    +
    + + + +
    +
    +
    +
    + + +coalition.side.RED + +
    +
    + + + +
    +
    +

    Type country.id

    diff --git a/Documentation/DCSCommand.html b/Documentation/DCSCommand.html index e5cb77601..3150f700f 100644 --- a/Documentation/DCSCommand.html +++ b/Documentation/DCSCommand.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSController.html b/Documentation/DCSController.html index 05bd95b0e..e4cce5c0d 100644 --- a/Documentation/DCSController.html +++ b/Documentation/DCSController.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSGroup.html b/Documentation/DCSGroup.html index 9f2258624..dd7001392 100644 --- a/Documentation/DCSGroup.html +++ b/Documentation/DCSGroup.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSObject.html b/Documentation/DCSObject.html index 017a27b88..56cbb69dd 100644 --- a/Documentation/DCSObject.html +++ b/Documentation/DCSObject.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSTask.html b/Documentation/DCSTask.html index 4f42d8760..478cc51cf 100644 --- a/Documentation/DCSTask.html +++ b/Documentation/DCSTask.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSTypes.html b/Documentation/DCSTypes.html index 7eb5381e2..6d91375f4 100644 --- a/Documentation/DCSTypes.html +++ b/Documentation/DCSTypes.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSUnit.html b/Documentation/DCSUnit.html index 7b78a1fd6..11c5a3b41 100644 --- a/Documentation/DCSUnit.html +++ b/Documentation/DCSUnit.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCSWorld.html b/Documentation/DCSWorld.html index e1dc25088..0470048f3 100644 --- a/Documentation/DCSWorld.html +++ b/Documentation/DCSWorld.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DCStimer.html b/Documentation/DCStimer.html index 1ee0f7a2c..36682b66f 100644 --- a/Documentation/DCStimer.html +++ b/Documentation/DCStimer.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DEPLOYTASK.html b/Documentation/DEPLOYTASK.html index 846eb6968..1bd82e7b7 100644 --- a/Documentation/DEPLOYTASK.html +++ b/Documentation/DEPLOYTASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DESTROYBASETASK.html b/Documentation/DESTROYBASETASK.html index e239668bd..9605895ce 100644 --- a/Documentation/DESTROYBASETASK.html +++ b/Documentation/DESTROYBASETASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DESTROYGROUPSTASK.html b/Documentation/DESTROYGROUPSTASK.html index 0307805d5..0d5a3cbdb 100644 --- a/Documentation/DESTROYGROUPSTASK.html +++ b/Documentation/DESTROYGROUPSTASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DESTROYRADARSTASK.html b/Documentation/DESTROYRADARSTASK.html index 26d37714a..f7fc20204 100644 --- a/Documentation/DESTROYRADARSTASK.html +++ b/Documentation/DESTROYRADARSTASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/DESTROYUNITTYPESTASK.html b/Documentation/DESTROYUNITTYPESTASK.html index 48e9b5d50..fcbd0827c 100644 --- a/Documentation/DESTROYUNITTYPESTASK.html +++ b/Documentation/DESTROYUNITTYPESTASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Database.html b/Documentation/Database.html index 0e988cba7..c6baf3672 100644 --- a/Documentation/Database.html +++ b/Documentation/Database.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • @@ -63,12 +63,9 @@
    -

    Module Database

    +

    Module DATABASE

    -

    Administers the Initial Sets of the Mission Templates as defined within the Mission Editor.

    - -

    Administers the Spawning of new Groups within the DCSRTE and administers these new Groups within the DATABASE object(s).

    Global(s)

    @@ -76,19 +73,13 @@ - - - -
    DATABASE -
    _Database -
    -

    Type DATABASE

    - +

    Type DATABASE

    +
    - + @@ -109,6 +100,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -132,13 +207,19 @@ + + + + @@ -157,12 +238,42 @@ + + + + + + + + + + + + + + + + + + + + @@ -188,33 +299,84 @@ -
    -
    +

    Type DATABASE

    + +

    Administers the Initial Sets of the Mission Templates as defined within the Mission Editor.

    - Database#DATABASE - -_Database - -
    -
    +

    Mission designers can use the DATABASE class to build sets of units belonging to certain:

    + +
      +
    • Coalitions
    • +
    • Categories
    • +
    • Countries
    • +
    • Unit types
    • +
    • Starting with certain prefix strings.
    • +
    + +

    This list will grow over time. Planned developments are to include filters and iterators. + Additional filters will be added around Zone#ZONEs, Radiuses, Active players, ... + More iterators will be implemented in the near future ...

    + +

    DATABASE construction methods:

    +

    Create a new DATABASE object with the DATABASE.New method:

    + + -
    -
    -

    Type Database

    - -

    Type DATABASE

    - -

    The DATABASE class

    +

    DATABASE filter criteria:

    +

    You can set filter criteria to define the set of units within the database. +Filter criteria are defined by:

    + + + +

    Once the filter criteria have been set for the DATABASE, you can start filtering using:

    + + + +

    Planned filter criteria within development are (so these are not yet available):

    + + + + +

    DATABASE iterators:

    +

    Once the filters have been defined and the DATABASE has been built, you can iterate the database with the available iterator methods. +The iterator methods will walk the DATABASE set, and call for each element within the set a function that you provide. +The following iterator methods are currently available within the DATABASE:

    + + + +

    Planned iterators methods in development are (so these are not yet available):

    + + +

    Field(s)

    - -DATABASE.ActivePlayers + +DATABASE.AlivePlayers
    @@ -263,6 +425,320 @@ +
    +
    +
    +
    + + + +DATABASE.DCSGroups + +
    +
    + + + +
    +
    +
    +
    + + + +DATABASE.DCSGroupsAlive + +
    +
    + + + +
    +
    +
    +
    + + + +DATABASE.DCSUnits + +
    +
    + + + +
    +
    +
    +
    + + + +DATABASE.DCSUnitsAlive + +
    +
    + + + +
    +
    +
    +
    + + + +DATABASE.Filter + +
    +
    + + + +
    +
    +
    +
    + + +DATABASE:FilterCategories(Categories) + +
    +
    + +

    Builds a set of units out of categories.

    + + +

    Possible current categories are plane, helicopter, ground, ship.

    + +

    Parameter

    +
      +
    • + +

      #string Categories : +Can take the following values: "plane", "helicopter", "ground", "ship".

      + +
    • +
    +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:FilterCoalitions(Coalitions) + +
    +
    + +

    Builds a set of units of coalitons.

    + + +

    Possible current coalitions are red, blue and neutral.

    + +

    Parameter

    +
      +
    • + +

      #string Coalitions : +Can take the following values: "red", "blue", "neutral".

      + +
    • +
    +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:FilterCountries(Countries) + +
    +
    + +

    Builds a set of units of defined countries.

    + + +

    Possible current countries are those known within DCS world.

    + +

    Parameter

    +
      +
    • + +

      #string Countries : +Can take those country strings known within DCS world.

      + +
    • +
    +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:FilterGroupPrefixes(Prefixes) + +
    +
    + +

    Builds a set of units of defined group prefixes.

    + + +

    All the units starting with the given group prefixes will be included within the set.

    + +

    Parameter

    +
      +
    • + +

      #string Prefixes : +The prefix of which the group name where the unit belongs to starts with.

      + +
    • +
    +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + + +DATABASE.FilterMeta + +
    +
    + + + +
    +
    +
    +
    + + +DATABASE:FilterStart() + +
    +
    + +

    Starts the filtering.

    + +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:FilterTypes(Types) + +
    +
    + +

    Builds a set of units of defined unit types.

    + + +

    Possible current types are those types known within DCS world.

    + +

    Parameter

    +
      +
    • + +

      #string Types : +Can take those type strings known within DCS world.

      + +
    • +
    +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:FilterUnitPrefixes(Prefixes) + +
    +
    + +

    Builds a set of units of defined unit prefixes.

    + + +

    All the units starting with the given prefixes will be included within the set.

    + +

    Parameter

    +
      +
    • + +

      #string Prefixes : +The prefix of which the unit name starts with.

      + +
    • +
    +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:ForEachAliveUnit(IteratorFunction, ...) + +
    +
    + +

    Interate the DATABASE and call an interator function for each alive unit, providing the Unit and optional parameters.

    + +

    Parameters

    +
      +
    • + +

      #function IteratorFunction : +The function that will be called when there is an alive unit in the database. The function needs to accept a UNIT parameter.

      + +
    • +
    • + +

      ... :

      + +
    • +
    +

    Return value

    + +

    #DATABASE: +self

    +
    @@ -323,12 +799,12 @@
    -

    Creates a new DATABASE Object to administer the Groups defined and alive within the DCSRTE.

    +

    Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    Return value

    +

    #DATABASE:

    -

    DATABASE

    Usage:

    -- Define a new DATABASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
    @@ -348,6 +824,19 @@ DBObject = DATABASE:New()
    +
    +
    +
    +
    + + +DATABASE:ScanEnvironment() + +
    +
    + + +
    @@ -414,6 +903,27 @@ This method is used by the SPAWN class.

    + +
    +
    +
    + + +DATABASE:TraceDatabase() + +
    +
    + +

    Traces the current database contents in the log ...

    + + +

    (for debug reasons).

    + +

    Return value

    + +

    #DATABASE: +self

    +
    @@ -428,6 +938,100 @@ This method is used by the SPAWN class.

    + +
    +
    +
    + + +DATABASE:_EventOnBirth(Event) + +
    +
    + +

    Handles the OnBirth event for the alive units set.

    + +

    Parameter

    + +
    +
    +
    +
    + + +DATABASE:_EventOnDeadOrCrash(Event) + +
    +
    + +

    Handles the OnDead or OnCrash event for alive units set.

    + +

    Parameter

    + +
    +
    +
    +
    + + +DATABASE:_IsAliveDCSUnit(DCSUnit) + +
    +
    + + + +

    Parameter

    + +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:_IsIncludeDCSUnit(DCSUnit) + +
    +
    + + + +

    Parameter

    + +

    Return value

    + +

    #DATABASE: +self

    +
    diff --git a/Documentation/Escort.html b/Documentation/Escort.html index a75e3f26f..e5305361f 100644 --- a/Documentation/Escort.html +++ b/Documentation/Escort.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Event.html b/Documentation/Event.html index 9e5bd862b..50ed86fc5 100644 --- a/Documentation/Event.html +++ b/Documentation/Event.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • @@ -73,12 +73,6 @@
    - - - -
    DATABASE.ActivePlayersDATABASE.AlivePlayers DATABASE.ClientsByName +
    DATABASE.DCSGroups + +
    DATABASE.DCSGroupsAlive + +
    DATABASE.DCSUnits + +
    DATABASE.DCSUnitsAlive + +
    DATABASE.Filter + +
    DATABASE:FilterCategories(Categories) +

    Builds a set of units out of categories.

    +
    DATABASE:FilterCoalitions(Coalitions) +

    Builds a set of units of coalitons.

    +
    DATABASE:FilterCountries(Countries) +

    Builds a set of units of defined countries.

    +
    DATABASE:FilterGroupPrefixes(Prefixes) +

    Builds a set of units of defined group prefixes.

    +
    DATABASE.FilterMeta + +
    DATABASE:FilterStart() +

    Starts the filtering.

    +
    DATABASE:FilterTypes(Types) +

    Builds a set of units of defined unit types.

    +
    DATABASE:FilterUnitPrefixes(Prefixes) +

    Builds a set of units of defined unit prefixes.

    +
    DATABASE:ForEachAliveUnit(IteratorFunction, ...) +

    Interate the DATABASE and call an interator function for each alive unit, providing the Unit and optional parameters.

    DATABASE:New() -

    Creates a new DATABASE Object to administer the Groups defined and alive within the DCSRTE.

    +

    Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    DATABASE.Players +
    DATABASE:ScanEnvironment() +
    DATABASE.Statics +
    DATABASE:TraceDatabase() +

    Traces the current database contents in the log ...

    DATABASE.Units +
    DATABASE:_EventOnBirth(Event) +

    Handles the OnBirth event for the alive units set.

    +
    DATABASE:_EventOnDeadOrCrash(Event) +

    Handles the OnDead or OnCrash event for alive units set.

    +
    DATABASE:_IsAliveDCSUnit(DCSUnit) + +
    DATABASE:_IsIncludeDCSUnit(DCSUnit) +
    EVENT -
    _EVENTDISPATCHER -

    Declare the event dispatcher based on the EVENT class

    @@ -389,20 +383,6 @@ - - -
    -
    - - #EVENT - -_EVENTDISPATCHER - -
    -
    - -

    Declare the event dispatcher based on the EVENT class

    -

    Type Event

    diff --git a/Documentation/GOHOMETASK.html b/Documentation/GOHOMETASK.html index b1ebecdcd..dc2a4b028 100644 --- a/Documentation/GOHOMETASK.html +++ b/Documentation/GOHOMETASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Group.html b/Documentation/Group.html index 3298e9321..c260ae21d 100644 --- a/Documentation/Group.html +++ b/Documentation/Group.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/MISSION.html b/Documentation/MISSION.html index 81752775f..f320ff531 100644 --- a/Documentation/MISSION.html +++ b/Documentation/MISSION.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/MOVEMENT.html b/Documentation/MOVEMENT.html index 1fd0bfce1..bf2539324 100644 --- a/Documentation/MOVEMENT.html +++ b/Documentation/MOVEMENT.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Menu.html b/Documentation/Menu.html index a82742975..744da29a2 100644 --- a/Documentation/Menu.html +++ b/Documentation/Menu.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Message.html b/Documentation/Message.html index 66c9d6c91..2141cc4dc 100644 --- a/Documentation/Message.html +++ b/Documentation/Message.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/NOTASK.html b/Documentation/NOTASK.html index 4fa604429..44017a343 100644 --- a/Documentation/NOTASK.html +++ b/Documentation/NOTASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/PICKUPTASK.html b/Documentation/PICKUPTASK.html index e9fcbf698..0a5e99486 100644 --- a/Documentation/PICKUPTASK.html +++ b/Documentation/PICKUPTASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/ROUTETASK.html b/Documentation/ROUTETASK.html index 87dc106be..6d7554c75 100644 --- a/Documentation/ROUTETASK.html +++ b/Documentation/ROUTETASK.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/STAGE.html b/Documentation/STAGE.html index bc38980e4..2e49e72dd 100644 --- a/Documentation/STAGE.html +++ b/Documentation/STAGE.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Scoring.html b/Documentation/Scoring.html index b70b673fb..4e4180ae7 100644 --- a/Documentation/Scoring.html +++ b/Documentation/Scoring.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Sead.html b/Documentation/Sead.html index 95c47ee9e..84d17c60e 100644 --- a/Documentation/Sead.html +++ b/Documentation/Sead.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • diff --git a/Documentation/Spawn.html b/Documentation/Spawn.html index 21d159c33..770a35c22 100644 --- a/Documentation/Spawn.html +++ b/Documentation/Spawn.html @@ -21,6 +21,7 @@
  • CARGO
  • CleanUp
  • Client
  • +
  • DATABASE
  • DCSAirbase
  • DCSCoalitionObject
  • DCSCommand
  • @@ -37,7 +38,6 @@
  • DESTROYGROUPSTASK
  • DESTROYRADARSTASK
  • DESTROYUNITTYPESTASK
  • -
  • Database
  • Escort
  • Event
  • GOHOMETASK
  • @@ -89,52 +89,58 @@ Groups will follow the following naming structure when spawned at run-time:

    Some additional notes that need to be remembered:

    + +

    SPAWN construction methods:

    +

    Create a new SPAWN object with the SPAWN.New or the SPAWN.NewWithAlias methods:

    + +

    It is important to understand how the SPAWN class works internally. The SPAWN object created will contain internally a list of groups that will be spawned and that are already spawned. The initialization functions will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons. So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.

    -
      -
    1. SPAWN object initialization methods:

      -

      A spawn object will behave differently based on the usage of initialization methods:

    2. -
    3. SPAWN.Limit: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.

    4. -
    5. SPAWN.RandomizeRoute: Randomize the routes of spawned groups.

    6. -
    7. SPAWN.RandomizeTemplate: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined.

    8. -
    9. SPAWN.Uncontrolled: Spawn plane groups uncontrolled.

    10. -
    11. SPAWN.Array: Make groups visible before they are actually activated, and order these groups like a batallion in an array.

    12. -
    13. SPAWN.Repeat: Re-spawn groups when they land at the home base. Similar functions are SPAWN.RepeatOnLanding and SPAWN.RepeatOnEngineShutDown.

    14. -
    15. SPAWN object spawning methods:

      -

      Groups can be spawned at different times and methods:

    16. -
    17. SPAWN.Spawn: Spawn one new group based on the last spawned index.

    18. -
    19. SPAWN.ReSpawn: Re-spawn a group based on a given index.

    20. -
    21. SPAWN.SpawnScheduled: Spawn groups at scheduled but randomized intervals. You can use SPAWN.SpawnScheduleStart and SPAWN.SpawnScheduleStop to start and stop the schedule respectively.

    22. -
    23. SPAWN.SpawnFromUnit: Spawn a new group taking the position of a UNIT.

    24. -
    25. SPAWN.SpawnInZone: Spawn a new group in a ZONE.

    26. -
    +

    SPAWN initialization methods:

    +

    A spawn object will behave differently based on the usage of initialization methods:

    + + + +

    SPAWN spawning methods:

    +

    Groups can be spawned at different times and methods:

    + +

    Note that SPAWN.Spawn and SPAWN.ReSpawn return a GROUP#GROUP.New object, that contains a reference to the DCSGroup object. You can use the GROUP object to do further actions with the DCSGroup.

    -
      -
    1. SPAWN object cleaning: -
      - Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. - In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, - and it may occur that no new groups are or can be spawned as limits are reached. - To prevent this, a SPAWN.CleanUp initialization method has been defined that will silently monitor the status of each spawned group. - Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time. - There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"... - In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically. - This models AI that has succesfully returned to their airbase, to restart their combat activities. - Check the SPAWN.CleanUp for further info.
    2. -
    +

    SPAWN object cleaning:

    +

    Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. +In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, +and it may occur that no new groups are or can be spawned as limits are reached. +To prevent this, a SPAWN.CleanUp initialization method has been defined that will silently monitor the status of each spawned group. +Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time. +There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"... +In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically. +This models AI that has succesfully returned to their airbase, to restart their combat activities. +Check the SPAWN.CleanUp for further info.

    Global(s)

    @@ -2052,7 +2058,7 @@ Nothing found

    -

    TODO Need to delete this... _Database does this now ...

    +

    TODO Need to delete this... _DATABASE does this now ...

    Parameter