Getting started

Note

Some of the contents are from BGSC. This page is incomplete.

Setting up

Attention

This is a quickstart written for developers creating a new flyable plugin from scratch. If you are modifying a flyable plugin, see Plugins.

A flyable plugin consists of multiple directories for various aspects, such as the cockpit, settings, (options) liveries, textures & 3D models. DCSWD comes with a template repository which can be cloned via. git:

$ git clone --recursive https://github.com/filiastra/dcswd-template

Modifying files

entry.lua

A plugin requires to be loaded directly into EDGE in order be functionally present in-game. We can achieve this by creating an entry:

 1-- This isn't necessary, but it may be useful for future states.
 2local State = { enabled = 'installed', disabled = 'uninstalled' }
 3
 4--- Represents the base plugin information we want.
 5local plugin = {
 6    name = 'Plugin name',
 7    type = 'PluginName',
 8    version = '0.1.0',
 9    description = 'This plugin is currently under development.',
10}
11
12--- Defines the properties for defining a plugin.
13-- The bulk of declaring a plugin comes down to metadata and
14-- file path information.
15local DeclarePluginProperties = {
16    dirName = current_mod_path,
17    displayName = _(plugin.name),
18    fileMenuName = _(plugin.name),
19    installed = true,
20    state = State.enabled,
21    update_id = plugin.name,
22    version = plugin.version,
23    info = plugin.description,
24}
25
26--- Directly loads the plugin information established into EDGE.
27declare_plugin(plugin.type, DeclarePluginProperties)
28
29-- Signalling we're done with plugin entry.
30plugin_done()

Debugging

You can debug DCS by using Logging to write to dcs.log.

Cockpit scripting

EDGE is capable of detecting connectors in an EDM. These connectors can also be interacted with, such as avLuaDevice (e.g. Landing Gear System) and/or Clickable cockpit.