Jump to content

DCS-ExportScripts for Stream Deck Community Github Library


Recommended Posts

5 hours ago, Scofflaw said:

The file date is showing 5/22/2022.  Is there a newer one?

No, but the current one does not have those of export lua lines.  

Link to comment
Share on other sites

17 hours ago, Bailey said:

No, but the current one does not have those of export lua lines.  

Sorry, I'm not super familiar with github, but I downloaded the .zip from github (this URL : https://github.com/asherao/DCS-ExportScripts/archive/refs/heads/master.zip).  Is this not the latest?

On github, I see the tools.lua link on line 38 of this file : https://github.com/asherao/DCS-ExportScripts/blob/master/Scripts/DCS-ExportScript/ExportScript.lua

This matches the exportscript.lua in on my computer, am I using the wrong version?

  • Like 1

run come save me

Link to comment
Share on other sites

  • 4 weeks later...

So, I have figured out how to get a little animation into a Tile. It may not be much, but it is a start. It involves using a still first image and a gif as the second image, playing within the "more than 0" confines of the in-game animation.
You can find the explanation and demo profile here:
https://github.com/asherao/DCS-ExportScripts/tree/master/docu/StreamDeck Examples
Good luck!

 

	-- provides the logic for an animated indicator
	-- Use a Momentary Button with Lamp
	-- Image State change: ID is greater that (>) the below value - 0

	-- The first image is a still image (frame 0) of the rest position
	-- The second image is an animation gif
	-- The logic below will allow the longest reasonable time for the gif to play
	-- The time for your gif will be based on the time the ingame animation goes from 0 to 1 and back to 0
	-- If the gif is too long the still will appear before the end of the gif, possibly making an unwanted result
	local blink = mainPanelDevice:get_argument_value(600) -- FlowBlinker
	if blink > 0.0010 then
		blink = 1
	else
		blink = 0
	end
	ExportScript.Tools.SendData(9000, blink)

Edit: You may want to set your gif to no repeat when making it. 


Edited by Bailey
Link to comment
Share on other sites

  • 2 weeks later...
On 6/10/2022 at 10:58 AM, quantum69 said:

Yeah, I took a similar approach and used the 3rd option of the rotary tile (ok, we'll use tile(s) to avoid confusion), the section that allows associating text with returned values. I used some of the standard ASCII values; 211,212, etc (the block characters) to do 4-state indicators. I don't know if the SD would recognize ASCII above 255 but at least good ol' block chars are there. I remember the days of the old ASCII drawings (I'm incredibly old).

so text for the 1st state basically covers the underlying graphic, the 2nd state is effectively an empty string (though it has to be something) and allows 1st state graphic to be shown, 3rd state is like the 2nd; no text overlaying the graphic. Set the tile option for value=text accordingly. So a covered over tile is your off. value 0.0=<text that cover graphics>,0.5=<blank text,1.0=<blank text>

I'll give that go. Good thinking there.

 

I tried the color thing. I failed. IDK if it was due to syntax or that the Stream Deck overrides the colors. Oh well.

Link to comment
Share on other sites

2022/5/17 PM5点49分,Bailey说:

I did not have the opportunity to complete the profile. The extent of my efforts is here https://github.com/asherao/DCS-ExportScripts/tree/master/docu/StreamDeck Examples 

There is a person who went the extra mile to make a more complete profile. Ask around on the UH-60L Mod discord to find it. They put a lot of good work into it. 

Hi! how to use UH60L through StreamDeck? i cant find the item call"UH-60L"here.i have installed the UH60L mod and updated the DCS-ExportScript.

1658565658002.jpg

1658565771006.jpg

Link to comment
Share on other sites

37 minutes ago, Torattacker said:

Hi! how to use UH60L through StreamDeck? i cant find the item call"UH-60L"here.i have installed the UH60L mod and updated the DCS-ExportScript.

1658565658002.jpg

1658565771006.jpg

You won’t be able to under normal circumstances. DCS-Interface was not designed with Saved Games aircraft in mind. A workaround is to copy the entire UH-60L mod folder into DcsInstallLocation/mods/aircraft. Then go into the new UH-60L folder and delete the entry.lua file. That should be it. 

  • Like 1
Link to comment
Share on other sites

I need help with the Mirage 2000, I cant seem to get the text from the PCA and weapon selector to show, for the PCA I found the ID values from 2010 to 2019 and none work.

 

 Was able to make it work the FA18 UFC display but not the Mirage.

image.png


Edited by Pekins
Link to comment
Share on other sites

1 hour ago, Pekins said:

I need help with the Mirage 2000, I cant seem to get the text from the PCA and weapon selector to show, for the PCA I found the ID values from 2010 to 2019 and none work.

 

 Was able to make it work the FA18 UFC display but not the Mirage.

image.png

 

What have you tried?

Link to comment
Share on other sites

2 hours ago, Pekins said:

I need help with the Mirage 2000, I cant seem to get the text from the PCA and weapon selector to show, for the PCA I found the ID values from 2010 to 2019 and none work.

 

 Was able to make it work the FA18 UFC display but not the Mirage.

image.png

 

Updated M2K
- PCA (2010-2019)
- Radios (2020-2023)
https://github.com/asherao/DCS-ExportScripts/blob/5014f815bc27010b2220b0d7cfde9d7d3738b23e/Scripts/DCS-ExportScript/ExportsModules/M-2000C.lua

There you go. Enjoy!

image.png

 

function ExportScript.Radios(mainPanelDevice)
	-- top radio
	local top_RADIO = GetDevice(20)
	local topFreq = ExportScript.Tools.RoundFreqeuncy((top_RADIO:get_frequency()/1000000))
	ExportScript.Tools.SendData(2020, string.format("%7.3f",topFreq))

	-- U/VHF Com Preset (top radio)
	--[436] = "%.4f",	-- 	Preset display (1-20)
	local lUVHF_RADIO_PRESET = {[0.00]="1",[0.10]="2",[0.15]="3",[0.20]="4",[0.25]="5",[0.30]="6",[0.35]="7",[0.40]="8",[0.45]="9",[0.50]="10",[0.55]="11",[0.60]="12",[0.65]="13",[0.70]="14",[0.75]="15",[0.80]="16",[0.85]="17",[0.90]="18",[0.95]="19",[1.00]="20"}
	ExportScript.Tools.SendData(2021, ExportScript.Tools.DisplayFormat(lUVHF_RADIO_PRESET[tonumber(string.format("%1.2f",mainPanelDevice:get_argument_value(436)))], 2))


	-- bottom radio
	local bot_RADIO = GetDevice(19)
	local botFreq = ExportScript.Tools.RoundFreqeuncy((bot_RADIO:get_frequency()/1000000))
	ExportScript.Tools.SendData(2022, string.format("%7.3f",botFreq))

	-- Best way to get digital radio preset channel is unknown. Use export 2023
end

function ExportScript.PCApanel(mainPanelDevice)
	-- Weapon Panel top line
	local lPCAUR = ExportScript.Tools.getListIndicatorValue(4)
	local pca1 = ''
	local pca2 = ''
	local pca3 = ''
	local pca4 = ''
	local pca5 = ''

	if lPCAUR ~= nil then
		if lPCAUR.PCA_LCD_1_0 ~= nil then pca1 = lPCAUR.PCA_LCD_1_0 end
		if lPCAUR.PCA_LCD_1_1 ~= nil then pca2 = lPCAUR.PCA_LCD_1_1 end
		if lPCAUR.PCA_LCD_1_2 ~= nil then pca3 = lPCAUR.PCA_LCD_1_2 end
		if lPCAUR.PCA_LCD_1_3 ~= nil then pca4 = lPCAUR.PCA_LCD_1_3 end
		if lPCAUR.PCA_LCD_1_4 ~= nil then pca5 = lPCAUR.PCA_LCD_1_4 end
	end
	ExportScript.Tools.SendData(2010, pca1)
	ExportScript.Tools.SendData(2011, pca2)
	ExportScript.Tools.SendData(2012, pca3)
	ExportScript.Tools.SendData(2013, pca4)
	ExportScript.Tools.SendData(2014, pca5)

	-- Weapon Panel bottom line
	local lPCABR = ExportScript.Tools.getListIndicatorValue(5)
	local stores1 = ''
	local stores2 = ''
	local stores3 = ''
	local stores4 = ''
	local stores5 = ''

	if lPCABR ~= nil then
		if lPCABR.PCA_LCD_2_0 ~= nil then stores1 = lPCABR.PCA_LCD_2_0 end
		if lPCABR.PCA_LCD_2_1 ~= nil then stores2 = lPCABR.PCA_LCD_2_1 end
		if lPCABR.PCA_LCD_2_2 ~= nil then stores3 = lPCABR.PCA_LCD_2_2 end
		if lPCABR.PCA_LCD_2_3 ~= nil then stores4 = lPCABR.PCA_LCD_2_3 end
		if lPCABR.PCA_LCD_2_4 ~= nil then stores5 = lPCABR.PCA_LCD_2_4 end
	end

	ExportScript.Tools.SendData(2015, stores1)
	ExportScript.Tools.SendData(2016, stores2)
	ExportScript.Tools.SendData(2017, stores3)
	ExportScript.Tools.SendData(2018, stores4)
	ExportScript.Tools.SendData(2019, stores5)
end

 

  • Thanks 1
Link to comment
Share on other sites

Mirage F1 Update
- Added Fuel Calculator (Set the Mrad depression value to the amount of fuel burned in 10 seconds to get fuel time remaining)
https://github.com/asherao/DCS-ExportScripts/blob/master/Scripts/DCS-ExportScript/ExportsModules/Mirage-F1CE.lua

Pic demonstrates the two states of the calculator.
image.jpeg


Edited by Bailey
  • Like 1
