Banner Image

Module Ops.NavyGroup

Ops - Enhanced Naval Group.

Main Features:

  • Dynamically add and remove waypoints.
  • Let the group steam into the wind.
  • Command a full stop.
  • Let a submarine dive and surface.

Author: funkyfranky

Global(s)

Global NAVYGROUP

Something must be left to chance; nothing is sure in a sea fight above all. -- Horatio Nelson


Banner Image

The NAVYGROUP Concept

This class enhances naval groups.

#NAVYGROUP NAVYGROUP

Something must be left to chance; nothing is sure in a sea fight above all. -- Horatio Nelson


Banner Image

The NAVYGROUP Concept

This class enhances naval groups.

Type(s)

Fields and Methods inherited from NAVYGROUP Description

NAVYGROUP:AddTaskAttackGroup(TargetGroup, WeaponExpend, WeaponType, Clock, Prio)

Add a scheduled task.

NAVYGROUP:AddTaskFireAtPoint(Coordinate, Radius, Nshots, WeaponType, Clock, Prio)

Add a scheduled task.

NAVYGROUP:AddTurnIntoWind(starttime, stoptime, speed, uturn, offset)

Add aircraft recovery time window and recovery case.

NAVYGROUP:AddWaypoint(coordinate, speed, wpnumber, updateroute)

Add an a waypoint to the route.

NAVYGROUP.Corientlast

NAVYGROUP:CreateTurnIntoWind(starttime, stoptime, speed, uturn, offset)

Add aircraft recovery time window and recovery case.

NAVYGROUP.Debug

NAVYGROUP:GetHeadingIntoWind(Offset)

Get heading of group into the wind.

NAVYGROUP:GetNextTurnIntoWind()

Check queued turns into wind.

NAVYGROUP:GetSpeedCruise()

Get default cruise speed.

NAVYGROUP:GetSpeedToWaypoint(indx)

Returns a non-zero speed to the next waypoint (even if the waypoint speed is zero).

NAVYGROUP:GetWind()

Get wind direction and speed at current position.

NAVYGROUP:IsSteamingIntoWind()

Check if the group is currently steaming into the wind.

NAVYGROUP:IsTurning()

Check if the group is currently turning.

NAVYGROUP:New(GroupName)

Create a new NAVYGROUP class object.

NAVYGROUP:OnEventBirth(EventData)

Event function handling the birth of a unit.

NAVYGROUP:OnEventDead(EventData)

Flightgroup event function handling the crash of a unit.

NAVYGROUP:OnEventRemoveUnit(EventData)

Flightgroup event function handling the crash of a unit.

NAVYGROUP.Qintowind

Queue of "into wind" turns.

NAVYGROUP:SetPatrolAdInfinitum(switch)

Group patrols ad inifintum.

NAVYGROUP:SetSpeedCruise(Speed)

Group patrols ad inifintum.

NAVYGROUP:_CheckCollisionCoord(coordto, coordfrom)

Check for possible collisions between two coordinates.

NAVYGROUP:_CheckGroupDone(delay)

Check if group is done, i.e.

NAVYGROUP:_CheckTurning()

Check if group is turning.

NAVYGROUP:_CheckTurnsIntoWind()

Check queued turns into wind.

NAVYGROUP._DetourReached(group, navygroup, resume)

Function called when a group is passing a waypoint.

NAVYGROUP:_InitGroup()

Initialize group parameters.

NAVYGROUP:__Stop(delay)

Triggers the FSM event "Stop" after a delay.

NAVYGROUP.actype

NAVYGROUP.adinfinitum

Resume route at first waypoint when final waypoint is reached.

NAVYGROUP.ai

NAVYGROUP.depth

Ordered depth in meters.

NAVYGROUP.descriptors

NAVYGROUP.formationDefault

NAVYGROUP.groupinitialized

NAVYGROUP.intowind

Into wind info.

NAVYGROUP.intowindcounter

NAVYGROUP.isAircraft

NAVYGROUP.isGround

NAVYGROUP.isLateActivated

NAVYGROUP.isNaval

NAVYGROUP.isUncontrolled

NAVYGROUP.lid

NAVYGROUP:onafterCruise(From, Event, To, Speed)

On after "Cruise" event.

NAVYGROUP:onafterDead(From, Event, To)

On after "Dead" event.

NAVYGROUP:onafterDetour(From, Event, To, Coordinate, Speed, Depth, ResumeRoute)

On after "Detour" event.

NAVYGROUP:onafterDetourReached(From, Event, To)

On after "DetourReached" event.

NAVYGROUP:onafterDive(From, Event, To, Depth)

On after "Dive" event.

NAVYGROUP:onafterElementDead(From, Event, To, Element)

On after "ElementDead" event.

NAVYGROUP:onafterElementSpawned(From, Event, To, Element)

On after "ElementSpawned" event.

NAVYGROUP:onafterFullStop(From, Event, To)

On after "FullStop" event.

NAVYGROUP:onafterSpawned(From, Event, To)

On after "Spawned" event.

NAVYGROUP:onafterStatus(From, Event, To)

Update status.

NAVYGROUP:onafterStop(From, Event, To)

On after Start event.

NAVYGROUP:onafterSurface(From, Event, To)

On after "Surface" event.

NAVYGROUP:onafterTurnIntoWind(From, Event, To, Into, Duration, Speed, Uturn, IntoWind)

On after "TurnIntoWind" event.

NAVYGROUP:onafterTurnIntoWindOver(From, Event, To, Duration, Speed, Uturn)

On after "TurnIntoWindOver" event.

NAVYGROUP:onafterUpdateRoute(From, Event, To, n, Speed, Depth)

On after "UpdateRoute" event.

NAVYGROUP:onbeforeStatus(From, Event, To)

  • Update status.

NAVYGROUP.passedfinalwp

NAVYGROUP.position

NAVYGROUP.radioFreq

NAVYGROUP.radioFreqDefault

NAVYGROUP.radioModu

NAVYGROUP.radioModuDefault

NAVYGROUP.radioOn

NAVYGROUP.respawning

NAVYGROUP.speedCruise

NAVYGROUP.speedmax

NAVYGROUP.template

NAVYGROUP.traveldist

NAVYGROUP.traveltime

NAVYGROUP.turning

If true, group is currently turning.

NAVYGROUP.version

NavyGroup version.

NAVYGROUP.waypoints

Fields and Methods inherited from OPSGROUP Description

NAVYGROUP:Activate(delay)

Activate a late activated group.

NAVYGROUP:AddCheckZone(CheckZone)

Add a zone that triggers and event if the group enters or leaves any of the zones.

NAVYGROUP:AddMission(Mission)

Add mission to queue.

NAVYGROUP:AddTask(task, clock, description, prio, duration)

Add a scheduled task.

