Kolyma Posted December 27, 2014 Posted December 27, 2014 If I put this into witchcraft on a running DCS mission: for key,value in pairs(Object) do env.info('key: ' .. key); end return I get helpful results like: 07160.439 INFO SCRIPTING: key: isExist 07160.439 INFO SCRIPTING: key: className_ 07160.439 INFO SCRIPTING: key: parentClass_ 07160.439 INFO SCRIPTING: key: getCategory 07160.439 INFO SCRIPTING: key: cancelChoosingCargo 07160.439 INFO SCRIPTING: key: database_ 07160.439 INFO SCRIPTING: key: Category 07160.439 INFO SCRIPTING: key: hasAttribute 07160.439 INFO SCRIPTING: key: __index 07160.439 INFO SCRIPTING: key: destroy 07160.439 INFO SCRIPTING: key: tonumber 07160.439 INFO SCRIPTING: key: __le 07160.439 INFO SCRIPTING: key: getName 07160.439 INFO SCRIPTING: key: __tonumber 07160.439 INFO SCRIPTING: key: __lt 07160.439 INFO SCRIPTING: key: __eq 07160.439 INFO SCRIPTING: key: getPoint 07160.439 INFO SCRIPTING: key: __newindex 07160.439 INFO SCRIPTING: key: getPosition 07160.439 INFO SCRIPTING: key: getVelocity 07160.439 INFO SCRIPTING: key: inAir 07160.439 INFO SCRIPTING: key: getTypeName And for something useful like Group: for key,value in pairs(Group) do env.info('key: ' .. key); end return Provides: 07360.402 INFO SCRIPTING: key: activate 07360.402 INFO SCRIPTING: key: isExist 07360.402 INFO SCRIPTING: key: className_ 07360.402 INFO SCRIPTING: key: parentClass_ 07360.402 INFO SCRIPTING: key: getCategory 07360.402 INFO SCRIPTING: key: Category 07360.402 INFO SCRIPTING: key: __index 07360.402 INFO SCRIPTING: key: getInitialSize 07360.402 INFO SCRIPTING: key: tonumber 07360.402 INFO SCRIPTING: key: __tonumber 07360.402 INFO SCRIPTING: key: __newindex 07360.402 INFO SCRIPTING: key: __le 07360.402 INFO SCRIPTING: key: __eq 07360.402 INFO SCRIPTING: key: getName 07360.402 INFO SCRIPTING: key: getController 07360.402 INFO SCRIPTING: key: __lt 07360.402 INFO SCRIPTING: key: getSize 07360.402 INFO SCRIPTING: key: getID 07360.402 INFO SCRIPTING: key: getCoalition 07360.402 INFO SCRIPTING: key: destroy 07360.402 INFO SCRIPTING: key: getUnits 07360.402 INFO SCRIPTING: key: getByName 07360.402 INFO SCRIPTING: key: getUnit Now I know some of this is documented in the standard DCS scripting info link http://en.wiki.eagle.ru/wiki/Simulator_Scripting_Engine/DCS:_World/Part_1 But does anyone know if there's any FULL documentation or information on ALL the function, methods, and values available to a lua script in DCS? I kind of poked around in the game files and didn't find anything.
Kolyma Posted December 27, 2014 Author Posted December 27, 2014 Note: clearly I see a lot of functions and stuff defined in the DCA world directory in *.lua files for items like weapons definitions, coalition lists, and such. But what I'm looking for is the actual definition of the Object class, and the inherited stuff like Unit class, Airbase class, Group class, etc. Maybe those classes are not defined in a publicly-accessible way and only contained in the compiled binary (closed source) DCS application executables and libraries?
Chump Posted December 27, 2014 Posted December 27, 2014 The Object class and derived class summaries can be found @ http://en.wiki.eagle.ru/wiki/Simulator_Scripting_Engine/DCS:_World/Part_2.
Kolyma Posted December 27, 2014 Author Posted December 27, 2014 (edited) The Object class and derived class summaries can be found @ http://en.wiki.eagle.ru/wiki/Simulator_Scripting_Engine/DCS:_World/Part_2. Thanks for trying to help. As I said in the 2nd post, I know about that link and information contained there, but it is far from complete. It's trivial to look at my OP and see that not all of those members are described on the link you posted.... cancelChoosingCargo __index etc I'd just like to know if any uber DCS scripters/programmers know where the source is for these structures. Edited December 27, 2014 by Kolyma
FSFIan Posted December 27, 2014 Posted December 27, 2014 A lot of the DLLs in the "bin" directory mostly contain functions that get exported to Lua. The two pages on the ED wiki are the only official documentation I am aware of other than the user manuals. Instead of writing a loop yourself, you can also add MiST to your mission and get a nice overview like this: return mist.utils.tableShow(_G) DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
Chump Posted December 27, 2014 Posted December 27, 2014 You got me on where cancelChoosingCargo() is implemented. Since cargo is fairly new to the Huey/Hip, it might not be exposed fully at this time (just a guess) until they get it ironed out. I do not know of a singular repository for this information other than the wiki mentioned above. These forums have a wealth of knowledge regarding what people have tried so far with Lua scripting.
Kolyma Posted December 28, 2014 Author Posted December 28, 2014 Ian;2273764'] Instead of writing a loop yourself, you can also add MiST to your mission and get a nice overview like this: return mist.utils.tableShow(_G) This command was very helpful and I had looked through the (very nice) MIST lua source code before. I ran your command in witchcraft and dumped to notepad to search. Seems a lot of what I'm asking about (which I realize once learned may be a pointless exercise) for these base lua members are shown in the sections titled "function: blah blah, C function", so I guess these are core ideas found/defined only in the binaries. Thanks for the help
Recommended Posts