Jump to content

DCS-ExportScripts F-14B Tomcat .lua script w/Special Stream Deck exports


Recommended Posts

Wow, nosa great work! I watched the youtube video and at first couldn't figure out how you got the RPM display showing there :-)

 

Thanks ctytler. love your plugin. Would love to extend it with some type of Guages like this but with a color graphics style guage that accepts the input value and displays appropriately. I have some ideas, but don't want to intrude or step on any toes.

 

Wouldn't mind your help setting up the dev environment for your plugin along with any dependencies so I can have a look and maybe poke at some ideas.

 

I don't want to have to re-invent the wheel, and would rather contribute to an already good product.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Added a video of a selection of gauges on the XL

 

Random Examples on Stream Deck XL

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Sure, I've tried to set things up to allow other collaborators to contribute if they like via Pull Requests in github. Look at the section "Build from source instructions" in the Readme.

 

The plugin basically is written in two sections: The main plugin and UDP communication with DCS is done in C++. You'll need to install Visual Studio to build the Windows executable for this. The streamdeck settings windows are programmed in javascript and the plugin itself is a package that gets assembled with all the javascript and the compiled C++ executable that gets run on startup, and the javascript PropertyInspector as StreamDeck calls it is able to communicate back and forth with the C++ plugin.

 

For the C++ side I've created a large set of unit tests that can be run to make sure nothing accidentally gets broken with changes. I'm not as familiar with javascript and so that could use some organization and also unit tests to protect against bugs I still need to do.

 

For future capabilities I have some ideas I haven't gotten to yet, and have wanted to reorganize the C++ a bit to make it more scalable for more button types. But what I'd like to add is:

- Separate Short/Long press actions are definitely doable if time between press/release is measured.

Potential use cases: (small/large increment, increment/switch direction, uncover/press button, 2-way switch/hold for momentary as in some of the on/off/test switches in game).

 

- I have Lua scripting included already to read the ID Lookup values, there could potentially be a Streamdeck button with a generic Lua textbox that would allow users to write custom logic per inputs. Although I think the use for this should be focused on button actions, whereas DCS ID monitoring logic is more capably handled in the export scripts as you've already done.

 

- I think Streamdeck can handle more than two image states, but the button types need to have a fixed number of states defined. So making a button type for 3-way switches would be really nice that has a friendly interface for common DCS uses like 3-way toggle switch or 2-way toggle + momentary. This could also be a more generic button with something like 10 states where you could use as many as needed more in the line of your thinking with gauges. The difficulty here is Streamdeck only provides 2-states for the images upload in the setting with the nice display. The images uploaded would need some additional javascript to upload PNG images one by one, and I'm not sure a good approach right now to make the user interface capable but understandable by users. I think it would have to be handled by a custom web page interface like the ID Lookup, DCS Comms windows in order to make sense.

 

- Another far-fetched idea that seems really hard would be image manipulation, allowing rotating images for things like a dial/lever. Maybe with something like OpenCV this could be done, but getting it working with the Streamdeck SDK seems tough.

Link to comment
Share on other sites

Added a video of a selection of gauges on the XL

 

Random Examples on Stream Deck XL

 

 

How do you display 2 informations which change. It's like you display one id on the left part of the button, and another id on the other side.

 

Sure, I've tried to set things up to allow other collaborators to contribute if they like via Pull Requests in github. Look at the section "Build from source instructions" in the Readme.

 

The plugin basically is written in two sections: The main plugin and UDP communication with DCS is done in C++. You'll need to install Visual Studio to build the Windows executable for this. The streamdeck settings windows are programmed in javascript and the plugin itself is a package that gets assembled with all the javascript and the compiled C++ executable that gets run on startup, and the javascript PropertyInspector as StreamDeck calls it is able to communicate back and forth with the C++ plugin.

 

For the C++ side I've created a large set of unit tests that can be run to make sure nothing accidentally gets broken with changes. I'm not as familiar with javascript and so that could use some organization and also unit tests to protect against bugs I still need to do.

 

For future capabilities I have some ideas I haven't gotten to yet, and have wanted to reorganize the C++ a bit to make it more scalable for more button types. But what I'd like to add is:

- Separate Short/Long press actions are definitely doable if time between press/release is measured.

