Banner Image

Module Ops.CTLD

Ops - Combat Troops & Logistics Department.


CTLD - MOOSE based Helicopter CTLD Operations.


Missions:

CTLD - Combat Troop & Logistics Deployment


Main Features:

  • MOOSE-based Helicopter CTLD Operations for Players.

Author: Applevangelist (Moose Version), Ciribob (original), Thanks to: Shadowze, Cammel (testing), bbirchnz (additional code!!)

Repack addition for crates: Raiden

Global(s)

Global CTLD

Combat Troop & Logistics Deployment (CTLD): Everyone wants to be a POG, until there's POG stuff to be done. (Mil Saying)


Banner Image

CTLD Concept

  • MOOSE-based CTLD for Players.
#CTLD CTLD

Combat Troop & Logistics Deployment (CTLD): Everyone wants to be a POG, until there's POG stuff to be done. (Mil Saying)


Banner Image

CTLD Concept

  • MOOSE-based CTLD for Players.
  • Object oriented refactoring of Ciribob's fantastic CTLD script.
  • No need for extra MIST loading.
  • Additional events to tailor your mission.
  • ANY late activated group can serve as cargo, either as troops, crates, which have to be build on-location, or static like ammo chests.
  • Option to persist (save&load) your dropped troops, crates and vehicles.
  • Weight checks on loaded cargo.

0. Prerequisites

You need to load an .ogg soundfile for the pilot's beacons into the mission, e.g. "beacon.ogg", use a once trigger, "sound to country" for that. Create the late-activated troops, vehicles, that will make up your deployable forces.

Example sound files are here: Moose Sound

1. Basic Setup

1.1 Create and start a CTLD instance

A basic setup example is the following:

   -- Instantiate and start a CTLD for the blue side, using helicopter groups named "Helicargo" and alias "Lufttransportbrigade I"
   local my_ctld = CTLD:New(coalition.side.BLUE,{"Helicargo"},"Lufttransportbrigade I")
   my_ctld:__Start(5)

1.2 Add cargo types available

Add generic cargo types that you need for your missions, here infantry units, vehicles and a FOB. These need to be late-activated Wrapper.Group#GROUP objects:

   -- add infantry unit called "Anti-Tank Small" using template "ATS", of type TROOP with size 3
   -- infantry units will be loaded directly from LOAD zones into the heli (matching number of free seats needed)
   my_ctld:AddTroopsCargo("Anti-Tank Small",{"ATS"},CTLD_CARGO.Enum.TROOPS,3)
   -- if you want to add weight to your Heli, troops can have a weight in kg **per person**. Currently no max weight checked. Fly carefully.
   my_ctld:AddTroopsCargo("Anti-Tank Small",{"ATS"},CTLD_CARGO.Enum.TROOPS,3,80)

   -- add infantry unit called "Anti-Tank" using templates "AA" and "AA"", of type TROOP with size 4. No weight. We only have 2 in stock:
   my_ctld:AddTroopsCargo("Anti-Air",{"AA","AA2"},CTLD_CARGO.Enum.TROOPS,4,nil,2)

   -- add an engineers unit called "Wrenches" using template "Engineers", of type ENGINEERS with size 2. Engineers can be loaded, dropped,
   -- and extracted like troops. However, they will seek to build and/or repair crates found in a given radius. Handy if you can\'t stay
   -- to build or repair or under fire.
   my_ctld:AddTroopsCargo("Wrenches",{"Engineers"},CTLD_CARGO.Enum.ENGINEERS,4)
   myctld.EngineerSearch = 2000 -- teams will search for crates in this radius.

   -- add vehicle called "Humvee" using template "Humvee", of type VEHICLE, size 2, i.e. needs two crates to be build
   -- vehicles and FOB will be spawned as crates in a LOAD zone first. Once transported to DROP zones, they can be build into the objects
   my_ctld:AddCratesCargo("Humvee",{"Humvee"},CTLD_CARGO.Enum.VEHICLE,2)
   -- if you want to add weight to your Heli, crates can have a weight in kg **per crate**. Fly carefully.
   my_ctld:AddCratesCargo("Humvee",{"Humvee"},CTLD_CARGO.Enum.VEHICLE,2,2775)
   -- if you want to limit your stock, add a number (here: 10) as parameter after weight. No parameter / nil means unlimited stock.
   my_ctld:AddCratesCargo("Humvee",{"Humvee"},CTLD_CARGO.Enum.VEHICLE,2,2775,10)
   -- additionally, you can limit **where** the stock is available (one location only!) - this one is available in a zone called "Vehicle Store".
   my_ctld:AddCratesCargo("Humvee",{"Humvee"},CTLD_CARGO.Enum.VEHICLE,2,2775,10,nil,nil,"Vehicle Store")

   -- add infantry unit called "Forward Ops Base" using template "FOB", of type FOB, size 4, i.e. needs four crates to be build:
   my_ctld:AddCratesCargo("Forward Ops Base",{"FOB"},CTLD_CARGO.Enum.FOB,4)

   -- add crates to repair FOB or VEHICLE type units - the 2nd parameter needs to match the template you want to repair,
   -- e.g. the "Humvee" here refers back to the "Humvee" crates cargo added above (same template!)
   my_ctld:AddCratesRepair("Humvee Repair","Humvee",CTLD_CARGO.Enum.REPAIR,1)
   my_ctld.repairtime = 300 -- takes 300 seconds to repair something

   -- add static cargo objects, e.g ammo chests - the name needs to refer to a STATIC object in the mission editor, 
   -- here: it\'s the UNIT name (not the GROUP name!), the second parameter is the weight in kg.
   my_ctld:AddStaticsCargo("Ammunition",500)

1.3 Add logistics zones

Add (normal, round!) zones for loading troops and crates and dropping, building crates

   -- Add a zone of type LOAD to our setup. Players can load any troops and crates here as defined in 1.2 above.
   -- "Loadzone" is the name of the zone from the ME. Players can load, if they are inside the zone.
   -- Smoke and Flare color for this zone is blue, it is active (can be used) and has a radio beacon.
   my_ctld:AddCTLDZone("Loadzone",CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true)

   -- Add a zone of type DROP. Players can drop crates here.
   -- Smoke and Flare color for this zone is blue, it is active (can be used) and has a radio beacon.
   -- NOTE: Troops can be unloaded anywhere, also when hovering in parameters.
   my_ctld:AddCTLDZone("Dropzone",CTLD.CargoZoneType.DROP,SMOKECOLOR.Red,true,true)

   -- Add two zones of type MOVE. Dropped troops and vehicles will move to the nearest one. See options.
   -- Smoke and Flare color for this zone is blue, it is active (can be used) and has a radio beacon.
   my_ctld:AddCTLDZone("Movezone",CTLD.CargoZoneType.MOVE,SMOKECOLOR.Orange,false,false)

   my_ctld:AddCTLDZone("Movezone2",CTLD.CargoZoneType.MOVE,SMOKECOLOR.White,true,true)

   -- Add a zone of type SHIP to our setup. Players can load troops and crates from this ship
   -- "Tarawa" is the unitname (callsign) of the ship from the ME. Players can load, if they are inside the zone.
   -- The ship is 240 meters long and 20 meters wide.
   -- Note that you need to adjust the max hover height to deck height plus 5 meters or so for loading to work.
   -- When the ship is moving, avoid forcing hoverload.
   my_ctld:AddCTLDZone("Tarawa",CTLD.CargoZoneType.SHIP,SMOKECOLOR.Blue,true,true,240,20)

2. Options

The following options are available (with their defaults). Only set the ones you want changed:

     my_ctld.useprefix = true -- (DO NOT SWITCH THIS OFF UNLESS YOU KNOW WHAT YOU ARE DOING!) Adjust **before** starting CTLD. If set to false, *all* choppers of the coalition side will be enabled for CTLD.
     my_ctld.CrateDistance = 35 -- List and Load crates in this radius only.
     my_ctld.PackDistance = 35 -- Pack crates in this radius only
     my_ctld.dropcratesanywhere = false -- Option to allow crates to be dropped anywhere.
     my_ctld.dropAsCargoCrate = false -- Parachuted herc cargo is not unpacked automatically but placed as crate to be unpacked. Needs a cargo with the same name defined like the cargo that was dropped.
     my_ctld.maximumHoverHeight = 15 -- Hover max this high to load.
     my_ctld.minimumHoverHeight = 4 -- Hover min this low to load.
     my_ctld.forcehoverload = true -- Crates (not: troops) can **only** be loaded while hovering.
     my_ctld.hoverautoloading = true -- Crates in CrateDistance in a LOAD zone will be loaded automatically if space allows.
     my_ctld.smokedistance = 2000 -- Smoke or flares can be request for zones this far away (in meters).
     my_ctld.movetroopstowpzone = true -- Troops and vehicles will move to the nearest MOVE zone...
     my_ctld.movetroopsdistance = 5000 -- .. but only if this far away (in meters)
     my_ctld.smokedistance = 2000 -- Only smoke or flare zones if requesting player unit is this far away (in meters)
     my_ctld.suppressmessages = false -- Set to true if you want to script your own messages.
     my_ctld.repairtime = 300 -- Number of seconds it takes to repair a unit.
     my_ctld.buildtime = 300 -- Number of seconds it takes to build a unit. Set to zero or nil to build instantly.
     my_ctld.cratecountry = country.id.GERMANY -- ID of crates. Will default to country.id.RUSSIA for RED coalition setups.
     my_ctld.allowcratepickupagain = true  -- allow re-pickup crates that were dropped.
     my_ctld.enableslingload = false -- allow cargos to be slingloaded - might not work for all cargo types
     my_ctld.pilotmustopendoors = false -- force opening of doors
     my_ctld.SmokeColor = SMOKECOLOR.Red -- default color to use when dropping smoke from heli 
     my_ctld.FlareColor = FLARECOLOR.Red -- color to use when flaring from heli
     my_ctld.basetype = "container_cargo" -- default shape of the cargo container
     my_ctld.droppedbeacontimeout = 600 -- dropped beacon lasts 10 minutes
     my_ctld.usesubcats = false -- use sub-category names for crates, adds an extra menu layer in "Get Crates", useful if you have > 10 crate types.
     my_ctld.placeCratesAhead = false -- place crates straight ahead of the helicopter, in a random way. If true, crates are more neatly sorted.
     my_ctld.nobuildinloadzones = true -- forbid players to build stuff in LOAD zones if set to `true`
     my_ctld.movecratesbeforebuild = true -- crates must be moved once before they can be build. Set to false for direct builds.
     my_ctld.surfacetypes = {land.SurfaceType.LAND,land.SurfaceType.ROAD,land.SurfaceType.RUNWAY,land.SurfaceType.SHALLOW_WATER} -- surfaces for loading back objects.
     my_ctld.nobuildmenu = false -- if set to true effectively enforces to have engineers build/repair stuff for you.
     my_ctld.RadioSound = "beacon.ogg" -- -- this sound will be hearable if you tune in the beacon frequency. Add the sound file to your miz.
     my_ctld.RadioSoundFC3 = "beacon.ogg" -- this sound will be hearable by FC3 users (actually all UHF radios); change to something like "beaconsilent.ogg" and add the sound file to your miz if you don't want to annoy FC3 pilots.
     my_ctld.enableChinookGCLoading = true -- this will effectively suppress the crate load and drop for CTLD_CARGO.Enum.STATIc types for CTLD for the Chinook
     my_ctld.TroopUnloadDistGround = 5 -- If hovering, spawn dropped troops this far away in meters from the helo
     my_ctld.TroopUnloadDistHover = 1.5 -- If grounded, spawn dropped troops this far away in meters from the helo
     my_ctld.TroopUnloadDistGroundHerc = 25 -- On the ground, unload troops this far behind the Hercules
     my_ctld.TroopUnloadDistGroundHook = 15 -- On the ground, unload troops this far behind the Chinook

2.1 CH-47 Chinook support

The Chinook comes with the option to use the ground crew menu to load and unload cargo into the Helicopter itself for better immersion. As well, it can sling-load cargo from ground. The cargo you can actually create from this menu is limited to contain items from the airbase or FARP's resources warehouse and can take a number of shapes (static shapes in the category of cargo) independent of their contents. If you unload this kind of cargo with the ground crew, the contents will be "absorbed" into the airbase or FARP you landed at, and the cargo static will be removed after ca 2 mins.

2.1.1 Moose CTLD created crate cargo

Given the correct shape, Moose created cargo can be either loaded with the ground crew or via the F10 CTLD menu. It is strongly recommend to either use the ground crew or CTLD to load/unload Moose created cargo. Mix and match will not work here. Static shapes loadable into the Chinook are at the time of writing:

 * Ammo crate (type "ammo_cargo")
 * M117 bomb crate (type name "m117_cargo")
 * Dual shell fuel barrels (type name "barrels")
 * UH-1H net (type name "uh1h_cargo")

All other kinds of cargo can be sling-loaded.

2.1.2 Recommended settings

     my_ctld.basetype = "ammo_cargo"
     my_ctld.forcehoverload = false -- no hover autoload, leads to cargo complications with ground crew created cargo items
     my_ctld.pilotmustopendoors = true -- crew must open back loading door 50% (horizontal) or more
     my_ctld.enableslingload = true -- will set cargo items as sling-loadable
     my_ctld.enableChinookGCLoading = true -- will effectively suppress the crate load and drop menus for CTLD for the Chinook
     my_ctld.movecratesbeforebuild = false -- cannot detect movement of crates at the moment
     my_ctld.nobuildinloadzones = true -- don't build where you load.
     my_ctld.ChinookTroopCircleRadius = 5 -- Radius for troops dropping in a nice circle. Adjust to your planned squad size for the Chinook.

2.2 User functions

2.2.1 Adjust or add chopper unit-type capabilities

Use this function to adjust what a heli type can or cannot do:

   -- E.g. update unit capabilities for testing. Please stay realistic in your mission design.
   -- Make a Gazelle into a heavy truck, this type can load both crates and troops and eight of each type, up to 4000 kgs:
   my_ctld:SetUnitCapabilities("SA342L", true, true, 8, 8, 12, 4000)

   -- Default unit type capabilities are: 
   ["SA342Mistral"] = {type="SA342Mistral", crates=false, troops=true, cratelimit = 0, trooplimit = 4, length = 12, cargoweightlimit = 400},
   ["SA342L"] = {type="SA342L", crates=false, troops=true, cratelimit = 0, trooplimit = 2, length = 12, cargoweightlimit = 400},
   ["SA342M"] = {type="SA342M", crates=false, troops=true, cratelimit = 0, trooplimit = 4, length = 12, cargoweightlimit = 400},
   ["SA342Minigun"] = {type="SA342Minigun", crates=false, troops=true, cratelimit = 0, trooplimit = 2, length = 12, cargoweightlimit = 400},
   ["UH-1H"] = {type="UH-1H", crates=true, troops=true, cratelimit = 1, trooplimit = 8, length = 15, cargoweightlimit = 700},
   ["Mi-8MT"] = {type="Mi-8MT", crates=true, troops=true, cratelimit = 2, trooplimit = 12, length = 15, cargoweightlimit = 3000},
   ["Mi-8MTV2"] = {type="Mi-8MTV2", crates=true, troops=true, cratelimit = 2, trooplimit = 12, length = 15, cargoweightlimit = 3000},
   ["Ka-50"] = {type="Ka-50", crates=false, troops=false, cratelimit = 0, trooplimit = 0, length = 15, cargoweightlimit = 0},
   ["Mi-24P"] = {type="Mi-24P", crates=true, troops=true, cratelimit = 2, trooplimit = 8, length = 18, cargoweightlimit = 700},
   ["Mi-24V"] = {type="Mi-24V", crates=true, troops=true, cratelimit = 2, trooplimit = 8, length = 18, cargoweightlimit = 700},
   ["Hercules"] = {type="Hercules", crates=true, troops=true, cratelimit = 7, trooplimit = 64, length = 25, cargoweightlimit = 19000},
   ["UH-60L"] = {type="UH-60L", crates=true, troops=true, cratelimit = 2, trooplimit = 20, length = 16, cargoweightlimit = 3500},
   ["AH-64D_BLK_II"] = {type="AH-64D_BLK_II", crates=false, troops=true, cratelimit = 0, trooplimit = 2, length = 17, cargoweightlimit = 200}, 
   ["MH-60R"] = {type="MH-60R", crates=true, troops=true, cratelimit = 2, trooplimit = 20, length = 16, cargoweightlimit = 3500}, -- 4t cargo, 20 (unsec) seats
   ["SH-60B"] = {type="SH-60B", crates=true, troops=true, cratelimit = 2, trooplimit = 20, length = 16, cargoweightlimit = 3500}, -- 4t cargo, 20 (unsec) seats
   ["Bronco-OV-10A"] = {type="Bronco-OV-10A", crates= false, troops=true, cratelimit = 0, trooplimit = 5, length = 13, cargoweightlimit = 1450},
   ["Bronco-OV-10A"] = {type="Bronco-OV-10A", crates= false, troops=true, cratelimit = 0, trooplimit = 5, length = 13, cargoweightlimit = 1450},
   ["OH-6A"] = {type="OH-6A", crates=false, troops=true, cratelimit = 0, trooplimit = 4, length = 7, cargoweightlimit = 550},
   ["OH58D"] = {type="OH58D", crates=false, troops=false, cratelimit = 0, trooplimit = 0, length = 14, cargoweightlimit = 400},
   ["CH-47Fbl1"] = {type="CH-47Fbl1", crates=true, troops=true, cratelimit = 4, trooplimit = 31, length = 20, cargoweightlimit = 8000},

