DCS MAP — LOCAL EXPORTER
how to install it, and how to build it yourself
A small add-on for your own DCS World that feeds the map faster aircraft updates, with altitude and heading, plus neutral units and terrain heights. It runs on your PC only; the map works as before without it.
Download
These steps are also in README.txt inside the first
zip. CREDITS.txt in both lists the open-source code the DLL is
built from.
Install
Find your DCS user folder: C:\Users\<you>\Saved Games\DCS
or DCS.openbeta (if both exist, the one whose
Logs\dcs.log is newest). It is called
Saved Games\DCS... below. Close DCS and unzip the download.
- Copy
rotorheads_exporter.dlltoSaved Games\DCS...\Mods\Services\RotorheadsExporter\bin\
creating the folders if needed. - Copy
rotorheads-exporter-hook.luatoSaved Games\DCS...\Scripts\Hooks\
- Copy
rotorheads-exporter-export.luatoSaved Games\DCS...\Scripts\
- Open, or create,
Saved Games\DCS...\Scripts\Export.luaand add this line, last, on a line of its own:pcall(function() local lfs=require('lfs'); dofile(lfs.writedir()..[[Scripts\rotorheads-exporter-export.lua]]) end)Leave other tools' lines (SRS, Tacview, DCS-BIOS) as they are. - Start DCS.
Turn it on in the map
In the map's panel, open Advanced and switch on Local exporter. On this PC the address is already right. The note under it says when the map is reading it.
To check the exporter by itself, open
http://127.0.0.1:31490/v1/status on the PC: in a mission on the
Rotorheads server, state reads mission and
exportState reads running.
For the Quest or a phone
By default the exporter answers only the PC it runs on. To read it from another device on the same network:
- Copy
rotorheads-exporter.luafrom the zip toSaved Games\DCS...\Config\
and setlan = truein it. Restart DCS. A mistake in that file turns LAN listening off and is written toSaved Games\DCS...\Logs\dcs.log; a wrongterrain_microsonly keeps its default. - Allow the port through Windows Firewall, in PowerShell as administrator
(right-click Start, Terminal (Admin)):
New-NetFirewallRule -DisplayName "Rotorheads exporter" -Direction Inbound -Protocol TCP -LocalPort 31490 -Profile Private -RemoteAddress LocalSubnet -Action Allow
- In the map on that device, under Advanced, enter the address shown in
/v1/statusunderlan, such ashttp://192.168.1.20:31490.
The rule opens port 31490 to devices on your own network, on networks Windows calls private. Through the exporter they can read what it serves -- the units and terrain of the server you fly on -- and change nothing.
If Windows asks whether to let DCS through the firewall, tick Private networks only, or press Cancel and use the rule above. Allow with Public networks ticked opens all of DCS on every network.
When travelling -- a VPN, a hotel, café or other public
Wi-Fi -- set lan = false: those networks look like a home network
to the exporter.
Uninstall
Delete the three files you copied and remove your line from
Export.lua. If you added the firewall rule, remove it in
PowerShell as administrator:
Remove-NetFirewallRule -DisplayName "Rotorheads exporter"
If something doesn't work
Search Saved Games\DCS...\Logs\dcs.log for
ROTORHEADS-EXPORTER: every line the exporter writes is tagged
with it.
| Nothing on http://127.0.0.1:31490 at all | The hook isn't loading. Check step 2, and look for hook: not
loaded. |
| exportState reads "not-installed" | The Export.lua line is missing or wrong (step 4). |
| exportState reads "stopped" | A tool loaded after yours cut it off. Move your line back to the end of
Export.lua. |
| state reads "other-server" | You are not on the Rotorheads server; the exporter gathers nothing anywhere else. |
| The Quest or phone can't reach it | Check the three steps above, and that the device is on the same network. |
Building it yourself
The source zip holds everything, with BUILDING.txt. You need
rustup (the toolchain is pinned in the source)
and MinGW-w64 on your PATH for the linker; Visual Studio isn't
used. In PowerShell in the unzipped folder, run .\build.ps1, and
copy the DLL it leaves in target\x86_64-pc-windows-gnu\release\
in place of the one in the binary zip. cargo test runs the
tests, which need neither DCS nor a built DLL.