Jump to content

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


Recommended Posts

On 5/22/2021 at 5:55 PM, Chacal_IX said:

I used the tools provided by ctytler and created the script for the missing aircraft (F-14, F-16 and JF-17). 
But it was a big job.

Is there a complete F-16.lua and F-14A/B.lua for DCS Export Modules?

http://104thphoenix.com/ "Failure Is Not An Option" - Online Combat Simulation Since 1997

www.youtube.com/user/AntonioGR201 www.twitch.tv/104th_Tiger www.facebook.com/TIGER.GR.Tiger/

Discord: 104th_Tiger#1883

 

 

Link to comment
Share on other sites

On 6/16/2020 at 3:50 AM, nosaMtrevoC said:

_________________________________________________________________________________________________

▀▀▀█ Needs Testing █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

6c - Need the HDG and CRS Knob tested. I can spin them, obviously, but I do not see any type of change on HSD (heading change etc..) I need the

F-14 HSD or hud or whatever put in the proper mode (maybe some type of nav or course mode) to see these knobs changing something. Also the BIT

indicator at bottom right, I'm not sure how that works. Does it light up? and if so, I need a replay where it does.

 

To test, load the Instant Action Takeoff Caucasus scenario. 
-Press Backspace

-Press Navigation Steer Command TACAN or MAN
-Move CRS and HDG knobs freely

They work, but I have no clue what the DCS Interface values should be for accurate and sensible adjustments.


Edited by Bailey
Link to comment
Share on other sites

6 hours ago, Bailey said:

Pour tester, chargez le scénario Instant Action Takeoff Caucasus. 
-Appuyez sur Retour arrière

-Appuyez sur Navigation Steer Command TACAN ou MAN
-Déplacez librement les boutons CRS et HDG

Ils fonctionnent, mais je n'ai aucune idée de ce que devraient être les valeurs de l'interface DCS pour des ajustements précis et sensibles.

 

Sorry to deceive but nosaMtrevoC hasn't posted for 7 months. 

Unfortunately, I'm afraid the project has been abandoned.

Link to comment
Share on other sites

9 hours ago, Chacal_IX said:

Sorry to deceive but nosaMtrevoC hasn't posted for 7 months. 

Unfortunately, I'm afraid the project has been abandoned.

Ah, I see. I'll scrub thought the thread with a closer eye. By the way, thanks for the updated F-14B.lua. I just saw it and checked it out. Nice work. 

When you say that you used the tools provided, what exactly did you mean by that to get the IDs? I went into model viewer and got the switch numbers by using one of the views (control handle view I believe?) and the animation arguments by pure trial and error. 

Link to comment
Share on other sites

  • 2 weeks later...

I tired to make the F-14B profile. 1st the lag with the image change happen i fixed that, but some switches text keeps blinking for example the master arm three way switch I used the rotary dial switch. I’m not sure if it’s happening only at my end.

Link to comment
Share on other sites

Hello,
this happens when there are duplicates in the script that do not have the same decimal value or decimal point.

 

In your case, for the master arm cover and master arm switch, delete lines 635 and 636 or modify them as below.

 

[1046]  =  "%1d",   --      WEAP_Master_Arm_Cover 
[1047]  =  "%1d",   --      WEAP_Master_Arm 

 

Sorry, my script is far to be perfect but I didn't have the time or the desire to correct all the defects.

Link to comment
Share on other sites

  • 3 weeks later...
On 6/3/2021 at 8:57 AM, bones1014 said:

Have you figured out a way to display the current radio frequency or channel?

Maybe. Give me a while (hrs/days) to put together a code block to get a rough export.
Personal note: 

Spoiler

local a = ExportScript.Tools.split(list_indication(8), "%c")

return a

 


Edited by Bailey
Link to comment
Share on other sites

On 6/3/2021 at 8:57 AM, bones1014 said:

Have you figured out a way to display the current radio frequency or channel?

Yep. You can even have it recognize channels vs freqs too.

Here is a demo video. https://i.imgur.com/1JEOqjH.mp4

Here is a pic.

k2FrfXA.jpg


Add this code to "ExportScript.ConfigEveryFrameArguments"

[353]  =  "%0.1f",   -- VHF/UHF ARC-182 Freq Mode (UHF GUARD|V/UHF|V/UHF GUARD|PRESET|V/UHF|LOAD?)

 