2.2.2 Activate and deactivate zones

Activate a zone:

   -- Activate zone called Name of type #CTLD.CargoZoneType ZoneType:
   my_ctld:ActivateZone(Name,CTLD.CargoZoneType.MOVE)

Deactivate a zone:

   -- Deactivate zone called Name of type #CTLD.CargoZoneType ZoneType:
   my_ctld:DeactivateZone(Name,CTLD.CargoZoneType.DROP)

2.2.3 Limit and manage available resources

When adding generic cargo types, you can effectively limit how many units can be dropped/build by the players, e.g.

         -- if you want to limit your stock, add a number (here: 10) as parameter after weight. No parameter / nil means unlimited stock.
         my_ctld:AddCratesCargo("Humvee",{"Humvee"},CTLD_CARGO.Enum.VEHICLE,2,2775,10)

You can manually add or remove the available stock like so:

         -- Crates
         my_ctld:AddStockCrates("Humvee", 2)
         my_ctld:RemoveStockCrates("Humvee", 2)

         -- Troops
         my_ctld:AddStockTroops("Anti-Air", 2)
         my_ctld:RemoveStockTroops("Anti-Air", 2)

Notes: Troops dropped back into a LOAD zone will effectively be added to the stock. Crates lost in e.g. a heli crash are just that - lost.

2.2.4 Create own SET_GROUP to manage CTLD Pilot groups

         -- Parameter: Set The SET_GROUP object created by the mission designer/user to represent the CTLD pilot groups.
         -- Needs to be set before starting the CTLD instance.
         local myset = SET_GROUP:New():FilterPrefixes("Helikopter"):FilterCoalitions("red"):FilterStart()
         my_ctld:SetOwnSetPilotGroups(myset)

3. Events

The class comes with a number of FSM-based events that missions designers can use to shape their mission. These are:

3.1 OnAfterTroopsPickedUp

This function is called when a player has loaded Troops:

   function my_ctld:OnAfterTroopsPickedUp(From, Event, To, Group, Unit, Cargo)
     ... your code here ...
   end

3.2 OnAfterCratesPickedUp

This function is called when a player has picked up crates:

   function my_ctld:OnAfterCratesPickedUp(From, Event, To, Group, Unit, Cargo)
     ... your code here ...
   end

3.3 OnAfterTroopsDeployed

This function is called when a player has deployed troops into the field:

   function my_ctld:OnAfterTroopsDeployed(From, Event, To, Group, Unit, Troops)
     ... your code here ...
   end

3.4 OnAfterTroopsExtracted

This function is called when a player has re-boarded already deployed troops from the field:

   function my_ctld:OnAfterTroopsExtracted(From, Event, To, Group, Unit, Troops)
     ... your code here ...
   end

3.5 OnAfterCratesDropped

This function is called when a player has deployed crates to a DROP zone:

   function my_ctld:OnAfterCratesDropped(From, Event, To, Group, Unit, Cargotable)
     ... your code here ...
   end

3.6 OnAfterCratesBuild, OnAfterCratesRepaired

This function is called when a player has build a vehicle or FOB:

   function my_ctld:OnAfterCratesBuild(From, Event, To, Group, Unit, Vehicle)
     ... your code here ...
   end

   function my_ctld:OnAfterCratesRepaired(From, Event, To, Group, Unit, Vehicle)
     ... your code here ...
   end

3.7 A simple SCORING example:

To award player with points, using the SCORING Class (SCORING: my_Scoring, CTLD: CTLD_Cargotransport)

   my_scoring = SCORING:New("Combat Transport")

   function CTLD_Cargotransport:OnAfterCratesDropped(From, Event, To, Group, Unit, Cargotable)
       local points = 10
       if Unit then
         local PlayerName = Unit:GetPlayerName()
         my_scoring:_AddPlayerFromUnit( Unit )
         my_scoring:AddGoalScore(Unit, "CTLD", string.format("Pilot %s has been awarded %d points for transporting cargo crates!", PlayerName, points), points)
       end
   end

   function CTLD_Cargotransport:OnAfterCratesBuild(From, Event, To, Group, Unit, Vehicle)
     local points = 5
     if Unit then
     local PlayerName = Unit:GetPlayerName()
     my_scoring:_AddPlayerFromUnit( Unit )
     my_scoring:AddGoalScore(Unit, "CTLD", string.format("Pilot %s has been awarded %d points for the construction of Units!", PlayerName, points), points)
     end
    end

4. F10 Menu structure

CTLD management menu is under the F10 top menu and called "CTLD"

4.1 Manage Crates

Use this entry to get, load, list nearby, drop, build and repair crates. Also see options.

4.2 Manage Troops

Use this entry to load, drop and extract troops. NOTE - with extract you can only load troops from the field that were deployed prior. Currently limited CTLD_CARGO troops, which are build from one template. Also, this will heal/complete your units as they are respawned.

4.3 List boarded cargo

Lists what you have loaded. Shows load capabilities for number of crates and number of seats for troops.

4.4 Smoke & Flare zones nearby or drop smoke, beacon or flare from Heli

Does what it says.

4.5 List active zone beacons

Lists active radio beacons for all zones, where zones are both active and have a beacon. @see CTLD:AddCTLDZone()

4.6 Show hover parameters

Lists hover parameters and indicates if these are curently fulfilled. Also @see options on hover heights.

4.7 List Inventory

Lists invetory of available units to drop or build.

5. Support for Hercules mod by Anubis

Basic support for the Hercules mod By Anubis has been build into CTLD - that is you can load/drop/build the same way and for the same objects as the helicopters (main method). To cover objects and troops which can be loaded from the groud crew Rearm/Refuel menu (F8), you need to use CTLD_HERCULES.New() and link this object to your CTLD setup (alternative method). In this case, do not use the Hercules_Cargo.lua or Hercules_Cargo_CTLD.lua which are part of the mod in your mission!

5.1 Create an own CTLD instance and allow the usage of the Hercules mod (main method)

         local my_ctld = CTLD:New(coalition.side.BLUE,{"Helicargo", "Hercules"},"Lufttransportbrigade I")

Enable these options for Hercules support:

         my_ctld.enableHercules = true
         my_ctld.HercMinAngels = 155 -- for troop/cargo drop via chute in meters, ca 470 ft
         my_ctld.HercMaxAngels = 2000 -- for troop/cargo drop via chute in meters, ca 6000 ft
         my_ctld.HercMaxSpeed = 77 -- 77mps or 270kph or 150kn

Hint: you can only airdrop from the Hercules if you are "in parameters", i.e. at or below HercMaxSpeed and in the AGL bracket between HercMinAngels and HercMaxAngels!

Also, the following options need to be set to true:

         my_ctld.useprefix = true -- this is true by default and MUST BE ON. 

5.2 Integrate Hercules ground crew (F8 Menu) loadable objects (alternative method, use either the above OR this method, NOT both!)

Integrate to your CTLD instance like so, where my_ctld is a previously created CTLD instance:

       my_ctld.enableHercules = false -- avoid dual loading via CTLD F10 and F8 ground crew
       local herccargo = CTLD_HERCULES:New("blue", "Hercules Test", my_ctld)

You also need:

  • A template called "Infantry" for 10 Paratroopers (as set via herccargo.infantrytemplate).
  • Depending on what you are loading with the help of the ground crew, there are 42 more templates for the various vehicles that are loadable.

There's a quick check output in the dcs.log which tells you what's there and what not. E.g.:

       ...Checking template for APC BTR-82A Air [24998lb] (BTR-82A) ... MISSING)   
       ...Checking template for ART 2S9 NONA Skid [19030lb] (SAU 2-C9) ... MISSING)   
       ...Checking template for EWR SBORKA Air [21624lb] (Dog Ear radar) ... MISSING)   
       ...Checking template for Transport Tigr Air [15900lb] (Tigr_233036) ... OK)   

Expected template names are the ones in the rounded brackets.

5.2.1 Hints

The script works on the EVENTS.Shot trigger, which is used by the mod when you drop cargo from the Hercules while flying. Unloading on the ground does not achieve anything here. If you just want to unload on the ground, use the normal Moose CTLD (see 5.1).

DO NOT use the "splash damage" script together with this method! Your cargo will explode on the ground!

There are two ways of airdropping:

1) Very low and very slow (>5m and <10m AGL) - here you can drop stuff which has "Skid" at the end of the cargo name (loaded via F8 Ground Crew menu)
2) Higher up and slow (>100m AGL) - here you can drop paratroopers and cargo which has "Air" at the end of the cargo name (loaded via F8 Ground Crew menu)

Standard transport capabilities as per the real Hercules are:

          ["Hercules"] = {type="Hercules", crates=true, troops=true, cratelimit = 7, trooplimit = 64}, -- 19t cargo, 64 paratroopers

5.3 Don't automatically unpack dropped cargo but drop as CTLD_CARGO

Cargo can be defined to be automatically dropped as crates.

         my_ctld.dropAsCargoCrate = true -- default is false

The idea is, to have those crate behave like brought in with a helo. So any unpack restictions apply. To enable those cargo drops, the cargo types must be added manually in the CTLD configuration. So when the above defined template for "Vulcan" should be used as CTLD_Cargo, the following line has to be added. NoCrates, PerCrateMass, Stock, SubCategory can be configured freely.

         my_ctld:AddCratesCargo("Vulcan",      {"Vulcan"}, CTLD_CARGO.Enum.VEHICLE, 6, 2000, nil, "SAM/AAA")

So if the Vulcan in the example now needs six crates to complete, you have to bring two Hercs with three Vulcan crates each and drop them very close together...

6. Save and load back units - persistance

You can save and later load back units dropped or build to make your mission persistent. For this to work, you need to de-sanitize io and lfs in your MissionScripting.lua, which is located in your DCS installtion folder under Scripts. There is a risk involved in doing that; if you do not know what that means, this is possibly not for you.

Use the following options to manage your saves:

         my_ctld.enableLoadSave = true -- allow auto-saving and loading of files
         my_ctld.saveinterval = 600 -- save every 10 minutes
         my_ctld.filename = "missionsave.csv" -- example filename
         my_ctld.filepath = "C:\\Users\\myname\\Saved Games\\DCS\Missions\\MyMission" -- example path
         my_ctld.eventoninject = true -- fire OnAfterCratesBuild and OnAfterTroopsDeployed events when loading (uses Inject functions)
         my_ctld.useprecisecoordloads = true -- Instead if slightly varyiing the group position, try to maintain it as is

Then use an initial load at the beginning of your mission:

       my_ctld:__Load(10)

Caveat: If you use units build by multiple templates, they will effectively double on loading. Dropped crates are not saved. Current stock is not saved.

7. Complex example - Build a complete FARP from a CTLD crate drop

Prerequisites - you need to add a cargo of type FOB to your CTLD instance, for simplification reasons we call it FOB:

       my_ctld:AddCratesCargo("FARP",{"FOB"},CTLD_CARGO.Enum.FOB,2)

The following code will build a FARP at the coordinate the FOB was dropped and built (the UTILS function used below does not need a template for the statics):

     -- FARP Radio. First one has 130AM name London, next 131 name Dallas, and so forth. 
     local FARPFreq = 129
     local FARPName = 1  --numbers 1..10

     local FARPClearnames = {
       [1]="London",
       [2]="Dallas",
       [3]="Paris",
       [4]="Moscow",
       [5]="Berlin",
       [6]="Rome",
       [7]="Madrid",
       [8]="Warsaw",
       [9]="Dublin",
       [10]="Perth",
       }

     function BuildAFARP(Coordinate)
       local coord = Coordinate  --Core.Point#COORDINATE

       local FarpNameNumber = ((FARPName-1)%10)+1 -- make sure 11 becomes 1 etc
       local FName = FARPClearnames[FarpNameNumber] -- get clear namee

       FARPFreq = FARPFreq + 1
       FARPName = FARPName + 1

       FName = FName .. " FAT COW "..tostring(FARPFreq).."AM" -- make name unique

       -- Get a Zone for loading 
       local ZoneSpawn = ZONE_RADIUS:New("FARP "..FName,Coordinate:GetVec2(),150,false)

       -- Spawn a FARP with our little helper and fill it up with resources (10t fuel each type, 10 pieces of each known equipment)
       UTILS.SpawnFARPAndFunctionalStatics(FName,Coordinate,ENUMS.FARPType.INVISIBLE,my_ctld.coalition,country.id.USA,FarpNameNumber,FARPFreq,radio.modulation.AM,nil,nil,nil,10,10)

       -- add a loadzone to CTLD
       my_ctld:AddCTLDZone("FARP "..FName,CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true)
       local m  = MESSAGE:New(string.format("FARP %s in operation!",FName),15,"CTLD"):ToBlue() 
     end

     function my_ctld:OnAfterCratesBuild(From,Event,To,Group,Unit,Vehicle)
       local name = Vehicle:GetName()
       if string.find(name,"FOB",1,true) then
         local Coord = Vehicle:GetCoordinate()
         Vehicle:Destroy(false)
         BuildAFARP(Coord) 
       end
     end

Global CTLD_CARGO

Global CTLD_ENGINEERING

Global CTLD_HERCULES

Type(s)

CTLD , extends Core.Fsm#FSM
Fields and Methods inherited from CTLD Description

CTLD:ActivateZone(Name, ZoneType, NewState)

User function - Activate Name #CTLD.CargoZone.Type ZoneType for this CTLD instance.

CTLD:AddCTLDZone(Name, Type, Color, Active, HasBeacon, Shiplength, Shipwidth)

User function - Creates and adds a #CTLD.CargoZone zone for this CTLD instance.

CTLD:AddCTLDZoneFromAirbase(AirbaseName, Type, Color, Active, HasBeacon)

User function - Creates and adds a #CTLD.CargoZone zone for this CTLD instance from an Airbase or FARP name.

CTLD:AddCratesCargo(Name, Templates, Type, NoCrates, PerCrateMass, Stock, SubCategory, DontShowInMenu, Location, UnitTypes, Category, TypeName, ShapeName)

User function - Add generic crate-type loadable as cargo.

CTLD:AddCratesRepair(Name, Template, Type, NoCrates, PerCrateMass, Stock, SubCategory, DontShowInMenu, Location, UnitTypes, Category, TypeName, ShapeName)

User function - Add generic repair crates loadable as cargo.

CTLD:AddPlayerTask(PlayerTask)

(User) Add a PLAYERTASK - FSM events will check success

CTLD:AddStaticsCargo(Name, Mass, Stock, SubCategory, DontShowInMenu, Location)

User function - Add generic static-type loadable as cargo.

CTLD:AddStockCrates(Name, Number)

User - function to add stock of a certain crates type

CTLD:AddStockStatics(Name, Number)

User - function to add stock of a certain crates type

CTLD:AddStockTroops(Name, Number)

User - function to add stock of a certain troops type

CTLD:AddTroopsCargo(Name, Templates, Type, NoTroops, PerTroopMass, Stock, SubCategory)

User function - Add generic troop type loadable as cargo.

CTLD:AddZone(Zone)

User function - Add a #CTLD.CargoZoneType zone for this CTLD instance.

CTLD:AutoHoverLoad(Unit)

(Internal) Autoload if we can do crates, have capacity free and are in a load zone.

CTLD:CanHoverLoad(Unit)

