Jump to content

How to: unpressed buttons do action?? Help

Recommended Posts

Hey Guys!


Since i don't use Helios anymore, i can not set my Switches on various Panels which are using Leo Bodnar's Joystickboard (BU0836X) from "ON" to "OFF"...


Is it possible to create a input.lua or something similar which defines "unpressed Button X = OFF" and "pressed Button X = ON"


I have no idea if this is possible or can work, maybe you guys?!?



Otherwise i have to connect all off-positions on my panel to the controllerboard as "pressed/input"...





Example: for now, when i press APU GEN PWR "On" i have to unswitch and switch it again to get it to "Off".

With Helios i could manage it to do "On" and "Off" as it should...

Link to comment
Share on other sites

Hi lnr212,


Give me until the end of the day (I am at work). Then I can send you my modified default joystick lua file that I am using for direct inputs, installed with JSGME.

Only downside to it is that some of the input mapping in the game will appear twice on the list but for mapping it is not a problem.


I only use Helios for displaying flight instruments. All inputs are send directly to the game. I am currently using 1.2.10 and it works


Will get back later.




Link to comment
Share on other sites

Thats funny I mostly use HELIOS for mapping switches,rotary switches, encoders & potentiometers as far as I know there is nothing better or easier, you dont even have to make a panel if you dont want to.

AMD A8-5600K @ 4GHz, Radeon 7970 6Gig, 16 Gig Ram, Win 10 , 250 gig SSD, 40" Screen + 22 inch below, Track Ir, TMWH, Saitek combat pedals & a loose nut behind the stick :thumbup:

Link to comment
Share on other sites

Initially I also used Helios for everything including the panels via touchscreen. But eventually I began to experience a significant lag from the time something was activated until the sim acted.

Sometimes it takes 10 seconds to react. Never found a solution nor the fault thus I went for the straight in solution.




Link to comment
Share on other sites

Thanks for reply and help!


HMA sounds good, im interested in your file... standing by ;)


I want to avoid Helios any further, because of some rumours it could not be working anymore with DCS 2.0, it was killing some FPS and i want to have as less programs running as possible. So for me this would be the best solution.

But yeah, with Helios it was very easy to set up the Switches, i know...

Link to comment
Share on other sites

Ok I am back.


First of all you need JGSME if you don't have it already. It is a great tool to add mods and remove them again in case it doesn't work as you intended. Link is here http://forums.eagle.ru/showthread.php?t=98607

If you already know this, please disregard above :smilewink:


Secondly I have attached my joystick default.lua incl folder for JSGME installation. One point of caution is that my default.lua isn't complete but if covers all the one inputs I am using. By running through the list you can see what has been included.

Some of them are similar to the original list as all the input are already define. An example of this is the AAP Page selector switch (line 12-15).

An example of a toggle which originally only had one state you can find in line 10, CDU ON and OFF.


When installing the mod then it will enable you to map you input via Game - Options - Controllers. Now here is a catch. As the structure of my modded default.lua differs from the other un-modded some of the lines will show up twice. What that means is that for any input controller (e.g. you BU0836X) there will be two line for CDU. I haven't bothered to keep them all in line as it is not a problem to map them anyway.


If you run into any problems let me know and I will do my best to assist. If you want more back ground info of what all the info in the default.lua means please have a look here;





HMA joystick default 1.2.10.rar

Link to comment
Share on other sites

ok... it worked.


but i do not really understand yet.


what i did so far:


i did copy and paste your lines which fitted for me and deleted the original lines.


its working. but what are all those numbers? (in orange)


For example:

{down = 3002, up = 3002, cockpit_device_id = 1, value_down = 1, value_up = 0, name = "Inverter STBY", category = "Electrical power control panel"},


I guess 1 and 0 are switch-positions (1=on, 0=off)

but the others? Fantasynumbers to make every switch unique?


But thank you very much my friend! :thumbup:

Link to comment
Share on other sites



First of all you need to locate following folder:

C:\Program Files\Eagle Dynamics\DCS World\Mods\aircrafts\A-10C\Cockpit\Scripts


First you need to open clickabledata.lua using Notepad++. in here you find the function you want, in your ex. is it INVERTER STBY and the information looks like this:

elements["PTR-EPP-INVERTER"] = {class = {class_type.TUMB, class_type.BTN},

hint = _("Inverter Switch"),

device = devices.ELEC_INTERFACE,

action = {device_commands.Button_2, device_commands.Button_2},

arg = {242, 242},

stop_action = {0, device_commands.Button_2},

use_release_message = {false, true},

arg_value = {1, -1},

arg_lim = {{0, 1}, {-1, 0}},

updatable = true,


First you find command button number. This has nothing to do with your joystick. It is merely a button indication for this panel. In order to use it in you default.lua joystick you have to add 3000 thus is becomes 3002.


Secondly you find the device/panel is called ELEC_INTERFACE. In order to determine the cockpit_device_idyou have to open devices.lua and serach for ELEC_INTERFACE and note the counter number, i.e. "counter()--1"


Thridly you have to determine the different arguments/positions the switch can stay in. This can be seen above arg_value

The example you gave you can toggle the switch to "1" (standby) or "0" (OFF).


{down = 3002, up = 3002, cockpit_device_id = 1, value_down = 1, value_up = 0, name = "Inverter STBY", category = "Electrical power control panel"},


Hope this helps a bit.





Link to comment
Share on other sites

  • 1 year later...

hey guys!


re-activating this thread, because this "hack" doesen't work anymore since i updated to 1.5...


i can write my changes in the .lua-files and in game settings they show up but i can't use them anymore (to click on it and configure my buttons)


see this picture: (my files are named with "LNR")




and this is its lua file:




is there a new file structure or some other changes?


or am i doing something wrong?


any help is appreciated...

Link to comment
Share on other sites

Hi LNR2112,


Did you exchange the default.lua file with your modified or did you place it alongside? I strongly suggest you exchange the files using JSGME.


My lines looks the same;

{down = 3005, up = 3005, cockpit_device_id = 22, value_down = 1, value_up = 0, name = "AAP CDU Power Switch", category = "AAP"},

{down = 3006, up = 3006, cockpit_device_id = 22, value_down = 1, value_up = 0, name = "AAP EGI Power Switch", category = "AAP"},


And I am running 1.5.2 fine.




Link to comment
Share on other sites

hi HMA!


thanks for your reply!


im using JSGME but didnt use it for this... so i copied the strings from the "old" file but this didnt work...


will try to use the old files and exchange it with jsgme...


EDIT: stupid me... everything working fine withe the "old" backup-files exchanged with jsgme. thanks for the hint HMA!!!

Edited by LNR212
stupid me
Link to comment
Share on other sites

  • Recently Browsing   0 members

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