then add the following to "function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)"
 

	-----------------------------------
	-----Get F14 Radio Frequencies-----
	-----------------------------------
	
	-----UHF-----

	--[[
	1. Get the state of the switch to determine if presets or freqs are being used
	2. Get the channel or freq
	3. Using the above logic, present the Channel or Freq
	4. Preceede channels with "CH ".
	5. Dont preceede freqs with anything.
	]]
	
	--[[
	[2033]  =  "%.4f",   -- Mode selector knob (GUARD|MANUAL|PRESET)
	0.0000 = preset
	0.5000 = MANUAL
	1.0000 = GUARD
	]]
	
	local UHF_ARC159_infoBase = ExportScript.Tools.split(list_indication(8), "%c")--this contains the formated table of the base radio
	local UHF_ARC159_readoutBase = UHF_ARC159_infoBase[10] -- so far it has always been 10 in both channel and freq modes
	local UHF_ARC159_FreqMode = string.format("%0.1f", mainPanelDevice:get_argument_value(2033))
	
	if UHF_ARC159_FreqMode == "1.0" or UHF_ARC159_FreqMode == "0.5" then
		ExportScript.Tools.SendData(60000, string.format("ARC-159\n" .. UHF_ARC159_readoutBase:sub(1,3) .. "." .. UHF_ARC159_readoutBase:sub(4,6)))
		ExportScript.Tools.SendData(60001, string.format(UHF_ARC159_readoutBase:sub(1,3) .. "." .. UHF_ARC159_readoutBase:sub(4,6)))
	elseif UHF_ARC159_FreqMode == "0.0" then
		ExportScript.Tools.SendData(60000, string.format("ARC-159\n" .. "CH " .. UHF_ARC159_readoutBase:sub(4,6)))
		ExportScript.Tools.SendData(60001, string.format("CH " .. UHF_ARC159_readoutBase:sub(4,6)))
	end


	local UHF_ARC159_infoPilot = ExportScript.Tools.split(list_indication(9), "%c")--this contains the formated table of the Pilot radio
	local UHF_ARC159_readoutPilot = UHF_ARC159_infoPilot[16] -- so far it has always been 10 in both channel and freq modes
	local UHF_ARC159_FreqMode = string.format("%0.1f", mainPanelDevice:get_argument_value(2033))
	
	if UHF_ARC159_FreqMode == "1.0" or UHF_ARC159_FreqMode == "0.5" then
		ExportScript.Tools.SendData(60002, string.format("ARC-159\n" .. UHF_ARC159_readoutPilot:sub(1,3) .. "." .. UHF_ARC159_readoutPilot:sub(4,6)))
		ExportScript.Tools.SendData(60003, string.format(UHF_ARC159_readoutPilot:sub(1,3) .. "." .. UHF_ARC159_readoutPilot:sub(4,6)))
	elseif UHF_ARC159_FreqMode == "0.0" then
		ExportScript.Tools.SendData(60002, string.format("ARC-159\n" .. "CH " .. UHF_ARC159_readoutPilot:sub(4,6)))
		ExportScript.Tools.SendData(60003, string.format("CH " .. UHF_ARC159_readoutPilot:sub(4,6)))
	end
	
	
	local UHF_ARC159_infoRio = ExportScript.Tools.split(list_indication(9), "%c")--this contains the formated table of the Rio radio
	local UHF_ARC159_readoutRio = UHF_ARC159_infoRio[16] -- so far it has always been 10 in both channel and freq modes
	local UHF_ARC159_FreqMode = string.format("%0.1f", mainPanelDevice:get_argument_value(2033))
	
	if UHF_ARC159_FreqMode == "1.0" or UHF_ARC159_FreqMode == "0.5" then
		ExportScript.Tools.SendData(60004, string.format("ARC-159\n" .. UHF_ARC159_readoutRio:sub(1,3) .. "." .. UHF_ARC159_readoutRio:sub(4,6)))
		ExportScript.Tools.SendData(60005, string.format(UHF_ARC159_readoutRio:sub(1,3) .. "." .. UHF_ARC159_readoutRio:sub(4,6)))
	elseif UHF_ARC159_FreqMode == "0.0" then
		ExportScript.Tools.SendData(60004, string.format("ARC-159\n" .. "CH " .. UHF_ARC159_readoutRio:sub(4,6)))
		ExportScript.Tools.SendData(60005, string.format("CH " .. UHF_ARC159_readoutRio:sub(4,6)))
	end
	
	-----V/UHF ARC182-----
	
	--[[
	[353]  =  "%0.1f",   -- VHF/UHF ARC-182 Freq Mode (UHF GUARD|V/UHF|V/UHF GUARD|PRESET|V/UHF|LOAD?)
	0.0 = UHF GUARD
	0.2 = V/UHF
	0.4 = V/UHF GUARD
	0.6 = PRESET
	0.8 = V/UHF
	1.0 = LOAD?
	]]
	
	local VHF_ARC182_infoBase = ExportScript.Tools.split(list_indication(12), "%c")--this contains the formated table of the base radio
	local VHF_ARC182_readoutBase = VHF_ARC182_infoBase[10] -- so far it has always been 10 in both channel and freq modes
	local VHF_ARC182_FreqMode = string.format("%0.1f", mainPanelDevice:get_argument_value(353))
	
	if VHF_ARC182_FreqMode == "0.0" or VHF_ARC182_FreqMode == "0.2" then
		ExportScript.Tools.SendData(60006, string.format("ARC-182\n" .. VHF_ARC182_readoutBase:sub(1,3) .. "." .. VHF_ARC182_readoutBase:sub(4,6)))
		ExportScript.Tools.SendData(60007, string.format(VHF_ARC182_readoutBase:sub(1,3) .. "." .. VHF_ARC182_readoutBase:sub(4,6)))
	elseif VHF_ARC182_FreqMode == "0.4" or VHF_ARC182_FreqMode == "0.8" then
		ExportScript.Tools.SendData(60006, string.format("ARC-182\n" .. VHF_ARC182_readoutBase:sub(1,3) .. "." .. VHF_ARC182_readoutBase:sub(4,6)))
		ExportScript.Tools.SendData(60007, string.format(VHF_ARC182_readoutBase:sub(1,3) .. "." .. VHF_ARC182_readoutBase:sub(4,6)))
	elseif VHF_ARC182_FreqMode == "1.0" then
		ExportScript.Tools.SendData(60006, string.format("ARC-182\n" .. VHF_ARC182_readoutBase:sub(1,3) .. "." .. VHF_ARC182_readoutBase:sub(4,6)))
		ExportScript.Tools.SendData(60007, string.format(VHF_ARC182_readoutBase:sub(1,3) .. "." .. VHF_ARC182_readoutBase:sub(4,6)))
	elseif VHF_ARC182_FreqMode == "0.6" then
		ExportScript.Tools.SendData(60006, string.format("ARC-182\n" .. "CH " .. VHF_ARC182_readoutBase:sub(4,6)))
		ExportScript.Tools.SendData(60007, string.format("CH " .. VHF_ARC182_readoutBase:sub(4,6)))
	end