(Internal) Check if a unit is in a load zone and is hovering in parameters.

CTLD.CargoCounter

CTLD.CargoZoneType

CTLD.Cargo_Crates

CTLD.Cargo_Statics

CTLD.Cargo_Troops

CTLD:CheckAutoHoverload()

(Internal) Run through all pilots and see if we autoload.

CTLD:CheckDroppedBeacons()

(Internal) Housekeeping dropped beacons.

CTLD.ChinookTroopCircleRadius

CTLD.ClassName

Name of the class.

CTLD:CleanDroppedTroops()

(Internal) Run through DroppedTroops and capture alive units

CTLD.CrateCounter

CTLD.CrateDistance

CTLD.CtldUnits

CTLD:DeactivateZone(Name, ZoneType)

User function - Deactivate Name #CTLD.CargoZoneType ZoneType for this CTLD instance.

CTLD:DropBeaconNow(Unit)

(Internal) Function to create a dropped beacon

CTLD.DroppedCrates

CTLD.DroppedTroops

CTLD.EngineerSearch

CTLD.Engineers

CTLD.EngineersInField

CTLD.ExtractFactor

CTLD.FlareColor

CTLD.FreeFMFrequencies

CTLD.FreeUHFFrequencies

CTLD.FreeVHFFrequencies

CTLD:GetStaticsCargoFromTemplate(Name, Mass)

User function - Get a generic static-type loadable as #CTLD_CARGO object.

CTLD:GetStockCrates()

User - function to get a table of crates in stock

CTLD:GetStockStatics()

User - function to get a table of statics cargo in stock

CTLD:GetStockTroops()

User - function to get a table of troops in stock

CTLD.HercMaxAngels

CTLD.HercMaxSpeed

CTLD.HercMinAngels

CTLD:InjectStaticFromTemplate(Zone, Template, Mass)

(User) Inject static cargo objects.

CTLD:InjectStatics(Zone, Cargo, RandomCoord, FromLoad)

(Internal) Inject crates and static cargo objects.

CTLD:InjectTroops(Zone, Cargo, Surfacetypes, PreciseLocation, Structure)

(User) Pre-populate troops in the field.

CTLD:InjectVehicles(Zone, Cargo, Surfacetypes, PreciseLocation, Structure)

(User) Pre-populate vehicles in the field.

CTLD:IsCorrectFlightParameters(Unit)

(Internal) Check if a Hercules is flying in parameters for air drops.

CTLD:IsCorrectHover(Unit)

(Internal) Check if a unit is hovering in parameters.

CTLD:IsHercules(Unit)

(Internal) Function to check if a unit is a Hercules C-130 or a Bronco.

CTLD:IsHook(Unit)

(Internal) Function to check if a unit is a CH-47

CTLD:IsUnitInAir(Unit)

(Internal) Check if a unit is above ground.

CTLD:IsUnitInZone(Unit, Zonetype)

(Internal) Function to see if a unit is in a specific zone type.

CTLD:Load()

Triggers the FSM event "Save".

CTLD.Loaded_Cargo

CTLD.MenusDone

CTLD:New(Coalition, Prefixes, Alias)

Instantiate a new CTLD.

CTLD:OnAfterCratesBuild(From, Event, To, Group, Unit, Vehicle)

FSM Function OnAfterCratesBuild.

CTLD:OnAfterCratesBuildStarted(From, Event, To, Group, Unit)

FSM Function OnAfterCratesBuildStarted.

CTLD:OnAfterCratesDropped(From, Event, To, Group, Unit, Cargotable)

FSM Function OnAfterCratesDropped.

CTLD:OnAfterCratesPickedUp(From, Event, To, Group, Unit, Cargo)

FSM Function OnAfterCratesPickedUp.

CTLD:OnAfterCratesRepairStarted(From, Event, To, Group, Unit)

FSM Function OnAfterCratesRepairStarted.

CTLD:OnAfterCratesRepaired(From, Event, To, Group, Unit, Vehicle)

FSM Function OnAfterCratesRepaired.

CTLD:OnAfterLoad(From, Event, To, path, filename)

FSM Function OnAfterLoad.

CTLD:OnAfterSave(From, Event, To, path, filename)

FSM Function OnAfterSave.

CTLD:OnAfterTroopsDeployed(From, Event, To, Group, Unit, Troops)

FSM Function OnAfterTroopsDeployed.

CTLD:OnAfterTroopsExtracted(From, Event, To, Group, Unit, Cargo)

FSM Function OnAfterTroopsExtracted.

CTLD:OnAfterTroopsPickedUp(From, Event, To, Group, Unit, Cargo)

FSM Function OnAfterTroopsPickedUp.

CTLD:OnAfterTroopsRTB(From, Event, To, Group, Unit)

FSM Function OnAfterTroopsRTB.

CTLD:OnBeforeCratesBuild(From, Event, To, Group, Unit, Vehicle)

FSM Function OnBeforeCratesBuild.

CTLD:OnBeforeCratesBuildStarted(From, Event, To, Group, Unit)

FSM Function OnBeforeCratesBuildStarted.

CTLD:OnBeforeCratesDropped(From, Event, To, Group, Unit, Cargotable)

FSM Function OnBeforeCratesDropped.

CTLD:OnBeforeCratesPickedUp(From, Event, To, Group, Unit, Cargo)

FSM Function OnBeforeCratesPickedUp.

CTLD:OnBeforeCratesRepairStarted(From, Event, To, Group, Unit)

FSM Function OnBeforeCratesRepairStarted.

CTLD:OnBeforeCratesRepaired(From, Event, To, Group, Unit, Vehicle)

FSM Function OnBeforeCratesRepaired.

CTLD:OnBeforeTroopsDeployed(From, Event, To, Group, Unit, Troops)

FSM Function OnBeforeTroopsDeployed.

CTLD:OnBeforeTroopsExtracted(From, Event, To, Group, Unit, Cargo)

FSM Function OnBeforeTroopsExtracted.

CTLD:OnBeforeTroopsPickedUp(From, Event, To, Group, Unit, Cargo)

FSM Function OnBeforeTroopsPickedUp.

CTLD:OnBeforeTroopsRTB(From, Event, To, Group, Unit, ZoneName, ZoneObject)

FSM Function OnBeforeTroopsRTB.

CTLD.PackDistance

CTLD.PilotGroups

CTLD.PlayerTaskQueue

CTLD:PreloadCrates(Unit, Cratesname, NumberOfCrates)

(User) Pre-load crates into a helo, e.g.

CTLD:PreloadTroops(Unit, Troopname)

(User) Pre-load troops into a helo, e.g.

CTLD.RadioModulation

CTLD.RadioPath

CTLD.RadioSound

CTLD.RadioSoundFC3

CTLD:RemoveStockCrates(Name, Number)

User - function to remove stock of a certain crates type

CTLD:RemoveStockStatics(Name, Number)

User - function to remove stock of a certain statics type

CTLD:RemoveStockTroops(Name, Number)

User - function to remove stock of a certain troops type

CTLD:SetOwnSetPilotGroups(Set)

User - Function to add onw SET_GROUP Set-up for pilot filtering and assignment.

CTLD:SetSoundfilesFolder(FolderPath)

Set folder path where the CTLD sound files are located within you mission (miz) file.

CTLD:SetStockCrates(Name, Number)

User - function to set the stock of a certain crates type

CTLD:SetStockStatics(Name, Number)

User - function to set the stock of a certain statics type

CTLD:SetStockTroops(Name, Number)

User - function to set the stock of a certain troops type

CTLD:SetTroopDropZoneRadius(Radius)

(User) Set drop zone radius for troop drops in meters.

CTLD:SetUnitCapabilities(Unittype, Cancrates, Cantroops, Cratelimit, Trooplimit, Length, Maxcargoweight)

User - Function to add/adjust unittype capabilities.

CTLD.SmokeColor

CTLD:SmokePositionNow(Unit, Flare, SmokeColor)

User function - Drop a smoke or flare at current location.

CTLD:SmokeZoneNearBy(Unit, Flare)

User function - Start smoke/flare in a zone close to the Unit.

CTLD.Spawned_Cargo

CTLD.Spawned_Crates

CTLD:Start()

Triggers the FSM event "Start".

CTLD:Status()

Triggers the FSM event "Status".

CTLD:Stop()

Triggers the FSM event "Stop".

CTLD.TroopCounter

CTLD:UnitCapabilities(Unittype, Cancrates, Cantroops, Cratelimit, Trooplimit, Length, Maxcargoweight)

[Deprecated] - Function to add/adjust unittype capabilities.

CTLD.UnitTypeCapabilities

CTLD.UsedFMFrequencies

CTLD.UsedUHFFrequencies

CTLD.UsedVHFFrequencies

CTLD.UserSetGroup

CTLD:_AddRadioBeacon(Name, Sound, Mhz, Modulation, IsShip, IsDropped)

(Internal) Add radio beacon to zone.

CTLD:_BuildCrates(Group, Unit, Engineering)

(Internal) Function to build nearby crates.

CTLD:_BuildObjectFromCrates(Group, Unit, Build, Repair, RepairLocation)

(Internal) Function to actually SPAWN buildables in the mission.

CTLD:_CheckEngineers()

(Internal) Check on engineering teams

CTLD:_CheckTemplates(temptable)

[Internal] Function to check if a template exists in the mission.

CTLD:_CleanUpCrates(Crates, Build, Number)

(Internal) Housekeeping - Cleanup crates when build

CTLD:_CleanupTrackedCrates(crateIdsToRemove)

(Internal) Function to clean up tracked cargo crates

CTLD:_EventHandler(EventData)

(Internal) Event handler function

CTLD:_ExtractTroops(Group, Unit)

(Internal) Function to extract (load from the field) troops into a heli.

CTLD:_FindCratesCargoObject(Name)

(Internal) Find a crates CTLD_CARGO object in stock

CTLD:_FindCratesNearby(_group, _unit, _dist, _ignoreweight, ignoretype)

(Internal) Function to find and return nearby crates.

CTLD:_FindRepairNearby(Group, Unit, Repairtype)

CTLD:_FindTroopsCargoObject(Name)

(Internal) Find a troops CTLD_CARGO object in stock

CTLD:_GenerateFMFrequencies()

(Internal) Function to generate valid FM Frequencies

CTLD:_GenerateUHFrequencies()

(Internal) Function to generate valid UHF Frequencies

CTLD:_GenerateVHFrequencies()

(Internal) Populate table with available VHF beacon frequencies.

CTLD:_GetCrates(Group, Unit, Cargo, number, drop, pack)

(Internal) Function to spawn crates in front of the heli.

CTLD:_GetDistance(_point1, _point2)

(Internal) Return distance in meters between two coordinates.

CTLD:_GetFMBeacon(Name)

(Internal) Function to obtain a valid FM frequency.

CTLD:_GetMaxLoadableMass(Unit)

(Internal) Function to calculate max loadable mass left over.

CTLD:_GetUHFBeacon(Name)

(Internal) Function to obtain a valid UHF frequency.

CTLD:_GetUnitCapabilities(Unit)

(Internal) Function to get capabilities of a chopper

CTLD:_GetUnitCargoMass(Unit)

(Internal) Function to get current loaded mass

CTLD:_GetUnitPositions(Coordinate, Radius, Heading, Template)

(Internal) Function to set troops positions of a template to a nice circle

CTLD:_GetVHFBeacon(Name)

(Internal) Function to obtain a valid VHF frequency.

CTLD:_ListCargo(Group, Unit)

(Internal) Function to list loaded cargo.

CTLD:_ListCratesNearby(Group, Unit, _group, _unit)

(Internal) Function to find and list nearby crates.

CTLD:_ListInventory(Group, Unit)

(Internal) Function to list loaded cargo.

CTLD:_ListRadioBeacons(Group, Unit)

(Internal) Function to show list of radio beacons

CTLD:_LoadCratesNearby(Group, Unit)

(Internal) Function to get and load nearby crates.

CTLD:_LoadTroops(Group, Unit, Cargotype, Inject)

(Internal) Function to load troops into a heli.

CTLD:_MoveGroupToZone(Group)

(Internal) Function to move group to WP zone.

CTLD:_PackCratesNearby(Group, Unit)

CTLD:_PreloadCrates(Group, Unit, Cargo, NumberOfCrates)

(Internal) Pre-load crates into a helo.

CTLD:_RefreshF10Menus()

(Internal) Housekeeping - Function to refresh F10 menus.

CTLD:_RefreshRadioBeacons()

(Internal) Function to refresh radio beacons

CTLD:_RemoveCratesNearby(_group, _unit)

CTLD:_RepairCrates(Group, Unit, Engineering)

(Internal) Function to repair nearby vehicles / FOBs

CTLD:_RepairObjectFromCrates(Group, Unit, Crates, Build, Number, Engineering)

(Internal) Function to repair an object.

CTLD:_SendMessage(Text, Time, Clearscreen, Group)

(Internal) Function to message a group.

CTLD:_ShowFlightParams(Group, Unit)

(Internal) List if a Herc unit is flying in parameters.

CTLD:_ShowHoverParams(Group, Unit)

(Internal) List if a unit is hovering in parameters.

CTLD:_UnloadCrates(Group, Unit)

(Internal) Function to unload crates from heli.

CTLD:_UnloadTroops(Group, Unit)

(Internal) Function to unload troops from heli.

CTLD:_UpdateUnitCargoMass(Unit)

(Internal) Function to calculate and set Unit internal cargo mass

CTLD:__Load(delay)

Triggers the FSM event "Load" after a delay.

CTLD:__Save(delay)

Triggers the FSM event "Save" after a delay.

CTLD:__Start(delay)

Triggers the FSM event "Start" after a delay.

CTLD:__Status(delay)

Triggers the FSM event "Status" after a delay.

CTLD:__Stop(delay)

Triggers the FSM event "Stop" after a delay.

CTLD.alias

CTLD.allowcratepickupagain

CTLD.basetype

CTLD.buildtime

CTLD.coalition

Coalition side number, e.g. coalition.side.RED.

CTLD.coalitiontxt

CTLD.cratecountry

CTLD.debug

CTLD.dropAsCargoCrate

CTLD.dropOffZones

CTLD.dropcratesanywhere

CTLD.droppedBeacons

CTLD.droppedbeaconref

CTLD.droppedbeacontimeout

CTLD.enableChinookGCLoading

CTLD.enableHercules

CTLD.enableLoadSave

CTLD.enableslingload

CTLD.eventoninject

CTLD.filename

CTLD.filepath

CTLD.forcehoverload

CTLD.hoverautoloading

CTLD.lid

Class id string for output to DCS log file.

CTLD.maximumHoverHeight

CTLD.minimumHoverHeight

CTLD.movecratesbeforebuild

CTLD.movetroopsdistance

CTLD.movetroopstowpzone

CTLD.nobuildinloadzones

CTLD.nobuildmenu

CTLD:onafterCratesBuild(From, Event, To, Group, Unit, Vehicle)

(Internal) FSM Function onafterCratesBuild.

CTLD:onafterLoad(From, Event, To, path, filename)

On after "Load" event.

CTLD:onafterSave(From, Event, To, path, filename)

On after "Save" event.

CTLD:onafterStart(From, Event, To)

(Internal) FSM Function onafterStart.

CTLD:onafterStatus(From, Event, To)

(Internal) FSM Function onafterStatus.

CTLD:onafterStop(From, Event, To)

(Internal) FSM Function onafterStop.

CTLD:onafterTroopsDeployed(From, Event, To, Group, Unit, Troops, Type)

(Internal) FSM Function onafterTroopsDeployed.

CTLD:onbeforeCratesBuild(From, Event, To, Group, Unit, Vehicle)

(Internal) FSM Function onbeforeCratesBuild.

CTLD:onbeforeCratesDropped(From, Event, To, Group, Unit, Cargotable)

(Internal) FSM Function onbeforeCratesDropped.

CTLD:onbeforeCratesPickedUp(From, Event, To, Group, Unit, Cargo)

(Internal) FSM Function onbeforeCratesPickedUp.

CTLD:onbeforeLoad(From, Event, To, path, filename)

On before "Load" event.

CTLD:onbeforeSave(From, Event, To, path, filename)

On before "Save" event.

CTLD:onbeforeStatus(From, Event, To)

(Internal) FSM Function onbeforeStatus.

CTLD:onbeforeTroopsDeployed(From, Event, To, Group, Unit, Troops)

(Internal) FSM Function onbeforeTroopsDeployed.

