Jump to content

Does export.lua automatically get called as long as it's put in the right place?


Recommended Posts

Hi, I haven't flown for some time. Export.lua used to work in previous versions of FC and DCS. Now I can't seem to get it to work. No idea whether it's got to do with DCSW2.5 upgrades.

 

Thing is, I have to determine whether the file has been executed when the game is running. As long as I could remember, there didn't seem to be a switch anywhere else where you need to tweak a line to enable Export.lua. So I think I just need to place the file in the right place.

 

I'm aware that the Export.lua found in DCS World 2 OpenAlpha\Scripts\ is just a sample template. I've downloaded the Helios version and Capt Zeen's version of Export.lua, and put them in both these folders:

USER NAME\Saved Games\DCS.openalpha\Scripts

USER NAME\Saved Games\DCS\Scripts

 

Note:

1. I don't think the latter one works since DCS.openalpha is the active path for 2.5. But I put it there anyway because the template still says you need to put it there, wouldn't hurt anything. ED may forgot to upgrade the template though.

2. I've created both Scripts\ folders manually.

 

In order for the scripts to leave a trace, I've modified the log file open command within function LuaExportStart() , now it looks like this:

debug_output_file = io.open("E:\\ExportDebug.log", "wa")

debug_output_file:write("Error log begins.\r\n")

 

The absolute address is just for convenience. I suppose if export.lua ever gets called, it would leave a log file behind, even just an empty one. But no matter where I place this file, there's no sign of a log file being created. So I'm a bit confused, is there a hiden switch anywhere else that I need to turn on so that export.lua gets called? I have to know it because then I can decide whether I sould focus on the stuff within this particular file or outside of it. Thanks.

Link to comment
Share on other sites

BTW, the log file was only used to check if the .lua has been called and executed. I've also checked UDP connection at first. Helios was not getting the data. I used a socket tool and opened up a UDP client at 127.0.0.1, listening to port 9089. Found no activity whatsoever.

Link to comment
Share on other sites

Hello Alex.

The place for the export.lua is correct:

USER NAME\Saved Games\DCS.openalpha\Scripts

Dont know from where you get the captzeen export.lua but be sure you are using the latest one. You can get it from mi site:

http://www.captzeen.com

perhapps you are using the one in Gadrocs site, and that one is not updated to all the changes DCS make those last months.

 

Anyway, if the export.lua fail, you can check it in DCS.log, there you get the reason why export.lua fails in case it does.

Link to comment
Share on other sites

Hello Alex.

The place for the export.lua is correct:

USER NAME\Saved Games\DCS.openalpha\Scripts

Dont know from where you get the captzeen export.lua but be sure you are using the latest one. You can get it from mi site:

http://www.captzeen.com

perhapps you are using the one in Gadrocs site, and that one is not updated to all the changes DCS make those last months.

 

Anyway, if the export.lua fail, you can check it in DCS.log, there you get the reason why export.lua fails in case it does.

 

Hi Capt Zeen, nice to have your reply. Now it's working great thanks to your reminder.

 

Yes I made the download directly from your site when I Googled for a SU-27 solution. I also experimented with Gadroc's scripts. I'll explain later.

 

Turns out I missed out the IMPORTANT NOTE on the top when I was all focused at scrolling down to find the SU-27 profile in the first place. And yes I used the Export.lua that came with the package. No wonder the notes are IMPORTANT:doh:

 

It also turned out that I set up the wrong UDP client with my socket tool. I thought DCS created a server at 9089, while in fact the client itself has to be set on port 9089, not try to listen to 9089 from some random port. That's why I wrongly concluded that the function never got called because the socket tool didn't hear anything.

 

I was quite good with this export thing when I created my own Export.lua and VC++ program. But it's been 7 years since I did that, and I didn't leave any documentaion for know-how. Lessons learned, I'm off to archiving. Thanks for the help Captain.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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