Jump to content

DCS-BIOS: Help with understanding Aircraft LAU function


Recommended Posts

Posted

Hi,

 

 

Could someone please help me understand these aircraft LUA files in DC BIOS?

 

If I look at the function definition for defineTumb in Util.lua,

 

function BIOS.util.defineTumb(msg, device_id, command, arg_number, step, limits, output_map, cycle, category, description)

 

Then I look at how it's used,

defineTumb("RADAR_SW", 43, 3001, 440, 0.1, {0.0, 0.3}, nil, false, "Sensor Panel", "RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL)")

 

I can see that the RADAR control is device ID 43 from devices LUA.

But where can I find a reference for the commands and arg_number parameters?

 

Thank you.

 

cheers

 

John

Posted

This is an old one for the A-10 but may still be valid to explain what you should look for;

 

 

All the files you need are located here:

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

 

The + 3000 is defined in command_defs.lua line 492 an onwards.

 

When you want to do the APU GEN you need to locate it in clickabledata.lua:

elements["PTR-EPP-APU-GEN-PWR"] = {class = {class_type.TUMB, class_type.TUMB}, hint = _("APU Generator On/Off"), device = devices.ELEC_INTERFACE, action = {device_commands.Button_1 ,device_commands.Button_1}, arg = {241,241}, arg_value = {-1,1}, arg_lim = {{0,1},{0,1}},updatable = true}

 

devices.ELEC_INTERFACE is found in devices.lua line 8 as counter() -- 1. Here you note down 1 (one) as you need it for cockpit_device_ID=1

 

device_commands.Button_1 we already found in comman_defs.lua to be + 3000, thus down = 3001 and up = 3001

 

{0,1} are the values for up=unactivated and down=activated thus value_down=1 and value_up=0

 

Then you have the full line:

{combos = {{key = "JOY_BTN89"}}, down = 3001, up = 3001, cockpit_device_id = 1, value_down = 1, value_up = 0, name = "APU generator power", category = "Electrical power control panel"}

 

The orange text is the original from the joystick.lua. I am pretty sure this is what it is displayed as in the game Option - Controls

 

 

 

https://forums.eagle.ru/showpost.php?p=2017801&postcount=52

 

Cheers

Solo

  • Recently Browsing   0 members

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