CTLD:onbeforeTroopsExtracted(From, Event, To, Group, Unit, Troops)

(Internal) FSM Function onbeforeTroopsExtracted.

CTLD:onbeforeTroopsPickedUp(From, Event, To, Group, Unit, Cargo)

(Internal) FSM Function onbeforeTroopsPickedUp.

CTLD:onbeforeTroopsRTB(From, Event, To, Group, Unit, ZoneName, ZoneObject)

(Internal) FSM Function onbeforeTroopsRTB.

CTLD.pickupZones

CTLD.pilotmustopendoors

CTLD.placeCratesAhead

CTLD.prefixes

CTLD.repairtime

CTLD.saveinterval

CTLD.shipZones

CTLD.smokedistance

CTLD.subcats

CTLD.subcatsTroop

CTLD.suppressmessages

CTLD.surfacetypes

CTLD.troopdropzoneradius

CTLD.useprecisecoordloads

CTLD.useprefix

CTLD.usesubcats

CTLD.verbose

Verbosity level.

CTLD.version

CTLD class version.

CTLD.wpZones

Fields and Methods inherited from FSM Description

CTLD:AddEndState(State)

Adds an End state.

CTLD: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.

CTLD:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

CTLD:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

CTLD.CallScheduler

CTLD.Events

CTLD:GetCurrentState()

Get current state.

CTLD:GetEndStates()

Returns the End states.

CTLD:GetProcess(From, Event)

CTLD:GetProcesses()

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

CTLD:GetScores()

Returns a table with the scores defined.

CTLD:GetStartState()

Returns the start state of the FSM.

CTLD:GetState()

Get current state.

CTLD:GetSubs()

Returns a table with the Subs defined.

CTLD:GetTransitions()

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

CTLD:Is(State)

Check if FSM is in state.

CTLD:LoadCallBacks(CallBackTable)

Load call backs.

CTLD:New()

Creates a new FSM object.

CTLD.Scores

CTLD:SetProcess(From, Event, Fsm)

CTLD:SetStartState(State)

Sets the start state of the FSM.

CTLD._EndStates

CTLD._EventSchedules

CTLD._Processes

CTLD._Scores

CTLD._StartState

CTLD._Transitions

CTLD:_add_to_map(Map, Event)

Add to map.

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

Call handler.

CTLD:_create_transition(EventName)

Create transition.

CTLD:_delayed_transition(EventName)

Delayed transition.

CTLD:_eventmap(Events, EventStructure)

Event map.

CTLD:_gosub(ParentFrom, ParentEvent)

Go sub.

CTLD:_handler(EventName, ...)

Handler.

CTLD:_isendstate(Current)

Is end state.

CTLD:_submap(subs, sub, name)

Sub maps.

CTLD:can(e)

Check if can do an event.

CTLD:cannot(e)

Check if cannot do an event.

CTLD.current

CTLD.endstates

CTLD:is(State, state)

Check if FSM is in state.

CTLD.options

CTLD.subs

Fields and Methods inherited from CTLD.Buildable Description

CTLD.Buildable.CanBuild

Is buildable or not.

CTLD.Buildable.Coord

CTLD.Buildable.Found

Found crates.

CTLD.Buildable.Name

Name of the object.

CTLD.Buildable.Required

Required crates.

CTLD.Buildable.Template

Template names for this build.

CTLD.Buildable.Type

Type enumerator (for moves).

Fields and Methods inherited from CTLD.CargoZone Description

CTLD.CargoZone.active

Active or not.

CTLD.CargoZone.color

Smoke color for zone, e.g. SMOKECOLOR.Red.

CTLD.CargoZone.fmbeacon

Beacon info as #CTLD.ZoneBeacon

CTLD.CargoZone.hasbeacon

Create and run radio beacons if active.

CTLD.CargoZone.name

Name of Zone.

CTLD.CargoZone.shiplength

For ships - length of ship

CTLD.CargoZone.shipwidth

For ships - width of ship

CTLD.CargoZone.timestamp

For dropped beacons - time this was created

CTLD.CargoZone.type

Type of zone, i.e. load,drop,move,ship

CTLD.CargoZone.uhfbeacon

Beacon info as #CTLD.ZoneBeacon

CTLD.CargoZone.vhfbeacon

Beacon info as #CTLD.ZoneBeacon

Fields and Methods inherited from CTLD.LoadedCargo Description

CTLD.LoadedCargo.Cargo

CTLD.LoadedCargo.Cratesloaded

CTLD.LoadedCargo.Troopsloaded

Fields and Methods inherited from CTLD.RadioModulation Description

CTLD.RadioModulation.AM

CTLD.RadioModulation.FM

Fields and Methods inherited from CTLD.ZoneBeacon Description

CTLD.ZoneBeacon.frequency

-- in mHz

CTLD.ZoneBeacon.modulation

-- i.e.CTLD.RadioModulation.FM or CTLD.RadioModulation.AM

CTLD.ZoneBeacon.name

-- Name of zone for the coordinate

Fields and Methods inherited from CTLD_CARGO Description

CTLD_CARGO:AddMark(Mark)

Add mark

CTLD_CARGO:AddStock(Number)

Add Stock.

CTLD_CARGO:AddUnitTypeName(UnitTypes)

Add specific unit types to this CARGO (restrict what types can pick this up).

CTLD_CARGO:CanLoadDirectly()

Query directly loadable.

CTLD_CARGO.CargoType

Enumerator of Type.

CTLD_CARGO.ClassName

Class name.

CTLD_CARGO.CratesNeeded

Crates needed to build.

CTLD_CARGO.DontShowInMenu

Show this item in menu or not.

CTLD_CARGO.Enum

CTLD_CARGO:GetCratesNeeded()

Query number of crates or troopsize.

CTLD_CARGO:GetID()

Query ID.

CTLD_CARGO:GetLocation()

Query Location.

CTLD_CARGO:GetMark(Mark)

Get mark

CTLD_CARGO:GetMass()

Query Mass.

CTLD_CARGO:GetName()

Query Name.

CTLD_CARGO:GetNetMass()

Get overall mass of a cargo object, i.e.

CTLD_CARGO:GetPositionable()

Query type.

CTLD_CARGO:GetStaticResourceMap()

Get Resource Map information table

CTLD_CARGO:GetStaticTypeAndShape()

Get the specific static type and shape from this CARGO if set.

CTLD_CARGO:GetStock()

Get Stock.

CTLD_CARGO:GetSubCat()

Query Subcategory

CTLD_CARGO:GetTemplates()

Query Templates.

CTLD_CARGO:GetType()

Query type.

CTLD_CARGO.HasBeenDropped

True if dropped from heli.

CTLD_CARGO.HasBeenMoved

Flag for moving.

CTLD_CARGO:HasMoved()

Query has moved.

CTLD_CARGO.ID

ID of this cargo.

CTLD_CARGO:IsRepair()

Query crate type for REPAIR

CTLD_CARGO:IsStatic()

Query crate type for STATIC

CTLD_CARGO:Isloaded(loaded)

Query if cargo has been loaded.

CTLD_CARGO.LoadDirectly

Flag for direct loading.

CTLD_CARGO.Location

Location (if set) where to get this cargo item.

CTLD_CARGO.Mark

CTLD_CARGO.Name

Name for menu.

CTLD_CARGO:New(ID, Name, Templates, Sorte, HasBeenMoved, LoadDirectly, CratesNeeded, Positionable, Dropped, PerCrateMass, Stock, Subcategory, DontShowInMenu, Location)

Function to create new CTLD_CARGO object.

CTLD_CARGO.PerCrateMass

Mass in kg.

CTLD_CARGO.Positionable

Representation of cargo in the mission.

CTLD_CARGO:RemoveStock(Number)

Remove Stock.

CTLD_CARGO.ResourceMap

Resource Map information table if it has been set for static cargo items.

CTLD_CARGO:SetHasMoved(moved)

Set HasMoved.

CTLD_CARGO:SetStaticResourceMap(ResourceMap)

Add Resource Map information table

CTLD_CARGO:SetStaticTypeAndShape(TypeName, ShapeName, Category)

Add specific static type and shape to this CARGO.

CTLD_CARGO:SetStock(Number)

Set Stock.

CTLD_CARGO:SetWasDropped(dropped)

Set WasDropped.

CTLD_CARGO.StaticCategory

Individual static category if set.

CTLD_CARGO.StaticShape

Individual shape if set.

CTLD_CARGO.StaticType

Individual type if set.

CTLD_CARGO.Stock

Number of builds available, -1 for unlimited.

CTLD_CARGO.Subcategory

Sub-category name.

CTLD_CARGO.Templates

Table of #POSITIONABLE objects.

CTLD_CARGO.TypeNames

Table of unit types able to pick this cargo up.

CTLD_CARGO:UnitCanCarry(Unit)

Check if a specific unit can carry this CARGO (restrict what types can pick this up).

CTLD_CARGO:WasDropped()

Query was dropped.

CTLD_CARGO:WipeMark()

Wipe mark

Fields and Methods inherited from BASE Description

CTLD_CARGO.ClassID

The ID number of the class.

CTLD_CARGO.ClassName

The name of the class.

CTLD_CARGO.ClassNameAndID

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

CTLD_CARGO:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

CTLD_CARGO:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

CTLD_CARGO:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

CTLD_CARGO:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

CTLD_CARGO:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

CTLD_CARGO:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

CTLD_CARGO:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

CTLD_CARGO:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

CTLD_CARGO:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

CTLD_CARGO:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

CTLD_CARGO:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

CTLD_CARGO:E(Arguments)

Log an exception which will be traced always.

CTLD_CARGO:EventDispatcher()

Returns the event dispatcher

CTLD_CARGO:EventRemoveAll()

Remove all subscribed events

CTLD_CARGO:F(Arguments)

Trace a function call.

CTLD_CARGO:F2(Arguments)

Trace a function call level 2.

CTLD_CARGO:F3(Arguments)

Trace a function call level 3.

CTLD_CARGO:GetClassID()

Get the ClassID of the class instance.

CTLD_CARGO:GetClassName()

Get the ClassName of the class instance.

CTLD_CARGO:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

CTLD_CARGO:GetEventPriority()

Get the Class Core.Event processing Priority.

CTLD_CARGO:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

CTLD_CARGO:GetState(Object, Key)

Get a Value given a Key from the Object.

CTLD_CARGO:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

CTLD_CARGO:I(Arguments)

Log an information which will be traced always.

CTLD_CARGO:Inherit(Child, Parent)

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

CTLD_CARGO:IsInstanceOf(ClassName)

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

CTLD_CARGO:IsTrace()

Enquires if tracing is on (for the class).

CTLD_CARGO:New()

BASE constructor.

CTLD_CARGO:OnEvent(EventData)

Occurs when an Event for an object is triggered.

CTLD_CARGO:OnEventBDA(EventData)

BDA.

CTLD_CARGO:OnEventBaseCaptured(EventData)

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

CTLD_CARGO:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

CTLD_CARGO:OnEventCrash(EventData)

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

CTLD_CARGO:OnEventDead(EventData)

Occurs when an object is dead.

CTLD_CARGO:OnEventDetailedFailure(EventData)

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

CTLD_CARGO:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

CTLD_CARGO:OnEventDynamicCargoLoaded(EventData)

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

CTLD_CARGO:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

CTLD_CARGO:OnEventDynamicCargoUnloaded(EventData)

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

CTLD_CARGO:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_CARGO:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

CTLD_CARGO:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

CTLD_CARGO:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

CTLD_CARGO:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

CTLD_CARGO:OnEventKill(EventData)

Occurs on the death of a unit.

CTLD_CARGO:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_CARGO:OnEventLandingAfterEjection(EventData)

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

CTLD_CARGO:OnEventLandingQualityMark(EventData)

Landing quality mark.

CTLD_CARGO:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

CTLD_CARGO:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

CTLD_CARGO:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

CTLD_CARGO:OnEventMissionEnd(EventData)

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_CARGO:OnEventMissionStart(EventData)

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_CARGO:OnEventNewDynamicCargo(EventData)

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

CTLD_CARGO:OnEventParatrooperLanding(EventData)

Weapon add.

CTLD_CARGO:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

CTLD_CARGO:OnEventPlayerEnterAircraft(EventData)

Occurs when a player enters a slot and takes control of an aircraft.

CTLD_CARGO:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

CTLD_CARGO:OnEventPlayerLeaveUnit(EventData)

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

CTLD_CARGO:OnEventRefueling(EventData)

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

CTLD_CARGO:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

CTLD_CARGO:OnEventScore(EventData)

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

CTLD_CARGO:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

CTLD_CARGO:OnEventShootingStart(EventData)

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

CTLD_CARGO:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

CTLD_CARGO:OnEventTakeoff(EventData)

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

CTLD_CARGO:OnEventTriggerZone(EventData)

Trigger zone.

CTLD_CARGO:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

CTLD_CARGO:ScheduleStop(SchedulerID)

Stops the Schedule.

CTLD_CARGO.Scheduler

CTLD_CARGO:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

CTLD_CARGO:SetState(Object, Key, Value)

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

CTLD_CARGO:T(Arguments)

Trace a function logic level 1.

CTLD_CARGO:T2(Arguments)

Trace a function logic level 2.

CTLD_CARGO:T3(Arguments)

Trace a function logic level 3.

CTLD_CARGO:TraceAll(TraceAll)

Trace all methods in MOOSE

CTLD_CARGO:TraceClass(Class)

Set tracing for a class

CTLD_CARGO:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

CTLD_CARGO:TraceLevel(Level)

Set trace level

CTLD_CARGO:TraceOff()

Set trace off.

CTLD_CARGO:TraceOn()

Set trace on.

CTLD_CARGO: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.

CTLD_CARGO:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

CTLD_CARGO._

CTLD_CARGO:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

CTLD_CARGO:_Serialize(Arguments)

(Internal) Serialize arguments

CTLD_CARGO:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

CTLD_CARGO.__

CTLD_CARGO:onEvent(event)

The main event handling function...

Fields and Methods inherited from CTLD_ENGINEERING Description

CTLD_ENGINEERING:Arrive()

(Internal) Arrived at crates in reach.

CTLD_ENGINEERING:Build()

(Internal) Set build status.

CTLD_ENGINEERING.ClassName

CTLD_ENGINEERING:Done()

(Internal) Set done status.

CTLD_ENGINEERING:GetStatus()

(Internal) Get the status

CTLD_ENGINEERING.Group

CTLD_ENGINEERING.HeliGroup

CTLD_ENGINEERING.HeliUnit

CTLD_ENGINEERING:IsNotStatus(State)

(Internal) Check the negative status

CTLD_ENGINEERING:IsStatus(State)

(Internal) Check the status

CTLD_ENGINEERING:Move()

(Internal) Move towards crates in reach.

CTLD_ENGINEERING.Name

CTLD_ENGINEERING:New(Name, GroupName, HeliGroup, HeliUnit)

Create a new instance.

CTLD_ENGINEERING:Search(crates, number)

(Internal) Search for crates in reach.

CTLD_ENGINEERING:SetStatus(State)

(Internal) Set the status

CTLD_ENGINEERING:Start()

(Internal) Set start status.

CTLD_ENGINEERING.State

CTLD_ENGINEERING:Stop()

(Internal) Set stop status.

CTLD_ENGINEERING.Unit

CTLD_ENGINEERING.Version

CTLD_ENGINEERING:_GetDistance(_point1, _point2)

(Internal) Return distance in meters between two coordinates.

CTLD_ENGINEERING.currwpt

CTLD_ENGINEERING.lid

CTLD_ENGINEERING.marktimer

Fields and Methods inherited from BASE Description

CTLD_ENGINEERING.ClassID

The ID number of the class.

CTLD_ENGINEERING.ClassName

The name of the class.

CTLD_ENGINEERING.ClassNameAndID

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

CTLD_ENGINEERING:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

CTLD_ENGINEERING:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

CTLD_ENGINEERING:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

CTLD_ENGINEERING:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

CTLD_ENGINEERING:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

CTLD_ENGINEERING:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

CTLD_ENGINEERING:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

CTLD_ENGINEERING:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

CTLD_ENGINEERING:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

CTLD_ENGINEERING:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

CTLD_ENGINEERING:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

CTLD_ENGINEERING:E(Arguments)

Log an exception which will be traced always.

CTLD_ENGINEERING:EventDispatcher()

Returns the event dispatcher

CTLD_ENGINEERING:EventRemoveAll()