NAVYGROUP:AddTaskEnroute(task)

Add an enroute task.

NAVYGROUP:AddTaskWaypoint(task, waypointindex, description, prio, duration)

Add a waypoint task.

NAVYGROUP:CheckTaskDescriptionUnique(description)

Check if task description is unique.

NAVYGROUP.ClassName

Name of the class.

NAVYGROUP:ClearTasks(DCSTask)

Clear DCS tasks.

NAVYGROUP:CountRemainingMissison()

Count remaining missons.

NAVYGROUP:CountRemainingTasks()

Count the number of tasks that still pending in the queue.

NAVYGROUP.Debug

Debug mode. Messages to all about status.

NAVYGROUP.ElementStatus

NAVYGROUP:GetAmmoElement(element)

Get the number of shells a unit or group currently has.

NAVYGROUP:GetAmmoTot()

Get total amount of ammunition of the whole group.

NAVYGROUP:GetAmmoUnit(unit, display)

Get the number of shells a unit or group currently has.

NAVYGROUP:GetCoalition()

Get coalition.

NAVYGROUP:GetCoordinate()

Get current coordinate of the group.

NAVYGROUP:GetDetectedUnits()

Get set of detected units.

NAVYGROUP:GetElementByName(unitname)

Get the element of a group.

NAVYGROUP:GetGroup()

Get MOOSE GROUP object.

NAVYGROUP:GetHeading()

Get current heading of the group.

NAVYGROUP:GetLifePoints()

Returns the absolute (average) life points of the group.

NAVYGROUP:GetMissionByID(id)

Get mission by its id (auftragsnummer).

NAVYGROUP:GetMissionByTaskID(taskid)

Get mission by its task id.

NAVYGROUP:GetMissionCurrent()

Get current mission.

NAVYGROUP:GetName()

Get the group name.

NAVYGROUP:GetNelements(status)

Get number of elements alive.

NAVYGROUP:GetNextWaypointCoordinate()

Get coordinate of next waypoint of the group.

NAVYGROUP:GetROE()

Get current ROE of the group.

NAVYGROUP:GetTaskByID(id, status)

Get task by its id.

NAVYGROUP:GetTaskCurrent()

Get the currently executed task if there is any.

NAVYGROUP:GetTasksWaypoint(n)

Get the unfinished waypoint tasks

NAVYGROUP:GetWaypoint(indx)

Get waypoint.

NAVYGROUP:GetWaypointCoordinate(wp)

Get next waypoint coordinates.

NAVYGROUP:GetWaypointCurrent()

Get current waypoint.

NAVYGROUP:GetWaypointFinal()

Get final waypoint.

NAVYGROUP:GetWaypointIndexNext(cyclic)

Get next waypoint index.

NAVYGROUP:GetWaypointNext(cyclic)

Get next waypoint.

NAVYGROUP:GetWaypointSpeed(indx)

Get waypoint speed.

NAVYGROUP:InitWaypoints(waypoints)

Initialize Mission Editor waypoints.

NAVYGROUP:IsAlive()

Check if group is alive.

NAVYGROUP:IsDead()

Check if group is dead.

NAVYGROUP:IsInUtero()

Check if group is in state in utero.

NAVYGROUP:IsLateActivated()

Check if this group is currently "late activated" and needs to be "activated" to appear in the mission.

NAVYGROUP:IsSpawned()

Check if group is in state spawned.

NAVYGROUP:IsStopped()

Check if FSM is stopped.

NAVYGROUP:IsUncontrolled()

Check if this group is currently "uncontrolled" and needs to be "started" to begin its route.

NAVYGROUP:New(Group)

Create a new OPSGROUP class object.

NAVYGROUP:NewTaskScheduled(task, clock, description, prio, duration)

Create a scheduled task.

NAVYGROUP:PushTask(DCSTask)

Push DCS task.

NAVYGROUP:RemoveMission(Mission)

Remove mission from queue.

NAVYGROUP:RemoveTask(Task)

Remove task from task queue.

NAVYGROUP:RemoveWaypoint(wpindex)

Remove a waypoint.

NAVYGROUP:Route(waypoints, delay)

Route group along waypoints.

NAVYGROUP:RouteToMission(mission, delay)

Route group to mission.

NAVYGROUP:SelfDestruction(Delay, ExplosionPower)

Self destruction of group.

NAVYGROUP:SetCheckZones(CheckZonesSet)

Define a SET of zones that trigger and event if the group enters or leaves any of the zones.

NAVYGROUP:SetDefaultROE(roe)

Set the default ROE for the group.

NAVYGROUP:SetDefaultROT(roe)

Set the default ROT for the group.

NAVYGROUP:SetDetection(Switch)

Set detection on or off.

NAVYGROUP:SetOptionROE(roe)

Set current ROE for the group.

NAVYGROUP:SetOptionROT(rot)

Set ROT for the group.

NAVYGROUP:SetTask(DCSTask)

Set DCS task.

NAVYGROUP:Status()

Triggers the FSM event "Status".

NAVYGROUP.TaskStatus

NAVYGROUP.TaskType

NAVYGROUP:_AllSameStatus(unitname, status)

Check if all elements of the group have the same status (or are dead).

NAVYGROUP:_AllSimilarStatus(status)

Check if all elements of the group have the same status (or are dead).

NAVYGROUP:_CheckDetectedUnits()

Check detected units.

NAVYGROUP:_CheckInZones()

Check if group is in zones.

NAVYGROUP:_GetNextMission()

Get next mission.

NAVYGROUP:_GetNextTask()

Get next task in queue.

NAVYGROUP:_MissileCategoryName(categorynumber)

Returns a name of a missile category.

NAVYGROUP._PassingWaypoint(group, opsgroup, i)

Function called when a group is passing a waypoint.

NAVYGROUP:_SetElementStatusAll(status)

Set status for all elements (except dead ones).

NAVYGROUP:_SortTaskQueue()

Sort task queue.

NAVYGROUP._TaskDone(group, opsgroup, task)

Function called when a task is done.

NAVYGROUP._TaskExecute(group, opsgroup, task)

Function called when a task is executed.

NAVYGROUP:_UpdateStatus(element, newstatus, airbase)

Check if all elements of the group have the same status or are dead.

NAVYGROUP:_UpdateWaypointTasks(n)

Initialize Mission Editor waypoints.

NAVYGROUP:__Status(delay)

Triggers the FSM event "Status" after a delay.

NAVYGROUP:__Stop(delay)

Triggers the FSM event "Stop" after a delay.

NAVYGROUP.ai

If true, group is purely AI.

NAVYGROUP.attribute

Generalized attribute.

NAVYGROUP.checkzones

Set of zones.

NAVYGROUP.currentmission

The ID (auftragsnummer) of the currently assigned AUFTRAG.

