Banner Image

Module Ops.OpsTransport

Ops - Transport assignment for OPS groups and storage.

Main Features:

  • Transport troops from A to B
  • Transport of warehouse storage (fuel, weapons and equipment)
  • Supports ground, naval and airborne (airplanes and helicopters) units as carriers
  • Use combined forces (ground, naval, air) to transport the troops
  • Additional FSM events to hook into and customize your mission design

Example Missions:

Demo missions can be found on github.


Author: funkyfranky


Global(s)

Global OPSTRANSPORT

Victory is the beautiful, bright-colored flower; Transport is the stem without which it could never have blossomed -- Winston Churchill


The OPSTRANSPORT Concept

This class simulates troop transport using carriers such as APCs, ships, helicopters or airplanes.

#OPSTRANSPORT OPSTRANSPORT

Victory is the beautiful, bright-colored flower; Transport is the stem without which it could never have blossomed -- Winston Churchill


The OPSTRANSPORT Concept

This class simulates troop transport using carriers such as APCs, ships, helicopters or airplanes.

The carriers and transported groups need to be OPSGROUPS (see ARMYGROUP, NAVYGROUP and FLIGHTGROUP classes).

IMPORTANT NOTES

  • Cargo groups are not split and distributed into different carrier units. That means that the whole cargo group must fit into one of the carrier units.
  • Cargo groups must be inside the pickup zones to be considered for loading. Groups not inside the pickup zone will not get the command to board.

Troop Transport

A new cargo transport assignment is created with the OPSTRANSPORT.New() function

local opstransport=OPSTRANSPORT:New(Cargo, PickupZone, DeployZone)

Here Cargo is an object of the troops to be transported. This can be a GROUP, OPSGROUP, SET_GROUP or SET_OPSGROUP object.

PickupZone is the zone where the troops are picked up by the transport carriers. Note that troops must be inside this zone to be considered for loading!

DeployZone is the zone where the troops are transported to.

Assign to Carrier(s)

A transport can be assigned to one or multiple carrier OPSGROUPS with this Ops.OpsGroup#OPSGROUP.AddOpsTransport() function

myopsgroup:AddOpsTransport(opstransport)

There is no restriction to the type of the carrier. It can be a ground group (e.g. an APC), a helicopter, an airplane or even a ship.

You can also mix carrier types. For instance, you can assign the same transport to APCs and helicopters. Or to helicopters and airplanes.

Storage Transport

An instance of the OPSTRANSPORT class is created similarly to the troop transport case. However, the first parameter is nil as not troops are transported.

local storagetransport=OPSTRANSPORT:New(nil, PickupZone, DeployZone) 

Defining Storage

The storage warehouses from which the cargo is taken and to which the cargo is delivered have to be specified

storagetransport:AddCargoStorage(berlinStorage, batumiStorage, STORAGE.Liquid.JETFUEL, 1000)

Here berlinStorage and batumiStorage are Wrapper.Storage#STORAGE objects of DCS warehouses.

Furthermore, that type of cargo (liquids or weapons/equipment) and the amount has to be specified. If weapons/equipment is the cargo, we also need to specify the weight per storage item as this cannot be retrieved from the DCS API and is not stored in any MOOSE database.

storagetransport:AddCargoStorage(berlinStorage, batumiStorage, ENUMS.Storage.weapons.bombs.Mk_82, 9, 230)     

Finally, the transport is assigned to one or multiple groups, which carry out the transport

myopsgroup:AddOpsTransport(storagetransport)

Examples

A carrier group is assigned to transport infantry troops from zone "Zone Kobuleti X" to zone "Zone Alpha".

-- Carrier group.
local carrier=ARMYGROUP:New("TPz Fuchs Group")

-- Set of groups to transport.
local infantryset=SET_GROUP:New():FilterPrefixes("Infantry Platoon Alpha"):FilterOnce()

-- Cargo transport assignment.
local opstransport=OPSTRANSPORT:New(infantryset, ZONE:New("Zone Kobuleti X"), ZONE:New("Zone Alpha"))

-- Assign transport to carrier.
carrier:AddOpsTransport(opstransport)

Global _OPSTRANSPORTID

Transport ID.

#number _OPSTRANSPORTID

Transport ID.

Type(s)

Fields and Methods inherited from OPSTRANSPORT Description

OPSTRANSPORT:AddAsset(Asset, TransportZoneCombo)

Add carrier asset to transport.

OPSTRANSPORT:AddAssetCargo(Asset, TransportZoneCombo)

Add cargo asset.

OPSTRANSPORT:AddCargoGroups(GroupSet, TransportZoneCombo, DisembarkActivation, DisembarkZone, DisembarkCarriers)

Add cargo groups to be transported.

OPSTRANSPORT:AddCargoStorage(StorageFrom, StorageTo, CargoType, CargoAmount, CargoWeight, TransportZoneCombo)

Add cargo warehouse storage to be transported.

OPSTRANSPORT:AddConditionStart(ConditionFunction, ...)

Add start condition.

OPSTRANSPORT:AddLegion(Legion)

Add LEGION to the transport.

OPSTRANSPORT:AddPathTransport(PathGroup, Radius, TransportZoneCombo, Reversed)

Add path used for transportation from the pickup to the deploy zone.

OPSTRANSPORT:AddTransportZoneCombo(CargoGroups, PickupZone, DeployZone)

Add pickup and deploy zone combination.

OPSTRANSPORT:Cancel()

Triggers the FSM event "Cancel".

OPSTRANSPORT.CargoType

OPSTRANSPORT.ClassName

Name of the class.

OPSTRANSPORT:DelAsset(Asset)

Delete carrier asset from transport.

OPSTRANSPORT:Delivered()

Triggers the FSM event "Delivered".

OPSTRANSPORT:EvalConditionsAll(Conditions)

Check if all given condition are true.

OPSTRANSPORT:Executing()

Triggers the FSM event "Executing".

OPSTRANSPORT:FindTransferCarrierForCargo(CargoGroup, Zone, DisembarkCarriers, DeployAirbase)

Find transfer carrier element for cargo group.

OPSTRANSPORT:GetCargoOpsGroups(Delivered, Carrier, TransportZoneCombo)

Get (all) cargo Ops.OpsGroup#OPSGROUPs.

OPSTRANSPORT:GetCargoStorages(Delivered, Carrier, TransportZoneCombo)

Get (all) cargo Ops.OpsGroup#OPSGROUPs.

OPSTRANSPORT:GetCargoTotalWeight(Cargo, IncludeReserved)

Get total weight.

OPSTRANSPORT:GetCargos(TransportZoneCombo, Carrier, Delivered)

Get cargos.

OPSTRANSPORT:GetCarrierTransportStatus(CarrierGroup)

Get carrier transport status.

OPSTRANSPORT:GetCarriers()

Get carriers.

OPSTRANSPORT:GetDeployZone(TransportZoneCombo)

Get deploy zone.

OPSTRANSPORT:GetDisembarkActivation(TransportZoneCombo)

Get disembark activation.

OPSTRANSPORT:GetDisembarkCarriers(TransportZoneCombo)

Get transfer carrier(s).

OPSTRANSPORT:GetDisembarkInUtero(TransportZoneCombo)

Get disembark in utero.

OPSTRANSPORT:GetDisembarkZone(TransportZoneCombo)

Get disembark zone.

OPSTRANSPORT:GetEmbarkZone(TransportZoneCombo)

Get embark zone.

OPSTRANSPORT:GetLegionStatus(Legion)

Get LEGION transport status.

OPSTRANSPORT:GetNcargoDelivered()

Get number of delivered cargo groups.

OPSTRANSPORT:GetNcargoTotal()