Remove all subscribed events

CTLD_ENGINEERING:F(Arguments)

Trace a function call.

CTLD_ENGINEERING:F2(Arguments)

Trace a function call level 2.

CTLD_ENGINEERING:F3(Arguments)

Trace a function call level 3.

CTLD_ENGINEERING:GetClassID()

Get the ClassID of the class instance.

CTLD_ENGINEERING:GetClassName()

Get the ClassName of the class instance.

CTLD_ENGINEERING:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

CTLD_ENGINEERING:GetEventPriority()

Get the Class Core.Event processing Priority.

CTLD_ENGINEERING:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

CTLD_ENGINEERING:GetState(Object, Key)

Get a Value given a Key from the Object.

CTLD_ENGINEERING:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

CTLD_ENGINEERING:I(Arguments)

Log an information which will be traced always.

CTLD_ENGINEERING:Inherit(Child, Parent)

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

CTLD_ENGINEERING:IsInstanceOf(ClassName)

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

CTLD_ENGINEERING:IsTrace()

Enquires if tracing is on (for the class).

CTLD_ENGINEERING:New()

BASE constructor.

CTLD_ENGINEERING:OnEvent(EventData)

Occurs when an Event for an object is triggered.

CTLD_ENGINEERING:OnEventBDA(EventData)

BDA.

CTLD_ENGINEERING:OnEventBaseCaptured(EventData)

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

CTLD_ENGINEERING:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

CTLD_ENGINEERING:OnEventCrash(EventData)

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

CTLD_ENGINEERING:OnEventDead(EventData)

Occurs when an object is dead.

CTLD_ENGINEERING:OnEventDetailedFailure(EventData)

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

CTLD_ENGINEERING:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

CTLD_ENGINEERING:OnEventDynamicCargoLoaded(EventData)

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

CTLD_ENGINEERING:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

CTLD_ENGINEERING:OnEventDynamicCargoUnloaded(EventData)

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

CTLD_ENGINEERING:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_ENGINEERING:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

CTLD_ENGINEERING:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

CTLD_ENGINEERING:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

CTLD_ENGINEERING:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

CTLD_ENGINEERING:OnEventKill(EventData)

Occurs on the death of a unit.

CTLD_ENGINEERING:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_ENGINEERING:OnEventLandingAfterEjection(EventData)

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

CTLD_ENGINEERING:OnEventLandingQualityMark(EventData)

Landing quality mark.

CTLD_ENGINEERING:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

CTLD_ENGINEERING:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

CTLD_ENGINEERING:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

CTLD_ENGINEERING:OnEventMissionEnd(EventData)

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_ENGINEERING:OnEventMissionStart(EventData)

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_ENGINEERING:OnEventNewDynamicCargo(EventData)

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

CTLD_ENGINEERING:OnEventParatrooperLanding(EventData)

Weapon add.

CTLD_ENGINEERING:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

CTLD_ENGINEERING:OnEventPlayerEnterAircraft(EventData)

Occurs when a player enters a slot and takes control of an aircraft.

CTLD_ENGINEERING:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

CTLD_ENGINEERING:OnEventPlayerLeaveUnit(EventData)

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

CTLD_ENGINEERING:OnEventRefueling(EventData)

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

CTLD_ENGINEERING:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

CTLD_ENGINEERING:OnEventScore(EventData)

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

CTLD_ENGINEERING:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

CTLD_ENGINEERING:OnEventShootingStart(EventData)

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

CTLD_ENGINEERING:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

CTLD_ENGINEERING:OnEventTakeoff(EventData)

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

CTLD_ENGINEERING:OnEventTriggerZone(EventData)

Trigger zone.

CTLD_ENGINEERING:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

CTLD_ENGINEERING:ScheduleStop(SchedulerID)

Stops the Schedule.

CTLD_ENGINEERING.Scheduler

CTLD_ENGINEERING:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

CTLD_ENGINEERING:SetState(Object, Key, Value)

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

CTLD_ENGINEERING:T(Arguments)

Trace a function logic level 1.

CTLD_ENGINEERING:T2(Arguments)

Trace a function logic level 2.

CTLD_ENGINEERING:T3(Arguments)

Trace a function logic level 3.

CTLD_ENGINEERING:TraceAll(TraceAll)

Trace all methods in MOOSE

CTLD_ENGINEERING:TraceClass(Class)

Set tracing for a class

CTLD_ENGINEERING:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

CTLD_ENGINEERING:TraceLevel(Level)

Set trace level

CTLD_ENGINEERING:TraceOff()

Set trace off.

CTLD_ENGINEERING:TraceOn()

Set trace on.

CTLD_ENGINEERING: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.

CTLD_ENGINEERING:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

CTLD_ENGINEERING._

CTLD_ENGINEERING:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

CTLD_ENGINEERING:_Serialize(Arguments)

(Internal) Serialize arguments

CTLD_ENGINEERING:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

CTLD_ENGINEERING.__

CTLD_ENGINEERING:onEvent(event)

The main event handling function...

Fields and Methods inherited from CTLD_HERCULES Description

CTLD_HERCULES.CTLD

CTLD_HERCULES:Calculate_Cargo_Drop_initiator_Heading(Cargo_Drop_initiator)

[Internal] Function to calc initiator heading

CTLD_HERCULES:Calculate_Cargo_Drop_initiator_NorthCorrection(point)

[Internal] Function to calc north correction

CTLD_HERCULES:Calculate_Object_Height_AGL(group)

[Internal] Function to calculate object height

CTLD_HERCULES.Cargo

CTLD_HERCULES:Cargo_Initialize(Initiator, Cargo_Contents, Cargo_Type_name, Container_Enclosed, SoldierGroup, ParatrooperGroupSpawnInit)

[Internal] Function to initialize dropped cargo

CTLD_HERCULES:Cargo_SpawnDroppedAsCargo(Cargo_Type_name, Cargo_Drop_Position, _name, _pos)

[Internal] Function to spawn cargo by type at position

CTLD_HERCULES:Cargo_SpawnGroup(Cargo_Drop_initiator, Cargo_Drop_Position, Cargo_Type_name, CargoHeading, Cargo_Country)

[Internal] Function to spawn a group

CTLD_HERCULES:Cargo_SpawnObjects(Cargo_Drop_initiator, Cargo_Drop_Direction, Cargo_Content_position, Cargo_Type_name, Cargo_over_water, Container_Enclosed, ParatrooperGroupSpawn, offload_cargo, all_cargo_survive_to_the_ground, all_cargo_gets_destroyed, destroy_cargo_dropped_without_parachute, Cargo_Country)

[Internal] Spawn cargo objects

CTLD_HERCULES:Cargo_SpawnStatic(Cargo_Drop_initiator, Cargo_Drop_Position, Cargo_Type_name, CargoHeading, dead, Cargo_Country)

[Internal] Function to spawn static cargo

CTLD_HERCULES:Cargo_Track(cargo, initiator)

[Internal] Function to track cargo objects

CTLD_HERCULES:CheckTemplates()

[Internal] Function to check availability of templates

CTLD_HERCULES:Check_SurfaceType(group, object)

[Internal] Function to check surface type

CTLD_HERCULES.ClassName

CTLD_HERCULES.Name

CTLD_HERCULES:New(Coalition, Alias, CtldObject)

[User] Instantiate a new object

CTLD_HERCULES.ObjectTracker

CTLD_HERCULES.ParatrooperCount

CTLD_HERCULES:SetType(key, cargoType, cargoNum)

[Internal] Function to change cargotype per group (Wrench)

CTLD_HERCULES:Soldier_SpawnGroup(Cargo_Drop_initiator, Cargo_Drop_Position, Cargo_Type_name, CargoHeading, Cargo_Country, GroupSpacing)

[Internal] Function to spawn a soldier group of 10 units

CTLD_HERCULES.Types

CTLD_HERCULES.Version

CTLD_HERCULES:_HandleBirth(event)

[Internal] Function to capture BIRTH event

CTLD_HERCULES:_HandleShot(Cargo_Drop_Event)

[Internal] Function to capture SHOT event

CTLD_HERCULES.alias

CTLD_HERCULES.carrierGroups

CTLD_HERCULES.coalition

CTLD_HERCULES.coalitiontxt

CTLD_HERCULES.infantrytemplate

CTLD_HERCULES.j

CTLD_HERCULES.lid

CTLD_HERCULES.verbose

Fields and Methods inherited from BASE Description

CTLD_HERCULES.ClassID

The ID number of the class.

CTLD_HERCULES.ClassName

The name of the class.

CTLD_HERCULES.ClassNameAndID

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

CTLD_HERCULES:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

CTLD_HERCULES:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

CTLD_HERCULES:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

CTLD_HERCULES:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

CTLD_HERCULES:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

CTLD_HERCULES:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

CTLD_HERCULES:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

CTLD_HERCULES:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

CTLD_HERCULES:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

CTLD_HERCULES:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

CTLD_HERCULES:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

CTLD_HERCULES:E(Arguments)

Log an exception which will be traced always.

CTLD_HERCULES:EventDispatcher()

Returns the event dispatcher

CTLD_HERCULES:EventRemoveAll()

Remove all subscribed events

CTLD_HERCULES:F(Arguments)

Trace a function call.

CTLD_HERCULES:F2(Arguments)

Trace a function call level 2.

CTLD_HERCULES:F3(Arguments)

Trace a function call level 3.

CTLD_HERCULES:GetClassID()

Get the ClassID of the class instance.

CTLD_HERCULES:GetClassName()

Get the ClassName of the class instance.

CTLD_HERCULES:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

CTLD_HERCULES:GetEventPriority()

Get the Class Core.Event processing Priority.

CTLD_HERCULES:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

CTLD_HERCULES:GetState(Object, Key)

Get a Value given a Key from the Object.

CTLD_HERCULES:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

CTLD_HERCULES:I(Arguments)

Log an information which will be traced always.

CTLD_HERCULES:Inherit(Child, Parent)

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

CTLD_HERCULES:IsInstanceOf(ClassName)

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

CTLD_HERCULES:IsTrace()

Enquires if tracing is on (for the class).

CTLD_HERCULES:New()

BASE constructor.

CTLD_HERCULES:OnEvent(EventData)

Occurs when an Event for an object is triggered.

CTLD_HERCULES:OnEventBDA(EventData)

BDA.

CTLD_HERCULES:OnEventBaseCaptured(EventData)

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

CTLD_HERCULES:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

CTLD_HERCULES:OnEventCrash(EventData)

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

CTLD_HERCULES:OnEventDead(EventData)

Occurs when an object is dead.

CTLD_HERCULES:OnEventDetailedFailure(EventData)

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

CTLD_HERCULES:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

CTLD_HERCULES:OnEventDynamicCargoLoaded(EventData)

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

CTLD_HERCULES:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

CTLD_HERCULES:OnEventDynamicCargoUnloaded(EventData)

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

CTLD_HERCULES:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_HERCULES:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

CTLD_HERCULES:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

CTLD_HERCULES:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

CTLD_HERCULES:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

CTLD_HERCULES:OnEventKill(EventData)

Occurs on the death of a unit.

CTLD_HERCULES:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_HERCULES:OnEventLandingAfterEjection(EventData)

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

CTLD_HERCULES:OnEventLandingQualityMark(EventData)

Landing quality mark.

CTLD_HERCULES:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

CTLD_HERCULES:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

CTLD_HERCULES:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

CTLD_HERCULES:OnEventMissionEnd(EventData)

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_HERCULES:OnEventMissionStart(EventData)

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

CTLD_HERCULES:OnEventNewDynamicCargo(EventData)

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

CTLD_HERCULES:OnEventParatrooperLanding(EventData)

Weapon add.

CTLD_HERCULES:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

CTLD_HERCULES:OnEventPlayerEnterAircraft(EventData)

Occurs when a player enters a slot and takes control of an aircraft.

CTLD_HERCULES:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

CTLD_HERCULES:OnEventPlayerLeaveUnit(EventData)

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

CTLD_HERCULES:OnEventRefueling(EventData)

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

CTLD_HERCULES:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

CTLD_HERCULES:OnEventScore(EventData)

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

CTLD_HERCULES:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

CTLD_HERCULES:OnEventShootingStart(EventData)

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

CTLD_HERCULES:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

CTLD_HERCULES:OnEventTakeoff(EventData)

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

CTLD_HERCULES:OnEventTriggerZone(EventData)

Trigger zone.

CTLD_HERCULES:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

CTLD_HERCULES:ScheduleStop(SchedulerID)

Stops the Schedule.

CTLD_HERCULES.Scheduler

CTLD_HERCULES:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

CTLD_HERCULES:SetState(Object, Key, Value)

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

CTLD_HERCULES:T(Arguments)

Trace a function logic level 1.

CTLD_HERCULES:T2(Arguments)

Trace a function logic level 2.

CTLD_HERCULES:T3(Arguments)

Trace a function logic level 3.

CTLD_HERCULES:TraceAll(TraceAll)

Trace all methods in MOOSE

CTLD_HERCULES:TraceClass(Class)

Set tracing for a class

CTLD_HERCULES:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

CTLD_HERCULES:TraceLevel(Level)

Set trace level

CTLD_HERCULES:TraceOff()

Set trace off.

CTLD_HERCULES:TraceOn()

Set trace on.

CTLD_HERCULES: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.

CTLD_HERCULES:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

CTLD_HERCULES._

CTLD_HERCULES:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

CTLD_HERCULES:_Serialize(Arguments)

(Internal) Serialize arguments

CTLD_HERCULES:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

CTLD_HERCULES.__

CTLD_HERCULES:onEvent(event)

The main event handling function...

Fields and Methods inherited from CTLD_HERCULES.Types Description

CTLD_HERCULES.Types.AAA GEPARD [34720lb]

CTLD_HERCULES.Types.AAA Vulcan M163 Air [21666lb]

CTLD_HERCULES.Types.AAA Vulcan M163 Skid [21577lb]

CTLD_HERCULES.Types.AAA ZSU-23-4 Shilka [32912lb]

CTLD_HERCULES.Types.APC BTR-80 Air [23936lb]

CTLD_HERCULES.Types.APC BTR-80 Skid [23826lb]

CTLD_HERCULES.Types.APC BTR-82A Air [24998lb]

CTLD_HERCULES.Types.APC BTR-82A Skid [24888lb]

CTLD_HERCULES.Types.APC Cobra Air [10912lb]

CTLD_HERCULES.Types.APC Cobra Skid [10802lb]

CTLD_HERCULES.Types.APC LAV-25 Air [22520lb]

CTLD_HERCULES.Types.APC LAV-25 Skid [22514lb]

CTLD_HERCULES.Types.APC M1043 HMMWV Armament Air [7023lb]

CTLD_HERCULES.Types.APC M1043 HMMWV Armament Skid [6912lb]

CTLD_HERCULES.Types.APC M1126 Stryker ICV [29542lb]

CTLD_HERCULES.Types.APC M113 Air [21624lb]

CTLD_HERCULES.Types.APC M113 Skid [21494lb]

CTLD_HERCULES.Types.APC MTLB Air [26400lb]

CTLD_HERCULES.Types.APC MTLB Skid [26290lb]

CTLD_HERCULES.Types.ART 2S9 NONA Air [19140lb]

CTLD_HERCULES.Types.ART 2S9 NONA Skid [19030lb]

CTLD_HERCULES.Types.ART GVOZDIKA [34720lb]

CTLD_HERCULES.Types.ARV BRDM-2 Air [12320lb]

CTLD_HERCULES.Types.ARV BRDM-2 Skid [12210lb]

CTLD_HERCULES.Types.ATGM M1045 HMMWV TOW Air [7183lb]

CTLD_HERCULES.Types.ATGM M1045 HMMWV TOW Skid [7073lb]

CTLD_HERCULES.Types.ATGM M1134 Stryker [30337lb]

CTLD_HERCULES.Types.EWR SBORKA Air [21624lb]

CTLD_HERCULES.Types.EWR SBORKA Skid [21624lb]

CTLD_HERCULES.Types.HEMTT TFFT [34400lb]

CTLD_HERCULES.Types.IFV BMD-1 Air [18040lb]

CTLD_HERCULES.Types.IFV BMD-1 Skid [17930lb]

CTLD_HERCULES.Types.IFV BMP-1 [23232lb]

CTLD_HERCULES.Types.IFV BMP-2 [25168lb]

CTLD_HERCULES.Types.IFV BMP-3 [32912lb]