NAVYGROUP.currentwp

Current waypoint.

NAVYGROUP.detectedunits

Set of detected units.

NAVYGROUP.detectionOn

If true, detected units of the group are analyzed.

NAVYGROUP.elements

Table of elements, i.e. units of the group.

NAVYGROUP.eplrs

If true, EPLRS data link is on.

NAVYGROUP.eplrsDefault

Default EPLRS data link setting.

NAVYGROUP.formation

Current formation setting.

NAVYGROUP.formationDefault

Default formation setting.

NAVYGROUP.group

Group object.

NAVYGROUP.groupinitialized

If true, group parameters were initialized.

NAVYGROUP.groupname

Name of the group.

NAVYGROUP.inzones

Set of zones in which the group is currently in.

NAVYGROUP.isAircraft

If true, group is airplane or helicopter.

NAVYGROUP.isGround

If true, group is some ground unit.

NAVYGROUP.isLateActivated

Is the group late activated.

NAVYGROUP.isNaval

If true, group is ships or submarine.

NAVYGROUP.isUncontrolled

Is the group uncontrolled.

NAVYGROUP.lid

Class id string for output to DCS log file.

NAVYGROUP.missionpaused

Paused mission.

NAVYGROUP.missionqueue

Queue of missions.

NAVYGROUP:onafterCheckZone(From, Event, To)

On after "CheckZone" event.

NAVYGROUP:onafterDetectedUnit(From, Event, To, Unit)

On after "DetectedUnit" event.

NAVYGROUP:onafterDetectedUnitNew(From, Event, To, Unit)

On after "DetectedUnitNew" event.

NAVYGROUP:onafterEnterZone(From, Event, To, Zone)

On after "EnterZone" event.

NAVYGROUP:onafterGotoWaypoint(From, Event, To, n)

On after "GotoWaypoint" event.

NAVYGROUP:onafterLeaveZone(From, Event, To, Zone)

On after "LeaveZone" event.

NAVYGROUP:onafterMissionCancel(From, Event, To, Mission)

On after "MissionCancel" event.

NAVYGROUP:onafterMissionDone(From, Event, To, Mission)

On after "MissionDone" event.

NAVYGROUP:onafterMissionExecute(From, Event, To, Mission)

On after "MissionExecute" event.

NAVYGROUP:onafterMissionStart(From, Event, To, Mission)

On after "MissionStart" event.

NAVYGROUP:onafterPassingWaypoint(From, Event, To, n, N)

On after "PassingWaypoint" event.

NAVYGROUP:onafterPauseMission(From, Event, To)

On after "PauseMission" event.

NAVYGROUP:onafterQueueUpdate(From, Event, To)

On after "QueueUpdate" event.

NAVYGROUP:onafterTaskCancel(From, Event, To, Task)

On after "TaskCancel" event.

NAVYGROUP:onafterTaskDone(From, Event, To, Task)

On after "TaskDone" event.

NAVYGROUP:onafterTaskExecute(From, Event, To, Task)

On after TaskExecute event.

NAVYGROUP:onafterUnpauseMission(From, Event, To)

On after "UnpauseMission" event.

NAVYGROUP:onbeforeMissionStart(From, Event, To, Mission)

On before "MissionStart" event.

NAVYGROUP:onbeforeTaskDone(From, Event, To, Task)

On before "TaskDone" event.

NAVYGROUP.passedfinalwp

Group has passed the final waypoint.

NAVYGROUP.position

Current position of the group.

NAVYGROUP.radioFreq

Currently used radio frequency in MHz.

NAVYGROUP.radioFreqDefault

Default radio frequency in MHz.

NAVYGROUP.radioModu

Currently used radio modulation radio.modulation.AM or radio.modulation.FM.

NAVYGROUP.radioModuDefault

Default Radio modulation radio.modulation.AM or radio.modulation.FM.

NAVYGROUP.radioOn

If true, radio is currently turned on.

NAVYGROUP.radioQueue

Radio queue.

NAVYGROUP.respawning

Group is being respawned.

NAVYGROUP.roe

Current ROE setting.

NAVYGROUP.roeDefault

Default ROE setting.

NAVYGROUP.rot

Current ROT setting.

NAVYGROUP.rotDefault

Default ROT setting.

NAVYGROUP.speedCruise

Cruising speed in km/h.

NAVYGROUP.speedmax

Max speed in km/h.

NAVYGROUP.tacanBeacon

The unit acting as TACAN beacon.

NAVYGROUP.tacanChannel

The currenly used TACAN channel.

NAVYGROUP.tacanChannelDefault

The default TACAN channel.

NAVYGROUP.tacanMorse

The currently used TACAN morse code.

NAVYGROUP.tacanMorseDefault

The default TACAN morse code.

NAVYGROUP.tacanOn

If true, TACAN is currently active.

NAVYGROUP.taskcounter

Running number of task ids.

NAVYGROUP.taskcurrent

ID of current task. If 0, there is no current task assigned.

NAVYGROUP.taskenroute

Enroute task of the group.

NAVYGROUP.taskpaused

Paused tasks.

NAVYGROUP.taskqueue

Queue of tasks.

NAVYGROUP.template

Template of the group.

NAVYGROUP.traveldist

Distance traveled in meters. This is a lower bound!

NAVYGROUP.traveltime

Time.

NAVYGROUP.verbose

Verbosity level. 0=silent.

NAVYGROUP.version

NavyGroup version.

NAVYGROUP.waypoints

Table of waypoints.

NAVYGROUP.waypoints0

Table of initial waypoints.

Fields and Methods inherited from FSM Description

NAVYGROUP:AddEndState(State)

Adds an End state.

NAVYGROUP:AddProcess(From, Event, Process, ReturnEvents)

Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

NAVYGROUP:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

NAVYGROUP:AddScoreProcess(From, Event, State, ScoreText, Score)

Adds a score for the FSM_PROCESS to be achieved.

NAVYGROUP:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

NAVYGROUP.CallScheduler

NAVYGROUP.Events

NAVYGROUP:GetCurrentState()

NAVYGROUP:GetEndStates()

Returns the End states.

NAVYGROUP:GetProcess(From, Event)

NAVYGROUP:GetProcesses()

Returns a table of the SubFSM rules defined within the FSM.

NAVYGROUP:GetScores()

Returns a table with the scores defined.

NAVYGROUP:GetStartState()

Returns the start state of the FSM.

NAVYGROUP:GetState()

NAVYGROUP:GetSubs()

Returns a table with the Subs defined.

NAVYGROUP:GetTransitions()

Returns a table of the transition rules defined within the FSM.

NAVYGROUP:Is(State)

NAVYGROUP:LoadCallBacks(CallBackTable)

NAVYGROUP:New()

Creates a new FSM object.