Link to comment
Share on other sites

Just wanted to say thank you, Bailey!
Bought the F1 the other day, and - surpise! - instead of spending hours in lua and SD software, I just downloaded your profile for F1 and that's it - it works.
I find these especially great:
1. The icons for those "pushable pegs" in F1 (e.g. NWS sensitivity "peg"). I couldn't figure out how to draw icons for such a control, but your icons are just perfect for that - those half-disks - upper or lower, great idea! A quick glimpse and I know whether it's high or low sensitivity.
2. Pipper depression calculator (tables) - this is wild! 🙂 It took me a second to realize what I'm looking at on my SD. Press buttons to pick attack run parameters, read the mills! Amazing idea!
Hats off! Thanks a lot for this and all your great work in general! 🙂

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

Bailey I just downloaded your profile for the F1 however Im noticing its made for the Streamdeck XL, which limits the display to this, Im really interested in your weapon selector panel, any way you could condense that into a 15 button layout? thx 

image.pngnull

Link to comment
Share on other sites

38 minutes ago, Pekins said:

Bailey I just downloaded your profile for the F1 however Im noticing its made for the Streamdeck XL, which limits the display to this, Im really interested in your weapon selector panel, any way you could condense that into a 15 button layout? thx 

image.pngnull

I cannot. There are more than 15 tiles. There is a Depression Table Calculator (export 8043) in the wiki. The tables are reduced to 1 tile.

Link to comment
Share on other sites

9 hours ago, Pekins said:

Bailey I just downloaded your profile for the F1 however Im noticing its made for the Streamdeck XL, which limits the display to this, Im really interested in your weapon selector panel, any way you could condense that into a 15 button layout? thx 

image.pngnull

I have his weapons panel on a small stream deck. It's at this location:
Shared DCS Stuff

The small panel is on the right stream deck profile.

  • Thanks 2
Link to comment
Share on other sites

Mirage F1 Update
- Added Total Fuel Needle Tile (8005)
181450676-e966ffaa-e149-4d27-b456-341588
Needle version on the left
Thumbwheel version on the right


Edited by Bailey
  • Like 1
Link to comment
Share on other sites

On 7/27/2022 at 5:39 PM, scoobie said:

Just wanted to say thank you, Bailey!
Bought the F1 the other day, and - surpise! - instead of spending hours in lua and SD software, I just downloaded your profile for F1 and that's it - it works.
I find these especially great:
1. The icons for those "pushable pegs" in F1 (e.g. NWS sensitivity "peg"). I couldn't figure out how to draw icons for such a control, but your icons are just perfect for that - those half-disks - upper or lower, great idea! A quick glimpse and I know whether it's high or low sensitivity.
2. Pipper depression calculator (tables) - this is wild! 🙂 It took me a second to realize what I'm looking at on my SD. Press buttons to pick attack run parameters, read the mills! Amazing idea!
Hats off! Thanks a lot for this and all your great work in general! 🙂

I am glad to be able to allow people to spend less time in code and more time in the Mirage F1!

1. I was thinking about the icons for what felt like quite a while as the NWS switch is so hard to know at a glimpse in the aircraft. Eventually simplicity won. No only clearly visible, but understandable at a glance too. I really like that one even if it is so simple. Maybe that's what make it work so well.

2. The jet may not be "smart" but I'm counting this one as a computer 😄

Thank you for your feedback. It is much appreciated. Enjoy!


Edited by Bailey
  • Thanks 1
Link to comment
Share on other sites

Hi Everyone!

Bailey, did you manage to get Stream Deck Interface list the DCS Interface values after clicking refresh? I have copied the Mirage-F1CE.lua to export scripts folder and get no output in SD. Other modules and scripts work just fine.

Also, is the DCS Interface plugin still in development? It cant read the DCS IDs, cause the tool used to extract them, which is part of the plugin, cant read the clickable data thanks to the fact, that the folder structure is different for F1. It doesnt have exceptional case for F1, as it does for L-39 or C-101. It would be fairly easy fix for the developer, event I could do it myself, but looks like the plugin development is dead, which is a pitty.

  • Like 1
Link to comment
Share on other sites

5 hours ago, ShadowDragonCZ said:

Hi Everyone!

Bailey, did you manage to get Stream Deck Interface list the DCS Interface values after clicking refresh? I have copied the Mirage-F1CE.lua to export scripts folder and get no output in SD. Other modules and scripts work just fine.

Also, is the DCS Interface plugin still in development? It cant read the DCS IDs, cause the tool used to extract them, which is part of the plugin, cant read the clickable data thanks to the fact, that the folder structure is different for F1. It doesnt have exceptional case for F1, as it does for L-39 or C-101. It would be fairly easy fix for the developer, event I could do it myself, but looks like the plugin development is dead, which is a pitty.

Post your lua here so someone can take a look. 

Development of the app is focused on dcs-bios integration. If you can make those exceptions for the handful of aircraft it would be greatly appreciated. 

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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