Jump to content

DCS-ExportScripts for Stream Deck Community Github Library


Recommended Posts

2 hours ago, skypickle said:

I dont have a folder named Saved Games/DCS.openbeta/Longs/

Did you mean Scripts?

Saved Games/DCS.openbeta/Logs/

Link to comment
Share on other sites

3 hours ago, skypickle said:

OK. Here is a working T45.lua and an associated T45 streamdeck profile. The profile is still 'alpha', it just has most of what's needed for a cold start. I could not however get the canopy or the fingerlift buttons to work, despite having them properly assigned.

T-45.lua 17.1 kB · 1 download T45.streamDeckProfile 112.89 kB · 1 download

Nice, thanks. If you update line 4 and delete the duplicate ConfigArguments, I'll make some other minor changes and add it to the Library.

Link to comment
Share on other sites

@BaileyI was looking at empty-DCS.lua and could not understand why large segments of the code were commented out.

In the high importance exports section for example there is:

 

-- Pointed to by ProcessIkarusDCSHighImportance
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
	--[[
	every frame export to Ikarus
	Example from A-10C
	Get Radio Frequencies
	get data from device
	local lUHFRadio = GetDevice(54)
	ExportScript.Tools.SendData("ExportID", "Format")
	ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
	ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
	]]
end

The entire contents of the function have been commented out. Is this intentional? I understand why the first 4 lines have been commented out but the remainder look like valid code. This kind of comment block exists for the next 5 functions.

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

1 hour ago, skypickle said:

@BaileyI was looking at empty-DCS.lua and could not understand why large segments of the code were commented out.

In the high importance exports section for example there is:

 

-- Pointed to by ProcessIkarusDCSHighImportance
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
	--[[
	every frame export to Ikarus
	Example from A-10C
	Get Radio Frequencies
	get data from device
	local lUHFRadio = GetDevice(54)
	ExportScript.Tools.SendData("ExportID", "Format")
	ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
	ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
	]]
end

The entire contents of the function have been commented out. Is this intentional? I understand why the first 4 lines have been commented out but the remainder look like valid code. This kind of comment block exists for the next 5 functions.

They are commented out because they are generic examples. 

Link to comment
Share on other sites

With regards to the Mirage F1

i'm trying to have a switch input to display Vector , BRG and DIST and choose the mode when i click it.

so i follow your example here

  1. Search the files in step 5 for Fuselage bombs pushbutton. Here is the result: elements["PNT-618"] = default_2_position_tumb(_("Fuselage bombs pushbutton"), 0, devices.MAIN, devCmds.Cmd594, 618, 1, {0, 1}, true, false, nil, false)
  2. In DCS-Interface, the Button ID will be 3 followed by the numbers that are after Cmd. In this case, the Button ID is 3594
  3. In DCS-Interface, the Device ID is 1
  4. Send Value while Pressed is 1

 and look for the ligne i have foud that 

    -- Additional target selector switch
    elements["PNT-1206"] = default_2_position_tumb(_("Additional target selector switch"), 0, devices.MAIN, devCmds.Cmd558, 1206, nil, nil, nil, nil, sounds.sound_IDN_add_tgt_sel)

question is what is "search the line in step 5" ? and also how do we know that "Button ID will be 3" and "Device ID is 1"

i have choose a switch input and add if i follow your example Button ID 3558 and Device ID 1    it also doesn't work with Momentary button

but it does not work, what i'm i doing wrong ?

 

edit i have set value to 1 and -1 it tend to work but i have to click twice to change to previous state and i cannot st the arrow being in the same mode as the button is

 

 

Screenshot_1.jpg

 

 

EDIT again

 

ok may be it is because it seem inverted in the code 

 

Screenshot_2.jpg


Edited by Jexmatex
add informations
Link to comment
Share on other sites

17 hours ago, Jexmatex said:

With regards to the Mirage F1

i'm trying to have a switch input to display Vector , BRG and DIST and choose the mode when i click it.