NAVYGROUP.Scores

NAVYGROUP:SetProcess(From, Event, Fsm)

NAVYGROUP:SetStartState(State)

Sets the start state of the FSM.

NAVYGROUP._EndStates

NAVYGROUP._EventSchedules

NAVYGROUP._Processes

NAVYGROUP._Scores

NAVYGROUP._StartState

NAVYGROUP._Transitions

NAVYGROUP:_add_to_map(Map, Event)

NAVYGROUP:_call_handler(step, trigger, params, EventName)

NAVYGROUP:_create_transition(EventName)

NAVYGROUP:_delayed_transition(EventName)

NAVYGROUP:_eventmap(Events, EventStructure)

NAVYGROUP:_gosub(ParentFrom, ParentEvent)

NAVYGROUP:_handler(EventName, ...)

NAVYGROUP:_isendstate(Current)

NAVYGROUP:_submap(subs, sub, name)

NAVYGROUP:can(e)

NAVYGROUP:cannot(e)

NAVYGROUP.current

NAVYGROUP.endstates

NAVYGROUP:is(state)

NAVYGROUP.options

NAVYGROUP.subs

Fields and Methods inherited from BASE Description

NAVYGROUP.ClassID

The ID number of the class.

NAVYGROUP.ClassName

The name of the class.

NAVYGROUP.ClassNameAndID

The name of the class concatenated with the ID number of the class.

NAVYGROUP:ClearState(Object, StateName)

Clear the state of an object.

NAVYGROUP:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)

Creation of a Birth Event.

NAVYGROUP:CreateEventCrash(EventTime, Initiator)

Creation of a Crash Event.

NAVYGROUP:CreateEventDead(EventTime, Initiator)

Creation of a Dead Event.

NAVYGROUP:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

NAVYGROUP:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

NAVYGROUP:E(Arguments)

Log an exception which will be traced always.

NAVYGROUP:EventDispatcher()

Returns the event dispatcher

NAVYGROUP:EventRemoveAll()

Remove all subscribed events

NAVYGROUP:F(Arguments)

Trace a function call.

NAVYGROUP:F2(Arguments)

Trace a function call level 2.

NAVYGROUP:F3(Arguments)

Trace a function call level 3.

NAVYGROUP:GetClassID()

Get the ClassID of the class instance.

NAVYGROUP:GetClassName()

Get the ClassName of the class instance.

NAVYGROUP:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

NAVYGROUP:GetEventPriority()

Get the Class Event processing Priority.

NAVYGROUP:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

NAVYGROUP:GetState(Object, Key)

Get a Value given a Key from the Object.

NAVYGROUP:HandleEvent(Event, EventFunction)

Subscribe to a DCS Event.

NAVYGROUP:I(Arguments)

Log an information which will be traced always.

NAVYGROUP:Inherit(Child, Parent)

This is the worker method to inherit from a parent class.

NAVYGROUP:IsInstanceOf(ClassName)

This is the worker method to check if an object is an (sub)instance of a class.

NAVYGROUP:IsTrace()

Enquires if tracing is on (for the class).

NAVYGROUP:New()

BASE constructor.

NAVYGROUP:OnEvent(EventData)

Occurs when an object is completely destroyed.

NAVYGROUP:OnEventBaseCaptured(EventData)

Occurs when a ground unit captures either an airbase or a farp.

NAVYGROUP:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

NAVYGROUP:OnEventCrash(EventData)

Occurs when any aircraft crashes into the ground and is completely destroyed.

NAVYGROUP:OnEventDead(EventData)

Occurs when an object is dead.

NAVYGROUP:OnEventDetailedFailure(EventData)

Unknown precisely what creates this event, likely tied into newer damage model.

NAVYGROUP:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected

NAVYGROUP:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

NAVYGROUP:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

NAVYGROUP:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

NAVYGROUP:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

NAVYGROUP:OnEventKill(EventData)

Occurs on the death of a unit.

NAVYGROUP:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed place: Object that the unit landed on.

NAVYGROUP:OnEventLandingAfterEjection(EventData)

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

NAVYGROUP:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

NAVYGROUP:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

NAVYGROUP:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

NAVYGROUP:OnEventMissionEnd(EventData)

Occurs when a mission ends

NAVYGROUP:OnEventMissionStart(EventData)

Occurs when a mission starts

NAVYGROUP:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

NAVYGROUP:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

NAVYGROUP:OnEventPlayerLeaveUnit(EventData)

Occurs when any player relieves control of a unit to the AI.

NAVYGROUP:OnEventRefueling(EventData)

Occurs when an aircraft connects with a tanker and begins taking on fuel.

NAVYGROUP:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

NAVYGROUP:OnEventScore(EventData)

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

NAVYGROUP:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

NAVYGROUP:OnEventShootingStart(EventData)

Occurs when any unit begins firing a weapon that has a high rate of fire.

NAVYGROUP:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

NAVYGROUP:OnEventTakeoff(EventData)

Occurs when an aircraft takes off from an airbase, farp, or ship.

NAVYGROUP:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

NAVYGROUP:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

NAVYGROUP:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...)

Schedule a new time event.

NAVYGROUP:ScheduleStop(SchedulerFunction)

Stops the Schedule.

NAVYGROUP.Scheduler

NAVYGROUP:SetEventPriority(EventPriority)

Set the Class Event processing Priority.

NAVYGROUP:SetState(Object, Key, Value)

Set a state or property of the Object given a Key and a Value.

NAVYGROUP:T(Arguments)

Trace a function logic level 1.

NAVYGROUP:T2(Arguments)

Trace a function logic level 2.

NAVYGROUP:T3(Arguments)

Trace a function logic level 3.

NAVYGROUP:TraceAll(TraceAll)

Trace all methods in MOOSE

NAVYGROUP:TraceClass(Class)

Set tracing for a class

NAVYGROUP:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

NAVYGROUP:TraceLevel(Level)

Set trace level

NAVYGROUP:TraceOff()

Set trace off.

NAVYGROUP:TraceOn()

Set trace on.

NAVYGROUP:TraceOnOff(TraceOnOff)

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

NAVYGROUP:UnHandleEvent(Event)

UnSubscribe to a DCS event.

NAVYGROUP._

NAVYGROUP:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

NAVYGROUP:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

NAVYGROUP.__

NAVYGROUP:onEvent(event)

Fields and Methods inherited from NAVYGROUP.Element Description

NAVYGROUP.Element.name

Name of the element, i.e. the unit.

NAVYGROUP.Element.status

NAVYGROUP.Element.typename

Type name.

NAVYGROUP.Element.unit

Fields and Methods inherited from NAVYGROUP.IntoWind Description

NAVYGROUP.IntoWind.Coordinate

Coordinate where we left the route.

NAVYGROUP.IntoWind.Heading