Get number of cargo groups.

OPSTRANSPORT:GetNcarrier()

Get number of carrier groups assigned for this transport.

OPSTRANSPORT:GetPickupZone(TransportZoneCombo)

Get pickup zone.

OPSTRANSPORT:GetRequiredCargos(TransportZoneCombo)

Get required cargos.

OPSTRANSPORT:GetRequiredCarriers()

Get the number of required carrier groups for an OPSTRANSPORT assignment.

OPSTRANSPORT:GetTZCofCargo(GroupName)

Get transport zone combo of cargo group.

OPSTRANSPORT:GetUID()

Get unique ID of the transport assignment.

OPSTRANSPORT:IsCargoDelivered(GroupName)

Check if a cargo group was delivered.

OPSTRANSPORT:IsCarrier(CarrierGroup)

Check if an OPS group is assigned as carrier for this transport.

OPSTRANSPORT:IsDelivered(Nmin)

Check if all cargo was delivered (or is dead).

OPSTRANSPORT:IsExecuting()

Check if state is EXECUTING.

OPSTRANSPORT:IsPlanned()

Check if state is PLANNED.

OPSTRANSPORT:IsQueued(Legion)

Check if state is QUEUED.

OPSTRANSPORT:IsReadyToGo()

Check if transport is ready to be started.

OPSTRANSPORT:IsRequested(Legion)

Check if state is REQUESTED.

OPSTRANSPORT:IsScheduled()

Check if state is SCHEDULED.

OPSTRANSPORT:Loaded(OpsGroupCargo, OpsGroupCarrier, CarrierElement)

Triggers the FSM event "Loaded".

OPSTRANSPORT.Ncargo

Total number of cargo groups.

OPSTRANSPORT.NcargoDead

Totalnumber of dead cargo groups.

OPSTRANSPORT.Ncarrier

Total number of assigned carriers.

OPSTRANSPORT.NcarrierDead

Total number of dead carrier groups

OPSTRANSPORT.Ndelivered

Total number of cargo groups delivered.

OPSTRANSPORT:New(CargoGroups, PickupZone, DeployZone)

Create a new OPSTRANSPORT class object.

OPSTRANSPORT:OnAfterCancel(From, Event, To)

On after "Cancel" event.

OPSTRANSPORT:OnAfterDelivered(From, Event, To)

On after "Delivered" event.

OPSTRANSPORT:OnAfterExecuting(From, Event, To)

On after "Executing" event.

OPSTRANSPORT:OnAfterLoaded(From, Event, To, OpsGroupCargo, OpsGroupCarrier, CarrierElement)

On after "Loaded" event.

OPSTRANSPORT:OnAfterPlanned(From, Event, To)

On after "Planned" event.

OPSTRANSPORT:OnAfterQueued(From, Event, To)

On after "Queued" event.

OPSTRANSPORT:OnAfterRequested(From, Event, To)

On after "Requested" event.

OPSTRANSPORT:OnAfterScheduled(From, Event, To)

On after "Scheduled" event.

OPSTRANSPORT:OnAfterUnloaded(From, Event, To, OpsGroupCargo, OpsGroupCarrier)

On after "Unloaded" event.

OPSTRANSPORT:Planned()

Triggers the FSM event "Planned".

OPSTRANSPORT:Queued()

Triggers the FSM event "Queued".

OPSTRANSPORT:RemoveLegion(Legion)

Remove LEGION from transport.

OPSTRANSPORT:Requested()

Triggers the FSM event "Requested".

OPSTRANSPORT:Scheduled()

Triggers the FSM event "Scheduled".

OPSTRANSPORT:SetCarrierTransportStatus(CarrierGroup, Status)

Add a carrier assigned for this transport.

OPSTRANSPORT:SetDeployZone(DeployZone, TransportZoneCombo)

Set deploy zone.

OPSTRANSPORT:SetDisembarkActivation(Active, TransportZoneCombo)

Set activation status of group when disembarked from transport carrier.

OPSTRANSPORT:SetDisembarkCarriers(Carriers, TransportZoneCombo)

Set/add transfer carrier(s).

OPSTRANSPORT:SetDisembarkInUtero(InUtero, TransportZoneCombo)

Set if group remains in utero after disembarkment from carrier.

OPSTRANSPORT:SetDisembarkZone(DisembarkZone, TransportZoneCombo)

Set disembark zone.

OPSTRANSPORT:SetEmbarkZone(EmbarkZone, TransportZoneCombo)

Set embark zone.

OPSTRANSPORT:SetFormationPickup(Formation, TransportZoneCombo)

Set pickup formation.

OPSTRANSPORT:SetFormationTransport(Formation, TransportZoneCombo)

Set transport formation.

OPSTRANSPORT:SetLegionStatus(Legion, Status)

Set LEGION transport status.

OPSTRANSPORT:SetPickupZone(PickupZone, TransportZoneCombo)

Set pickup zone.

OPSTRANSPORT:SetPriority(Prio, Importance, Urgent)

Set mission priority and (optional) urgency.

OPSTRANSPORT:SetRequiredCargos(Cargos, TransportZoneCombo)

Set required cargo.

OPSTRANSPORT:SetRequiredCarriers(NcarriersMin, NcarriersMax)

Set number of required carrier groups for an OPSTRANSPORT assignment.

OPSTRANSPORT:SetTime(ClockStart, ClockStop)

Set transport start and stop time.

OPSTRANSPORT:SetVerbosity(Verbosity)

Set verbosity.

OPSTRANSPORT.Status

OPSTRANSPORT:StatusUpdate()

Triggers the FSM event "StatusUpdate".

OPSTRANSPORT.Tover

OPSTRANSPORT.Tstart

Start time in abs. seconds.

OPSTRANSPORT.Tstop

Stop time in abs. seconds. Default #nil (never stops).

OPSTRANSPORT:Unloaded(OpsGroupCargo, OpsGroupCarrier)

Triggers the FSM event "Unloaded".

OPSTRANSPORT:_AddCarrier(CarrierGroup)

Add a carrier assigned for this transport.

OPSTRANSPORT:_AddDisembarkCarriers(Carriers, Table)

Set/add transfer carrier(s).

OPSTRANSPORT:_CheckDelivered()

Check if all cargo of this transport assignment was delivered.

OPSTRANSPORT:_CheckRequiredCargos(TransportZoneCombo, CarrierGroup)

Check if all required cargos are loaded.

OPSTRANSPORT:_CountCargosInZone(Zone, Delivered, Carrier, TransportZoneCombo)

Count how many cargo groups are inside a zone.

OPSTRANSPORT:_CreateCargoGroupData(group, TransportZoneCombo, DisembarkActivation, DisembarkZone, DisembarkCarriers)

Create a cargo group data structure.

OPSTRANSPORT:_CreateCargoStorage(StorageFrom, StorageTo, CargoType, CargoAmount, CargoWeight, TransportZoneCombo)

Create a cargo group data structure.

OPSTRANSPORT:_DelCarrier(CarrierGroup, Delay)

Remove group from the current carrier list/table.

OPSTRANSPORT:_GetCarrierNames()

Get a list of alive carriers.

OPSTRANSPORT:_GetFormationDefault(OpsGroup)

Get pickup formation.

OPSTRANSPORT:_GetFormationPickup(TransportZoneCombo, OpsGroup)

Get pickup formation.

OPSTRANSPORT:_GetFormationTransport(TransportZoneCombo, OpsGroup)

Get transport formation.

OPSTRANSPORT:_GetOpsGroupFromObject(Object)

Get an OPSGROUP from a given OPSGROUP or GROUP object.

OPSTRANSPORT:_GetPathTransport(Category, TransportZoneCombo)