so i follow your example here

  1. Search the files in step 5 for Fuselage bombs pushbutton. Here is the result: elements["PNT-618"] = default_2_position_tumb(_("Fuselage bombs pushbutton"), 0, devices.MAIN, devCmds.Cmd594, 618, 1, {0, 1}, true, false, nil, false)
  2. In DCS-Interface, the Button ID will be 3 followed by the numbers that are after Cmd. In this case, the Button ID is 3594
  3. In DCS-Interface, the Device ID is 1
  4. Send Value while Pressed is 1

 and look for the ligne i have foud that 

    -- Additional target selector switch
    elements["PNT-1206"] = default_2_position_tumb(_("Additional target selector switch"), 0, devices.MAIN, devCmds.Cmd558, 1206, nil, nil, nil, nil, sounds.sound_IDN_add_tgt_sel)

question is what is "search the line in step 5" ? and also how do we know that "Button ID will be 3" and "Device ID is 1"

i have choose a switch input and add if i follow your example Button ID 3558 and Device ID 1    it also doesn't work with Momentary button

but it does not work, what i'm i doing wrong ?

 

edit i have set value to 1 and -1 it tend to work but i have to click twice to change to previous state and i cannot st the arrow being in the same mode as the button is

 

 

Screenshot_1.jpg

 

 

EDIT again

 

ok may be it is because it seem inverted in the code 

 

Screenshot_2.jpg

 

 

On 9/13/2022 at 12:40 AM, Jexmatex said:

Awsome job you did here

currently working on your Mirage F1 Profil to fit it to my needs

is there a way to separate the information in flight instant

to have bigger numbers like altitude separate from pressure etc ?

 

and i guess you already know but you tacan button supposed to be for uit doesnt work it put the tacan Off instead

 

 

 

 

On 8/17/2022 at 3:27 AM, sobe said:

Bailey

So is this the latest link to your F1 profile?   https://github.com/asherao/DCS-ExportScripts/tree/master/docu/StreamDeck Examples

The F1 dev has changed args in the module. This creates some incompatibility with the stream deck profile. I will be working on a version that is compatible with the DCS v2.7.17.29493 F1.

If you would like to help identify bugs or contribute directly with code, feel free to do so.

  • Like 1
Link to comment
Share on other sites

Mirage F1 Streamdeck profile update for DCS v2.7.17.29493 (current DCS openbeta and stable releases):

Fixed:
- Flap Tile
- Radio Mode Tile
- VUHF Radio Channel Select Tile
- UHF Radio Channel Select Tile
- Norm/Add Selector Switch
- Brng/Dist Selector Knob
- Vect. Brng/Dist Tile
- Tacan Ones Selector
- Emergency Lights
- IFF Panel
- Radar switches/modes
- Master Arm/Safe switches
- Weapons switches

Summary: Arges changed some argument values of the module. Most of the work was to identify the Tiles that didn't work, then determine if it was an arg issue, find the correct new arg (typically found with a text search program), and finally populate the correct number as the DCS Command Button ID in DCS-Interface.

You can download the updated profile here: https://github.com/asherao/DCS-ExportScripts/raw/master/docu/StreamDeck Examples/Mirage F1 by Bailey.streamDeckProfile

The updated lua is here: https://github.com/asherao/DCS-ExportScripts/tree/master/Scripts/DCS-ExportScript/ExportsModules

Remember to check out the wiki here: https://github.com/asherao/DCS-ExportScripts/wiki/Mirage-F1

Thank you for those who identified the changes, bugs, updates, etc.

  • Like 2
Link to comment
Share on other sites

On 9/15/2022 at 2:08 AM, skypickle said:

OK. Here is a working T45.lua and an associated T45 streamdeck profile. The profile is still 'alpha', it just has most of what's needed for a cold start. I could not however get the canopy or the fingerlift buttons to work, despite having them properly assigned.

T-45.lua 17.1 kB · 4 downloads T45.streamDeckProfile 112.89 kB · 1 download

Thanks! Lua uploaded to the Library.
https://github.com/asherao/DCS-ExportScripts/tree/master/Scripts/DCS-ExportScript/ExportsModules

Link to comment
Share on other sites

I tried to create a lua file for the Hercules but cannot figure out what the argument IDs are. It seems this mod uses a different syntax without numbers so I am stumped. The clickabledata.lua file has no numbers in it. The mainpanel_init.lua file in the Cockpit/Scripts folder is almost entirely commented out. Any suggestions on how to proceed?

 

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