save, reload DCS, add a "Momentary Button/Display (Text)" form DCS Interface with "Title Text Change on DCS Update Settings" for DCS ID 60000, 60001, 60006, and 60007. That's it! Good luck!


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

46 minutes ago, bones1014 said:

That works perfectly! How do you figure these things out?

Nice! Good to hear!

It wasn't till after the Xth time of watching this video and a few weeks later that the information and how to use it finally "clicked".
I extrapolated the principles to a different module.

 

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, Bailey said:

Nice! Good to hear!

It wasn't till after the Xth time of watching this video and a few weeks later that the information and how to use it finally "clicked".
I extrapolated the principles to a different module.

 

 I'll give it a more thorough study.

Link to comment
Share on other sites

There's some pretty cool stuff in here and I have my F-14 almost working how I want in the stream deck thanks to everyone.

 

Just wondering if this work should be checked back into the main DCS Export Scripts git and we start managing it there?

Link to comment
Share on other sites

1 hour ago, Simm0 said:

There's some pretty cool stuff in here and I have my F-14 almost working how I want in the stream deck thanks to everyone.

 

Just wondering if this work should be checked back into the main DCS Export Scripts git and we start managing it there?

@McMicha 's (who I believe to be the main holder of https://github.com/s-d-a/DCS-ExportScripts) last post was about a year and a half ago. The hardest part of making a common place for these additions is the maintenance it would require. Someone, or a group of people, would have to volunteer for such a task. 


Edited by Bailey
Link to comment
Share on other sites

  • Recently Browsing   0 members

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