# ciribob/dcs-ctld architecture

> Architecture diagram of the GitHub repository ciribob/dcs-ctld, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ciribob/dcs-ctld
- Repository: https://github.com/ciribob/dcs-ctld
- Video tour (about a minute): https://gitdiagram.com/ciribob/dcs-ctld/video

## Overview

DCS-CTLD is a Lua mission script for troop transport and battlefield logistics in DCS World. Mission makers load MIST first, optionally load translations, then configure CTLD in a mission; players and mission triggers use its radio-menu and scripting interfaces to move troops and cargo, build FOBs, deploy beacons, and access support features. The README documents these capabilities but no source excerpts were provided, so the graph reuses CTLD.lua for documented feature areas and omits unverified internal call relationships.

Main entry points: [`CTLD.lua`](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua) (CTLD mission script), [`mist.lua`](https://github.com/ciribob/dcs-ctld/blob/master/mist.lua) (MIST runtime), [`CTLD-i18n.lua`](https://github.com/ciribob/dcs-ctld/blob/master/CTLD-i18n.lua) (Translations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mission["Mission integration"]
  node_mist["MIST runtime<br/>[mist.lua]"]
  node_i18n["Translations<br/>[CTLD-i18n.lua]"]
  node_ctld["CTLD mission script<br/>[CTLD.lua]"]
  node_mission_api["Mission functions<br/>[CTLD.lua]"]
end

subgraph group_transport["Troop transport"]
  node_troop_ops["Troop loading<br/>[CTLD.lua]"]
  node_extract_ops["Extraction zones<br/>[CTLD.lua]"]
end

subgraph group_logistics["Cargo logistics"]
  node_cargo_ops["Cargo deployment<br/>[CTLD.lua]"]
  node_crate_build["Crate construction<br/>[CTLD.lua]"]
  node_fob["FOB building<br/>[CTLD.lua]"]
end

subgraph group_support["Support features"]
  node_beacons["Radio beacons<br/>[CTLD.lua]"]
  node_jtac["JTAC assistance<br/>[CTLD.lua]"]
  node_recognition["Target recognition<br/>[CTLD.lua]"]
end

node_missionmaker(("Mission maker"))
node_player(("Player / AI crew"))
node_dcs["DCS World"]

node_missionmaker -->|"loads first"| node_mist
node_missionmaker -.->|"loads optionally"| node_i18n
node_missionmaker -->|"loads and configures"| node_ctld
node_mist -->|"enables dynamic spawns"| node_ctld
node_i18n -->|"provides translations"| node_ctld
node_player -->|"uses radio menu"| node_troop_ops
node_player -->|"uses radio menu"| node_cargo_ops
node_ctld -->|"supports"| node_troop_ops
node_ctld -->|"spawns groups"| node_extract_ops
node_ctld -->|"exposes functions"| node_mission_api
node_missionmaker -->|"calls from triggers"| node_mission_api
node_ctld -->|"spawns cargo"| node_cargo_ops
node_cargo_ops -->|"supplies crates"| node_crate_build
node_ctld -->|"supports construction"| node_fob
node_ctld -->|"deploys beacons"| node_beacons
node_ctld -->|"provides targeting"| node_jtac
node_ctld -->|"marks targets"| node_recognition
node_ctld -->|"runs in"| node_dcs

click node_mist "https://github.com/ciribob/dcs-ctld/blob/master/mist.lua"
click node_i18n "https://github.com/ciribob/dcs-ctld/blob/master/CTLD-i18n.lua"
click node_ctld "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_mission_api "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_troop_ops "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_extract_ops "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_cargo_ops "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_crate_build "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_fob "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_beacons "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_jtac "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"
click node_recognition "https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mist,node_i18n,node_ctld,node_mission_api toneBlue
class node_troop_ops,node_extract_ops toneAmber
class node_cargo_ops,node_crate_build,node_fob toneMint
class node_beacons,node_jtac,node_recognition toneRose
class node_missionmaker,node_player,node_dcs toneIndigo
```

## Components

### Mission integration

- [MIST runtime](https://github.com/ciribob/dcs-ctld/blob/master/mist.lua): `mist.lua`
- [Translations](https://github.com/ciribob/dcs-ctld/blob/master/CTLD-i18n.lua): `CTLD-i18n.lua`
- [CTLD mission script](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`
- [Mission functions](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`

### Troop transport

- [Troop loading](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`
- [Extraction zones](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`

### Cargo logistics

- [Cargo deployment](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`
- [Crate construction](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`
- [FOB building](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`

### Support features

- [Radio beacons](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`
- [JTAC assistance](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`
- [Target recognition](https://github.com/ciribob/dcs-ctld/blob/master/CTLD.lua): `CTLD.lua`

### Other components

- **Mission maker**
- **Player / AI crew**
- **DCS World**

## Connections

- Mission maker → MIST runtime: loads first (evidence: `README.md`)
- Mission maker → Translations: loads optionally (evidence: `README.md`)
- Mission maker → CTLD mission script: loads and configures (evidence: `README.md`)
- MIST runtime → CTLD mission script: enables dynamic spawns (evidence: `README.md`)
- Translations → CTLD mission script: provides translations (evidence: `README.md`)
- Player / AI crew → Troop loading: uses radio menu (evidence: `README.md`)
- Player / AI crew → Cargo deployment: uses radio menu (evidence: `README.md`)
- CTLD mission script → Troop loading: supports (evidence: `README.md`)
- CTLD mission script → Extraction zones: spawns groups (evidence: `README.md`)
- CTLD mission script → Mission functions: exposes functions (evidence: `README.md`)
- Mission maker → Mission functions: calls from triggers (evidence: `README.md`)
- CTLD mission script → Cargo deployment: spawns cargo (evidence: `README.md`)
- Cargo deployment → Crate construction: supplies crates (evidence: `README.md`)
- CTLD mission script → FOB building: supports construction (evidence: `README.md`)
- CTLD mission script → Radio beacons: deploys beacons (evidence: `README.md`)
- CTLD mission script → JTAC assistance: provides targeting (evidence: `README.md`)
- CTLD mission script → Target recognition: marks targets (evidence: `README.md`)
- CTLD mission script → DCS World: runs in (evidence: `README.md`)