Potential use cases: (small/large increment, increment/switch direction, uncover/press button, 2-way switch/hold for momentary as in some of the on/off/test switches in game).

 

- I have Lua scripting included already to read the ID Lookup values, there could potentially be a Streamdeck button with a generic Lua textbox that would allow users to write custom logic per inputs. Although I think the use for this should be focused on button actions, whereas DCS ID monitoring logic is more capably handled in the export scripts as you've already done.

 

- I think Streamdeck can handle more than two image states, but the button types need to have a fixed number of states defined. So making a button type for 3-way switches would be really nice that has a friendly interface for common DCS uses like 3-way toggle switch or 2-way toggle + momentary. This could also be a more generic button with something like 10 states where you could use as many as needed more in the line of your thinking with gauges. The difficulty here is Streamdeck only provides 2-states for the images upload in the setting with the nice display. The images uploaded would need some additional javascript to upload PNG images one by one, and I'm not sure a good approach right now to make the user interface capable but understandable by users. I think it would have to be handled by a custom web page interface like the ID Lookup, DCS Comms windows in order to make sense.

 

- Another far-fetched idea that seems really hard would be image manipulation, allowing rotating images for things like a dial/lever. Maybe with something like OpenCV this could be done, but getting it working with the Streamdeck SDK seems tough.

It seems good for the future. :)

Link to comment
Share on other sites

The easiest way would be to ask Elgato to give us the possibility to add three or more images.

As many people as possible should make this request and if we get this opportunity it might be easier to integrate it into the Ctytler PlugIn.

Link to comment
Share on other sites

How do you display 2 informations which change. It's like you display one id on the left part of the button, and another id on the other side.

 

Yes, all of those gauges (tape gauges) have seperate inputs for Left and Right. Some of them move together only because both Left and Right engines are acting similar.

 

I can't do this on the stream deck side, so there are custom functions that calculate the seperate inputs and draw them in the .lua script side before sending the complete "picture" (it's actually just formatted text) to the stream deck as a single ID, so I can be much more versatile than the stream deck plugin allows by formatting the output before it gets to the stream deck.

 

And it's simple to setup because you just have to monitor the appropriate ID for the gauge which might show 5 different values for instance, or two tapes for left and right.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Sure, I've tried to set things up to allow other collaborators to contribute if they like via Pull Requests in github. Look at the section "Build from source instructions" in the Readme.

 

Awesome, I'll take a look and at least start familiarizing myself with the code.

 

For future capabilities I have some ideas I haven't gotten to yet, and have wanted to reorganize the C++ a bit to make it more scalable for more button types.

 

Story of my life.... code it so it works.... then go back and re-code it so that I'm not repeating my code and it's scalable. (I also panic when another developer wants to see it :) as many times coding so it works is very different than coding for public consumption... no judgements here.. it works.

 

But what I'd like to add is:

- Separate Short/Long press actions are definitely doable if time between press/release is measured.

Potential use cases: (small/large increment, increment/switch direction, uncover/press button, 2-way switch/hold for momentary as in some of the on/off/test switches in game).

 

Never thought of this, but this would be great for switch covers or reset and wind on same button.

 

- I have Lua scripting included already to read the ID Lookup values, there could potentially be a Streamdeck button with a generic Lua textbox that would allow users to write custom logic per inputs. Although I think the use for this should be focused on button actions, whereas DCS ID monitoring logic is more capably handled in the export scripts as you've already done.

 

This is what I originally wanted because I was being lazy, but I agree, it's better handled in the exportscript than confusing 99% of the casual users in the Stream Deck plugin.

 

- I think Streamdeck can handle more than two image states, but the button types need to have a fixed number of states defined.

 