Get a path for transportation.

OPSTRANSPORT:_GetTransportZoneCombo(Carrier)

Get a transport zone combination (TZC) for a carrier group.

OPSTRANSPORT:__Cancel(delay)

Triggers the FSM event "Cancel" after a delay.

OPSTRANSPORT:__Delivered(delay)

Triggers the FSM event "Delivered" after a delay.

OPSTRANSPORT:__Executing(delay)

Triggers the FSM event "Executing" after a delay.

OPSTRANSPORT:__Loaded(delay, OpsGroupCargo, OpsGroupCarrier, CarrierElement)

Triggers the FSM event "Loaded" after a delay.

OPSTRANSPORT:__Planned(delay)

Triggers the FSM event "Planned" after a delay.

OPSTRANSPORT:__Queued(delay)

Triggers the FSM event "Queued" after a delay.

OPSTRANSPORT:__Requested(delay)

Triggers the FSM event "Requested" after a delay.

OPSTRANSPORT:__Scheduled(delay)

Triggers the FSM event "Scheduled" after a delay.

OPSTRANSPORT:__StatusUpdate(delay)

Triggers the FSM event "Status" after a delay.

OPSTRANSPORT:__Unloaded(delay, OpsGroupCargo, OpsGroupCarrier)

Triggers the FSM event "Unloaded" after a delay.

OPSTRANSPORT.assets

Warehouse assets assigned for this transport.

OPSTRANSPORT.assetsCargo

OPSTRANSPORT.cargocounter

Running number to generate cargo UIDs.

OPSTRANSPORT.carrierTransportStatus

Status of each carrier.

OPSTRANSPORT.carriers

Carriers assigned for this transport.

OPSTRANSPORT.chief

Chief of the transport.

OPSTRANSPORT.commander

Commander of the transport.

OPSTRANSPORT.conditionStart

Start conditions.

OPSTRANSPORT.duration

Duration (Tstop-Tstart) of the transport in seconds.

OPSTRANSPORT.formationArmy

Default formation for ground vehicles.

OPSTRANSPORT.formationHelo

Default formation for helicopters.

OPSTRANSPORT.formationPlane

Default formation for airplanes.

OPSTRANSPORT.importance

Importance of this transport. Smaller=higher.

OPSTRANSPORT.legions

Assigned legions.

OPSTRANSPORT.lid

Log ID.

OPSTRANSPORT.mission

The mission attached to this transport.

OPSTRANSPORT.nCarriersMax

OPSTRANSPORT.nCarriersMin

OPSTRANSPORT:onafterCancel(From, Event, To)

On after "Cancel" event.

OPSTRANSPORT:onafterDeadCarrierAll(From, Event, To)

On after "DeadCarrierAll" event.

OPSTRANSPORT:onafterDeadCarrierGroup(From, Event, To, OpsGroup)

On after "DeadCarrierGroup" event.

OPSTRANSPORT:onafterDelivered(From, Event, To)

On after "Delivered" event.

OPSTRANSPORT:onafterExecuting(From, Event, To)

On after "Executing" event.

OPSTRANSPORT:onafterLoaded(From, Event, To, OpsGroupCargo, OpsGroupCarrier, CarrierElement)

On after "Loaded" event.

OPSTRANSPORT:onafterPlanned(From, Event, To)

On after "Planned" event.

OPSTRANSPORT:onafterScheduled(From, Event, To)

On after "Scheduled" event.

OPSTRANSPORT:onafterStatusUpdate(From, Event, To)

On after "StatusUpdate" event.

OPSTRANSPORT:onafterUnloaded(From, Event, To, OpsGroupCargo, OpsGroupCarrier)

On after "Unloaded" event.

OPSTRANSPORT:onbeforeDelivered(From, Event, To)

On before "Delivered" event.

OPSTRANSPORT.opszone

OPS zone.

OPSTRANSPORT.prio

Priority of this transport. Should be a number between 0 (high prio) and 100 (low prio).

OPSTRANSPORT.requestID

The ID of the queued warehouse request. Necessary to cancel the request if the transport was cancelled before the request is processed.

OPSTRANSPORT.statusCommander

Staus of the COMMANDER.

OPSTRANSPORT.statusLegion

Transport status of all assigned LEGIONs.

OPSTRANSPORT.tzCombos

Table of transport zone combos. Each element of the table is of type #OPSTRANSPORT.TransportZoneCombo.

OPSTRANSPORT.tzcCounter

Running number of added transport zone combos.

OPSTRANSPORT.tzcDefault

Default transport zone combo.

OPSTRANSPORT.uid

Unique ID of the transport.

OPSTRANSPORT.urgent

If true, transport is urgent.

OPSTRANSPORT.verbose

Verbosity level.

OPSTRANSPORT.version

Army Group version.

Fields and Methods inherited from FSM Description

OPSTRANSPORT:AddEndState(State)

Adds an End state.

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

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

OPSTRANSPORT:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

OPSTRANSPORT:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

OPSTRANSPORT.CallScheduler

OPSTRANSPORT.Events

OPSTRANSPORT:GetCurrentState()

Get current state.

OPSTRANSPORT:GetEndStates()

Returns the End states.

OPSTRANSPORT:GetProcess(From, Event)

OPSTRANSPORT:GetProcesses()

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

OPSTRANSPORT:GetScores()

Returns a table with the scores defined.

OPSTRANSPORT:GetStartState()

Returns the start state of the FSM.

OPSTRANSPORT:GetState()

Get current state.

OPSTRANSPORT:GetSubs()

Returns a table with the Subs defined.

OPSTRANSPORT:GetTransitions()

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

OPSTRANSPORT:Is(State)

Check if FSM is in state.

OPSTRANSPORT:LoadCallBacks(CallBackTable)

Load call backs.

OPSTRANSPORT:New()

Creates a new FSM object.

OPSTRANSPORT.Scores

OPSTRANSPORT:SetProcess(From, Event, Fsm)

OPSTRANSPORT:SetStartState(State)

Sets the start state of the FSM.

OPSTRANSPORT._EndStates

OPSTRANSPORT._EventSchedules

OPSTRANSPORT._Processes

OPSTRANSPORT._Scores

OPSTRANSPORT._StartState

OPSTRANSPORT._Transitions

OPSTRANSPORT:_add_to_map(Map, Event)

Add to map.

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

Call handler.

OPSTRANSPORT:_create_transition(EventName)

Create transition.

OPSTRANSPORT:_delayed_transition(EventName)

Delayed transition.

OPSTRANSPORT:_eventmap(Events, EventStructure)

Event map.

OPSTRANSPORT:_gosub(ParentFrom, ParentEvent)

Go sub.

OPSTRANSPORT:_handler(EventName, ...)

Handler.

OPSTRANSPORT:_isendstate(Current)

Is end state.

OPSTRANSPORT:_submap(subs, sub, name)

Sub maps.

OPSTRANSPORT:can(e)

Check if can do an event.

OPSTRANSPORT:cannot(e)

Check if cannot do an event.

OPSTRANSPORT.current

OPSTRANSPORT.endstates

OPSTRANSPORT:is(State, state)

Check if FSM is in state.

OPSTRANSPORT.options

OPSTRANSPORT.subs

Fields and Methods inherited from OPSTRANSPORT.CargoType Description

OPSTRANSPORT.CargoType.OPSGROUP

Cargo is an OPSGROUP.

OPSTRANSPORT.CargoType.STORAGE

Cargo is storage of DCS warehouse.

Fields and Methods inherited from OPSTRANSPORT.Condition Description

OPSTRANSPORT.Condition.arg

Optional arguments passed to the condition callback function.

OPSTRANSPORT.Condition.func