Heading the boat will take in degrees.

NAVYGROUP.IntoWind.Id

Unique ID of the turn.

NAVYGROUP.IntoWind.Offset

Offset angle in degrees.

NAVYGROUP.IntoWind.Open

Currently active.

NAVYGROUP.IntoWind.Over

This turn is over.

NAVYGROUP.IntoWind.Speed

Speed in knots.

NAVYGROUP.IntoWind.Tstart

Time to start.

NAVYGROUP.IntoWind.Tstop

Time to stop.

NAVYGROUP.IntoWind.Uturn

U-turn.

NAVYGROUP class.

Field(s)

NAVYGROUP.Corientlast

Last orientation becomes new orientation

#boolean NAVYGROUP.Debug
#table NAVYGROUP.Qintowind

Queue of "into wind" turns.

#boolean NAVYGROUP.adinfinitum

Resume route at first waypoint when final waypoint is reached.

#boolean NAVYGROUP.ai

Ships are always AI.

#number NAVYGROUP.depth

Ordered depth in meters.

#boolean NAVYGROUP.groupinitialized

Init done.

#boolean NAVYGROUP.isAircraft

Define category.

NAVYGROUP.isLateActivated

Is (template) group late activated.

#boolean NAVYGROUP.isUncontrolled

Naval groups cannot be uncontrolled.

NAVYGROUP.lid

Set some string id for output to DCS.log file.

#boolean NAVYGROUP.radioOn

Radio is always on for ships.

NAVYGROUP.speedmax

Max speed in km/h.

NAVYGROUP.template

Get template of group.

#boolean NAVYGROUP.turning

If true, group is currently turning.

#string NAVYGROUP.version

NavyGroup version.

Function(s)

Add a scheduled task.

Defined in:

NAVYGROUP

Parameters:

Wrapper.Group#GROUP TargetGroup

Target group.

#number WeaponExpend

How much weapons does are used.

#number WeaponType

Type of weapon. Default auto.

#string Clock

Time when to start the attack.

#number Prio

Priority of the task.

Add a scheduled task.

Defined in:

NAVYGROUP

Parameters:

Coordinate of the target.

#number Radius

Radius in meters. Default 100 m.

#number Nshots

Number of shots to fire. Default 3.

#number WeaponType

Type of weapon. Default auto.

#string Clock

Time when to start the attack.

#number Prio

Priority of the task.

Add aircraft recovery time window and recovery case.

Defined in:

NAVYGROUP

Parameters:

#string starttime

Start time, e.g. "8:00" for eight o'clock. Default now.

#string stoptime

Stop time, e.g. "9:00" for nine o'clock. Default 90 minutes after start time.

#number speed

Speed in knots during turn into wind leg.

#boolean uturn

If true (or nil), carrier wil perform a U-turn and go back to where it came from before resuming its route to the next waypoint. If false, it will go directly to the next waypoint.

#number offset

Offset angle in degrees, e.g. to account for an angled runway. Default 0 deg.

Return value:

Recovery window.

Add an a waypoint to the route.

Defined in:

NAVYGROUP

Parameters:

The coordinate of the waypoint. Use COORDINATE:SetAltitude(altitude) to define the altitude.

#number speed

Speed in knots. Default is default cruise speed or 70% of max speed.

#number wpnumber

Waypoint number. Default at the end.

#boolean updateroute

If true or nil, call UpdateRoute. If false, no call.

Return value:

#number:

Waypoint index.

Add aircraft recovery time window and recovery case.

Defined in:

NAVYGROUP

Parameters:

#string starttime

Start time, e.g. "8:00" for eight o'clock. Default now.

#string stoptime

Stop time, e.g. "9:00" for nine o'clock. Default 90 minutes after start time.

#number speed

Speed in knots during turn into wind leg.

#boolean uturn

If true (or nil), carrier wil perform a U-turn and go back to where it came from before resuming its route to the next waypoint. If false, it will go directly to the next waypoint.

#number offset

Offset angle in degrees, e.g. to account for an angled runway. Default 0 deg.

Return value:

Recovery window.

Get heading of group into the wind.

Defined in:

NAVYGROUP

Parameter:

#number Offset

Offset angle in degrees, e.g. to account for an angled runway.

Return value:

#number:

Carrier heading in degrees.

Check queued turns into wind.

Defined in:

NAVYGROUP

Return value:

Next into wind data.

Get default cruise speed.

Defined in:

NAVYGROUP

Return value:

#number:

Cruise speed (>0) in knots.

Returns a non-zero speed to the next waypoint (even if the waypoint speed is zero).

Defined in:

NAVYGROUP

Parameter:

#number indx

Waypoint index.

Return value:

#number:

Speed to next waypoint (>0) in knots.

Get wind direction and speed at current position.

Defined in:

NAVYGROUP

Return values:

#number:

Direction the wind is blowing from in degrees.

#number:

Wind speed in m/s.

Check if the group is currently steaming into the wind.

Defined in:

NAVYGROUP

Return value:

#boolean:

If true, group is currently steaming into the wind.

Check if the group is currently turning.

Defined in:

NAVYGROUP

Return value:

#boolean:

If true, group is currently turning.

Create a new NAVYGROUP class object.

Defined in:

NAVYGROUP

Parameter:

#string GroupName

Name of the group.

Return value:

self

Event function handling the birth of a unit.

Defined in:

NAVYGROUP

Parameter:

Event data.

Flightgroup event function handling the crash of a unit.

Defined in:

NAVYGROUP

Parameter:

Event data.

Flightgroup event function handling the crash of a unit.

Defined in:

NAVYGROUP

Parameter:

Event data.

Group patrols ad inifintum.

If the last waypoint is reached, it will go to waypoint one and repeat its route.

Defined in:

NAVYGROUP

Parameter:

#boolean switch

If true or nil, patrol until the end of time. If false, go along the waypoints once and stop.

Return value:

self

Group patrols ad inifintum.

If the last waypoint is reached, it will go to waypoint one and repeat its route.

Defined in:

NAVYGROUP

Parameter:

#number Speed

Speed in knots. Default 70% of max speed.

Return value:

self

Check for possible collisions between two coordinates.

Defined in:

NAVYGROUP

Parameters:

Coordinate to which the collision is check.

Coordinate from which the collision is check.

Return values:

#boolean:

If true, surface type ahead is not deep water.

#number:

Max free distance in meters.

Check if group is done, i.e.

  • passed the final waypoint,
  • no current task
  • no current mission
  • number of remaining tasks is zero
  • number of remaining missions is zero

Defined in:

NAVYGROUP

Parameter:

#number delay

Delay in seconds.

Check if group is turning.

Defined in:

NAVYGROUP

Check queued turns into wind.

Defined in:

NAVYGROUP