12 hours ago, skypickle said:

I tried to create a lua file for the Hercules but cannot figure out what the argument IDs are. It seems this mod uses a different syntax without numbers so I am stumped. The clickabledata.lua file has no numbers in it. The mainpanel_init.lua file in the Cockpit/Scripts folder is almost entirely commented out. Any suggestions on how to proceed?

 

You can use modelViewer to get the IDs by hand. That is one workaround. 

Link to comment
Share on other sites

So I looked in model viewer. There is an 'args' window. I copied those numbers and created a lua file (attached) but there is no text indicating which arg IDs refer to which controls.

anyway, i created the hercules.lua file and i can assign button IDs in streamdeck however, they do not work. For example, the battery cond switch is listed with the ID 13048 and Device number 13. Assigning this to a rotary switch should work but I see no effect in the cockpit.

Hercules.lua

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

6 hours ago, skypickle said:

So I looked in model viewer. There is an 'args' window. I copied those numbers and created a lua file (attached) but there is no text indicating which arg IDs refer to which controls.

anyway, i created the hercules.lua file and i can assign button IDs in streamdeck however, they do not work. For example, the battery cond switch is listed with the ID 13048 and Device number 13. Assigning this to a rotary switch should work but I see no effect in the cockpit.

Hercules.lua 43.73 kB · 0 downloads

Correct, there is no text. You will have to move each arg in the modelViewer by hand and hope to see something move in the cockpit. 

For many DCS mods it is popular to have the aircraft electrical system (and possibly other systems) as a part of the FM. Due to this reason, and possibly others, although the switch will operate normally, the code does not detect actions made via DCS-Interface, DCS-BIOS, etc. It is very unfortunate. I The workaround for this is to use a normal Hotkey Tile.

Link to comment
Share on other sites

5 hours ago, skypickle said:

unfortunately most of the startup controls (battery, APU, engine start, etc) have no key binds.

Yep 😞

Link to comment
Share on other sites

Is there a streamdeck profile for the F-5E?

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

On 7/31/2022 at 3:37 PM, secretcode said:

Has anyone experienced a massive drop in frames while using the Apache lua file and turning ON the CMWS ?

Whenever I turn ON the CMWS I drop 30fps, and if I turn it back OFF I recover the lost frames.

As a note I downloaded the Apache lua from the exports library on github and I use it in conjunction with this stream deck profile:

https://www.digitalcombatsimulator.com/en/files/3321515/

Has anyone have an idea on what might be the issue?

 

I've been having the same issue, works perfectly on Instant action or any SP mission but when I go on MP servers my frames dump as soon as the CMWS powers on. Have you found a workaround for this ? 

Link to comment
Share on other sites

 [Files deleted, improved version reposted below.]

Spoiler

Hi, folks. I know it's next to nothing, but AFAIK no one has done a Stream Deck profile for C-101CC, nor an export script for this bird. So I reckon "next to nothing" is still a bit more than exactly nothing.

Here's a nearly empty export script plus a nearly empty Stream Deck profile (you must have the ctytler's plugin!), which only feature those 6 weapon/pylon select buttons. Each has 3 indications: top yellow light (a horizontal bar) for "pylon selected", bottom left green light (a box) for "weapon/pod loaded", and the "NS" indication to the right of the green box.
It seems to work.
THERE'S NOTHING MORE IN THE SCRIPT AND THE PROFILE!


If you know how to work with export scripts and Stream Deck plugin and profiles, feel free to build on top of it. If you don't feel like doing it, well, that's all I've got. I'm new to CASA and have had very little time lately 😞


Edited by scoobie
  • Thanks 2

i7-8700K 32GB 2060(6GB) 27"@1080p TM Hawg HOTAS TPR TIR5 SD-XL 2xSD+ HC Bravo button/pot box

Link to comment
Share on other sites

8 hours ago, scoobie said:

Hi, folks. I know it's next to nothing, but AFAIK no one has done a Stream Deck profile for C-101CC, nor an export script for this bird. So I reckon "next to nothing" is still a bit more than exactly nothing.