Callback function to check for a condition. Should return a #boolean.

Fields and Methods inherited from OPSTRANSPORT.Path Description

OPSTRANSPORT.Path.category

Category for which carriers this path is used.

OPSTRANSPORT.Path.radius

Radomization radius for waypoints in meters. Default 0 m.

OPSTRANSPORT.Path.reverse

If true, path is used in reversed order.

OPSTRANSPORT.Path.waypoints

Table of waypoints.

Fields and Methods inherited from OPSTRANSPORT.Status Description

OPSTRANSPORT.Status.CANCELLED

Transport was cancelled.

OPSTRANSPORT.Status.DELIVERED

Transport was delivered.

OPSTRANSPORT.Status.EXECUTING

Transport is being executed.

OPSTRANSPORT.Status.FAILED

Transport failed.

OPSTRANSPORT.Status.PLANNED

Planning state.

OPSTRANSPORT.Status.QUEUED

Queued state.

OPSTRANSPORT.Status.REQUESTED

Requested state.

OPSTRANSPORT.Status.SCHEDULED

Transport is scheduled in the cargo queue.

OPSTRANSPORT.Status.SUCCESS

Transport was a success.

Fields and Methods inherited from OPSTRANSPORT.Storage Description

OPSTRANSPORT.Storage.cargoAmount

Amount of cargo that should be transported.

OPSTRANSPORT.Storage.cargoDelivered

Amount of cargo that has been delivered.

OPSTRANSPORT.Storage.cargoLoaded

Amount of cargo that is loading.

OPSTRANSPORT.Storage.cargoLost

Amount of cargo that was lost.

OPSTRANSPORT.Storage.cargoReserved

Amount of cargo that is reserved for a carrier group.

OPSTRANSPORT.Storage.cargoType

Type of cargo.

OPSTRANSPORT.Storage.cargoWeight

Weight of one single cargo item in kg. Default 1 kg.

OPSTRANSPORT.Storage.storageFrom

Storage from.

OPSTRANSPORT.Storage.storageTo

Storage To.

Fields and Methods inherited from OPSTRANSPORT.TransportZoneCombo Description

OPSTRANSPORT.TransportZoneCombo.Cargos

Cargo groups of the TZ combo. Each element is of type Ops.OpsGroup#OPSGROUP.CargoGroup.

OPSTRANSPORT.TransportZoneCombo.DeployAirbase

Airbase for deploy.

OPSTRANSPORT.TransportZoneCombo.DeployZone

Deploy zone.

OPSTRANSPORT.TransportZoneCombo.DisembarkCarriers

Carriers where the cargo is directly disembarked to.

OPSTRANSPORT.TransportZoneCombo.DisembarkZone

Zone where the troops are disembared to.

OPSTRANSPORT.TransportZoneCombo.EmbarkZone

Embark zone if different from pickup zone.

OPSTRANSPORT.TransportZoneCombo.Ncargo

Number of cargos assigned. This is a running number and not decreased if cargo is delivered or dead.

OPSTRANSPORT.TransportZoneCombo.Ncarriers

Number of carrier groups using this transport zone.

OPSTRANSPORT.TransportZoneCombo.PickupAirbase

Airbase for pickup.

OPSTRANSPORT.TransportZoneCombo.PickupFormation

Formation used to pickup.

OPSTRANSPORT.TransportZoneCombo.PickupPaths

Paths for pickup.

OPSTRANSPORT.TransportZoneCombo.PickupZone

Pickup zone.

OPSTRANSPORT.TransportZoneCombo.RequiredCargos

Required cargos.

OPSTRANSPORT.TransportZoneCombo.TransportFormation

Formation used to transport.

OPSTRANSPORT.TransportZoneCombo.TransportPaths

Path for Transport. Each elment of the table is of type #OPSTRANSPORT.Path.

OPSTRANSPORT.TransportZoneCombo.assets

Cargo assets.

OPSTRANSPORT.TransportZoneCombo.assetsCargo

OPSTRANSPORT.TransportZoneCombo.disembarkActivation

If true, troops are spawned in late activated state when disembarked from carrier.

OPSTRANSPORT.TransportZoneCombo.disembarkInUtero

If true, troops are disembarked "in utero".

OPSTRANSPORT.TransportZoneCombo.disembarkToCarriers

If true, cargo is supposed to embark to another carrier.

OPSTRANSPORT.TransportZoneCombo.uid

Unique ID of the TZ combo.

OPSTRANSPORT class.

Field(s)

#string OPSTRANSPORT.ClassName

Name of the class.

#number OPSTRANSPORT.Ncargo

Total number of cargo groups.

#number OPSTRANSPORT.NcargoDead

Totalnumber of dead cargo groups.

#number OPSTRANSPORT.Ncarrier

Total number of assigned carriers.

#number OPSTRANSPORT.NcarrierDead

Total number of dead carrier groups

#number OPSTRANSPORT.Ndelivered

Total number of cargo groups delivered.

OPSTRANSPORT.Tover

Time stamp.

#number OPSTRANSPORT.Tstart

Start time in abs. seconds.

#number OPSTRANSPORT.Tstop

Stop time in abs. seconds. Default #nil (never stops).

#table OPSTRANSPORT.assets

Warehouse assets assigned for this transport.

#number OPSTRANSPORT.cargocounter

Running number to generate cargo UIDs.

#table OPSTRANSPORT.carrierTransportStatus

Status of each carrier.

#table OPSTRANSPORT.carriers

Carriers assigned for this transport.

Ops.Chief#CHIEF OPSTRANSPORT.chief

Chief of the transport.

Ops.Commander#COMMANDER OPSTRANSPORT.commander

Commander of the transport.

#table OPSTRANSPORT.conditionStart

Start conditions.

#number OPSTRANSPORT.duration

Duration (Tstop-Tstart) of the transport in seconds.

#string OPSTRANSPORT.formationArmy

Default formation for ground vehicles.

#string OPSTRANSPORT.formationHelo

Default formation for helicopters.

#string OPSTRANSPORT.formationPlane

Default formation for airplanes.

#number OPSTRANSPORT.importance

Importance of this transport. Smaller=higher.

#table OPSTRANSPORT.legions

Assigned legions.

#string OPSTRANSPORT.lid

Log ID.

Ops.Auftrag#AUFTRAG OPSTRANSPORT.mission

The mission attached to this transport.

#number OPSTRANSPORT.prio

Priority of this transport. Should be a number between 0 (high prio) and 100 (low prio).

#table OPSTRANSPORT.requestID

The ID of the queued warehouse request. Necessary to cancel the request if the transport was cancelled before the request is processed.

#string OPSTRANSPORT.statusCommander

Staus of the COMMANDER.

#table OPSTRANSPORT.statusLegion

Transport status of all assigned LEGIONs.

#table OPSTRANSPORT.tzCombos

Table of transport zone combos. Each element of the table is of type #OPSTRANSPORT.TransportZoneCombo.

#number OPSTRANSPORT.tzcCounter

Running number of added transport zone combos.

#number OPSTRANSPORT.uid

Unique ID of the transport.

#boolean OPSTRANSPORT.urgent

If true, transport is urgent.

#number OPSTRANSPORT.verbose

Verbosity level.

#string OPSTRANSPORT.version

Army Group version.

Function(s)

Add carrier asset to transport.

Defined in:

OPSTRANSPORT

Parameters:

The asset to be added.

Transport zone combo.

Return value:

Add cargo asset.

Defined in:

OPSTRANSPORT

Parameters:

The asset to be added.

Transport zone combo.

Return value:

Add cargo groups to be transported.

Defined in:

OPSTRANSPORT

Parameters:

Set of groups to be transported. Can also be passed as a single GROUP or OPSGROUP object.