CTLD_HERCULES.Types.IFV BTR-D Air [18040lb]

CTLD_HERCULES.Types.IFV BTR-D Skid [17930lb]

CTLD_HERCULES.Types.IFV M2A2 Bradley [34720lb]

CTLD_HERCULES.Types.IFV MARDER [34720lb]

CTLD_HERCULES.Types.IFV MCV-80 [34720lb]

CTLD_HERCULES.Types.IFV TPZ FUCH [33440lb]

CTLD_HERCULES.Types.M1025 HMMWV Air [6160lb]

CTLD_HERCULES.Types.M1025 HMMWV Skid [6050lb]

CTLD_HERCULES.Types.SAM Avenger M1097 Air [7200lb]

CTLD_HERCULES.Types.SAM Avenger M1097 Skid [7090lb]

CTLD_HERCULES.Types.SAM CHAPARRAL Air [21624lb]

CTLD_HERCULES.Types.SAM CHAPARRAL Skid [21516lb]

CTLD_HERCULES.Types.SAM LINEBACKER [34720lb]

CTLD_HERCULES.Types.SAM ROLAND ADS [34720lb]

CTLD_HERCULES.Types.SAM ROLAND LN [34720b]

CTLD_HERCULES.Types.SAM SA-13 STRELA [21624lb]

CTLD_HERCULES.Types.SAM SA-19 Tunguska 2S6 [34720lb]

CTLD_HERCULES.Types.SPG M1128 Stryker MGS [33036lb]

CTLD_HERCULES.Types.Tanker M978 HEMTT [34000lb]

CTLD_HERCULES.Types.Transport M818 [16000lb]

CTLD_HERCULES.Types.Transport Tigr Air [15900lb]

CTLD_HERCULES.Types.Transport Tigr Skid [15730lb]

CTLD_HERCULES.Types.Transport UAZ-469 Air [3747lb]

CTLD_HERCULES.Types.Transport UAZ-469 Skid [3630lb]

CTLD_HERCULES.Types.Transport URAL-375 [14815lb]

CTLD_HERCULES.Types.Type

Name of cargo type, container (boolean) in container or not.

  • CTLD class, extends Core.Base#BASE, Core.Fsm#FSM

Field(s)

#table CTLD.Cargo_Crates

Cargo

#string CTLD.ClassName

Name of the class.

#number CTLD.CrateDistance

list/load crates in this radius

#number CTLD.EngineerSearch

search distance for crates to build or repair

#number CTLD.Engineers

use as counter

#table CTLD.EngineersInField

holds #CTLD_ENGINEERING objects

#number CTLD.ExtractFactor

factor for troops extraction, i.e. CrateDistance * Extractfactor

#table CTLD.FreeVHFFrequencies

Beacons

#number CTLD.HercMaxAngels

for troop/cargo drop via chute

#number CTLD.HercMaxSpeed

280 kph or 150kn eq 77 mps

#number CTLD.HercMinAngels

for troop/cargo drop via chute

#number CTLD.PackDistance

pack objects in this radius

#table CTLD.PilotGroups

tables

#string CTLD.RadioPath
#string CTLD.RadioSound

radio beacons

CTLD.SmokeColor

Smokes and Flares

#boolean CTLD.allowcratepickupagain

allow re-pickup crates

#string CTLD.basetype

shape of the container

#number CTLD.buildtime
#number CTLD.coalition

Coalition side number, e.g. coalition.side.RED.

CTLD.cratecountry

country of crates spawned

#boolean CTLD.debug
#boolean CTLD.dropAsCargoCrate

Parachuted herc cargo is not unpacked automatically but placed as crate to be unpacked

#boolean CTLD.dropcratesanywhere

#1570

#boolean CTLD.enableChinookGCLoading

Chinook

#boolean CTLD.enableHercules

added support Hercules Mod

#boolean CTLD.enableLoadSave

load and save dropped TROOPS

#boolean CTLD.enableslingload

slingload

#string CTLD.lid

Class id string for output to DCS log file.

#boolean CTLD.nobuildinloadzones

disallow building in loadzones

#boolean CTLD.nobuildmenu

enfore engineer build only?

#table CTLD.pickupZones

zones stuff

#boolean CTLD.pilotmustopendoors

for opening doors

#boolean CTLD.placeCratesAhead

place spawned crates in front of aircraft

#number CTLD.repairtime

time to repairor build a unit/group

#table CTLD.subcats
#boolean CTLD.suppressmessages

message suppression

#boolean CTLD.useprefix
#boolean CTLD.usesubcats

sub categories

#number CTLD.verbose

Verbosity level.

#string CTLD.version

CTLD class version.

#table CTLD.wpZones

Function(s)

User function - Activate Name #CTLD.CargoZone.Type ZoneType for this CTLD instance.

Defined in:

CTLD

Parameters:

#string Name

Name of the zone to change in the ME.

Type of zone this belongs to.

#boolean NewState

(Optional) Set to true to activate, false to switch off.

User function - Creates and adds a #CTLD.CargoZone zone for this CTLD instance.

Zones of type LOAD: Players load crates and troops here.
Zones of type DROP: Players can drop crates here. Note that troops can be unloaded anywhere.
Zone of type MOVE: Dropped troops and vehicles will start moving to the nearest zone of this type (also see options).

Defined in:

CTLD

Parameters:

#string Name

Name of this zone, as in Mission Editor.

#string Type

Type of this zone, #CTLD.CargoZoneType

#number Color

Smoke/Flare color e.g. #SMOKECOLOR.Red

#string Active

Is this zone currently active?

#string HasBeacon

Does this zone have a beacon if it is active?

#number Shiplength

Length of Ship for shipzones

#number Shipwidth

Width of Ship for shipzones

Return value:

self

User function - Creates and adds a #CTLD.CargoZone zone for this CTLD instance from an Airbase or FARP name.

Zones of type LOAD: Players load crates and troops here.
Zones of type DROP: Players can drop crates here. Note that troops can be unloaded anywhere.
Zone of type MOVE: Dropped troops and vehicles will start moving to the nearest zone of this type (also see options).

Defined in:

CTLD

Parameters:

#string AirbaseName

Name of the Airbase, can be e.g. AIRBASE.Caucasus.Beslan or "Beslan". For FARPs, this will be the UNIT name.

#string Type

Type of this zone, #CTLD.CargoZoneType

#number Color

Smoke/Flare color e.g. #SMOKECOLOR.Red

#string Active

Is this zone currently active?

#string HasBeacon

Does this zone have a beacon if it is active?

Return value:

self

User function - Add generic crate-type loadable as cargo.

This type will create crates that need to be loaded, moved, dropped and built.

Defined in:

CTLD

Parameters:

#string Name

Unique name of this type of cargo. E.g. "Humvee".

#table Templates

Table of #string names of late activated Wrapper.Group#GROUP building this cargo.

Type of cargo. I.e. VEHICLE or FOB. VEHICLE will move to destination zones when dropped/build, FOB stays put.

#number NoCrates

Number of crates needed to build this cargo.

#number PerCrateMass

Mass in kg of each crate

#number Stock

Number of buildable groups in stock. Nil for unlimited.

#string SubCategory

Name of sub-category (optional).

#boolean DontShowInMenu

(optional) If set to "true" this won't show up in the menu.

Core.Zone#ZONE Location

(optional) If set, the cargo item is only available here. Can be a #ZONE object or the name of a zone as #string.

#string UnitTypes

Unit type names (optional). If set, only these unit types can pick up the cargo, e.g. "UH-1H" or {"UH-1H","OH58D"}.

#string Category

Static category name (optional). If set, spawn cargo crate with an alternate category type, e.g. "Cargos".

#string TypeName

Static type name (optional). If set, spawn cargo crate with an alternate type shape, e.g. "iso_container".

#string ShapeName

Static shape name (optional). If set, spawn cargo crate with an alternate type sub-shape, e.g. "iso_container_cargo".

Return value:

self

User function - Add generic repair crates loadable as cargo.

This type will create crates that need to be loaded, moved, dropped and built.

Defined in:

CTLD

Parameters:

#string Name

Unique name of this type of cargo. E.g. "Humvee".

#string Template

Template of VEHICLE or FOB cargo that this can repair. MUST be the same as given in AddCratesCargo(..)!

Type of cargo, here REPAIR.

#number NoCrates

Number of crates needed to build this cargo.

#number PerCrateMass

Mass in kg of each crate

#number Stock

Number of groups in stock. Nil for unlimited.

#string SubCategory

Name of the sub-category (optional).

#boolean DontShowInMenu

(optional) If set to "true" this won't show up in the menu.

Core.Zone#ZONE Location

(optional) If set, the cargo item is only available here. Can be a #ZONE object or the name of a zone as #string.

#string UnitTypes

Unit type names (optional). If set, only these unit types can pick up the cargo, e.g. "UH-1H" or {"UH-1H","OH58D"}

#string Category

Static category name (optional). If set, spawn cargo crate with an alternate category type, e.g. "Cargos".

#string TypeName

Static type name (optional). If set, spawn cargo crate with an alternate type shape, e.g. "iso_container".

#string ShapeName

Static shape name (optional). If set, spawn cargo crate with an alternate type sub-shape, e.g. "iso_container_cargo".

Return value:

self

(User) Add a PLAYERTASK - FSM events will check success

Defined in:

CTLD

Parameter:

Return value:

self

User function - Add generic static-type loadable as cargo.

This type will create cargo that needs to be loaded, moved and dropped.

Defined in:

CTLD

Parameters:

#string Name

Unique name of this type of cargo as set in the mission editor (note: UNIT name!), e.g. "Ammunition-1".

#number Mass

Mass in kg of each static in kg, e.g. 100.

#number Stock

Number of groups in stock. Nil for unlimited.

#string SubCategory

Name of sub-category (optional).

#boolean DontShowInMenu

(optional) If set to "true" this won't show up in the menu.

Core.Zone#ZONE Location

(optional) If set, the cargo item is only available here. Can be a #ZONE object or the name of a zone as #string.

Return value:

CargoObject

User - function to add stock of a certain crates type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to add.

Return value:

self

User - function to add stock of a certain crates type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to add.

Return value:

self

User - function to add stock of a certain troops type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to add.

Return value:

self

User function - Add generic troop type loadable as cargo.

This type will load directly into the heli without crates.

Defined in:

CTLD

Parameters:

#string Name

Unique name of this type of troop. E.g. "Anti-Air Small".

#table Templates

Table of #string names of late activated Wrapper.Group#GROUP making up this troop.

Type of cargo, here TROOPS - these will move to a nearby destination zone when dropped/build.

#number NoTroops

Size of the group in number of Units across combined templates (for loading).

#number PerTroopMass

Mass in kg of each soldier

#number Stock

Number of groups in stock. Nil for unlimited.

#string SubCategory

Name of sub-category (optional).

User function - Add a #CTLD.CargoZoneType zone for this CTLD instance.

Defined in:

CTLD

Parameter:

Zone #CTLD.CargoZone describing the zone.

(Internal) Autoload if we can do crates, have capacity free and are in a load zone.

Defined in:

CTLD

Parameter:

Return value:

self

(Internal) Check if a unit is in a load zone and is hovering in parameters.

Defined in:

CTLD

Parameter:

Return value:

#boolean:

Outcome

(Internal) Run through all pilots and see if we autoload.

Defined in:

CTLD

Return value:

self

(Internal) Housekeeping dropped beacons.

Defined in:

CTLD

Return value:

self

(Internal) Run through DroppedTroops and capture alive units

Defined in:

CTLD

Return value:

self

User function - Deactivate Name #CTLD.CargoZoneType ZoneType for this CTLD instance.

Defined in:

CTLD

Parameters:

#string Name

Name of the zone to change in the ME.

Type of zone this belongs to.

(Internal) Function to create a dropped beacon

Defined in:

CTLD

Parameter:

Return value:

self

User function - Get a generic static-type loadable as #CTLD_CARGO object.

Defined in:

CTLD

Parameters:

#string Name

Unique Unit(!) name of this type of cargo as set in the mission editor (not: GROUP name!), e.g. "Ammunition-1".

#number Mass

Mass in kg of each static in kg, e.g. 100.

Return value:

Cargo object

User - function to get a table of crates in stock

Defined in:

CTLD

Return value:

#table:

Table Table of Stock, indexed by cargo type name

User - function to get a table of statics cargo in stock

Defined in:

CTLD

Return value:

#table:

Table Table of Stock, indexed by cargo type name

User - function to get a table of troops in stock

Defined in:

CTLD

Return value:

#table:

Table Table of Stock, indexed by cargo type name

(User) Inject static cargo objects.

Defined in:

CTLD

Parameters:

Zone to spawn in. Will be a somewhat random coordinate.

#string Template

Unit(!) name of the static cargo object to be used as template.

#number Mass

Mass of the static in kg.

Return value:

self

(Internal) Inject crates and static cargo objects.

Defined in:

CTLD

Parameters:

Zone to spawn in.

#CTLD_CARGO Cargo

The cargo type to spawn.

#boolean RandomCoord

Randomize coordinate.

#boolean FromLoad

Create only one crate per cargo type, as we are re-creating dropped crates that CTLD has saved prior.

Return value:

self

(User) Pre-populate troops in the field.

Defined in:

CTLD

Parameters:

The zone where to drop the troops.

The #CTLD_CARGO object to spawn.

#table Surfacetypes

(Optional) Table of surface types. Can also be a single surface type. We will try max 1000 times to find the right type!

#boolean PreciseLocation

(Optional) Don't try to get a random position in the zone but use the dead center. Caution not to stack up stuff on another!

#string Structure

(Optional) String object describing the current structure of the injected group; mainly for load/save to keep current state setup.

Return value:

self

Usage:

Use this function to pre-populate the field with Troops or Engineers at a random coordinate in a zone:
           -- create a matching #CTLD_CARGO type
           local InjectTroopsType = CTLD_CARGO:New(nil,"Infantry",{"Inf12"},CTLD_CARGO.Enum.TROOPS,true,true,12,nil,false,80)
           -- get a #ZONE object
           local dropzone = ZONE:New("InjectZone") -- Core.Zone#ZONE
           -- and go:
           my_ctld:InjectTroops(dropzone,InjectTroopsType,{land.SurfaceType.LAND})

(User) Pre-populate vehicles in the field.

Defined in:

CTLD

Parameters:

The zone where to drop the troops.

The #CTLD_CARGO object to spawn.

#table Surfacetypes

(Optional) Table of surface types. Can also be a single surface type. We will try max 1000 times to find the right type!

#boolean PreciseLocation

(Optional) Don't try to get a random position in the zone but use the dead center. Caution not to stack up stuff on another!

#string Structure

(Optional) String object describing the current structure of the injected group; mainly for load/save to keep current state setup.

Return value:

self

Usage:

Use this function to pre-populate the field with Vehicles or FOB at a random coordinate in a zone:
           -- create a matching #CTLD_CARGO type
           local InjectVehicleType = CTLD_CARGO:New(nil,"Humvee",{"Humvee"},CTLD_CARGO.Enum.VEHICLE,true,true,1,nil,false,1000)
           -- get a #ZONE object
           local dropzone = ZONE:New("InjectZone") -- Core.Zone#ZONE
           -- and go:
           my_ctld:InjectVehicles(dropzone,InjectVehicleType)

(Internal) Check if a Hercules is flying in parameters for air drops.

Defined in:

CTLD

Parameter:

Return value:

#boolean:

Outcome

(Internal) Check if a unit is hovering in parameters.

Defined in:

CTLD

Parameter:

Return value:

#boolean:

Outcome

(Internal) Function to check if a unit is a Hercules C-130 or a Bronco.

Defined in:

CTLD

Parameter:

Return value:

#boolean:

Outcome

(Internal) Function to check if a unit is a CH-47

Defined in:

CTLD

Parameter:

Return value:

#boolean:

Outcome

(Internal) Check if a unit is above ground.

Defined in:

CTLD

Parameter:

Return value:

#boolean:

Outcome

(Internal) Function to see if a unit is in a specific zone type.

Defined in:

CTLD

Parameters:

Unit

Zonetype

Return values:

#boolean:

Outcome Is in zone or not

#string:

name Closest zone name

zone Closest Core.Zone#ZONE object

#number:

distance Distance to closest zone

#number:

width Radius of zone or width of ship

Triggers the FSM event "Save".

Defined in:

CTLD

Instantiate a new CTLD.

Defined in:

CTLD

Parameters:

#string Coalition