Function called when a group is passing a waypoint.

Defined in:

NAVYGROUP

Parameters:

Group that passed the waypoint

#NAVYGROUP navygroup

Navy group object.

#boolean resume

Resume route.

Initialize group parameters.

Also initializes waypoints if self.waypoints is nil.

Defined in:

NAVYGROUP

Return value:

self

Triggers the FSM event "Stop" after a delay.

Stops the NAVYGROUP and all its event handlers.

Defined in:

NAVYGROUP

Parameter:

#number delay

Delay in seconds.

On after "Cruise" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#number Speed

Speed in knots.

On after "Dead" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Detour" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Coordinate where to go.

#number Speed

Speed in knots. Default cruise speed.

#number Depth

Depth in meters. Default 0 meters.

#number ResumeRoute

If true, resume route after detour point was reached.

On after "DetourReached" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Dive" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#number Depth

Dive depth in meters. Default 50 meters.

On after "ElementDead" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The group element.

On after "ElementSpawned" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The group element.

On after "FullStop" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Spawned" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Update status.

Defined in:

NAVYGROUP

Parameters:

From

Event

To

On after Start event.

Starts the NAVYGROUP FSM and event handlers.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Surface" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "TurnIntoWind" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

wind parameters.

#number Duration

Duration in seconds.

#number Speed

Speed in knots.

#boolean Uturn

Return to the place we came from.

IntoWind

On after "TurnIntoWindOver" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#number Duration

Duration in seconds.

#number Speed

Speed in knots.

#boolean Uturn

Return to the place we came from.

On after "UpdateRoute" event.

Defined in:

NAVYGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#number n

Waypoint number. Default is next waypoint.

#number Speed

Speed in knots. Default cruise speed.

#number Depth

Depth in meters. Default 0 meters.

  • Update status.

Defined in:

NAVYGROUP

Parameters:

From

Event

To

Field(s)

NAVYGROUP.Corientlast

Last orientation becomes new orientation

#boolean NAVYGROUP.Debug
#table NAVYGROUP.Qintowind

Queue of "into wind" turns.

#boolean NAVYGROUP.adinfinitum

Resume route at first waypoint when final waypoint is reached.

#boolean NAVYGROUP.ai

Ships are always AI.

#number NAVYGROUP.depth

Ordered depth in meters.

#boolean NAVYGROUP.groupinitialized

Init done.

#boolean NAVYGROUP.isAircraft

Define category.

NAVYGROUP.isLateActivated

Is (template) group late activated.

#boolean NAVYGROUP.isUncontrolled

Naval groups cannot be uncontrolled.

NAVYGROUP.lid

Set some string id for output to DCS.log file.

#boolean NAVYGROUP.radioOn

Radio is always on for ships.

NAVYGROUP.speedmax

Max speed in km/h.

NAVYGROUP.template

Get template of group.

#boolean NAVYGROUP.turning

If true, group is currently turning.

#string NAVYGROUP.version

NavyGroup version.

Function(s)

Activate a late activated group.

Defined in:

Parameter:

#number delay

(Optional) Delay in seconds before the group is activated. Default is immediately.

Return value:

self

Add a zone that triggers and event if the group enters or leaves any of the zones.

Defined in:

Parameter:

Core.Zone#ZONE CheckZone

Zone to check.

Return value:

self

Add mission to queue.

Defined in:

Parameter:

Mission for this group.

Return value:

self

Add a scheduled task.

Defined in:

Parameters:

#table task

DCS task table structure.

#string clock

Mission time when task is executed. Default in 5 seconds. If argument passed as #number, it defines a relative delay in seconds.

#string description

Brief text describing the task, e.g. "Attack SAM".

#number prio

Priority of the task.

#number duration

Duration before task is cancelled in seconds counted after task started. Default never.

Return value:

The task structure.

Add an enroute task.

Defined in:

Parameter:

#table task

DCS task table structure.

Add a waypoint task.

Defined in:

Parameters:

#table task

DCS task table structure.

#number waypointindex

Number of waypoint. Counting starts at one! Default is the as next waypoint.

#string description

Brief text describing the task, e.g. "Attack SAM".

#number prio

Priority of the task. Number between 1 and 100. Default is 50.

#number duration

Duration before task is cancelled in seconds counted after task started. Default never.

Return value:

The task structure.

Check if task description is unique.

Defined in:

Parameter:

#string description

Task destription

Return value:

#boolean:

If true, no other task has the same description.

Clear DCS tasks.

Defined in:

Parameter:

#table DCSTask

DCS task structure.

Return value:

self

Count remaining missons.

Defined in:

Return value:

#number:

Number of missions to be done.

Count the number of tasks that still pending in the queue.

Defined in:

Return values:

#number:

Total number of tasks remaining.

#number:

Number of SCHEDULED tasks remaining.

#number:

Number of WAYPOINT tasks remaining.

Get the number of shells a unit or group currently has.

For a group the ammo count of all units is summed up.

Defined in:

Parameter:

The element.

Return value:

Ammo data.

Get total amount of ammunition of the whole group.

Defined in:

Return value:

Ammo data.

Get the number of shells a unit or group currently has.

For a group the ammo count of all units is summed up.

Defined in:

Parameters:

The unit object.

#boolean display

Display ammo table as message to all. Default false.

Return value:

Ammo data.

Get coalition.

Defined in:

Return value:

#number:

Coalition side of carrier.

Get current coordinate of the group.

Defined in:

Return value:

The coordinate (of the first unit) of the group.

Get set of detected units.

Defined in:

Return value:

Set of detected units.

Get the element of a group.

Defined in:

Parameter:

#string unitname

Name of unit.

Return value:

The element.

Get MOOSE GROUP object.

Defined in:

Return value:

Moose group object.

Get current heading of the group.

Defined in:

Return value:

#number:

Current heading of the group in degrees.

Returns the absolute (average) life points of the group.

Defined in:

Return values:

#number:

Life points. If group contains more than one element, the average is given.

#number:

Initial life points.

Get mission by its id (auftragsnummer).

Defined in:

Parameter:

#number id

Mission id (auftragsnummer).

Return value:

The mission.

Get mission by its task id.

Defined in:

Parameter:

#number taskid

The id of the (waypoint) task of the mission.

Return value:

The mission.

Get current mission.

Defined in:

Return value:

The current mission or nil.

Get the group name.

Defined in:

Return value:

#string:

Group name.

Get number of elements alive.

Defined in:

Parameter:

#string status

(Optional) Only count number, which are in a special status.

Return value:

#number:

Number of elements.

Get coordinate of next waypoint of the group.

Defined in:

Return values:

Coordinate of the next waypoint.

#number:

Number of waypoint.

Get current ROE of the group.

Defined in:

Return value:

#number:

Current ROE.

Get task by its id.