Transport zone combo.

#boolean DisembarkActivation

If true, cargo group is activated when disembarked. If false, cargo groups are late activated when disembarked. Default nil (usually activated).

Core.Zone#ZONE DisembarkZone

Zone where the groups disembark to.

Core.Set#SET_OPSGROUP DisembarkCarriers

Carrier groups where the cargo directly disembarks to.

Return value:

Add cargo warehouse storage to be transported.

This adds items such as fuel, weapons and other equipment, which is to be transported from one DCS warehouse to another. For weapons and equipment, the weight per item has to be specified explicitly as these cannot be retrieved by the DCS API. For liquids the default value of 1 kg per item should be used as the amount of liquid is already given in kg.

Defined in:

OPSTRANSPORT

Parameters:

Storage warehouse from which the cargo is taken.

Storage warehouse to which the cargo is delivered.

#string CargoType

Type of cargo, e.g. "weapons.bombs.Mk_84" or liquid type as #number.

#number CargoAmount

Amount of cargo. Liquids in kg.

#number CargoWeight

Weight of a single cargo item in kg. Default 1 kg.

Transport zone combo if other than default.

Return value:

Add start condition.

Defined in:

OPSTRANSPORT

Parameters:

#function ConditionFunction

Function that needs to be true before the transport can be started. Must return a #boolean.

...

Condition function arguments if any.

Return value:

Add LEGION to the transport.

Defined in:

OPSTRANSPORT

Parameter:

The legion.

Return value:

Add path used for transportation from the pickup to the deploy zone.

If multiple paths are defined, a random one is chosen. The path is retrieved from the waypoints of a given group. NOTE that the category group defines for which carriers this path is valid. For example, if you specify a GROUND group to provide the waypoints, only assigned GROUND carriers will use the path.

Defined in:

OPSTRANSPORT

Parameters:

A (late activated) GROUP defining a transport path by their waypoints.

#number Radius

Randomization radius in meters. Default 0 m.

Transport Zone combo.

Reversed

Return value:

Add pickup and deploy zone combination.

Defined in:

OPSTRANSPORT

Parameters:

Core.Set#SET_GROUP CargoGroups

Groups to be transported as cargo. Can also be a single Wrapper.Group#GROUP or Ops.OpsGroup#OPSGROUP object.

Core.Zone#ZONE PickupZone

Zone where the troops are picked up.

Core.Zone#ZONE DeployZone

Zone where the troops are picked up.

Return value:

Transport zone table.

Triggers the FSM event "Cancel".

Defined in:

OPSTRANSPORT

Delete carrier asset from transport.

Defined in:

OPSTRANSPORT

Parameter:

The asset to be removed.

Return value:

Triggers the FSM event "Delivered".

Defined in:

OPSTRANSPORT

Check if all given condition are true.

Defined in:

OPSTRANSPORT

Parameter:

#table Conditions

Table of conditions.

Return value:

#boolean:

If true, all conditions were true. Returns false if at least one condition returned false.

Triggers the FSM event "Executing".

Defined in:

OPSTRANSPORT

Find transfer carrier element for cargo group.

Defined in:

OPSTRANSPORT

Parameters:

The cargo group that needs to be loaded into a carrier unit/element of the carrier group.

(Optional) Zone where the carrier must be in.

#table DisembarkCarriers

Disembark carriers.

Wrapper.Airbase#AIRBASE DeployAirbase

Airbase where to deploy.

Return values:

New carrier element for cargo or nil.

New carrier group for cargo or nil.

Get (all) cargo Ops.OpsGroup#OPSGROUPs.

Optionally, only delivered or undelivered groups can be returned.

Defined in:

OPSTRANSPORT

Parameters:

#boolean Delivered

If true, only delivered groups are returned. If false only undelivered groups are returned. If nil, all groups are returned.

(Optional) Only count cargo groups that fit into the given carrier group. Current cargo is not a factor.

Transport zone combo.

Return value:

#table:

Cargo Ops groups. Can be and empty table {}.

Get (all) cargo Ops.OpsGroup#OPSGROUPs.

Optionally, only delivered or undelivered groups can be returned.

Defined in:

OPSTRANSPORT

Parameters:

#boolean Delivered

If true, only delivered groups are returned. If false only undelivered groups are returned. If nil, all groups are returned.

(Optional) Only count cargo groups that fit into the given carrier group. Current cargo is not a factor.

Transport zone combo.

Return value:

#table:

Cargo Ops groups. Can be and empty table {}.

Get total weight.

Defined in:

OPSTRANSPORT

Parameters:

#boolean IncludeReserved

Include reserved cargo.

Return value:

#number:

Weight in kg.

Get cargos.

Defined in:

OPSTRANSPORT

Parameters:

Transport zone combo.

Specific carrier.

#boolean Delivered

Delivered status.

Return value:

#table:

Cargos.

Get carrier transport status.

Defined in:

OPSTRANSPORT

Parameter:

Ops.OpsGroup#OPSGROUP CarrierGroup

Carrier OPSGROUP.

Return value:

#string:

Carrier status.

Get carriers.

Defined in:

OPSTRANSPORT

Return value:

#table:

Carrier Ops groups.

Get deploy zone.

Defined in:

OPSTRANSPORT

Parameter:

Transport zone combo.

Return value:

Zone where the troops are deployed.

Get disembark activation.

Defined in:

OPSTRANSPORT

Parameter:

Transport zone combo.

Return value:

#boolean:

If true, groups are spawned in late activated state.

Get transfer carrier(s).

These are carrier groups, where the cargo is directly loaded into when disembarked.

Defined in:

OPSTRANSPORT

Parameter:

Transport zone combo.

Return value:

#table:

Table of carrier OPS groups.

Get disembark in utero.

Defined in:

OPSTRANSPORT

Parameter:

Transport zone combo.

Return value:

#boolean:

If true, groups stay in utero after disembarkment.

Get disembark zone.

Defined in:

OPSTRANSPORT

Parameter:

Transport zone combo.

Return value:

Zone where the troops are disembarked to.

Get embark zone.

Defined in:

OPSTRANSPORT

Parameter:

Transport zone combo.

Return value:

Zone where the troops are embarked from.

Get LEGION transport status.

Defined in:

OPSTRANSPORT

Parameter:

The legion.

Return value:

#string:

status Current status.

Get number of delivered cargo groups.

Defined in:

OPSTRANSPORT

Return value:

#number:

Total number of delivered cargo groups.

Get number of cargo groups.

Defined in:

OPSTRANSPORT

Return value:

#number:

Total number of cargo groups.

Get number of carrier groups assigned for this transport.

Defined in:

OPSTRANSPORT

Return value:

#number:

Total number of carrier groups.

Get pickup zone.

Defined in:

OPSTRANSPORT

Parameter:

Transport zone combo.

Return value:

Zone where the troops are picked up.

Get required cargos.

This is a list of cargo groups that need to be loaded before the first transport will start.

Defined in:

OPSTRANSPORT

Parameter:

Transport zone combo.

Return value:

#table:

Table of required cargo ops groups.

Get the number of required carrier groups for an OPSTRANSPORT assignment.

Only used if transport is assigned at LEGION or higher level.

Defined in:

OPSTRANSPORT

Return values:

#number:

Number of carriers at least required.

#number:

Number of carriers at most used for transportation.

Get transport zone combo of cargo group.

Defined in:

OPSTRANSPORT

Parameter:

#string GroupName

Group name of cargo.

Return value:

TransportZoneCombo Transport zone combo.

Get unique ID of the transport assignment.

Defined in:

OPSTRANSPORT

Return value:

#number:

UID.

Check if a cargo group was delivered.

Defined in:

OPSTRANSPORT

Parameter:

#string GroupName

Name of the group.

Return value:

#boolean:

If true, cargo was delivered.

Check if an OPS group is assigned as carrier for this transport.

Defined in:

OPSTRANSPORT

Parameter:

Ops.OpsGroup#OPSGROUP CarrierGroup

Potential carrier OPSGROUP.

Return value:

#boolean:

If true, group is an assigned carrier.

Check if all cargo was delivered (or is dead).

Defined in:

OPSTRANSPORT

Parameter:

#number Nmin

Number of groups that must be actually delivered (and are not dead). Default 0.

Return value:

#boolean:

If true, all possible cargo was delivered.

Check if state is EXECUTING.

Defined in:

OPSTRANSPORT

Return value:

#boolean:

If true, status is EXECUTING.

Check if state is PLANNED.

Defined in:

OPSTRANSPORT

Return value:

#boolean:

If true, status is PLANNED.

Check if state is QUEUED.

Defined in:

OPSTRANSPORT

Parameter:

(Optional) Check if transport is queued at this legion.

Return value:

#boolean:

If true, status is QUEUED.

Check if transport is ready to be started.

  • Start time passed.
  • Stop time did not pass already.
  • All start conditions are true.

Defined in:

OPSTRANSPORT

Return value:

#boolean:

If true, mission can be started.

Check if state is REQUESTED.

Defined in:

OPSTRANSPORT

Parameter:

(Optional) Check if transport is queued at this legion.

Return value:

#boolean:

If true, status is REQUESTED.

Check if state is SCHEDULED.

Defined in:

OPSTRANSPORT

Return value:

#boolean:

If true, status is SCHEDULED.

Triggers the FSM event "Loaded".

Defined in:

OPSTRANSPORT

Parameters:

Ops.OpsGroup#OPSGROUP OpsGroupCargo

OPSGROUP that was loaded into a carrier.

Ops.OpsGroup#OPSGROUP OpsGroupCarrier

OPSGROUP that was loaded into a carrier.

Carrier element.

Create a new OPSTRANSPORT class object.

Essential input are the troops that should be transported and the zones where the troops are picked up and deployed.

Defined in:

OPSTRANSPORT

Parameters:

Core.Set#SET_GROUP CargoGroups

Groups to be transported as cargo. Can also be a single Wrapper.Group#GROUP or Ops.OpsGroup#OPSGROUP object.

Core.Zone#ZONE PickupZone

Pickup zone. This is the zone, where the carrier is going to pickup the cargo. Important: only cargo is considered, if it is in this zone when the carrier starts loading!

Core.Zone#ZONE DeployZone

Deploy zone. This is the zone, where the carrier is going to drop off the cargo.

Return value:

On after "Cancel" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Delivered" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Executing" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Loaded" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Ops.OpsGroup#OPSGROUP OpsGroupCargo

OPSGROUP that was loaded into a carrier.

Ops.OpsGroup#OPSGROUP OpsGroupCarrier

OPSGROUP that was loaded into a carrier.

Carrier element.

On after "Planned" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Queued" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Requested" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Scheduled" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Unloaded" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Ops.OpsGroup#OPSGROUP OpsGroupCargo

Cargo OPSGROUP that was unloaded from a carrier.

Ops.OpsGroup#OPSGROUP OpsGroupCarrier

Carrier OPSGROUP that unloaded the cargo.

Triggers the FSM event "Planned".

Defined in:

OPSTRANSPORT

Triggers the FSM event "Queued".

Defined in:

OPSTRANSPORT

Remove LEGION from transport.

Defined in:

OPSTRANSPORT

Parameter:

The legion.

Return value:

Triggers the FSM event "Requested".

Defined in:

OPSTRANSPORT

Triggers the FSM event "Scheduled".

Defined in:

OPSTRANSPORT

Add a carrier assigned for this transport.

Defined in:

OPSTRANSPORT

Parameters:

Ops.OpsGroup#OPSGROUP CarrierGroup

Carrier OPSGROUP.

#string Status

Carrier Status.

Return value:

Set deploy zone.

Defined in:

OPSTRANSPORT

Parameters:

Core.Zone#ZONE DeployZone

Zone where the troops are deployed.

Transport zone combo.

Return value:

Set activation status of group when disembarked from transport carrier.

Defined in:

OPSTRANSPORT

Parameters:

#boolean Active

If true or nil, group is activated when disembarked. If false, group is late activated and needs to be activated manually.

Transport zone combo.

Return value:

Set/add transfer carrier(s).

These are carrier groups, where the cargo is directly loaded into when disembarked.

Defined in:

OPSTRANSPORT

Parameters:

Carrier set. Can also be passed as a #GROUP, #OPSGROUP or #SET_OPSGROUP object.

Transport zone combo.

Return value:

Set if group remains in utero after disembarkment from carrier.

Can be used to directly load the group into another carrier. Similar to disembark in late activated state.

Defined in:

OPSTRANSPORT

Parameters:

#boolean InUtero

If true or nil, group remains in utero after disembarkment.

Transport zone combo.

Return value:

Set disembark zone.

Defined in:

OPSTRANSPORT

Parameters:

Core.Zone#ZONE DisembarkZone

Zone where the troops are disembarked.

Transport zone combo.

Return value:

Set embark zone.

Defined in:

OPSTRANSPORT

Parameters:

Core.Zone#ZONE EmbarkZone

Zone where the troops are embarked.

Transport zone combo.

Return value:

Set pickup formation.

Defined in:

OPSTRANSPORT

Parameters:

#number Formation

Pickup formation.

Transport zone combo.

Return value:

Set transport formation.

Defined in:

OPSTRANSPORT

Parameters:

#number Formation

Pickup formation.

Transport zone combo.

Return value:

Set LEGION transport status.

Defined in:

OPSTRANSPORT

Parameters:

The legion.

#string Status

New status.

Return value:

Set pickup zone.

Defined in:

OPSTRANSPORT

Parameters:

Core.Zone#ZONE PickupZone

Zone where the troops are picked up.

Transport zone combo.

Return value:

Set mission priority and (optional) urgency.

Urgent missions can cancel other running missions.

Defined in:

OPSTRANSPORT

Parameters:

#number Prio

Priority 1=high, 100=low. Default 50.

#number Importance

Number 1-10. If missions with lower value are in the queue, these have to be finished first. Default is nil.

#boolean Urgent

If true, another running mission might be cancelled if it has a lower priority.

Return value:

Set required cargo.

This is a list of cargo groups that need to be loaded before the first transport will start.

Defined in:

OPSTRANSPORT

Parameters:

Required cargo set. Can also be passed as a #GROUP, #OPSGROUP or #SET_OPSGROUP object.

Transport zone combo.

Return value:

Set number of required carrier groups for an OPSTRANSPORT assignment.

Only used if transport is assigned at LEGION or higher level.

Defined in:

OPSTRANSPORT

Parameters:

#number NcarriersMin

Number of carriers at least required. Default 1.

#number NcarriersMax

Number of carriers at most used for transportation. Default is same as NcarriersMin.

Return value:

Set transport start and stop time.

Defined in:

OPSTRANSPORT

Parameters:

#string ClockStart

Time the transport is started, e.g. "05:00" for 5 am. If specified as a #number, it will be relative (in seconds) to the current mission time. Default is 5 seconds after mission was added.

#string ClockStop

(Optional) Time the transport is stopped, e.g. "13:00" for 1 pm. If mission could not be started at that time, it will be removed from the queue. If specified as a #number it will be relative (in seconds) to the current mission time.

Return value:

Set verbosity.

Defined in:

OPSTRANSPORT

Parameter:

#number Verbosity