Coalition of this CTLD. I.e. coalition.side.BLUE or coalition.side.RED or coalition.side.NEUTRAL

#table Prefixes

Table of pilot prefixes.

#string Alias

Alias of this CTLD for logging.

Return value:

self

FSM Function OnAfterCratesBuild.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

The #GROUP object of the vehicle or FOB build.

Return value:

self

FSM Function OnAfterCratesBuildStarted.

Info event that a build has been started.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Return value:

self

FSM Function OnAfterCratesDropped.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#table Cargotable

Table of #CTLD_CARGO objects dropped. Can be a Wrapper.DynamicCargo#DYNAMICCARGO object, if ground crew unloaded!

Return value:

self

FSM Function OnAfterCratesPickedUp.

Defined in:

CTLD

Parameters:

#string From

State .

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#CTLD_CARGO Cargo

Cargo crate. Can be a Wrapper.DynamicCargo#DYNAMICCARGO object, if ground crew loaded!

Return value:

self

FSM Function OnAfterCratesRepairStarted.

Info event that a repair has been started.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Return value:

self

FSM Function OnAfterCratesRepaired.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

The #GROUP object of the vehicle or FOB repaired.

Return value:

self

FSM Function OnAfterLoad.

Defined in:

CTLD

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string path

(Optional) Path where the file is located. Default is the DCS root installation folder or your "Saved Games\DCS" folder if the lfs module is desanitized.

#string filename

(Optional) File name for loading. Default is "CTLD__Persist.csv".

FSM Function OnAfterSave.

Defined in:

CTLD

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string path

(Optional) Path where the file is saved. Default is the DCS root installation folder or your "Saved Games\DCS" folder if the lfs module is desanitized.

#string filename

(Optional) File name for saving. Default is "CTLD__Persist.csv".

FSM Function OnAfterTroopsDeployed.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Troops #GROUP Object.

Return value:

self

FSM Function OnAfterTroopsExtracted.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#CTLD_CARGO Cargo

Cargo troops.

Return value:

self

FSM Function OnAfterTroopsPickedUp.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#CTLD_CARGO Cargo

Cargo troops.

Return value:

self

FSM Function OnAfterTroopsRTB.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

FSM Function OnBeforeCratesBuild.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

The #GROUP object of the vehicle or FOB build.

Return value:

self

FSM Function OnBeforeCratesBuildStarted.

Info event that a build has been started.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Return value:

self

FSM Function OnBeforeCratesDropped.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#table Cargotable

Table of #CTLD_CARGO objects dropped. Can be a Wrapper.DynamicCargo#DYNAMICCARGO object, if ground crew unloaded!

Return value:

self

FSM Function OnBeforeCratesPickedUp.

Defined in:

CTLD

Parameters:

#string From

State .

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#CTLD_CARGO Cargo

Cargo crate. Can be a Wrapper.DynamicCargo#DYNAMICCARGO object, if ground crew loaded!

Return value:

self

FSM Function OnBeforeCratesRepairStarted.

Info event that a repair has been started.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Return value:

self

FSM Function OnBeforeCratesRepaired.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

The #GROUP object of the vehicle or FOB repaired.

Return value:

self

FSM Function OnBeforeTroopsDeployed.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Troops #GROUP Object.

Return value:

self

FSM Function OnBeforeTroopsExtracted.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#CTLD_CARGO Cargo

Cargo troops.

Return value:

self

FSM Function OnBeforeTroopsPickedUp.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#CTLD_CARGO Cargo

Cargo troops.

Return value:

self

FSM Function OnBeforeTroopsRTB.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#string ZoneName

Name of the Zone where the Troops have been RTB'd.

of the Zone where the Troops have been RTB'd.

(User) Pre-load crates into a helo, e.g.

for airstart. Unit must be alive in-game, i.e. player has taken the slot!

Defined in:

CTLD

Parameters:

The unit to load into, can be handed as Wrapper.Client#CLIENT object

#string Cratesname

The name of the cargo to be loaded. Must be created prior in the CTLD setup!

#number NumberOfCrates

(Optional) Number of crates to be loaded. Default - all necessary to build this object. Might overload the helo!

Return value:

self

Usage:

         local client = UNIT:FindByName("Helo-1-1")
         if client and client:IsAlive() then
           myctld:PreloadCrates(client,"Humvee")
         end

(User) Pre-load troops into a helo, e.g.

for airstart. Unit must be alive in-game, i.e. player has taken the slot!

Defined in:

CTLD

Parameters:

The unit to load into, can be handed as Wrapper.Client#CLIENT object

#string Troopname

The name of the Troops to be loaded. Must be created prior in the CTLD setup!

Return value:

self

Usage:

         local client = UNIT:FindByName("Helo-1-1")
         if client and client:IsAlive() then
           myctld:PreloadTroops(client,"Infantry")
         end

User - function to remove stock of a certain crates type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to add.

Return value:

self

User - function to remove stock of a certain statics type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to add.

Return value:

self

User - function to remove stock of a certain troops type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to add.

Return value:

self

User - Function to add onw SET_GROUP Set-up for pilot filtering and assignment.

Needs to be set before starting the CTLD instance.

Defined in:

CTLD

Parameter:

The SET_GROUP object created by the mission designer/user to represent the CTLD pilot groups.

Return value:

self

Set folder path where the CTLD sound files are located within you mission (miz) file.

The default path is "l10n/DEFAULT/" but sound files simply copied there will be removed by DCS the next time you save the mission. However, if you create a new folder inside the miz file, which contains the sounds, it will not be deleted and can be used.

Defined in:

CTLD

Parameter:

#string FolderPath

The path to the sound files, e.g. "CTLD_Soundfiles/".

Return value:

self

User - function to set the stock of a certain crates type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to be available. Nil equals unlimited

Return value:

self

User - function to set the stock of a certain statics type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to be available. Nil equals unlimited

Return value:

self

User - function to set the stock of a certain troops type

Defined in:

CTLD

Parameters:

#string Name

Name as defined in the generic cargo.

#number Number

Number of units/groups to be available. Nil equals unlimited

Return value:

self

(User) Set drop zone radius for troop drops in meters.

Minimum distance is 25m for security reasons.

Defined in:

CTLD

Parameter:

#number Radius

The radius to use.

User - Function to add/adjust unittype capabilities.

Defined in:

CTLD

Parameters:

#string Unittype

The unittype to adjust. If passed as Wrapper.Unit#UNIT, it will search for the unit in the mission.

#boolean Cancrates

Unit can load crates. Default false.

#boolean Cantroops

Unit can load troops. Default false.

#number Cratelimit

Unit can carry number of crates. Default 0.

#number Trooplimit

Unit can carry number of troops. Default 0.

#number Length

Unit lenght (in metres) for the load radius. Default 20.

#number Maxcargoweight

Maxmimum weight in kgs this helo can carry. Default 500.

User function - Drop a smoke or flare at current location.

Defined in:

CTLD

Parameters:

The Unit.

#boolean Flare

If true, flare instead.

#number SmokeColor

Color enumerator for smoke, e.g. SMOKECOLOR.Red

User function - Start smoke/flare in a zone close to the Unit.

Defined in:

CTLD

Parameters:

The Unit.

#boolean Flare

If true, flare instead.

Triggers the FSM event "Start".

Starts the CTLD. Initializes parameters and starts event handlers.

Defined in:

CTLD

Triggers the FSM event "Status".

Defined in:

CTLD

Triggers the FSM event "Stop".

Stops the CTLD and all its event handlers.

Defined in:

CTLD

[Deprecated] - Function to add/adjust unittype capabilities.

Has been replaced with SetUnitCapabilities() - pls use the new one going forward!

Defined in:

CTLD

Parameters:

#string Unittype

The unittype to adjust. If passed as Wrapper.Unit#UNIT, it will search for the unit in the mission.

#boolean Cancrates

Unit can load crates. Default false.

#boolean Cantroops

Unit can load troops. Default false.

#number Cratelimit

Unit can carry number of crates. Default 0.

#number Trooplimit

Unit can carry number of troops. Default 0.

#number Length

Unit lenght (in metres) for the load radius. Default 20.

#number Maxcargoweight

Maxmimum weight in kgs this helo can carry. Default 500.

(Internal) Add radio beacon to zone.

Runs 30 secs.

Defined in:

CTLD

Parameters:

#string Name

Name of zone.

#string Sound

Name of soundfile.

#number Mhz

Frequency in Mhz.

#number Modulation

Modulation AM or FM.

#boolean IsShip

If true zone is a ship.

#boolean IsDropped

If true, this isn't a zone but a dropped beacon

(Internal) Function to build nearby crates.

Defined in:

CTLD

Parameters:

#boolean Engineering

If true build is by an engineering team.

(Internal) Function to actually SPAWN buildables in the mission.

Defined in:

CTLD

Parameters:

#boolean Repair

If true this is a repair and not a new build

Core.Point#COORDINATE RepairLocation

Location for repair (e.g. where the destroyed unit was)

(Internal) Check on engineering teams

Defined in:

CTLD

Return value:

self

[Internal] Function to check if a template exists in the mission.

Defined in:

CTLD

Parameter:

#table temptable

Table of string names

Return value:

#boolean:

outcome

(Internal) Housekeeping - Cleanup crates when build

Defined in:

CTLD

Parameters:

#table Crates

Table of #CTLD_CARGO objects near the unit.

Table build object.

#number Number

Number of objects in Crates (found) to limit search.

(Internal) Function to clean up tracked cargo crates

Defined in:

CTLD

Parameter:

crateIdsToRemove

(Internal) Event handler function

Defined in:

CTLD

Parameter:

(Internal) Function to extract (load from the field) troops into a heli.

Defined in:

CTLD

Parameters:

(Internal) Find a crates CTLD_CARGO object in stock

Defined in:

CTLD

Parameter:

#string Name

of the object

Return value:

Cargo object, nil if it cannot be found

(Internal) Function to find and return nearby crates.

Defined in:

CTLD

Parameters:

Group

Unit

#number _dist

Distance

#boolean _ignoreweight

Find everything in range, ignore loadable weight

#boolean ignoretype

Find everything in range, ignore loadable type name

Return values:

#table:

Crates Table of crates

#number:

Number Number of crates found

#table:

CratesGC Table of crates possibly loaded by GC

#number:

NumberGC Number of crates possibly loaded by GC

Defined in:

CTLD

Parameters:

Group

Unit

Repairtype

(Internal) Find a troops CTLD_CARGO object in stock

Defined in:

CTLD

Parameter:

#string Name

of the object

Return value:

Cargo object, nil if it cannot be found

(Internal) Function to generate valid FM Frequencies

Defined in:

CTLD

(Internal) Function to generate valid UHF Frequencies

Defined in:

CTLD

(Internal) Populate table with available VHF beacon frequencies.

Defined in:

CTLD

(Internal) Function to spawn crates in front of the heli.

Defined in:

CTLD

Parameters:

#CTLD_CARGO Cargo

#number number

Number of crates to generate (for dropping)

#boolean drop

If true we're dropping from heli rather than loading.

#boolean pack

If true we're packing crates from a template rather than loading or dropping

(Internal) Return distance in meters between two coordinates.

Defined in:

CTLD

Parameters:

Coordinate one

Coordinate two

Return value:

#number:

Distance in meters

(Internal) Function to obtain a valid FM frequency.

Defined in:

CTLD

Parameter:

#string Name

Name of zone.

Return value:

Beacon Beacon table.

(Internal) Function to calculate max loadable mass left over.

Defined in:

CTLD

Parameter:

Return value:

#number:

maxloadable Max loadable mass in kg

(Internal) Function to obtain a valid UHF frequency.

Defined in:

CTLD

Parameter:

#string Name

Name of zone.

Return value:

Beacon Beacon table.

(Internal) Function to get capabilities of a chopper

Defined in:

CTLD

Parameter:

The unit

Return value:

#table:

Capabilities Table of caps

(Internal) Function to get current loaded mass

Defined in:

CTLD

Parameter:

Return value:

#number:

mass in kgs

(Internal) Function to set troops positions of a template to a nice circle

Defined in:

CTLD

Parameters:

Start coordinate to use

#number Radius

Radius to be used

#number Heading

Heading starting with

#string Template

The group template name

Return value:

#table:

Positions The positions table

(Internal) Function to obtain a valid VHF frequency.

Defined in:

CTLD

Parameter:

#string Name

Name of zone.

Return value:

Beacon Beacon table.

(Internal) Function to list loaded cargo.

Defined in:

CTLD

Parameters:

Return value:

self

(Internal) Function to find and list nearby crates.

Defined in:

CTLD

Parameters:

_group

_unit

Return value:

self

(Internal) Function to list loaded cargo.

Defined in:

CTLD

Parameters:

Return value:

self

(Internal) Function to show list of radio beacons

Defined in:

CTLD

Parameters:

(Internal) Function to get and load nearby crates.

Defined in:

CTLD

Parameters:

Return value:

self

(Internal) Function to load troops into a heli.

Defined in:

CTLD

Parameters:

#CTLD_CARGO Cargotype

#boolean Inject

(Internal) Function to move group to WP zone.

Defined in:

CTLD

Parameter:

The Group to move.

Defined in:

CTLD

Parameters:

Group

Unit

(Internal) Pre-load crates into a helo.

Do not use standalone!

Defined in:

CTLD

Parameters:

The group to load into, can be handed as Wrapper.Client#CLIENT object

The unit to load into, can be handed as Wrapper.Client#CLIENT object

#CTLD_CARGO Cargo

The Cargo crate object to load

#number NumberOfCrates

(Optional) Number of crates to be loaded. Default - all necessary to build this object. Might overload the helo!

Return value:

self

(Internal) Housekeeping - Function to refresh F10 menus.

Defined in:

CTLD

Return value:

self

(Internal) Function to refresh radio beacons

Defined in:

CTLD

(Internal) Function to find and Remove nearby crates. @param #CTLD self @param Wrapper.Group#GROUP Group @param Wrapper.Unit#UNIT Unit @return #CTLD self

Defined in:

CTLD

Parameters:

_group

_unit

(Internal) Function to repair nearby vehicles / FOBs

Defined in:

CTLD

Parameters:

#boolean Engineering

If true, this is an engineering role

(Internal) Function to repair an object.

Defined in:

CTLD

Parameters:

#table Crates

Table of #CTLD_CARGO objects near the unit.

Table build object.

#number Number

Number of objects in Crates (found) to limit search.

#boolean Engineering

If true it is an Engineering repair.

(Internal) Function to message a group.

Defined in:

CTLD

Parameters:

#string Text

The text to display.

#number Time

Number of seconds to display the message.

#boolean Clearscreen

Clear screen or not.

The group receiving the message.

(Internal) List if a Herc unit is flying in parameters.

Defined in:

CTLD

Parameters:

(Internal) List if a unit is hovering in parameters.

Defined in:

CTLD

Parameters:

(Internal) Function to unload crates from heli.

Defined in:

CTLD

Parameters:

(Internal) Function to unload troops from heli.

Defined in:

CTLD

Parameters:

(Internal) Function to calculate and set Unit internal cargo mass

Defined in:

CTLD

Parameter:

Triggers the FSM event "Load" after a delay.

Defined in:

CTLD

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Save" after a delay.

Defined in:

CTLD

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Start" after a delay.

Starts the CTLD. Initializes parameters and starts event handlers.

Defined in:

CTLD

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Status" after a delay.

Defined in:

CTLD

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Stop" after a delay.

Stops the CTLD and all its event handlers.

Defined in:

CTLD

Parameter:

#number delay

Delay in seconds.

(Internal) FSM Function onafterCratesBuild.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

The #GROUP object of the vehicle or FOB build.

Return value:

self

On after "Load" event.

Loads dropped units from file.

Defined in:

CTLD

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string path

(Optional) Path where the file is located. Default is the DCS root installation folder or your "Saved Games\DCS" folder if the lfs module is desanitized.

#string filename

(Optional) File name for loading. Default is "CTLD__Persist.csv".

On after "Save" event.

Player data is saved to file.

Defined in:

CTLD

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string path

Path where the file is saved. If nil, file is saved in the DCS root installtion directory or your "Saved Games" folder if lfs was desanitized.

#string filename

(Optional) File name for saving. Default is Default is "CTLD__Persist.csv".

(Internal) FSM Function onafterStart.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Return value:

self

(Internal) FSM Function onafterStatus.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Return value:

self

(Internal) FSM Function onafterStop.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Return value:

self

(Internal) FSM Function onafterTroopsDeployed.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Troops #GROUP Object.

Type of Cargo deployed

Return value:

self

(Internal) FSM Function onbeforeCratesBuild.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

The #GROUP object of the vehicle or FOB build.

Return value:

self

(Internal) FSM Function onbeforeCratesDropped.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#table Cargotable

Table of #CTLD_CARGO objects dropped. Can be a Wrapper.DynamicCargo#DYNAMICCARGO object, if ground crew unloaded!

Return value:

self

(Internal) FSM Function onbeforeCratesPickedUp.

Defined in:

CTLD

Parameters:

#string From

State .

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#CTLD_CARGO Cargo

Cargo crate. Can be a Wrapper.DynamicCargo#DYNAMICCARGO object, if ground crew loaded!

Return value:

self

On before "Load" event.

Checks if io and lfs and the file are available.

Defined in:

CTLD

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string path

(Optional) Path where the file is located. Default is the DCS root installation folder or your "Saved Games\DCS" folder if the lfs module is desanitized.

#string filename

(Optional) File name for loading. Default is "CTLD__Persist.csv".

On before "Save" event.

Checks if io and lfs are available.

Defined in:

CTLD

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string path

(Optional) Path where the file is saved. Default is the DCS root installation folder or your "Saved Games\DCS" folder if the lfs module is desanitized.

#string filename

(Optional) File name for saving. Default is "CTLD__Persist.csv".

(Internal) FSM Function onbeforeStatus.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Return value:

self

(Internal) FSM Function onbeforeTroopsDeployed.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Troops #GROUP Object.

Return value:

self

(Internal) FSM Function onbeforeTroopsExtracted.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

Troops #GROUP Object.

Return value:

self

(Internal) FSM Function onbeforeTroopsPickedUp.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#CTLD_CARGO Cargo

Cargo crate.

Return value:

self

(Internal) FSM Function onbeforeTroopsRTB.

Defined in:

CTLD

Parameters:

#string From

State.

#string Event

Trigger.

#string To

State.

Group Object.

Unit Object.

#string ZoneName

Name of the Zone where the Troops have been RTB'd.

of the Zone where the Troops have been RTB'd.

Return value:

self

Field(s)

#table CTLD.Cargo_Crates

Cargo

#string CTLD.ClassName

Name of the class.

#number CTLD.CrateDistance

list/load crates in this radius

#number CTLD.EngineerSearch

search distance for crates to build or repair

#number CTLD.Engineers

use as counter

#table CTLD.EngineersInField

holds #CTLD_ENGINEERING objects

#number CTLD.ExtractFactor

factor for troops extraction, i.e. CrateDistance * Extractfactor

#table CTLD.FreeVHFFrequencies

Beacons

#number CTLD.HercMaxAngels

for troop/cargo drop via chute

#number CTLD.HercMaxSpeed

280 kph or 150kn eq 77 mps

#number CTLD.HercMinAngels

for troop/cargo drop via chute

#number CTLD.PackDistance

pack objects in this radius

#table CTLD.PilotGroups

tables

#string CTLD.RadioPath
#string CTLD.RadioSound

radio beacons

CTLD.SmokeColor

Smokes and Flares

#boolean CTLD.allowcratepickupagain

allow re-pickup crates

#string CTLD.basetype

shape of the container

#number CTLD.buildtime
#number CTLD.coalition

Coalition side number, e.g. coalition.side.RED.

CTLD.cratecountry

country of crates spawned

#boolean CTLD.debug
#boolean CTLD.dropAsCargoCrate

Parachuted herc cargo is not unpacked automatically but placed as crate to be unpacked

#boolean CTLD.dropcratesanywhere

#1570

#boolean CTLD.enableChinookGCLoading

Chinook

#boolean CTLD.enableHercules

added support Hercules Mod

#boolean CTLD.enableLoadSave

load and save dropped TROOPS

#boolean CTLD.enableslingload

slingload

#string CTLD.lid

Class id string for output to DCS log file.

#boolean CTLD.nobuildinloadzones

disallow building in loadzones

#boolean CTLD.nobuildmenu

enfore engineer build only?

#table CTLD.pickupZones

zones stuff

#boolean CTLD.pilotmustopendoors

for opening doors

#boolean CTLD.placeCratesAhead

place spawned crates in front of aircraft

#number CTLD.repairtime

time to repairor build a unit/group

#table CTLD.subcats
#boolean CTLD.suppressmessages

message suppression

#boolean CTLD.useprefix
#boolean CTLD.usesubcats

sub categories

#number CTLD.verbose

Verbosity level.

#string CTLD.version

CTLD class version.

#table CTLD.wpZones

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.

Buildable table info.

Field(s)

#boolean CTLD.Buildable.CanBuild

Is buildable or not.

#number CTLD.Buildable.Found

Found crates.

#string CTLD.Buildable.Name

Name of the object.

#number CTLD.Buildable.Required

Required crates.

#table CTLD.Buildable.Template

Template names for this build.

#CTLD_CARGO.Enum CTLD.Buildable.Type

Type enumerator (for moves).

Function(s)

Zone Info.

Field(s)

#boolean CTLD.CargoZone.active

Active or not.

#string CTLD.CargoZone.color

Smoke color for zone, e.g. SMOKECOLOR.Red.

#table CTLD.CargoZone.fmbeacon

Beacon info as #CTLD.ZoneBeacon

#boolean CTLD.CargoZone.hasbeacon

Create and run radio beacons if active.

#string CTLD.CargoZone.name

Name of Zone.

#number CTLD.CargoZone.shiplength

For ships - length of ship

#number CTLD.CargoZone.shipwidth

For ships - width of ship

#number CTLD.CargoZone.timestamp

For dropped beacons - time this was created

#string CTLD.CargoZone.type

Type of zone, i.e. load,drop,move,ship

#table CTLD.CargoZone.uhfbeacon

Beacon info as #CTLD.ZoneBeacon

#table CTLD.CargoZone.vhfbeacon

Beacon info as #CTLD.ZoneBeacon

Function(s)

Zone Type Info.

Field(s)

Function(s)

Radio Modulation

Field(s)

Function(s)

Radio Beacons

Field(s)

#number CTLD.ZoneBeacon.frequency

-- in mHz

#number CTLD.ZoneBeacon.modulation

-- i.e.CTLD.RadioModulation.FM or CTLD.RadioModulation.AM

#string CTLD.ZoneBeacon.name

-- Name of zone for the coordinate

Function(s)

  • CTLD_CARGO class, extends Core.Base#BASE

Field(s)

#string CTLD_CARGO.CargoType

Enumerator of Type.

#string CTLD_CARGO.ClassName

Class name.

#number CTLD_CARGO.CratesNeeded

Crates needed to build.

#boolean CTLD_CARGO.DontShowInMenu

Show this item in menu or not.

#boolean CTLD_CARGO.HasBeenDropped

True if dropped from heli.

#boolean CTLD_CARGO.HasBeenMoved

Flag for moving.

#number CTLD_CARGO.ID

ID of this cargo.

#boolean CTLD_CARGO.LoadDirectly

Flag for direct loading.

Core.Zone#ZONE CTLD_CARGO.Location

Location (if set) where to get this cargo item.

#string CTLD_CARGO.Name

Name for menu.

#number CTLD_CARGO.PerCrateMass

Mass in kg.

Wrapper.Positionable#POSITIONABLE CTLD_CARGO.Positionable

Representation of cargo in the mission.

#table CTLD_CARGO.ResourceMap

Resource Map information table if it has been set for static cargo items.

#string CTLD_CARGO.StaticCategory

Individual static category if set.

#string CTLD_CARGO.StaticShape

Individual shape if set.

#string CTLD_CARGO.StaticType

Individual type if set.

#number CTLD_CARGO.Stock

Number of builds available, -1 for unlimited.

#string CTLD_CARGO.Subcategory

Sub-category name.

#table CTLD_CARGO.Templates

Table of #POSITIONABLE objects.

#list<#string> CTLD_CARGO.TypeNames

Table of unit types able to pick this cargo up.

Function(s)

Add mark

Defined in:

CTLD_CARGO

Parameter:

Mark

Return value:

self

Add Stock.

Defined in:

CTLD_CARGO

Parameter:

#number Number

to add, none if nil.

Return value:

self

Add specific unit types to this CARGO (restrict what types can pick this up).

Defined in:

CTLD_CARGO

Parameter:

#string UnitTypes

Unit type name, can also be a #list<#string> table of unit type names.

Return value:

self

Query directly loadable.

Defined in:

CTLD_CARGO

Return value:

#boolean:

loadable

Query number of crates or troopsize.

Defined in:

CTLD_CARGO

Return value:

#number:

Crates or size of troops.

Query ID.

Defined in:

CTLD_CARGO

Return value:

#number:

ID

Query Location.

Defined in:

CTLD_CARGO

Return value:

location or nil if not set

Get mark

Defined in:

CTLD_CARGO

Parameter:

Mark

Return value:

#string:

Mark

Query Mass.

Defined in:

CTLD_CARGO

Return value:

#number:

Mass in kg

Query Name.

Defined in:

CTLD_CARGO

Return value:

#string:

Name

Get overall mass of a cargo object, i.e.

crates needed x mass per crate

Defined in:

CTLD_CARGO

Return value:

#number:

mass

Query type.

Defined in:

CTLD_CARGO

Return value:

Get Resource Map information table

Defined in:

CTLD_CARGO

Return value:

#table:

ResourceMap

Get the specific static type and shape from this CARGO if set.

Defined in:

CTLD_CARGO

Return values:

#string:

Category

#string:

TypeName

#string:

ShapeName

Get Stock.

Defined in:

CTLD_CARGO

Return value:

#number:

Stock

Query Subcategory

Defined in:

CTLD_CARGO

Return value:

#string:

SubCategory

Query Templates.

Defined in:

CTLD_CARGO

Return value:

#table:

Templates

Query type.

Defined in:

CTLD_CARGO

Return value:

Query has moved.

Defined in:

CTLD_CARGO

Return value:

#boolean:

Has moved

Query crate type for REPAIR

Defined in:

CTLD_CARGO

Query crate type for STATIC

Defined in:

CTLD_CARGO

Return value:

#boolean:

Query if cargo has been loaded.

Defined in:

CTLD_CARGO

Parameter:

#boolean loaded

Function to create new CTLD_CARGO object.

Defined in:

CTLD_CARGO

Parameters:

#number ID

ID of this #CTLD_CARGO

#string Name

Name for menu.

#table Templates

Table of #POSITIONABLE objects.

Enumerator of Type.

#boolean HasBeenMoved

Flag for moving.

#boolean LoadDirectly

Flag for direct loading.

#number CratesNeeded

Crates needed to build.

Representation of cargo in the mission.

#boolean Dropped

Cargo/Troops have been unloaded from a chopper.

#number PerCrateMass

Mass in kg

#number Stock

Number of builds available, nil for unlimited

#string Subcategory

Name of subcategory, handy if using > 10 types to load.

#boolean DontShowInMenu

Show this item in menu or not (default: false == show it).

Core.Zone#ZONE Location

(optional) Where the cargo is available (one location only).

Return value:

self

Remove Stock.

Defined in:

CTLD_CARGO

Parameter:

#number Number

to reduce, none if nil.

Return value:

self

Set HasMoved.

Defined in:

CTLD_CARGO

Parameter:

#boolean moved

Add Resource Map information table

Defined in:

CTLD_CARGO

Parameter:

#table ResourceMap

Return value:

self

Add specific static type and shape to this CARGO.

Defined in:

CTLD_CARGO

Parameters:

#string TypeName

#string ShapeName

Category

Return value:

self

Set Stock.

Defined in:

CTLD_CARGO

Parameter:

#number Number

to set, nil means unlimited.

Return value:

self

Set WasDropped.

Defined in:

CTLD_CARGO

Parameter:

#boolean dropped

Check if a specific unit can carry this CARGO (restrict what types can pick this up).

Defined in:

CTLD_CARGO

Parameter:

Return value:

#boolean:

Outcome

Query was dropped.

Defined in:

CTLD_CARGO

Return value:

#boolean:

Has been dropped.

Wipe mark

Defined in:

CTLD_CARGO

Return value:

self

Field(s)

#string CTLD_CARGO.CargoType

Enumerator of Type.

#string CTLD_CARGO.ClassName

Class name.

#number CTLD_CARGO.CratesNeeded

Crates needed to build.

#boolean CTLD_CARGO.DontShowInMenu

Show this item in menu or not.

#boolean CTLD_CARGO.HasBeenDropped

True if dropped from heli.

#boolean CTLD_CARGO.HasBeenMoved

Flag for moving.

#number CTLD_CARGO.ID

ID of this cargo.

#boolean CTLD_CARGO.LoadDirectly

Flag for direct loading.

Core.Zone#ZONE CTLD_CARGO.Location

Location (if set) where to get this cargo item.

#string CTLD_CARGO.Name

Name for menu.

#number CTLD_CARGO.PerCrateMass

Mass in kg.

Wrapper.Positionable#POSITIONABLE CTLD_CARGO.Positionable

Representation of cargo in the mission.

#table CTLD_CARGO.ResourceMap

Resource Map information table if it has been set for static cargo items.

#string CTLD_CARGO.StaticCategory

Individual static category if set.

#string CTLD_CARGO.StaticShape

Individual shape if set.

#string CTLD_CARGO.StaticType

Individual type if set.

#number CTLD_CARGO.Stock

Number of builds available, -1 for unlimited.

#string CTLD_CARGO.Subcategory

Sub-category name.

#table CTLD_CARGO.Templates

Table of #POSITIONABLE objects.

#list<#string> CTLD_CARGO.TypeNames

Table of unit types able to pick this cargo up.

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.

IniObjectCategory

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.

IniObjectCategory

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

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.

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.

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 Core.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 Core.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, set to nil, 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:

Event ID.

#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 Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • 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 Have a look at the class Core.Event#EVENT as these are just the prototypes.

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. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • 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.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

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. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. 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. Have a look at the class Core.Event#EVENT as these are just the prototypes. 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. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • 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:

#string:

The Schedule ID 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:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.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 Core.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, set to nil, 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

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

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:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

  • CTLD_ENGINEERING class, extends Core.Base#BASE

Field(s)

#number CTLD_ENGINEERING.marktimer

wait this many secs before trying a crate again

Function(s)

(Internal) Arrived at crates in reach.

Stop group.

Defined in:

CTLD_ENGINEERING

Return value:

(Internal) Set build status.

Defined in:

CTLD_ENGINEERING

Return value:

(Internal) Set done status.

Defined in:

CTLD_ENGINEERING

Return value:

(Internal) Get the status

Defined in:

CTLD_ENGINEERING

Return value:

#string:

State

(Internal) Check the negative status

Defined in:

CTLD_ENGINEERING

Parameter:

#string State

Return value:

#boolean:

Outcome

(Internal) Check the status

Defined in:

CTLD_ENGINEERING

Parameter:

#string State

Return value:

#boolean:

Outcome

(Internal) Move towards crates in reach.

Defined in:

CTLD_ENGINEERING

Return value:

Create a new instance.

Defined in:

CTLD_ENGINEERING

Parameters:

#string Name

#string GroupName

Name of Engineering #GROUP object

HeliGroup

HeliUnit

Return value:

(Internal) Search for crates in reach.

Defined in:

CTLD_ENGINEERING

Parameters:

#table crates

Table of found crate Ops.CTLD#CTLD_CARGO objects.

#number number

Number of crates found.

Return value:

(Internal) Set the status

Defined in:

CTLD_ENGINEERING

Parameter:

#string State

Return value:

(Internal) Set start status.

Defined in:

CTLD_ENGINEERING

Return value:

(Internal) Set stop status.

Defined in:

CTLD_ENGINEERING

Return value:

(Internal) Return distance in meters between two coordinates.

Defined in:

CTLD_ENGINEERING

Parameters:

Coordinate one

Coordinate two

Return value:

#number:

Distance in meters or -1

Field(s)

#number CTLD_ENGINEERING.marktimer

wait this many secs before trying a crate again

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.

IniObjectCategory

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.

IniObjectCategory

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

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.

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.

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 Core.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 Core.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, set to nil, 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:

Event ID.

#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 Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

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

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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.

Have a look at the class Core.Event#EVENT as these are just the prototypes. 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. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • 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 Have a look at the class Core.Event#EVENT as these are just the prototypes.

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. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • 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.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.