"DCS Witchcraft" is:
Here's what works so far:
Watch the video walkthrough to learn more.
witchcraft.lua
to %USERPROFILE%\Saved Games\DCS\Scripts\
(e.g. C:\Users\<Your Username>\Saved Games\DCS\Scripts\
).C:\Program Files\Eagle Dynamics\DCS World
), open the Scripts
subfolder and edit the file MissionScripting.lua
.
Add the following code somewhere before the function sanitizeModule
is defined:
witchcraft = {}
witchcraft.host = "localhost"
witchcraft.port = 3001
dofile(lfs.writedir()..[[Scripts\witchcraft.lua]])
To start trying to connect to the node.js server, your mission will have to call witchcraft.start(_G)
.
Create a new trigger set to fire ONCE, create a new condition TIME IS MORE (1 second) and add two actions:
witchcraft.start(_G)
witchcraft.cmd
in the windows
subfolder of this repository.The Lua debug console is mostly self-explanatory. Just play around with it and avoid infinite loops (those will understandably cause DCS to hang).
If you want the map to display the live positions of ground units, you have to tell witchcraft that it should send regular unit updates (select the "enable unit updates" template in the Lua Console and press Ctrl+Enter to execute it). The map is in an early stage and is currently hard-coded to only show units of the blue coalition.
The project itself is licensed under the GPLv3 or later. For third-party components (node.js and npm modules, the map icons, anything under src/bower_components
and src/vendor_js
), the licensing information can be found in the respective subdirectories or in the source file itself.