Be more verbose. Default 0

Return value:

Triggers the FSM event "StatusUpdate".

Defined in:

OPSTRANSPORT

Triggers the FSM event "Unloaded".

Defined in:

OPSTRANSPORT

Parameters:

Ops.OpsGroup#OPSGROUP OpsGroupCargo

Cargo OPSGROUP that was unloaded from a carrier.

Ops.OpsGroup#OPSGROUP OpsGroupCarrier

Carrier OPSGROUP that unloaded the cargo.

Add a carrier assigned for this transport.

Defined in:

OPSTRANSPORT

Parameter:

Ops.OpsGroup#OPSGROUP CarrierGroup

Carrier OPSGROUP.

Return value:

Set/add transfer carrier(s).

These are carrier groups, where the cargo is directly loaded into when disembarked.

Defined in:

OPSTRANSPORT

Parameters:

Carrier set. Can also be passed as a #GROUP, #OPSGROUP or #SET_OPSGROUP object.

#table Table

the table to add.

Return value:

Check if all cargo of this transport assignment was delivered.

Defined in:

OPSTRANSPORT

Check if all required cargos are loaded.

Defined in:

OPSTRANSPORT

Parameters:

Transport zone combo.

Ops.OpsGroup#OPSGROUP CarrierGroup

The carrier group asking.

Return value:

#boolean:

If true, all required cargos are loaded or there is no required cargo or asking carrier is full.

Count how many cargo groups are inside a zone.

Defined in:

OPSTRANSPORT

Parameters:

The zone object.

#boolean Delivered

If true, only delivered groups are returned. If false only undelivered groups are returned. If nil, all groups are returned.

(Optional) Only count cargo groups that fit into the given carrier group. Current cargo is not a factor.

Transport zone combo.

Return value:

#number:

Number of cargo groups.

Create a cargo group data structure.

Defined in:

OPSTRANSPORT

Parameters:

The GROUP or OPSGROUP object.

Transport zone combo.

#boolean DisembarkActivation

If true, cargo group is activated when disembarked.

Core.Zone#ZONE DisembarkZone

Disembark zone, where the cargo is spawned when delivered.

Core.Set#SET_OPSGROUP DisembarkCarriers

Disembark carriers cargo is directly loaded into when delivered.

Return value:

Create a cargo group data structure.

Defined in:

OPSTRANSPORT

Parameters:

Storage from.

Storage to.

#string CargoType

Type of cargo.

#number CargoAmount

Total amount of cargo that should be transported. Liquids in kg.

#number CargoWeight

Weight of a single cargo item in kg. Default 1 kg.

Transport zone combo.

Return value:

Remove group from the current carrier list/table.

Defined in:

OPSTRANSPORT

Parameters:

Ops.OpsGroup#OPSGROUP CarrierGroup

Carrier OPSGROUP.

#number Delay

Delay in seconds before the carrier is removed.

Return value:

Get a list of alive carriers.

Defined in:

OPSTRANSPORT

Return value:

#table:

Names of all carriers

Get pickup formation.

Defined in:

OPSTRANSPORT

Parameter:

Return value:

#string:

Formation.

Get pickup formation.

Defined in:

OPSTRANSPORT

Parameters:

Transport zone combo.

Return value:

#number:

Formation.

Get transport formation.

Defined in:

OPSTRANSPORT

Parameters:

Transport zone combo.

Return value:

#number:

Formation.

Get an OPSGROUP from a given OPSGROUP or GROUP object.

If the object is a GROUP, an OPSGROUP is created automatically.

Defined in:

OPSTRANSPORT

Parameter:

The object, which can be a GROUP or OPSGROUP.

Return value:

Ops Group.

Get a path for transportation.

Defined in:

OPSTRANSPORT

Parameters:

#number Category

Group category.

Transport Zone combo.

Return value:

The path object.

Get a transport zone combination (TZC) for a carrier group.

The pickup zone will be a zone, where the most cargo groups are located that fit into the carrier.

Defined in:

OPSTRANSPORT

Parameter:

The carrier OPS group.

Return value:

Pickup zone or #nil.

Triggers the FSM event "Cancel" after a delay.

Defined in:

OPSTRANSPORT

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Delivered" after a delay.

Defined in:

OPSTRANSPORT

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Executing" after a delay.

Defined in:

OPSTRANSPORT

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Loaded" after a delay.

Defined in:

OPSTRANSPORT

Parameters:

#number delay

Delay in seconds.

Ops.OpsGroup#OPSGROUP OpsGroupCargo

OPSGROUP that was loaded into a carrier.

Ops.OpsGroup#OPSGROUP OpsGroupCarrier

OPSGROUP that was loaded into a carrier.

Carrier element.

Triggers the FSM event "Planned" after a delay.

Defined in:

OPSTRANSPORT

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Queued" after a delay.

Defined in:

OPSTRANSPORT

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Requested" after a delay.

Defined in:

OPSTRANSPORT

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Scheduled" after a delay.

Defined in:

OPSTRANSPORT

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Status" after a delay.

Defined in:

OPSTRANSPORT

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Unloaded" after a delay.

Defined in:

OPSTRANSPORT

Parameters:

#number delay

Delay in seconds.

Ops.OpsGroup#OPSGROUP OpsGroupCargo

Cargo OPSGROUP that was unloaded from a carrier.

Ops.OpsGroup#OPSGROUP OpsGroupCarrier

Carrier OPSGROUP that unloaded the cargo.

On after "Cancel" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "DeadCarrierAll" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "DeadCarrierGroup" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Carrier OPSGROUP that is dead.

On after "Delivered" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Executing" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Loaded" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Ops.OpsGroup#OPSGROUP OpsGroupCargo

OPSGROUP that was loaded into a carrier.

Ops.OpsGroup#OPSGROUP OpsGroupCarrier

OPSGROUP that was loaded into a carrier.

Carrier element.

On after "Planned" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Scheduled" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "StatusUpdate" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "Unloaded" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Ops.OpsGroup#OPSGROUP OpsGroupCargo

Cargo OPSGROUP that was unloaded from a carrier.

Ops.OpsGroup#OPSGROUP OpsGroupCarrier

Carrier OPSGROUP that unloaded the cargo.

On before "Delivered" event.

Defined in:

OPSTRANSPORT

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Field(s)

#string OPSTRANSPORT.ClassName

Name of the class.

#number OPSTRANSPORT.Ncargo

Total number of cargo groups.

#number OPSTRANSPORT.NcargoDead

Totalnumber of dead cargo groups.

#number OPSTRANSPORT.Ncarrier

Total number of assigned carriers.

#number OPSTRANSPORT.NcarrierDead

Total number of dead carrier groups

#number OPSTRANSPORT.Ndelivered

Total number of cargo groups delivered.

OPSTRANSPORT.Tover

Time stamp.

#number OPSTRANSPORT.Tstart

Start time in abs. seconds.

#number OPSTRANSPORT.Tstop

Stop time in abs. seconds. Default #nil (never stops).

#table OPSTRANSPORT.assets

Warehouse assets assigned for this transport.

#number OPSTRANSPORT.cargocounter

Running number to generate cargo UIDs.

#table OPSTRANSPORT.carrierTransportStatus

Status of each carrier.

#table OPSTRANSPORT.carriers

Carriers assigned for this transport.

Ops.Chief#CHIEF OPSTRANSPORT.chief

Chief of the transport.

Ops.Commander#COMMANDER OPSTRANSPORT.commander

Commander of the transport.

#table OPSTRANSPORT.conditionStart

Start conditions.

#number OPSTRANSPORT.duration

Duration (Tstop-Tstart) of the transport in seconds.

#string OPSTRANSPORT.formationArmy