Defined in:

Parameters:

#number id

Task id.

#string status

(Optional) Only return tasks with this status, e.g. OPSGROUP.TaskStatus.SCHEDULED.

Return value:

The task or nil.

Get the currently executed task if there is any.

Defined in:

Return value:

Current task or nil.

Get the unfinished waypoint tasks

Defined in:

Parameter:

#number n

Waypoint index. Counting starts at one.

Return value:

#table:

Table of tasks. Table could also be empty {}.

Get waypoint.

Defined in:

Parameter:

#number indx

Waypoint index.

Return value:

#table:

Waypoint table.

Get next waypoint coordinates.

Defined in:

Parameter:

#table wp

Waypoint table.

Return value:

Coordinate of the next waypoint.

Get current waypoint.

Defined in:

Return value:

#table:

Waypoint table.

Get final waypoint.

Defined in:

Return value:

#table:

Waypoint table.

Get next waypoint index.

Defined in:

Parameter:

#boolean cyclic

If true, return first waypoint if last waypoint was reached.

Return value:

#number:

Next waypoint index.

Get next waypoint.

Defined in:

Parameter:

#boolean cyclic

If true, return first waypoint if last waypoint was reached.

Return value:

#table:

Waypoint table.

Get waypoint speed.

Defined in:

Parameter:

#number indx

Waypoint index.

Return value:

#number:

Speed set at waypoint in knots.

Initialize Mission Editor waypoints.

Defined in:

Parameter:

#table waypoints

Table of waypoints. Default is from group template.

Return value:

self

Check if group is alive.

Defined in:

Return value:

#boolean:

true if group is exists and is activated, false if group is exist but is NOT activated. nil otherwise, e.g. the GROUP object is nil or the group is not spawned yet.

Check if group is dead.

Defined in:

Return value:

#boolean:

If true, all units/elements of the group are dead.

Check if group is in state in utero.

Defined in:

Return value:

#boolean:

If true, group is not spawned yet.

Check if this group is currently "late activated" and needs to be "activated" to appear in the mission.

Defined in:

Return value:

#boolean:

Is this the group late activated?

Check if group is in state spawned.

Defined in:

Return value:

#boolean:

If true, group is spawned.

Check if FSM is stopped.

Defined in:

Return value:

#boolean:

If true, FSM state is stopped.

Check if this group is currently "uncontrolled" and needs to be "started" to begin its route.

Defined in:

Return value:

#boolean:

If this group uncontrolled.

Create a new OPSGROUP class object.

Defined in:

Parameter:

The group object. Can also be given by its group name as #string.

Return value:

self

Create a scheduled task.

Defined in:

Parameters:

#table task

DCS task table structure.

#string clock

Mission time when task is executed. Default in 5 seconds. If argument passed as #number, it defines a relative delay in seconds.

#string description

Brief text describing the task, e.g. "Attack SAM".

#number prio

Priority of the task.

#number duration

Duration before task is cancelled in seconds counted after task started. Default never.

Return value:

The task structure.

Push DCS task.

Defined in:

Parameter:

#table DCSTask

DCS task structure.

Return value:

self

Remove mission from queue.

Defined in:

Parameter:

Mission to be removed.

Return value:

self

Remove task from task queue.

Defined in:

Parameter:

The task to be removed from the queue.

Return value:

#boolean:

True if task could be removed.

Remove a waypoint.

Defined in:

Parameter:

#number wpindex

Waypoint number.

Return value:

self

Route group along waypoints.

Defined in:

Parameters:

#table waypoints

Table of waypoints.

delay

Return value:

self

Route group to mission.

Defined in:

Parameters:

The mission table.

#number delay

Delay in seconds.

Self destruction of group.

An explosion is created at the position of each element.

Defined in:

Parameters:

#number Delay

Delay in seconds. Default now.

#number ExplosionPower

(Optional) Explosion power in kg TNT. Default 500 kg.

Return value:

#number:

Relative fuel in percent.

Define a SET of zones that trigger and event if the group enters or leaves any of the zones.

Defined in:

Parameter:

Core.Set#SET_ZONE CheckZonesSet

Set of zones.

Return value:

self

Set the default ROE for the group.

This is the ROE state gets when the group is spawned or to which it defaults back after a mission.

Defined in:

Parameter:

#number roe

ROE of group. Default is ENUMS.ROE.ReturnFire.

Return value:

self

Set the default ROT for the group.

This is the ROT state gets when the group is spawned or to which it defaults back after a mission.

Defined in:

Parameter:

#number roe

ROE of group. Default is ENUMS.ROT.PassiveDefense.

Return value:

self

Set detection on or off.

Defined in:

Parameter:

#boolean Switch

If true, detection is on. If false or nil, detection is off. Default is off.

Return value:

self

Set current ROE for the group.

Defined in:

Parameter:

#string roe

ROE of group. Default is the value defined by :SetDefaultROE().

Return value:

self

Set ROT for the group.

Defined in:

Parameter:

#string rot

ROT of group. Default is the value defined by :SetDefaultROT().

Return value:

self

Set DCS task.

Enroute tasks are injected automatically.

Defined in:

Parameter:

#table DCSTask

DCS task structure.

Return value:

self

Triggers the FSM event "Status".

Defined in:

Check if all elements of the group have the same status (or are dead).

Defined in:

Parameters:

#string unitname

Name of unit.

status

Check if all elements of the group have the same status (or are dead).

Defined in:

Parameter:

#string status

Status to check.

Return value:

#boolean:

If true, all elements have a similar status.

Check detected units.

Defined in:

Check if group is in zones.

Defined in:

Get next mission.

Defined in:

Return value:

Next mission or nil.

Get next task in queue.

Task needs to be in state SCHEDULED and time must have passed.

Defined in:

Return value:

The next task in line or nil.

Returns a name of a missile category.

Defined in:

Parameter:

#number categorynumber

Number of missile category from weapon missile category enumerator. See https://wiki.hoggitworld.com/view/DCS_Class_Weapon

Return value:

#string:

Missile category name.

Function called when a group is passing a waypoint.

Defined in:

Parameters:

Group that passed the waypoint

#OPSGROUP opsgroup

Ops group object.

#number i

Waypoint number that has been reached.

Set status for all elements (except dead ones).

Defined in:

Parameter:

#string status

Element status.

Sort task queue.

Defined in:

Function called when a task is done.

Defined in:

Parameters:

Group for which the task is done.

#OPSGROUP opsgroup

Ops group.

Task.

Function called when a task is executed.

Defined in:

Parameters:

Group which should execute the task.

#OPSGROUP opsgroup

Ops group.

Task.

Check if all elements of the group have the same status or are dead.

Defined in:

Parameters:

Element.

#string newstatus

New status of element

Airbase if applicable.

