Jump to content

Recommended Posts

Posted

Hi guys,

 

Just some general questions regarding the scripting possibilities in dcs world.

 

I've been trying to make a small lua script as a test, nothing too exciting. I've managed to load it (I think), but I don't know if there are any debug commands I can use to print to a log file or to the screen.

 

Also it seems when making a change in the lua script the change is not packed inside the miz file, so I have to manually insert the lua script into the miz file and overwrite the old one. Any way I can avoid this?

 

Is there any way to use sqlite or mysql by importing these additional libraries into the miz file?

Posted

http://en.wiki.eagle.ru/wiki/Simulator_Scripting_Engine_Documentation

env.info('print equivalent') is a print() statement that will print the contents to dcs.log found in users/userName/savedGames/DCS

 

Simply reloading the lua file from a do script file trigger will update it within the .miz.

 

It is impossible to import additional libraries.

  • Like 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Thanks for answering my question yesterday regarding script reload and importing additional libraries to a miz file.

 

I've been playing around today, and basically I've found a way to write stuff from dcs to a database. I haven't tested the other way around but I think it should be possible.

 

The way it works is that from within dcs I write to a log file. I wrote a small java program that polls a directory every x seconds to see if there is a file (queue) and reads it, parses it and transfers the data to a db. It seems it's also possible to read text files in dcs, so in theory the java program can create a queue with commands for dcs to read, parse and perform an action (like create units etc etc).

 

Again in theory I think I should be able to keep track of statistics, status of planes, ground units etc, but since I'm fairly new to dcs scripting/lua, I'm not really sure if this little experiment can lead to anything useful. I don't know the limitations of the dcs scripting engine to make any assumptions.

 

Just wondering, how useful is this in fact. I read (and I also saw in your mist scripting tools) that there is a new function for adding units dynamically on the map. So maybe these two combined can lead to something interesting.

  • Recently Browsing   0 members

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