Automated DCS Mission Weather editor to set DCS mission to match real world environment conditions (temperarture, clouds, visibility, time, pressure, wind) based on the METAR data obtained from the AVWX API.
Optionally outputs METAR to Discord Webhook or Google Sheets Cell for KBC's (Kneeboard Card) stored on a Google Drive to aid in mission planning or KBC creation.
- Sets DCS mission weather to match real world weather conditions.
- Weather cannot currently be set while the mission is still live due to DCS limitations, this application works by setting the next mission's weather and then restarting every hour to that updated weather.
- The mission will not restart while clients are connected to the mission, effectively "freezing" weather in place until clients disconnect.
- That means this application is not suitable for public servers that have little to no down time with no clients connected.
- Can manually force clear weather or preset times from the DCS F10 menu while in an admin slot.
- Accounts for DCS inherent QFF -> QNH conversion error.
- Automatically desanitizes
\Program Files\Eagle Dynamics\DCS World OpenBeta\Scripts\MissionScripting.lua
- Be aware of running other untrusted DCS scripts when
MissionScripting.lua
is desanitized.
- Be aware of running other untrusted DCS scripts when
Requirements
- 7zip
- Java 17 (Class File Version 61.0 or newer)
- Dedicated DCS Server
- Windows
Installation
Initial Set-up
- Download the latest release from GitHub
- Extract the contents of the zip file into the
missions
folder.- e.g.
C:\Users\yourname\Saved Games\DCS.openbeta\Missions\mymission
mymission
can be renamed as you desire (this must be matched in a later step).
- e.g.
- Copy
mymission\hooks\DCSDynamicWeatherHook.lua
to your Saved Games Hooks folder.- e.g.
C:\Users\yourname\Saved Games\DCS.openbeta\Hooks\DCSDynamicWeatherHook.lua
- e.g.
- Verify the user running DCS has read/write access to the
mymission
folder. - Acquire an AVWX API Key (Free) and paste into
mymission\secrets\avwx_api_key.json
, replacing "YOUR_API_KEY".{ "avwx_key": "a3jd923ns983fk30TeWWFGjaf329aCutFj2Ask4Js31" }
Miz Set-up
- Create a zone in your DCS Mission using the DCS Mission Editor and name it
StationReference
(this name can be changed inconfig.json
).- Place the zone at the location of your station.
- This will be the reference station where weather will be polled. For example, if you place it at Nellis, the application will retrieve the weather from Nellis Station.
- Create the following triggers in your DCS Mission. (See Example Mission)
- "MISSION START" -> -> "DO SCRIPT" -> Paste the Code below, and edit "mymission" to match your desired folder name.
local folder folder = "mymission" -- <-- Edit this ---- DO NOT EDIT BELOW ------------ DCSDynamicWeather = {} DCSDynamicWeather.MISSION_FOLDER = folder
- "MISSION START" -> -> "DO SCRIPT FILE" -> Load
DCSDynamicWeatherLoader.lua
- This should be AFTER the
DO SCRIPT
mentioned above.
- This should be AFTER the
- "MISSION START" -> -> "DO SCRIPT" -> Paste the Code below, and edit "mymission" to match your desired folder name.
- Inside your Mission Briefing, include
DCSDW
somewhere insideSituation
- Start your DCS Server
- Discord Webhook and Google Sheets set up is optional, see below.
Discord Webhook Setup:
- Acquire your Discord Webhook API Key (Free) and paste into
mymission\secrets\discord_api_key.json
.
{
"discord_key": "https://discord.com/api/webhooks/012345678901234567/943c120b27fb49580766808103d3db6943c120b27fb4_951807DeFdAsd668-08103d"
}
- Set
output_to_discord
insideconfig.json
totrue
{
"output_to_discord": true,
}
Google Sheets Setup:
- Go to Google API Console
- Go to
Credentials
- Click
Manage service accounts
underService Accounts
- Click
Create Service Account
- Create a name/description as desired.
- Grant it the
Service Account User
role - Click the 3-dot menu and select
Manage Keys
- Click
Add Key
andCreate New Key
usingJSON
format. - Paste into
mymission\secrets\
and name the filegooglesheets.json
- Configure
config.json
and include your spreadsheet_id and spreadsheet_range:
{
"output_to_sheets": true,
"spreadsheet_id": "3bd76bf6d6f64c94b0c0a4278e7000c96bf6d6f64c94b0c",
"spreadsheet_range": "MySheet!C69"
}
- See Google Sheets API Overview for more information on finding your spreadsheet ID or range.