pet333r / pw-dev_script

Script for DCS World
http://pw-developer.com/
GNU Lesser General Public License v3.0
115 stars 12 forks source link
android dcs dcs-aoa-indexer dcs-nav dcs-ufc dcs-world

DCS World Script

Script for exporting data from DCS World

Table of context

HOW TO INSTALL SCRIPT / Video

Step by step how to install DCS World script

How to install script

supported software

automatic script installation

configure script for DCS World

After installing the script, enter the IP addresses of your Android devices in the Config.lua file, you can do this:

update script

in the application you can also check the version of the script that is installed and whether a newer version is available. In case an update is available, the entire script can be easily updated by clicking the "Update script" button

files scheme

Scheme of folders with installed script

DCS or DCS.openbeta
├── Logs
│   └── telemetry                   KML and CSV files are saved here
├── Mods
│   └── Services
│       └── pw-dev
└── Scripts
    ├── Hooks
    │   └── pw_dcs_util-hook.lua
    ├── pw-dev_script
    │   ├── lib\
    │   ├── Modules\                folder with files for individual modules in DCS World
    │   ├── Utilities\              folder with additional software
    │   ├── add_firewall_rules      file adds rules to Windows firewall (if necessary)
    │   ├── Config.lua              main script configuration file
    │   ├── ExportInit.lua
    │   ├── my_local_PC_IP          checking the PC IP address
    │   └── version                 installed script version
    └── Export.lua                  main Export.lua file with entries for additional scripts

manual installation

download latest script version in ZIP file from this link: https://github.com/pet333r/pw-dev_script/releases/download/script/Scripts-Extended.zip, save it wherevere You want on disk and unpack

next go to and open folder: (depending on the DCS World version you have installed..)

if you don't have a folder 'Scripts'

if You don't have folder Scripts, simply copy all files from unpacked ZIP file to one of the locations and go to Edit Config.lua

if you have 'Scripts' folder and have installed other scripts

pcall(function() local pw=require('lfs');dofile(pw.writedir()..[[Scripts\pw-dev_script\ExportInit.lua]]); end,nil);

folder scheme

this is what the scheme of the folder with the script installed should look like (depending on the DCS version) folder Scripts

folder pw-dev_script inside Scripts

edit Config.lua

in folder pw-dev_script open Config.lua for edit, there are several "groups" in the file:

-- device 1
PWDEV.Config.Device[1] = {}
PWDEV.Config.Device[1].Export = true;           -- set to true if you want to send data to this device
PWDEV.Config.Device[1].Host = "192.168.0.11"    -- IP for 1st app

choose one of them and edit Host by changing the IP address to the IP address of your device to which the data is to be sent
it is IMPORTANT that the device's IP address matches and PC / phone / tablet must be on the same network

example you will find below in the example connection

how to find IP's of PC and Android device

Android

To find Android device IP: on device go to Settings > WiFi > check the properties of your network (it may be different on different Android devices / versions / system overlays)

PC

to find the IP address of your PC with DCS World installed: https://www.digitalcitizen.life/find-ip-address-windows
or run my_local_PC_IP.cmd file in script folder or click on the PC IP button on the script configuration panel in DCS World, a console window will open

example:

example connection

Example configuration:
PC IP: 192.168.0.10
Android device IP: 192.168.0.12

connection

1 if your network structure is more complicated than a (PC -> router <- Android device), devices may not be able to "see" each other because each belongs to a different subnet of the router, this must be changed in the router settings

2 it's best to assign a static IP address to your Android device's router (the router will always assign the same IP address to a device on your network)

3 the application works on these ports by default:

4 where to enter the IP address of the device to which I want to send the data from the script?
In one of the "groups" in the Config.lua file which is located in the folder with the script. Never enter the same IP address in several groups with the same port number, it may block data transfer on this port.

features

additional script functions:

1 saving telemetry data to KML and CSV files, files are saved in one of the folders (depending on your DCS World version)

known issues

1 If You can interact with DCS but not receiving data

2 If Your device stopped receiving data

3 If you receive data from DCS but no button works

faq

1 What are the minimum Android versions for each app? [ DCS UFC / DCS Nav / DCS AoA Indexer]

2 do the applications and script work in multiplayer?

3 does integrity check pass?

4 are there any limitations to the DCS World version with which the apps work?

compability

Script may not work with some other scripts if they use similar solutions to connect to external applications. This is a known problem in DCS.
If you noticed that something is not working and you are also using other scripts, put other scripts in the comment (add -- at the beginning of the entry) to check which ones do not want to work with each other.

tested and works with :

local vaicomlfs = require('lfs'); dofile(vaicomlfs.writedir()..[[Scripts\VAICOMPRO\VAICOMPRO.export.lua]]);

pcall(function() local dcsSr=require('lfs');dofile(dcsSr.writedir()..[[Mods\Tech\DCS-SRS\Scripts\DCS-SimpleRadioStandalone.lua]]); end,nil);

local Tacviewlfs=require('lfs');dofile(Tacviewlfs.writedir()..'Scripts/TacviewGameExport.lua');



# Stream Deck support

For the script to work properly with StreamDeck, a plugin for the Elgato StreamDeck software must be installed, more information can be found here:
[https://github.com/charlestytler/streamdeck-dcs-interface](https://github.com/charlestytler/streamdeck-dcs-interface)

* To install the DCS Interface Streamdeck plugin, you will need to download and run the installer `com.ctytler.dcs.streamDeckPlugin` from [This page](https://github.com/charlestytler/streamdeck-dcs-interface/releases)

## plugin config
- IP Address: `127.0.0.1`
- Listener Port: `1725` (default)
- Send Port: `25070` (the same as in the `Config.lua` file > `PWDEV.Config.ListenerPort`)
![](.gfx/streamdeck1.png)

:red_circle: <span style="color:#FF4422">IMPORTANT</span>
The script does not send all the data from the modules available for DCS World. Therefore, not every available 'option' will be transferred between DCS World and StreamDeck (if you use any ready-made configurations found on the Internet). This is because the `DCS UFC` application does not need all this data and there is no need to send it additionally (it only increases the network traffic)  

# license

The script is available free of charge under the LGPLv3 license.  
Part of the script was based on DCS-ExportScripts 
Additional functionality was added and modified to increase performance and separate sending of individual data to reduce the load on the application.