sweinhart3 Posted February 5, 2010 Posted February 5, 2010 Im sure everyone here is aware of the keyboard input pitfall when designing external switches which can cause the sim to be out of sync with switch position. Aside from setting up joystick/keyboard commands in DCS setup, what file and how would you directly write to the sim? Export.lua seems pretty easy to read. So how do you write? Intel i7 990X, 6GB DDR3, Nvidia GTX 470 x2 SLI, Win 7 x64 http://picasaweb.google.com/sweinhart
Oakes Posted February 5, 2010 Posted February 5, 2010 I'm sorry but maybe I've misunderstood your question (keyboard etc)...how to write to Export.lua? You can send info/commands etc back to Export.lua over the same socket that you've used to extract stuff from DCS, you then need to parse this in export.lua and call the appropriate commands to toggle switches etc. Is this what you meant? /brds Oakes
Gadroc Posted February 5, 2010 Posted February 5, 2010 There are examples of doing what Oakes said in both his SIOC scripts and the Touchpal scripts. One thing to note is that not all commands can be executed like this. Only clickable items in the cockpit can be triggered through lua. For other things (like controls on the collective, view controls, etc) must be done either through mapping direct x buttons in game or keyboard emulation.
y2kiah Posted February 5, 2010 Posted February 5, 2010 I read this in the DCS documentation on the feature here http://www.digitalcombatsimulator.com/index.php?end_pos=567&scr=default&lang=en haven't tried it myself but it sounds promising DCS calls the function LuaExportBeforeNextFrame just before every simulation frame. So if you want to set some input control commands then you can do it here. For example: LoSetCommand(3, 0.25) -- rudder 0.25 right LoSetCommand(64) -- increase thrust There are discrete and analogous input control commands. The discrete command has code only: LoSetCommand(64) -- increase thrust The analogous command has code and value: LoSetCommand(3, 0.25) -- rudder 0.25 right
PanelBuilder Posted February 5, 2010 Posted February 5, 2010 I read this in the DCS documentation on the feature here http://www.digitalcombatsimulator.com/index.php?end_pos=567&scr=default&lang=en haven't tried it myself but it sounds promising This is way obsolete. Go here: http://en.wiki.eagle.ru/wiki/Export_1_0_1 Cheers, Colin
y2kiah Posted February 5, 2010 Posted February 5, 2010 Thanks, this is helpful. This source looks pretty incomplete at the moment, is there another source for information, or a thread, pertaining to the changes? Also, I don't see any mention of input, to get back to the OP's topic. Do these changes take effect with the installation of a DCS patch?
Gadroc Posted February 5, 2010 Posted February 5, 2010 Thanks, this is helpful. This source looks pretty incomplete at the moment, is there another source for information, or a thread, pertaining to the changes? Also, I don't see any mention of input, to get back to the OP's topic. Do these changes take effect with the installation of a DCS patch? Yes, the changes are part of the 1.0.1 patch. That wiki page is unfortunately the entirety of the official information on this topic. I have posted several times in various threads on how to get the information you need from the lua files included with the game. Search through my old posts to find them. I know several where in Oakes build thread, but some where scattered as answers to other questions.
y2kiah Posted February 5, 2010 Posted February 5, 2010 Yes, the changes are part of the 1.0.1 patch. That wiki page is unfortunately the entirety of the official information on this topic. I have posted several times in various threads on how to get the information you need from the lua files included with the game. Search through my old posts to find them. I know several where in Oakes build thread, but some where scattered as answers to other questions. Ok I see your post on page 19 of Oakes build. That will do the trick, thanks.
PanelBuilder Posted February 8, 2010 Posted February 8, 2010 Also, I posted some basic lua code on page 15 of Oakes' thread. Should be enough to get you started. Cheers, Colin
sweinhart3 Posted February 10, 2010 Author Posted February 10, 2010 The mainpanelinit.lua has a nice list of exportable values and what they are linked to. Is there a file that spells this sorta thing out for input? Intel i7 990X, 6GB DDR3, Nvidia GTX 470 x2 SLI, Win 7 x64 http://picasaweb.google.com/sweinhart
Recommended Posts