Skip to content
RndName edited this page May 7, 2022 · 7 revisions

LUA Plugin system

Note: Plugins are a Liberation 2.2 feature, which is currently in preview. The features described on this page will not work with Liberation 2.1 or earlier.

This plugin system was made for injecting LUA scripts in dcs-liberation missions.

The resources for the plugins are stored in the resources/plugins folder ; each plugin has its own folder.

How does the system work ?

The application first reads the resources/plugins/plugins.json file to get a list of plugins to load, in order. Each entry in this list should correspond to a subfolder of the resources/plugins directory, where a plugin.json file exists. This file is the description of the plugin.

plugin.json

The base and jtacautolase plugins both are included in the standard dcs-liberation distribution. You can check their respective plugin.json files to understand how they work. Here's a quick rundown of the file's components :

  • mnemonic : the short, technical name of the plugin. It's the name of the folder, and the name of the plugin in the application's settings
  • skipUI : if true, this plugin will not appear in the plugins selection user interface. Useful to force a plugin ON or OFF (see the base plugin)
  • nameInUI : the title of the plugin as it will appear in the plugins selection user interface.
  • defaultValue : the selection value of the plugin, when first installed ; if true, plugin is selected.
  • specificOptions : a list of specific plugin options
    • nameInUI : the title of the option as it will appear in the plugins specific options user interface.
    • mnemonic : the short, technical name of the option. It's the name of the LUA variable passed to the configuration script, and the name of the option in the application's settings
    • defaultValue : the selection value of the option, when first installed ; if true, option is selected.
  • scriptsWorkOrders : a list of work orders that can be used to load or disable loading a specific LUA script
    • file : the name of the LUA file in the plugin folder.
    • mnemonic : the technical name of the LUA component. The filename may be more precise than needed (e.g. include a version number) ; this is used to load each file only once, and also to disable loading a file
    • disable : if true, the script will be disabled instead of loaded
  • configurationWorkOrders : a list of work orders that can be used to load a configuration LUA script (same description as above)

Standard plugins

The base plugin

The base plugin contains the scripts that are going to be injected in every dcs-liberation missions. It is mandatory.

CTLD plugin

Complete Troops and Logistics Deployment for DCS World written by ciribob (https://github.com/ciribob/DCS-CTLD)

The CTLD plugin allows special options to pickup and deploy troops as well as spawn and sling load cargo crates. The CTLD plugin also provides the JTAC Autolase function which allows a JTAC Drone to be used to lase enemy targets at the front line.

Special options in the LUA Options dialog allow to customize this plugin to the personal needs. This plugin is tailored to the special needs of DCS Liberation using a lua script. It is possible to disable the liberation specific adoptions which allows all default functionialities of the CTLD plugin like spawning any type of crate or adding custom units or zones within the Mission Editor which will be used by CTLD. Please read the GitHub Documentation of CTLD if you want to use these special options.

This plugin will be introduced with Liberation 6.0.0

Skynet plugin

An IADS (Integrated Air Defence System) script for DCS (Digital Combat Simulator) written by walder (https://github.com/walder/Skynet-IADS)

The JTACAutolase plugin

This plugin replaces the vanilla JTAC functionality in dcs-liberation.

The VEAF framework plugin

When enabled, this plugin will inject and configure the VEAF Framework scripts in the mission.

These scripts add a lot of runtime functionalities :

  • spawning of units and groups (and portable TACANs)
  • air-to-ground missions
  • air-to-air missions
  • transport missions
  • carrier operations (not Moose)
  • tanker move
  • weather and ATC
  • shelling a zone, lighting it up
  • managing assets (tankers, awacs, aircraft carriers) : getting info, state, respawning them if needed
  • managing named points (position, info, ATC)
  • managing a dynamic radio menu
  • managing remote calls to the mission through NIOD (RPC) and SLMOD (LUA sockets)
  • managing security (not allowing everyone to do every action)
  • define groups templates

You can find the VEAF Framework plugin on GitHub For more information, please visit the VEAF Framework documentation site (work in progress)

The LotATC export plugin

This plugin can export LotATC compatible drawings of threat circles of SAMS and AAA for Blue and Red coalition. These threat circles reflect the campaign state and are generated once during mission start. Once a GCI connects with the LotATC client to the server that hosts the mission, these drawings are auto loaded in the LotATC client and displayed.

To make auto loading work correctly, the computer that hosts the DCS server needs some small setup.

DCS server setup

The lua script as plugin that generates the drawings runs exactly once during mission startup. This script generates the JSON for the selected faction, RED or BLUE or both, to the output folder specified by the environment variable LOTATC_DRAWINGS_DIR.

On the server machine the LOTATC_DRAWINGS_DIR should be set to:

  • LotATC 2.2+: C:\users\<you>\LotAtc Data\Server\drawings\
  • LotATC <2.2: C:\users\<you>\Saved Games\DCS(instance)\Mods\services\LotAtc\userdb\drawings\

For LotATC 2.2+ both are accepted but the first is recommended.

Local generation

For local generation of the drawings it is enough to generate the "next turn" by pressing "Take Off", start the mission in DCS and quit again. The drawings are generated either to the path of LOTATC_DRAWINGS_DIR or as fallback to Saved Games\DCS(instance)\Mods\services\LotAtc\userdb\drawings\. These drawings can then be manually loaded in the LotATC client.

NATO names

The names generated for a SAM site always includes the group name from the campaign. E.g. for the SA-10 site "LYNX" the generated LotATC label will contain LYNX|SAM. By default it is not possible to generate the threat type because a SAM group consist of many different units and there is no one that is called "SA-10". But the exporter can infer the NATO name of the threat site with SKYNET plugin. So if SKYNET is active in the settings, it is very likely that the LotATC label will be LYNX|SAM|SA-10.

Plugin options

The plugin can be configured to control the exported drawings.

  • Export RED AA - will export threat circles for the RED faction. These are loaded if a BLUE GCI connects to LotATC.
  • Export BLUE AA - will export threat circles for the BLUE faction. These are loaded if a RED GCI connects to LotATC.
  • Export AA Symbols - will additional export a classification symbol for every AA threat that marks the center of the site.

Custom plugins

The easiest way to create a custom plugin is to copy an existing plugin, and modify the files.

New settings pages

New settings pages

Custom plugins can be enabled or disabled in the new LUA Plugins settings page.

LUA Plugins settings page

For plugins which expose specific options (such as "use smoke" for the JTACAutoLase plugin), the LUA Plugins Options settings page lists these options.

LUA Plugins Options settings page

Clone this wiki locally