Apache600 Posted November 30, 2015 Posted November 30, 2015 Hey guys, This is question regarding the Mig-15, and if the "X: Cockpit Perform Clickable Action" action works. Looking at the manual, and topics online, I can only find information referring to it's use and the A-10C, which would lead me to believe it is ONLY a function for that aircraft. But I am hoping that I could use it for the Mig-15. Tests so far have failed, because I haven't a clue what to put in for the "command" key line in the action options. Example. If i wanted to force the NAV lights on, i figured this would be the triggered action to use. NAV lights, per 'clickablecockpit.lua' is pnt_111. So this is what i've been trying: - X: Cockpit Perform Clickable Action Cockpit Device - 111 Command - NO CLUE (values range from 3001 - 3999) nothing shows in the .lau Value - 1 (guess here, but value range is from 0.0 - 1.0, and i figure 1 is on) Can anyone help me out? It would be much appreciated. Thanks! - Apache600 [sIGPIC][/sIGPIC] The Museum Relic Campaign: --> http://forums.eagle.ru/showthread.php?t=164322 Community Missions (SP & MP) --> https://forums.eagle.ru/showthread.php?t=205546
Sauerkraut Posted November 30, 2015 Posted November 30, 2015 (edited) try the little mission for the values. --- Edit --- Hello there, because I can not write as well in English, I have the text translated with Google Translate. I have the German version of DCS World. Therefore, I do not know the exact English names in Missions Editor Let us first of all to the "X: Cockpit Perform Clickable Action" with the help of a mission created above. The function / action wants 3 values of you know: cockpit equipment, command and value. Cockpit equipment: First we bring in experience, in which category the programmers have created the relevant switch for navigation light. For this we look for in the "clickabledata.lua" file. Here we find the following entry: - Nav Lights System element ["pnt_111"] = default_2_position_tumb (_ ("External Lights Switch, ON / OFF"), devices.NAVLIGHT_SYSTEM, navlights_commands.Mig15_Command_PositionLights, 111) pnt_111 - Name of the switch in the program default_2_position_tumb - type of switch "External Lights Switch, ON / OFF" - hint, that appears when hovering with the mouse devices.NAVLIGHT_SYSTEM - Category (what we are looking for) navlights_commands.Mig15_Command_PositionLights - important for "command_defs.lua" 111 - Put simply, the device number Now we know that the switch for the navigation light in the category "NAVLIGHT_SYSTEM" is located. Now open the file "devices.lua" (located in the same directory as "clickabledata.lua"). local count = 0 LOCAL FUNCTION counter () count = count + 1 return count end ------- ------- DEVICE ID Devices = {} - Moved forward for correct initialization of another devices - Do not Changed Following sequence for sim Devices ["FM_PROXY"] = counter () Devices ["ELEC_INTERFACE"] = counter () Devices ["CONTROL_INTERFACE"] = counter () Devices ["WEAPON_SYSTEM"] = counter () Devices ["STANDBY_COMPASS"] = counter () Devices ["KNEEBOARD"] = counter () Devices ["CLOCK"] = counter () Devices ["AIR_INTERFACE"] = counter () Devices ["OXYGEN_INTERFACE"] = counter () Devices ["FUELSYS_INTERFACE"] = counter () Devices ["ENGINE_INTERFACE"] = counter () Devices ["HYDROSYS_INTERFACE"] = counter () Devices ["GEAR_INTERFACE"] = counter () Devices ["NAVLIGHT_SYSTEM"] = counter () ... At first glance, a bit confusing, but after that easy to understand. Here are the various categories, is classified into each switch, lamp and instrument. The basic scheme is given by ED. Look at times the local function and you'll quickly see what value ED has given the individual categories. Devices ["FM_PROXY"] = 1, Devices ["ELEC_INTERFACE"] = 2, etc. So for the devices ["NAVLIGHT_SYSTEM"] category we arrive at the value 14. This value we enter in the cockpit / instrument in the Mission Editor. command Now let's look at the file "command_defs.lua" and find the following: start_command = 3000 device_commands = { Button_1 = start_command + 1; Button_2 = start_command + 2; Button_3 = start_command + 3; Button_4 = start_command + 4; Button_5 = start_command + 5; .... This means the initial value for a command is 3000, each subsequent instruction increases by. 1 Search now find it in the file "Mig15_Command_PositionLights" and is in the following range: count = start_command navlights_commands = { Mig15_Command_PositionLights = counter (); Mig15_Command_NoseLight = counter (); - Input commands Mig15_Command_PositionLights_EXT = counter (); Mig15_Command_NoseLight_EXT = counter (); Whenever count = start_command stands in front of the section, one begins in 3000 to re-count. So true Mig15_Command_PositionLights = 3001, Mig15_Command_NoseLight = 3002, Mig15_Command_PositionLights_EXT = 3003 .... We want to change the value for the navigation light, so we take the input command Mig15_Command_PositionLights_EXT = 3003. The value 3003 we carry the mission editor in command. value For the variable value, we need to look into the clickabledata.lua again. As mentioned above in the description of switch "default_2_position_tumb". This type is a standard model and is described in the file header. Is the type of the switch a special type, it is described in the relevant section of the switch. function default_2_position_tumb (hint_, DEVICE_, command_, arg_) return { class = {class_type.TUMB, class_type.TUMB} Hint = hint_, device = DEVICE_, action = {command_, command_} arg = {arg_, arg_} arg_value = {1, -1}, arg_lim = {{0,1}, {0,1}} updatable = true, use_OBB = true, sound = {{SOUND_SW1}, {}} SOUND_SW1 } end Here I'm not sure if I'm doing it right. But it usually works. To determine this value, I also had to try some time. In arg_lim the switch positions are described 0 = Off and 1 = On. This switch positions I added with the second value from arg_value und came to the value -1 for navigations light off and 0 for navigations light on.mig-15_nav_light.miz Edited November 30, 2015 by Sauerkraut 2 2
Apache600 Posted November 30, 2015 Author Posted November 30, 2015 +1 Rep to you good sir! Thank you so much for the help. The Nav Light wasn't the thing i was really looking for. I was using it as a test bed. With the knowledge that you gave me here though, I was able to figure out the other systems that I needed to switch on and off. Thanks again for taking the time to explain it to a non-code reading person. I knew just enough to NEVER figure it out (with the pnt_111) hahaha. As you can tell, i was WAY OFF. - Apache600 [sIGPIC][/sIGPIC] The Museum Relic Campaign: --> http://forums.eagle.ru/showthread.php?t=164322 Community Missions (SP & MP) --> https://forums.eagle.ru/showthread.php?t=205546
vctpil Posted December 28, 2018 Posted December 28, 2018 Hi, I was able to mose the dispenser switch at the start of a mission, but I cannot find the value for the master arm switch and the HMD ? Any idea how to find them ? Thanks, Vincent IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY
Recommended Posts