Here's a nearly empty export script plus a nearly empty Stream Deck profile (you must have the ctytler's plugin!), which only feature those 6 weapon/pylon select buttons. Each has 3 indications: top yellow light (a horizontal bar) for "pylon selected", bottom left green light (a box) for "weapon/pod loaded", and the "NS" indication to the right of the green box.
It seems to work.
THERE'S NOTHING MORE IN THE SCRIPT AND THE PROFILE!


If you know how to work with export scripts and Stream Deck plugin and profiles, feel free to build on top of it. If you don't feel like doing it, well, that's all I've got. I'm new to CASA and have had very little time lately 😞

 

C-101CC.streamDeckProfile 349.11 kB · 2 downloads C-101CC.lua 4.9 kB · 2 downloads

You absolute star, timing is perfect! I bought this module yesterday and then looked for a lua and profile for the stream deck and nothing, thank you.

  • Like 1

SYSTEM SPECS: Hardware Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 64Gb RAM, NVIDIA GeForce RTX 4090,

CONTROLS: VPC Rotor TCS Base, VPC Hawk-60 Collective Grip, VPC MongoosT-50CM3 Base, VPC Constellation ALPHA Prime [R], Thrustmaster Warthog – Throttle, Thrustmaster TPR - Pendular Rudder Pedals, Honeycomb Alpha Flight Control (For Anubis C-130 Hercules), Meta Quest Pro.

SOFTWARE: Microsoft Windows 11,

Link to comment
Share on other sites

47 minutes ago, scoobie said:

Haha, yeah, good timing 🙂 In that case here's a newer version w. flight director buttons. Most of them seem to work, but it's late and I haven't tried localizer/glideslope intercept.

 

C-101CC.lua 7.99 kB · 0 downloads C-101CC.streamDeckProfile 575.48 kB · 0 downloads

Nice, thanks for the updated files. Good you find the time for others to benefit. I can do minor alterations to existing scripts but haven't the wit to do the starting bit. 

SYSTEM SPECS: Hardware Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 64Gb RAM, NVIDIA GeForce RTX 4090,

CONTROLS: VPC Rotor TCS Base, VPC Hawk-60 Collective Grip, VPC MongoosT-50CM3 Base, VPC Constellation ALPHA Prime [R], Thrustmaster Warthog – Throttle, Thrustmaster TPR - Pendular Rudder Pedals, Honeycomb Alpha Flight Control (For Anubis C-130 Hercules), Meta Quest Pro.

SOFTWARE: Microsoft Windows 11,

Link to comment
Share on other sites

On 8/8/2022 at 3:24 AM, marcost said:

I did find a workround for partial functionality by removing the two-way communication process. By removing the line:

ExportScript.Tools.createUDPListner()       in ExportScript.lua

By doing this, there is still status info from DCS>>Streamdeck but obviously I cannot send keypresses Streamdeck>>DCS. However, I have working switch status lights etc on the Streamdeck and no stutters.

Also suggests where the issue lies, so I will investigate more.

Apologies, I never saw this reply.

Nice find!  I was trying to get it working again today, and reached the same conclusion as you, but I set "ExportScript.Config.Listener = false" in the main config.lua. This does exactly what you say - you get functional switch status from the sim, but the streamdeck cannot send data to the sim.  This is probably oversimplified, but I originally thought maybe this script was pulling too much data from DCS, but this suggests the issue might be the streamdeck -> sim communication.

I'm going to keep looking as well; I really want to get this plugin working.

edit - In DCS-ExportScript\lib\Tools.lua, line 48, try changing the value from (.001) to (.000):

ExportScript.socket.try(ExportScript.UDPListener:settimeout(.000))

So far, this has fixed my stuttering.  Unfortunately, I only setup 1 switch on my streamdeck for testing purposes, so I'm not sure if this breaks anything.  I'm going to do further testing tonight and see if this is an actual long term solution.


Edited by Scofflaw

run come save me

Link to comment
Share on other sites

I made a stream deck profile for the mosquito but am having an issue with stream deck buttons for the rocket controls. The on/off switch, the pair/salvo/switch and the rocket station counter button do work but they do not return any values. As a result I cannot change the button icon or the text displayed. I would appreciate any help.

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

  • Recently Browsing   0 members

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