Jump to content

Recommended Posts

Posted

I know programs like HeliOS have the ability to somehow get data from the game like when switches are toggled, system failures, etc.

 

Does anyone have any good links to resources for how exactly people are accomplishing this? I was going to try and develop some ipad apps to connect to the pc and display some cockpit visuals with buttons which would transmit the data back to the pc, but the issue i'm having is I can't even figure out how to properly get cockpit data on the pc.

 

I was going to do ReadProcessMemory calls but I feel like this will be inefficient calling it every 100ms and also I would have to update every offset for when the game gets updated which would be too time consuming and unrealistic per update.

 

I saw some people were saying you can read the data using udp transmission, but I couldn't find any clear examples of something as simple as reading if the engine was turned on in a SU-25T.

 

I really wanted to try to make this on the ipad or some form of tablet instead of just using HeliOS because I feel like it would be a lot more efficient (not require a NASA cpu/gpu) and not require the multiple monitors that helios requires.

 

 

If anyone has any links to any helpful resources i'd really appreciate it. Just really looking for the most basic possible way to read a single cockpit control value.

Posted (edited)

DCS: World will look for a file called Export.lua in the user profile (%USERPROFILE%\Saved Games\DCS\Scripts\Export.lua) and run it. That file can define callback functions that run at specific times. The Export.lua script has access to various functions that can query and manipulate the cockpit. In general, FC3 aircraft have less information available than modules with a clickable cockpit. Since it's arbitrary Lua code, you can open a network socket to communicate with external software.

 

To learn more about Export.lua, you can

 

  • read the original developer post documenting Export.lua on the internet archive (refers to outdated location of the Export.lua file)
  • read the source code of Export.lua files for other software (Helios, DCS-BIOS, etc). In particular, pay attention to how they store the previous callback functions and make sure to run them as well. You should also minimize your use of global variables and ensure that any global variable you use has a name that is unique to your script. That avoids conflict with other Export.lua scripts.
  • use my DCS Witchcraft project to interactively play around with the functions available through Export.lua (see the comments in WitchcraftExport.lua in addition to the README for setup instructions)

Edited by [FSF]Ian
Posted
Ian;2787199']DCS: World will look for a file called Export.lua in the user profile (%USERPROFILE%\Saved Games\DCS\Scripts\Export.lua) and run it. That file can define callback functions that run at specific times. The Export.lua script has access to various functions that can query and manipulate the cockpit. In general, FC3 aircraft have less information available than modules with a clickable cockpit. Since it's arbitrary Lua code, you can open a network socket to communicate with external software.

 

To learn more about Export.lua, you can

 

  • read the original developer post documenting Export.lua on the internet archive (refers to outdated location of the Export.lua file)
  • read the source code of Export.lua files for other software (Helios, DCS-BIOS, etc). In particular, pay attention to how they store the previous callback functions and make sure to run them as well. You should also minimize your use of global variables and ensure that any global variable you use has a name that is unique to your script. That avoids conflict with other Export.lua scripts.
  • use my DCS Witchcraft project to interactively play around with the functions available through Export.lua (see the comments in WitchcraftExport.lua in addition to the README for setup instructions)

 

Thank you so much Ian this is exactly the type of thing I was looking for. Will look into this.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...