Initialize Mission Editor waypoints.

Defined in:

Parameter:

#number n

Waypoint

Triggers the FSM event "Status" after a delay.

Defined in:

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Stop" after a delay.

Stops the OPSGROUP and all its event handlers.

Defined in:

Parameter:

#number delay

Delay in seconds.

On after "CheckZone" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "DetectedUnit" event.

Add newly detected unit to detected units set.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The detected unit.

On after "DetectedUnitNew" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The detected unit.

On after "EnterZone" event.

Sets self.inzones[zonename]=true.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The zone that the group entered.

On after "GotoWaypoint" event.

Group will got to the given waypoint and execute its route from there.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#number n

The goto waypoint number.

On after "LeaveZone" event.

Sets self.inzones[zonename]=false.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The zone that the group entered.

On after "MissionCancel" event.

Cancels the mission.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The mission to be cancelled.

On after "MissionDone" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "MissionExecute" event.

Mission execution began.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The mission table.

On after "MissionStart" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The mission table.

On after "PassingWaypoint" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#number n

Waypoint passed.

#number N

Total number of waypoints.

On after "PauseMission" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "QueueUpdate" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "TaskCancel" event.

Cancels the current task or simply sets the status to DONE if the task is not the current one.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The task to cancel. Default is the current task (if any).

On after "TaskDone" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after TaskExecute event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "UnpauseMission" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On before "MissionStart" event.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The mission table.

On before "TaskDone" event.

Deny transition if task status is PAUSED.

Defined in:

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Field(s)

NAVYGROUP.Corientlast

Last orientation becomes new orientation

#boolean NAVYGROUP.Debug
#table NAVYGROUP.Qintowind

Queue of "into wind" turns.

#boolean NAVYGROUP.adinfinitum

Resume route at first waypoint when final waypoint is reached.

#boolean NAVYGROUP.ai

Ships are always AI.

#number NAVYGROUP.depth

Ordered depth in meters.

#boolean NAVYGROUP.groupinitialized

Init done.

#boolean NAVYGROUP.isAircraft

Define category.

NAVYGROUP.isLateActivated

Is (template) group late activated.

#boolean NAVYGROUP.isUncontrolled

Naval groups cannot be uncontrolled.

NAVYGROUP.lid

Set some string id for output to DCS.log file.

#boolean NAVYGROUP.radioOn

Radio is always on for ships.

NAVYGROUP.speedmax

Max speed in km/h.

NAVYGROUP.template

Get template of group.

#boolean NAVYGROUP.turning

If true, group is currently turning.

#string NAVYGROUP.version

NavyGroup version.

Function(s)

Adds an End state.

Defined in:

Parameter:

State

Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

An sub-process FSM.

#table ReturnEvents

A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

Return value:

The SubFSM.

Adds a score for the FSM to be achieved.

Defined in:

Parameters:

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Adds a score for the FSM_PROCESS to be achieved.

Defined in:

Parameters:

#string From

is the From State of the main process.

#string Event

is the Event of the main process.

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Add a new transition rule to the FSM.

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

#string To

The To state.

Returns the End states.

Defined in:

Defined in:

Parameters:

From

Event

Returns a table of the SubFSM rules defined within the FSM.

Defined in:

Return value:

#table:

Returns a table with the scores defined.

Defined in:

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Returns a table with the Subs defined.

Defined in:

Returns a table of the transition rules defined within the FSM.

Defined in:

Return value:

#table:

Defined in:

Parameter:

State

Defined in:

Parameter:

CallBackTable

Creates a new FSM object.

Defined in:

Return value:

#FSM:

Defined in:

Parameters:

From

Event

Fsm

Sets the start state of the FSM.

Defined in:

Parameter:

#string State

A string defining the start state.

Defined in:

Parameters:

Map

Event

Defined in:

Parameters:

step

trigger

params

EventName

Defined in:

Parameter:

EventName

Defined in:

Parameter:

EventName

Defined in:

Parameters:

Events

EventStructure

Defined in:

Parameters:

ParentFrom

ParentEvent

Defined in:

Parameters:

EventName

...

Defined in:

Parameter:

Current

Defined in:

Parameters:

subs

sub

name

Defined in:

Parameter:

e

Defined in:

Parameter:

e

Defined in:

Parameter:

state

Field(s)

NAVYGROUP.Corientlast

Last orientation becomes new orientation

#boolean NAVYGROUP.Debug
#table NAVYGROUP.Qintowind

Queue of "into wind" turns.

#boolean NAVYGROUP.adinfinitum

Resume route at first waypoint when final waypoint is reached.

#boolean NAVYGROUP.ai

Ships are always AI.

#number NAVYGROUP.depth

Ordered depth in meters.

#boolean NAVYGROUP.groupinitialized

Init done.

#boolean NAVYGROUP.isAircraft

Define category.

NAVYGROUP.isLateActivated

Is (template) group late activated.

#boolean NAVYGROUP.isUncontrolled

Naval groups cannot be uncontrolled.

NAVYGROUP.lid

Set some string id for output to DCS.log file.

#boolean NAVYGROUP.radioOn

Radio is always on for ships.

NAVYGROUP.speedmax

Max speed in km/h.

NAVYGROUP.template

Get template of group.

#boolean NAVYGROUP.turning

If true, group is currently turning.

#string NAVYGROUP.version

NavyGroup version.

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()


Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end
  

Defined in:

Return value:

Occurs when an object is completely destroyed.

initiator : The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed place: Object that the unit landed on.

Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#number:

The ScheduleID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#number:

The ScheduleID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

Set the Class Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

#string Method

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:

-- Switch the tracing On
BASE:TraceOnOff( true )

-- Switch the tracing Off
BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

TODO: Complete DCS#Event structure.
- The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event

Defined in:

Parameter:

event

Navy group element.

Field(s)

#string NAVYGROUP.Element.name

Name of the element, i.e. the unit.

#string NAVYGROUP.Element.typename

Type name.

Function(s)

Navy group element.

Field(s)

Core.Point#COORDINATE NAVYGROUP.IntoWind.Coordinate

Coordinate where we left the route.

#number NAVYGROUP.IntoWind.Heading

Heading the boat will take in degrees.

#number NAVYGROUP.IntoWind.Id

Unique ID of the turn.

#number NAVYGROUP.IntoWind.Offset

Offset angle in degrees.

#boolean NAVYGROUP.IntoWind.Open

Currently active.

#boolean NAVYGROUP.IntoWind.Over

This turn is over.

#number NAVYGROUP.IntoWind.Speed

Speed in knots.

#number NAVYGROUP.IntoWind.Tstart

Time to start.

#number NAVYGROUP.IntoWind.Tstop

Time to stop.

#boolean NAVYGROUP.IntoWind.Uturn

U-turn.

Function(s)