Default formation for ground vehicles.

#string OPSTRANSPORT.formationHelo

Default formation for helicopters.

#string OPSTRANSPORT.formationPlane

Default formation for airplanes.

#number OPSTRANSPORT.importance

Importance of this transport. Smaller=higher.

#table OPSTRANSPORT.legions

Assigned legions.

#string OPSTRANSPORT.lid

Log ID.

Ops.Auftrag#AUFTRAG OPSTRANSPORT.mission

The mission attached to this transport.

#number OPSTRANSPORT.prio

Priority of this transport. Should be a number between 0 (high prio) and 100 (low prio).

#table OPSTRANSPORT.requestID

The ID of the queued warehouse request. Necessary to cancel the request if the transport was cancelled before the request is processed.

#string OPSTRANSPORT.statusCommander

Staus of the COMMANDER.

#table OPSTRANSPORT.statusLegion

Transport status of all assigned LEGIONs.

#table OPSTRANSPORT.tzCombos

Table of transport zone combos. Each element of the table is of type #OPSTRANSPORT.TransportZoneCombo.

#number OPSTRANSPORT.tzcCounter

Running number of added transport zone combos.

#number OPSTRANSPORT.uid

Unique ID of the transport.

#boolean OPSTRANSPORT.urgent

If true, transport is urgent.

#number OPSTRANSPORT.verbose

Verbosity level.

#string OPSTRANSPORT.version

Army Group version.

Function(s)

Adds an End state.

Defined in:

Parameter:

#string State

The FSM state.

Set the default #FSM_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.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns the End states.

Defined in:

Return value:

#table:

End states.

Defined in:

Parameters:

From

Event

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

Defined in:

Return value:

#table:

Sub processes.

Returns a table with the scores defined.

Defined in:

Return value:

#table:

Scores.

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns a table with the Subs defined.

Defined in:

Return value:

#table:

Sub processes.

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

Defined in:

Return value:

#table:

Transitions.

Check if FSM is in state.

Defined in:

Parameter:

#string State

State name.

Return value:

#boolean:

If true, FSM is in this state.

Load call backs.

Defined in:

Parameter:

#table CallBackTable

Table of call backs.

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.

Add to map.

Defined in:

Parameters:

#table Map

Map.

#table Event

Event table.

Call handler.

Defined in:

Parameters:

#string step

Step "onafter", "onbefore", "onenter", "onleave".

#string trigger

Trigger.

#table params

Parameters.

#string EventName

Event name.

Return value:

Value.

Create transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Delayed transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Event map.

Defined in:

Parameters:

#table Events

Events.

#table EventStructure

Event structure.

Go sub.

Defined in:

Parameters:

#string ParentFrom

Parent from state.

#string ParentEvent

Parent event name.

Return value:

#table:

Subs.

Handler.

Defined in:

Parameters:

#string EventName

Event name.

...

Arguments.

Is end state.

Defined in:

Parameter:

#string Current

Current state name.

Return values:

#table:

FSM parent.

#string:

Event name.

Sub maps.

Defined in:

Parameters:

#table subs

Subs.

#table sub

Sub.

#string name

Name.

Check if can do an event.

Defined in:

Parameter:

#string e

Event name.

Return values:

#boolean:

If true, FSM can do the event.

#string:

To state.

Check if cannot do an event.

Defined in:

Parameter:

#string e

Event name.

Return value:

#boolean:

If true, FSM cannot do the event.

Check if FSM is in state.

Defined in:

Parameters:

#string State

State name.

state

Return value:

#boolean:

If true, FSM is in this state.

Storage data.

Field(s)

#string OPSTRANSPORT.CargoType.OPSGROUP

Cargo is an OPSGROUP.

#string OPSTRANSPORT.CargoType.STORAGE

Cargo is storage of DCS warehouse.

Function(s)

Generic transport condition.

Field(s)

#table OPSTRANSPORT.Condition.arg

Optional arguments passed to the condition callback function.

#function OPSTRANSPORT.Condition.func

Callback function to check for a condition. Should return a #boolean.

Function(s)

Path used for pickup or transport.

Field(s)

#number OPSTRANSPORT.Path.category

Category for which carriers this path is used.

#number OPSTRANSPORT.Path.radius

Radomization radius for waypoints in meters. Default 0 m.

#boolean OPSTRANSPORT.Path.reverse

If true, path is used in reversed order.

#table OPSTRANSPORT.Path.waypoints

Table of waypoints.

Function(s)

Cargo transport status.

Field(s)

#string OPSTRANSPORT.Status.CANCELLED

Transport was cancelled.

#string OPSTRANSPORT.Status.DELIVERED

Transport was delivered.

#string OPSTRANSPORT.Status.EXECUTING

Transport is being executed.

#string OPSTRANSPORT.Status.FAILED

Transport failed.

#string OPSTRANSPORT.Status.PLANNED

Planning state.

#string OPSTRANSPORT.Status.QUEUED

Queued state.

#string OPSTRANSPORT.Status.REQUESTED

Requested state.

#string OPSTRANSPORT.Status.SCHEDULED

Transport is scheduled in the cargo queue.

#string OPSTRANSPORT.Status.SUCCESS

Transport was a success.

Function(s)

Storage data.

Field(s)

#number OPSTRANSPORT.Storage.cargoAmount

Amount of cargo that should be transported.

#number OPSTRANSPORT.Storage.cargoDelivered

Amount of cargo that has been delivered.

#number OPSTRANSPORT.Storage.cargoLoaded

Amount of cargo that is loading.

#number OPSTRANSPORT.Storage.cargoLost

Amount of cargo that was lost.

#number OPSTRANSPORT.Storage.cargoReserved

Amount of cargo that is reserved for a carrier group.

#string OPSTRANSPORT.Storage.cargoType

Type of cargo.

#number OPSTRANSPORT.Storage.cargoWeight

Weight of one single cargo item in kg. Default 1 kg.

Function(s)

Transport zone combination.

Field(s)

#table OPSTRANSPORT.TransportZoneCombo.Cargos

Cargo groups of the TZ combo. Each element is of type Ops.OpsGroup#OPSGROUP.CargoGroup.

#table OPSTRANSPORT.TransportZoneCombo.DisembarkCarriers

Carriers where the cargo is directly disembarked to.

Core.Zone#ZONE OPSTRANSPORT.TransportZoneCombo.DisembarkZone

Zone where the troops are disembared to.

Core.Zone#ZONE OPSTRANSPORT.TransportZoneCombo.EmbarkZone

Embark zone if different from pickup zone.

#number OPSTRANSPORT.TransportZoneCombo.Ncargo

Number of cargos assigned. This is a running number and not decreased if cargo is delivered or dead.

#number OPSTRANSPORT.TransportZoneCombo.Ncarriers

Number of carrier groups using this transport zone.

#number OPSTRANSPORT.TransportZoneCombo.PickupFormation

Formation used to pickup.

#number OPSTRANSPORT.TransportZoneCombo.TransportFormation

Formation used to transport.

#table OPSTRANSPORT.TransportZoneCombo.TransportPaths

Path for Transport. Each elment of the table is of type #OPSTRANSPORT.Path.

#boolean OPSTRANSPORT.TransportZoneCombo.disembarkActivation

If true, troops are spawned in late activated state when disembarked from carrier.

#boolean OPSTRANSPORT.TransportZoneCombo.disembarkInUtero

If true, troops are disembarked "in utero".

#boolean OPSTRANSPORT.TransportZoneCombo.disembarkToCarriers

If true, cargo is supposed to embark to another carrier.

#number OPSTRANSPORT.TransportZoneCombo.uid

Unique ID of the TZ combo.

Function(s)