3 button states would take care of a majority of the switches that are hard to acomplish now. I envisioned being able to "add" button states in a listbox type of system to allow any number, but I see that might not be possible with stream deck as you have explained below. I thought you were just calling the image state change boxes on the stream deck in your plugin. (I havn't used the stream deck for anything other than DCS, so little experience here.)

 

So making a button type for 3-way switches would be really nice that has a friendly interface for common DCS uses like 3-way toggle switch or 2-way toggle + momentary. This could also be a more generic button with something like 10 states where you could use as many as needed more in the line of your thinking with gauges. The difficulty here is Streamdeck only provides 2-states for the images upload in the setting with the nice display. The images uploaded would need some additional javascript to upload PNG images one by one, and I'm not sure a good approach right now to make the user interface capable but understandable by users. I think it would have to be handled by a custom web page interface like the ID Lookup, DCS Comms windows in order to make sense.

 

Yeah, definately a work around, but not a nice one. Would confuse more people I think.

 

- Another far-fetched idea that seems really hard would be image manipulation, allowing rotating images for things like a dial/lever. Maybe with something like OpenCV this could be done, but getting it working with the Streamdeck SDK seems tough.

 

This is what I envisioned. Making a set of gauges cirlce with markers for example that you define min and max values so gauge might show 20 psi to 65 psi from left to right, and then feeding the DCS id to that gauge as a needle position percentage (like DCS does already)

 

Mostly because I wanted 288 pixels of freedom for my tape guages instead of 10 to make them more accurate.

 

Yes, more far-fetched. Maybe a future look at this if there's enough interest, but although it would be cool as hell, it's a lot of work for little return.

 

Thanks for your reply, want to try to finish the F-14 script first and provide it complete, but it sounds like diving into the above with you might be my next hobby project.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

The easiest way would be to ask Elgato to give us the possibility to add three or more images.

As many people as possible should make this request and if we get this opportunity it might be easier to integrate it into the Ctytler PlugIn.

 

I will threaten them with a Human Rights rally at their head office if they don't comply to this request immediaetly.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

@ctytler:

 

Had an idea last night about a lot of the "flags" in the F-14.

 

For example, the Landing gear flag can show something like 5 different symbols in the form of squares with lines or cirlce with two lines etc...

 

the standard approach would be to think of these as images, but along the lines of how I've bypassed the images, what if I created a font with each of these symbols corresponding to A or B etc... like wingdings.

 

Would it be easy for you to include this font (e.g. F-14.ttf) in your plugin so that I can just pass A/B/C/D/E to your plugin and it will show the appropriate flag?

 

In fact with all the extended charachters available on a keyboard, 1 font may be enough for all the aircraft in DCS, or at least a good sub set of the most popular ones.

 

Then I could essentially bypass the image limitation for images that look best as vector art anyways.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Could actually use the above method for a number of other things also.

 

- 3 way switches (font A is vector of up, B is middle, C is down)

- could control three way switch with press is up to off and hold down is down etc.. like you described.

 

- better tape guages by creating fonts that are 1 pixel tall by 10 wide and another that is 2 pixels tall by 10 wide etc... all the way to 288 tall by 10 wide (maybe a few pixels tall at a time), but I could then create very accurate gauges.

 

I know I could dream up a bunch of uses if the font can be easily distributed with your plugin.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Unfortunately I had tried looking into using custom fonts but it's not supported within the Streamdeck SDK right now. There are some nice F-18 UFC fonts that were created for Helios that would be nice to use also for the displays. The closest thing I found was on Elgato's Discord channel, someone requested on their #feature-request channel:

 

Paladinleeds02/19/2020

Can I request for us to be allowed to use our own fonts installed on our PC for StreamDeck buttons? For example I'd love to use DragonSlapper on some of my buttons, but that's never gonna be added unless we allow for StreamDeck to scan the installed fonts and use that

 

But looks like no response ever came.

Link to comment
Share on other sites

Unfortunately I had tried looking into using custom fonts but it's not supported within the Streamdeck SDK right now. There are some nice F-18 UFC fonts that were created for Helios that would be nice to use also for the displays. The closest thing I found was on Elgato's Discord channel, someone requested on their #feature-request channel:

 

But looks like no response ever came.

 

<sigh> that's too bad. Could do some pretty neat things with custom fonts. I have used this trick in the past to pass custom symbols through to software that didn't have other methods.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

The version 0.08 broke some of my momentary buton i use for landing gear and other interuptor.

 

 

It works fine in your previous version 1.2.1

 

Thanks for the report,

 

I'm guessing you were using a different F-14B script prior, I haven't added those ID's (landing gear) yet. probably just hadn't tried landing gear since switching to my script, but unfortunately there are hundreds of ID's not working until I can get to them. That's the problem with using something in development. :(

 

Landing gear is part of panel A2, which hasn't been in any version yet. That bein said, it will in the next.

 

last night I finished every placeholder and description for the Pilot Cockpit, just cross-referencing the ID's for them now and testing them. May have at least all the ID's available by Tuesday or so, even if they aren't tested so that at veyr least they can be used and/or reported as wrong.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

I used the script you modify. It's not your own at 100%

 

In the version 0.08, the effect of the button works, but not the change of image.

 

Other button which works, but not the image are all the pannel of different mod (Nav, air ground, AA, etc...)

 

 

I can provide you my profil if you want.

Link to comment
Share on other sites

I used the script you modify. It's not your own at 100%

 

In the version 0.08, the effect of the button works, but not the change of image.

 

Other button which works, but not the image are all the pannel of different mod (Nav, air ground, AA, etc...)

 

I can provide you my profil if you want.

 

The attached script is a complete re-write, so it will not be as inclusive as the script I had you edit at the beginning (hope that makes sense)

 

Your profile will start working again as soon as I upload version 0.09 probably, as most of the ID's are included.

 

The reason I did a repwrite is because the script you had before that I edited to include fuel (at first) has a number of conflicts.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

let me get v0.09 uploaded on tuesday and then test, and we'll see if it corrects it (it should)

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Just wanted to say thanks to everyone who put time and work into all this stuff. It's way awesome. I was a bit daunted at first but it wasn't hard at all to get the few things downloaded and installed. Just got the RPM and noz. position icons working and it's too cool. I'll look into starting to help with the testing. Thanks again.

Link to comment
Share on other sites

Just wanted to say thanks to everyone who put time and work into all this stuff. It's way awesome. I was a bit daunted at first but it wasn't hard at all to get the few things downloaded and installed. Just got the RPM and noz. position icons working and it's too cool. I'll look into starting to help with the testing. Thanks again.

 

thanks arbil, testing would be fantastic.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Besides the stuff you have posted here and in the lua file to help with what's to do? What's the best way for me to help figure out new IDs? Is that something that perhaps heatblur has documentation on they would possibly give us so we don't have to stab in the dark to figure out the IDs? Forgive me if these are dumb/already answered questions I missed.

Link to comment
Share on other sites

Besides the stuff you have posted here and in the lua file to help with what's to do? What's the best way for me to help figure out new IDs? Is that something that perhaps heatblur has documentation on they would possibly give us so we don't have to stab in the dark to figure out the IDs? Forgive me if these are dumb/already answered questions I missed.

 

Not dumb at all, I have reached out in a certain capacity that I'd rather not discuss here to the appropriate people, as I'd rather any decisions they make not be discussed on this forum.

 

That being said, even with the right ID's for things like the approach indexer (top left of windshield), it really needs to be tested so that I can see how the numbers react to different scenarios so that I can duplicate them on the stream deck in a nice way.

 

To do this, I would have to load up an F-14 scenario, set it up for a carrier landing and fly towards the carrier ensuring at one point during the approach i was above on ball and below the approach (to have each light up) and view the output.

 

if for whatever reason I needed to see it again (to test my output), keep in mind I may load this dozens of times in testing, I'd have to repeat the above.

 

I do this already with the gauges and other instruments, but I have 0 experience with the F-14, so to do the above I would have to learn how to do a carrier approach and all the systems involved etc...

 

A way to help would be to provide a replay file for me (as the export data works just like I was flying) and then I could just replay that portion of the flight for testing.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

It's a bit lengthy but for the most part I am cycling all 5 of the AOA indicator light states throughout the video.

 

awesome, I'll add it to my workflow of testing, I appreciate this.

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

Phoenix FR,

 

many more ID's added. I'm guessing many of your buttons will start working again. (not necessarily all, as there are still many ID's to add, all the ones with [0] are not added yet.)

Modules: Persian Gulf | Normandy | Channel | Nevada | Supercarrier | WWII Assets | FC3 | Spitfire | P-51D | P-47D | F-86F | L-39 | AV-8B | F-16C | F/A-18C | A-10C | F-14B | A-4E-C | BS2

 

System: X570 AMD-3900X | 32GB DDR4 3000 | 2TB Gen 4x4 5GB/s NVME | Dual 1070 TI | 4k 32" Samsung

Link to comment
Share on other sites

  • Recently Browsing   0 members

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