Skip to content

Setup Guide

Requirements

  • DCS World (any version with scripting engine)
  • Two files: BUFF.lua and BUFF_config.lua
  • No MOOSE, no MIST, no desanitization, no external dependencies

Installation

Step 1: Get the files

Download both files from the Downloads page:

  • BUFF.lua -- the core script
  • BUFF_config.lua -- your configuration (optional, runs on defaults without it)

Place them wherever your Mission Editor triggers resolve files. The default location is:

Saved Games/DCS/Missions/

Step 2: Mission Editor triggers

Create two triggers on MISSION START:

Trigger 1:  ONCE -- TIME MORE (1) -- DO SCRIPT FILE -> BUFF.lua
Trigger 2:  ONCE -- TIME MORE (2) -- DO SCRIPT FILE -> BUFF_config.lua

Load order matters

BUFF.lua must load before BUFF_config.lua. The config file calls BUFF:New() and BUFF:Start(), which require the class to exist. The TIME MORE values (1 and 2) ensure correct ordering.

This is the same pattern used by AEGIS IADS and other DCS community scripts.

Step 3: Configure (optional)

Edit BUFF_config.lua to override any defaults. Every key is optional -- omit what you don't need:

local buff = BUFF:New({
    debug            = true,      -- verbose logging to DCS.log
    players_only     = false,     -- true = ignore AI-launched weapons
    rockets_enabled  = false,     -- enable rocket supplemental damage
    power_scale      = 1.0,       -- global multiplier on all weapon power
})
buff:Start()

Leave the table empty (BUFF:New({})) for pure defaults. BUFF will work out of the box.

Dedicated Server

BUFF runs identically on dedicated servers. Same two triggers, same file placement. No special server configuration needed.

File updates on dedicated servers

When updating BUFF on a dedicated server, replace BUFF.lua in the mission file location. The server must restart the mission (or load a new mission) to pick up changes. There is no hot-reload.

Multiplayer Compatibility

BUFF runs on the server only -- it hooks into the server-side scripting engine via world.addEventHandler and timer.scheduleFunction. Clients don't need any files installed.

BUFF coexists with other scripts that use S_EVENT_SHOT (AEGIS IADS, MOOSE, Splash Damage, etc.). The DCS event system is pub/sub -- multiple handlers subscribe independently without conflict.

Don't run BUFF and Splash Damage simultaneously

Both scripts do the same thing (supplemental explosions at weapon impact points). Running both will double-stack explosions and produce unrealistic overkill. Use one or the other.

Verifying It Works

  1. Set debug = true in your config
  2. Fly a mission and drop ordnance on a target
  3. Check DCS.log (in Saved Games/DCS/Logs/)
  4. Grep for BUFF:
grep BUFF dcs.log

You should see:

BUFF v0.3 activated
BUFF: REGISTERED: GBU_12 id=16778496 by=Pilot1 basePower=100 ...
BUFF: DESTROYED: GBU_12 id=16778496 -- queued for impact
BUFF: PRIMARY EXPLOSION: GBU_12 by Pilot1 power=100 ...
BUFF: sphere search found 3 objects:
BUFF:   [Tank-1] dist=12.0m ... -> CASCADE: power=3.0 ...

If you see BUFF v0.3 activated but no weapon registrations, check that:

  • Your weapon type is in the weapon table
  • players_only isn't set to true when testing with AI
  • The weapon is air-launched (ground/naval ordnance is out of scope)

Uninstalling

Remove the two Mission Editor triggers. That's it. BUFF has no persistent state, no saved files, no side effects. Removing the triggers removes all behavior.