Bailey Posted May 27, 2024 Author Posted May 27, 2024 (edited) 3 hours ago, sobe said: I have managed to import the F4E profile and associated lua file and to my shock, it worked. The True Air Speed button seems to be correct and corresponds with the game. However, I tried to find the true air speed listing in the ID lookup and could not find it. I tried to use it as a model to try to get the radar altitude and while I found several device IDs for the radar altitude, I could not find anything that deals with the actual attitude. What am I doing wrong? I am glad that it worked "to your shock", haha. Pilot true airspeed (TAS) starts at arg 109. While the pilots seat look at the Radar Altitude guage and look one inch to the upper left. That is the pilot TAS readout, not the spinny dial. If you want to do the radar altitude it will be a challenge. The marks on the dial are not equal, so you will have to do some math and interpolation if you want it accurately represented in all scenarios. Good luck! There is at least one aircraft where I have done this... unfortunately I cannot remember which one it was.... The radar dial for the F4 is [73] = "%.1f", -- Radar_Alt_Needle I have updated the lua to include WSO speed tumblers: https://github.com/asherao/DCS-ExportScripts/commit/2738479f4e40640f18e554fd92cf22e04c6c15ce Edited May 27, 2024 by Bailey 2 DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
bones1014 Posted May 27, 2024 Posted May 27, 2024 (edited) 12 hours ago, sobe said: I have managed to import the F4E profile and associated lua file and to my shock, it worked. The True Air Speed button seems to be correct and corresponds with the game. However, I tried to find the true air speed listing in the ID lookup and could not find it. I tried to use it as a model to try to get the radar altitude and while I found several device IDs for the radar altitude, I could not find anything that deals with the actual attitude. What am I doing wrong? It won't be in the searchable list as it's not in the airplane game files. You'll have to look at the export lua itself and find the custom IDs that have been added. I had started on the pilot altitude and submitted a commit to the GitHub but it wasn't accepted. Edited May 27, 2024 by bones1014 1
Bailey Posted May 27, 2024 Author Posted May 27, 2024 2 hours ago, bones1014 said: It won't be in the searchable list as it's not in the airplane game files. You'll have to look at the export lua itself and find the custom IDs that have been added. I had started on the pilot altitude and submitted a commit to the GitHub but it wasn't accepted. I didn't see a pull request. I have seen your fork updated with what you were talking about. Hmmm, I may have accidently canceled yours while I was having trouble with mine thinking that I was canceling my own. Oops! Submit again and I'll take a look. 1 DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
bones1014 Posted May 27, 2024 Posted May 27, 2024 43 minutes ago, Bailey said: I didn't see a pull request. I have seen your fork updated with what you were talking about. Hmmm, I may have accidently canceled yours while I was having trouble with mine thinking that I was canceling my own. Oops! Submit again and I'll take a look. I just sent up a change to add the pilot's landing gear indicators function ExportScript.Pilot_Gear_Status(mainPanelDevice) local left, nose, right if mainPanelDevice:get_argument_value(52) < 0.5 then left = "" elseif mainPanelDevice:get_argument_value(52) > 0.1 and mainPanelDevice:get_argument_value(52) < 0.9 then left = "" else left = "" end if mainPanelDevice:get_argument_value(51) < 0.5 then nose = "" elseif mainPanelDevice:get_argument_value(51) > 0.1 and mainPanelDevice:get_argument_value(51) < 0.9 then nose = "" else nose = "" end if mainPanelDevice:get_argument_value(50) < 0.5 then right = "" elseif mainPanelDevice:get_argument_value(50) > 0.1 and mainPanelDevice:get_argument_value(50) < 0.9 then right = "" else right = "" end local All_Gear = "LND GEAR\n" .. nose .. "\n" .. left .. " " .. right ExportScript.Tools.SendData(export_ids.PILOT_GEAR_IND, All_Gear) end 2
bones1014 Posted May 27, 2024 Posted May 27, 2024 (edited) trying to work on the pilot's altimeter. here's what I have so far. It's not working quite right yet. I'm getting extra digits when the needle gets close to rolling over at each thousand feet. **EDIT got it working a little better. right now it rolls the 1000's to the next number too quickly at the top. **EDIT #2 I think I got it working correctly. Please test it. I'll push it up through github. if anyone knows how to add a thousands separator please do. function ExportScript.Pilot_Altimeter(mainPanelDevice) local altitudeWindowReadout_value1 = string.format("%.f",mainPanelDevice:get_argument_value(92) * 10) --hundreds local altitudeWindowReadout_value2 = string.format("%.f",math.floor(mainPanelDevice:get_argument_value(93) * 10)) --thousands local altitudeWindowReadout_value3 = string.format("%.f",mainPanelDevice:get_argument_value(94) * 10) --tenthousands local altitudeWindowReadout_needle = string.format("%.f",mainPanelDevice:get_argument_value(91) * 1000) --needle --this fixes the extra "10" problem if mainPanelDevice:get_argument_value(92) * 10 < 10 then--altitudeWindowReadout_value1 == "10" then altitudeWindowReadout_value1 = "0" end if altitudeWindowReadout_value2 == "10" then altitudeWindowReadout_value2 = "0" end if altitudeWindowReadout_value3 == "10" then altitudeWindowReadout_value3 = "0" end if altitudeWindowReadout_needle == "10" then altitudeWindowReadout_needle = "0" end --this is for the hash part if altitudeWindowReadout_value1 == "0" then altitudeWindowReadout_value1 = "" end -- this is to fill the blank space when the needle is below 100 if #altitudeWindowReadout_needle == 1 then altitudeWindowReadout_needle = string.format("00" .. altitudeWindowReadout_needle) end if #altitudeWindowReadout_needle == 2 then altitudeWindowReadout_needle = string.format("0" .. altitudeWindowReadout_needle) end --[[ExportScript.Tools.SendData(44261, altitudeWindowReadout_value1 .. " ft") --test values ExportScript.Tools.SendData(44262, altitudeWindowReadout_value2 .. " ft") --test values ExportScript.Tools.SendData(44263, altitudeWindowReadout_value3 .. " ft") --test values ExportScript.Tools.SendData(44264, altitudeWindowReadout_needle .. " ft") --test values ExportScript.Tools.SendData(44265, string.format("%.f",mainPanelDevice:get_argument_value(92) * 10) .. " ft") --test values ExportScript.Tools.SendData(44266, string.format("%2.d",mainPanelDevice:get_argument_value(93) * 10) .. " ft") --test values ExportScript.Tools.SendData(44267, string.format("%.f",mainPanelDevice:get_argument_value(94) * 10) .. " ft") --test values ExportScript.Tools.SendData(44268, string.format("%.f",mainPanelDevice:get_argument_value(91) * 1000) .. " ft") --test values]] --value 3 isnt needed bc it is taken over by the needle local altitudeWindowReadout_total = string.format(altitudeWindowReadout_value3 .. altitudeWindowReadout_value2 .. altitudeWindowReadout_value1 .. altitudeWindowReadout_needle) --remove leading zeros altitudeWindowReadout_total = altitudeWindowReadout_total:match("0*(%d+)") --https://stackoverflow.com/questions/34331633/remove-leading-zeroes-in-lua-string local altMsl_f4e_ft = altitudeWindowReadout_total .. "\nFT" ExportScript.Tools.SendData(export_ids.PILOT_ALTIMETER, altMsl_f4e_ft) --[[ExportScript.Tools.SendData(export_ids.PILOT_needle, altitudeWindowReadout_needle) --test ExportScript.Tools.SendData(export_ids.PILOT_hundreds, altitudeWindowReadout_value1) --test ExportScript.Tools.SendData(export_ids.PILOT_thousands, altitudeWindowReadout_value2) --test ExportScript.Tools.SendData(export_ids.PILOT_tenthousands, altitude Edited May 27, 2024 by bones1014
Bailey Posted May 28, 2024 Author Posted May 28, 2024 11 hours ago, bones1014 said: I just sent up a change to add the pilot's landing gear indicators function ExportScript.Pilot_Gear_Status(mainPanelDevice) local left, nose, right if mainPanelDevice:get_argument_value(52) < 0.5 then left = "" elseif mainPanelDevice:get_argument_value(52) > 0.1 and mainPanelDevice:get_argument_value(52) < 0.9 then left = "" else left = "" end if mainPanelDevice:get_argument_value(51) < 0.5 then nose = "" elseif mainPanelDevice:get_argument_value(51) > 0.1 and mainPanelDevice:get_argument_value(51) < 0.9 then nose = "" else nose = "" end if mainPanelDevice:get_argument_value(50) < 0.5 then right = "" elseif mainPanelDevice:get_argument_value(50) > 0.1 and mainPanelDevice:get_argument_value(50) < 0.9 then right = "" else right = "" end local All_Gear = "LND GEAR\n" .. nose .. "\n" .. left .. " " .. right ExportScript.Tools.SendData(export_ids.PILOT_GEAR_IND, All_Gear) end 10 hours ago, bones1014 said: trying to work on the pilot's altimeter. here's what I have so far. It's not working quite right yet. I'm getting extra digits when the needle gets close to rolling over at each thousand feet. **EDIT got it working a little better. right now it rolls the 1000's to the next number too quickly at the top. **EDIT #2 I think I got it working correctly. Please test it. I'll push it up through github. if anyone knows how to add a thousands separator please do. function ExportScript.Pilot_Altimeter(mainPanelDevice) local altitudeWindowReadout_value1 = string.format("%.f",mainPanelDevice:get_argument_value(92) * 10) --hundreds local altitudeWindowReadout_value2 = string.format("%.f",math.floor(mainPanelDevice:get_argument_value(93) * 10)) --thousands local altitudeWindowReadout_value3 = string.format("%.f",mainPanelDevice:get_argument_value(94) * 10) --tenthousands local altitudeWindowReadout_needle = string.format("%.f",mainPanelDevice:get_argument_value(91) * 1000) --needle --this fixes the extra "10" problem if mainPanelDevice:get_argument_value(92) * 10 < 10 then--altitudeWindowReadout_value1 == "10" then altitudeWindowReadout_value1 = "0" end if altitudeWindowReadout_value2 == "10" then altitudeWindowReadout_value2 = "0" end if altitudeWindowReadout_value3 == "10" then altitudeWindowReadout_value3 = "0" end if altitudeWindowReadout_needle == "10" then altitudeWindowReadout_needle = "0" end --this is for the hash part if altitudeWindowReadout_value1 == "0" then altitudeWindowReadout_value1 = "" end -- this is to fill the blank space when the needle is below 100 if #altitudeWindowReadout_needle == 1 then altitudeWindowReadout_needle = string.format("00" .. altitudeWindowReadout_needle) end if #altitudeWindowReadout_needle == 2 then altitudeWindowReadout_needle = string.format("0" .. altitudeWindowReadout_needle) end --[[ExportScript.Tools.SendData(44261, altitudeWindowReadout_value1 .. " ft") --test values ExportScript.Tools.SendData(44262, altitudeWindowReadout_value2 .. " ft") --test values ExportScript.Tools.SendData(44263, altitudeWindowReadout_value3 .. " ft") --test values ExportScript.Tools.SendData(44264, altitudeWindowReadout_needle .. " ft") --test values ExportScript.Tools.SendData(44265, string.format("%.f",mainPanelDevice:get_argument_value(92) * 10) .. " ft") --test values ExportScript.Tools.SendData(44266, string.format("%2.d",mainPanelDevice:get_argument_value(93) * 10) .. " ft") --test values ExportScript.Tools.SendData(44267, string.format("%.f",mainPanelDevice:get_argument_value(94) * 10) .. " ft") --test values ExportScript.Tools.SendData(44268, string.format("%.f",mainPanelDevice:get_argument_value(91) * 1000) .. " ft") --test values]] --value 3 isnt needed bc it is taken over by the needle local altitudeWindowReadout_total = string.format(altitudeWindowReadout_value3 .. altitudeWindowReadout_value2 .. altitudeWindowReadout_value1 .. altitudeWindowReadout_needle) --remove leading zeros altitudeWindowReadout_total = altitudeWindowReadout_total:match("0*(%d+)") --https://stackoverflow.com/questions/34331633/remove-leading-zeroes-in-lua-string local altMsl_f4e_ft = altitudeWindowReadout_total .. "\nFT" ExportScript.Tools.SendData(export_ids.PILOT_ALTIMETER, altMsl_f4e_ft) --[[ExportScript.Tools.SendData(export_ids.PILOT_needle, altitudeWindowReadout_needle) --test ExportScript.Tools.SendData(export_ids.PILOT_hundreds, altitudeWindowReadout_value1) --test ExportScript.Tools.SendData(export_ids.PILOT_thousands, altitudeWindowReadout_value2) --test ExportScript.Tools.SendData(export_ids.PILOT_tenthousands, altitude Checking these out today. I noticed that you are pushing updates to your git, not the community library. That is fine, just wanted to make sure you knew. DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
Bailey Posted May 28, 2024 Author Posted May 28, 2024 (edited) 10 hours ago, bones1014 said: trying to work on the pilot's altimeter. here's what I have so far. It's not working quite right yet. I'm getting extra digits when the needle gets close to rolling over at each thousand feet. **EDIT got it working a little better. right now it rolls the 1000's to the next number too quickly at the top. **EDIT #2 I think I got it working correctly. Please test it. I'll push it up through github. if anyone knows how to add a thousands separator please do. function ExportScript.Pilot_Altimeter(mainPanelDevice) local altitudeWindowReadout_value1 = string.format("%.f",mainPanelDevice:get_argument_value(92) * 10) --hundreds local altitudeWindowReadout_value2 = string.format("%.f",math.floor(mainPanelDevice:get_argument_value(93) * 10)) --thousands local altitudeWindowReadout_value3 = string.format("%.f",mainPanelDevice:get_argument_value(94) * 10) --tenthousands local altitudeWindowReadout_needle = string.format("%.f",mainPanelDevice:get_argument_value(91) * 1000) --needle --this fixes the extra "10" problem if mainPanelDevice:get_argument_value(92) * 10 < 10 then--altitudeWindowReadout_value1 == "10" then altitudeWindowReadout_value1 = "0" end if altitudeWindowReadout_value2 == "10" then altitudeWindowReadout_value2 = "0" end if altitudeWindowReadout_value3 == "10" then altitudeWindowReadout_value3 = "0" end if altitudeWindowReadout_needle == "10" then altitudeWindowReadout_needle = "0" end --this is for the hash part if altitudeWindowReadout_value1 == "0" then altitudeWindowReadout_value1 = "" end -- this is to fill the blank space when the needle is below 100 if #altitudeWindowReadout_needle == 1 then altitudeWindowReadout_needle = string.format("00" .. altitudeWindowReadout_needle) end if #altitudeWindowReadout_needle == 2 then altitudeWindowReadout_needle = string.format("0" .. altitudeWindowReadout_needle) end --[[ExportScript.Tools.SendData(44261, altitudeWindowReadout_value1 .. " ft") --test values ExportScript.Tools.SendData(44262, altitudeWindowReadout_value2 .. " ft") --test values ExportScript.Tools.SendData(44263, altitudeWindowReadout_value3 .. " ft") --test values ExportScript.Tools.SendData(44264, altitudeWindowReadout_needle .. " ft") --test values ExportScript.Tools.SendData(44265, string.format("%.f",mainPanelDevice:get_argument_value(92) * 10) .. " ft") --test values ExportScript.Tools.SendData(44266, string.format("%2.d",mainPanelDevice:get_argument_value(93) * 10) .. " ft") --test values ExportScript.Tools.SendData(44267, string.format("%.f",mainPanelDevice:get_argument_value(94) * 10) .. " ft") --test values ExportScript.Tools.SendData(44268, string.format("%.f",mainPanelDevice:get_argument_value(91) * 1000) .. " ft") --test values]] --value 3 isnt needed bc it is taken over by the needle local altitudeWindowReadout_total = string.format(altitudeWindowReadout_value3 .. altitudeWindowReadout_value2 .. altitudeWindowReadout_value1 .. altitudeWindowReadout_needle) --remove leading zeros altitudeWindowReadout_total = altitudeWindowReadout_total:match("0*(%d+)") --https://stackoverflow.com/questions/34331633/remove-leading-zeroes-in-lua-string local altMsl_f4e_ft = altitudeWindowReadout_total .. "\nFT" ExportScript.Tools.SendData(export_ids.PILOT_ALTIMETER, altMsl_f4e_ft) --[[ExportScript.Tools.SendData(export_ids.PILOT_needle, altitudeWindowReadout_needle) --test ExportScript.Tools.SendData(export_ids.PILOT_hundreds, altitudeWindowReadout_value1) --test ExportScript.Tools.SendData(export_ids.PILOT_thousands, altitudeWindowReadout_value2) --test ExportScript.Tools.SendData(export_ids.PILOT_tenthousands, altitude There seems to be an issue when there is the digit 7 in the second window spot, from the left, the Thousands slot. When it displays 7 ingame, SD shows 6. When it shows 6 the SD shows 6. When it shows 8, the SD shows 8. Hmm, it shows 7 when the needle is about between 9 and 0. Otherwise it shows 6. Do you see this too? This can be tested around 7k ft. Edited May 28, 2024 by Bailey DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
Bailey Posted May 28, 2024 Author Posted May 28, 2024 12 hours ago, bones1014 said: I just sent up a change to add the pilot's landing gear indicators function ExportScript.Pilot_Gear_Status(mainPanelDevice) local left, nose, right if mainPanelDevice:get_argument_value(52) < 0.5 then left = "" elseif mainPanelDevice:get_argument_value(52) > 0.1 and mainPanelDevice:get_argument_value(52) < 0.9 then left = "" else left = "" end if mainPanelDevice:get_argument_value(51) < 0.5 then nose = "" elseif mainPanelDevice:get_argument_value(51) > 0.1 and mainPanelDevice:get_argument_value(51) < 0.9 then nose = "" else nose = "" end if mainPanelDevice:get_argument_value(50) < 0.5 then right = "" elseif mainPanelDevice:get_argument_value(50) > 0.1 and mainPanelDevice:get_argument_value(50) < 0.9 then right = "" else right = "" end local All_Gear = "LND GEAR\n" .. nose .. "\n" .. left .. " " .. right ExportScript.Tools.SendData(export_ids.PILOT_GEAR_IND, All_Gear) end This one works in practice. I think it may need some fine tuning due to the bounciness of the cockpit gear indicators. There are times where ingame both left and right gears show as in transit with the hash marks, but on the SD one icon is red and the other is yellow. 11 minutes ago, Bailey said: There seems to be an issue when there is the digit 7 in the second window spot, from the left, the Thousands slot. When it displays 7 ingame, SD shows 6. When it shows 6 the SD shows 6. When it shows 8, the SD shows 8. Hmm, it shows 7 when the needle is about between 9 and 0. Otherwise it shows 6. Do you see this too? This can be tested around 7k ft. I removed the float calculation on the thousands argument. Can you see if that works for you too? DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
bones1014 Posted May 28, 2024 Posted May 28, 2024 6 hours ago, Bailey said: Checking these out today. I noticed that you are pushing updates to your git, not the community library. That is fine, just wanted to make sure you knew. I'm sorry but GitHub confuses the hell out of me. The work flow just doesn't make sense.
bones1014 Posted May 28, 2024 Posted May 28, 2024 8 hours ago, Bailey said: This one works in practice. I think it may need some fine tuning due to the bounciness of the cockpit gear indicators. There are times where ingame both left and right gears show as in transit with the hash marks, but on the SD one icon is red and the other is yellow. I wonder if changing the if statement to use not equal to (~=) the top and bottom values. I did see the bounciness.
Bailey Posted May 28, 2024 Author Posted May 28, 2024 3 hours ago, bones1014 said: I'm sorry but GitHub confuses the hell out of me. The work flow just doesn't make sense. same. posting the function here was perfectly fine. keep doing what you are doin'! 1 DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
Phoenix FR Posted May 28, 2024 Posted May 28, 2024 7 hours ago, bones1014 said: I'm sorry but GitHub confuses the hell out of me. The work flow just doesn't make sense. I thought i was alone in not understanding how works github. 4 hours ago, Bailey said: same. posting the function here was perfectly fine. keep doing what you are doin'! Cool, may you tell us when you update the file. 1
Bailey Posted May 29, 2024 Author Posted May 29, 2024 8 hours ago, Phoenix FR said: Cool, may you tell us when you update the file. Sure. 1 DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
bones1014 Posted June 1, 2024 Posted June 1, 2024 On 5/27/2024 at 11:43 PM, Bailey said: This one works in practice. I think it may need some fine tuning due to the bounciness of the cockpit gear indicators. There are times where ingame both left and right gears show as in transit with the hash marks, but on the SD one icon is red and the other is yellow. I removed the float calculation on the thousands argument. Can you see if that works for you too? I just got back into the cockpit this evening. I see the problem at 7k feet. I'll try your change and see what happens. 3
Bailey Posted June 1, 2024 Author Posted June 1, 2024 (edited) On 5/16/2022 at 9:30 PM, Pascoal said: So I created a profile for the SA342 Gazelle. I used the base Export Script and just added a few more exports. https://www.digitalcombatsimulator.com/en/files/3322439/ Thank you! The luas have been added to the Library. The profile and button art itself is so nice! Sorry for taking so long. Link to your profile: https://www.digitalcombatsimulator.com/en/files/3322439/ Edited June 1, 2024 by Bailey DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
bones1014 Posted June 1, 2024 Posted June 1, 2024 On 5/27/2024 at 11:43 PM, Bailey said: This one works in practice. I think it may need some fine tuning due to the bounciness of the cockpit gear indicators. There are times where ingame both left and right gears show as in transit with the hash marks, but on the SD one icon is red and the other is yellow. I removed the float calculation on the thousands argument. Can you see if that works for you too? how did you remove the floating calc?
Bailey Posted June 1, 2024 Author Posted June 1, 2024 50 minutes ago, bones1014 said: how did you remove the floating calc? Remove "math.floor(" and the last ")" from altitude value2. Oops, if I said float I meant floor. Sorry. 1 DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
bones1014 Posted June 1, 2024 Posted June 1, 2024 1 hour ago, Bailey said: Remove "math.floor(" and the last ")" from altitude value2. Oops, if I said float I meant floor. Sorry. So far that seems to have fixed it.
bones1014 Posted June 1, 2024 Posted June 1, 2024 (edited) I created a missile status tile. Uses export 10062. Red for sidewinders and green for sparrows. file I added contains all of @Bailey's content plus what I've added. function ExportScript.Missile_Lights(mainPanelDevice) local heat_left, heat_ml, heat_mr, heat_right, radar_tl, radar_tr, radar_bl, radar_br if mainPanelDevice:get_argument_value(284) < 0.8 then heat_left = "" else heat_left ="" end if mainPanelDevice:get_argument_value(285) < 0.8 then heat_ml = "" else heat_ml = "" end if mainPanelDevice:get_argument_value(286) < 0.8 then heat_mr = "" else heat_mr = "" end if mainPanelDevice:get_argument_value(287) < 0.8 then heat_right = "" else heat_right = "" end if mainPanelDevice:get_argument_value(288) < 0.8 then radar_tl = "" else radar_tl = "" end if mainPanelDevice:get_argument_value(289) < 0.8 then radar_bl = "" else radar_bl = "" end if mainPanelDevice:get_argument_value(290) < 0.8 then radar_tr = "" else radar_tr = "" end if mainPanelDevice:get_argument_value(291) < 0.8 then radar_br = "" else radar_br = "" end local missile_lights = "MSSL STAT" .. "\n" .. "" .. radar_tl .. " " .. radar_tr .. "\n" .. heat_left .. heat_ml .. " " .. heat_mr .. heat_right .. "\n" .. "" .. radar_bl .. " " .. radar_br ExportScript.Tools.SendData(export_ids.MISSILE_LIGHTS, missile_lights) end F-4E-45MC.lua Edited June 1, 2024 by bones1014 added file
Bailey Posted June 2, 2024 Author Posted June 2, 2024 2 hours ago, bones1014 said: So far that seems to have fixed it. Awesome. I'll update the git when I can. Thank you! 1 hour ago, bones1014 said: I created a missile status tile. Uses export 10062. Red for sidewinders and green for sparrows. file I added contains all of @Bailey's content plus what I've added. function ExportScript.Missile_Lights(mainPanelDevice) local heat_left, heat_ml, heat_mr, heat_right, radar_tl, radar_tr, radar_bl, radar_br if mainPanelDevice:get_argument_value(284) < 0.8 then heat_left = "" else heat_left ="" end if mainPanelDevice:get_argument_value(285) < 0.8 then heat_ml = "" else heat_ml = "" end if mainPanelDevice:get_argument_value(286) < 0.8 then heat_mr = "" else heat_mr = "" end if mainPanelDevice:get_argument_value(287) < 0.8 then heat_right = "" else heat_right = "" end if mainPanelDevice:get_argument_value(288) < 0.8 then radar_tl = "" else radar_tl = "" end if mainPanelDevice:get_argument_value(289) < 0.8 then radar_bl = "" else radar_bl = "" end if mainPanelDevice:get_argument_value(290) < 0.8 then radar_tr = "" else radar_tr = "" end if mainPanelDevice:get_argument_value(291) < 0.8 then radar_br = "" else radar_br = "" end local missile_lights = "MSSL STAT" .. "\n" .. "" .. radar_tl .. " " .. radar_tr .. "\n" .. heat_left .. heat_ml .. " " .. heat_mr .. heat_right .. "\n" .. "" .. radar_bl .. " " .. radar_br ExportScript.Tools.SendData(export_ids.MISSILE_LIGHTS, missile_lights) end F-4E-45MC.lua 113.98 kB · 2 downloads Looking forward to checking this out. DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
Bailey Posted June 2, 2024 Author Posted June 2, 2024 Updated P-51D - breakout instrument panel values individually for better visibility (thanks jdshkolnik) DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
bones1014 Posted June 2, 2024 Posted June 2, 2024 @Bailey I just noticed that the code as pasted into the forums doesn't have the circles like the lua. I used the green and red circles for lights on and black for lights off.
Bailey Posted June 2, 2024 Author Posted June 2, 2024 35 minutes ago, bones1014 said: @Bailey I just noticed that the code as pasted into the forums doesn't have the circles like the lua. I used the green and red circles for lights on and black for lights off. put it in your git (if it isnt already) and I'll grab it from there. DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays
bones1014 Posted June 2, 2024 Posted June 2, 2024 1 hour ago, Bailey said: put it in your git (if it isnt already) and I'll grab it from there. done
Bearmat Posted June 2, 2024 Posted June 2, 2024 21 hours ago, bones1014 said: So far that seems to have fixed it. Hello. Just wanted to let you know this is working well for me too. I appreciate it very much. I don't know anything about scripting but have been working on a few simple exports with the help of a little backwards engineering and LUA God. They seem to be working fine for me. If anyone is interested in checking them out: function ExportScript.PILOT_HSI_BEARING_POINTER(mainPanelDevice) local bearing_value = mainPanelDevice:get_argument_value(670) * 360 local formatted_bearing = string.format("%.0f", bearing_value) ExportScript.Tools.SendData(export_ids.PILOT_HSI_BEARING_POINTER, formatted_bearing) end function ExportScript.LEFT_ENGINE_RPM(mainPanelDevice) local rpm_value = mainPanelDevice:get_argument_value(299) * 100 local formatted_rpm = string.format("%.0f", rpm_value) ExportScript.Tools.SendData(export_ids.LEFT_ENGINE_RPM, formatted_rpm) end function ExportScript.RIGHT_ENGINE_RPM(mainPanelDevice) local rpm_value = mainPanelDevice:get_argument_value(300) * 100 local formatted_rpm = string.format("%.0f", rpm_value) ExportScript.Tools.SendData(export_ids.RIGHT_ENGINE_RPM, formatted_rpm) end function ExportScript.VSI_INDICATION(mainPanelDevice) local vsi_value = mainPanelDevice:get_argument_value(90) local vsi_fpm = vsi_value * 6000 local formatted_vsi = string.format("%d", vsi_fpm) ExportScript.Tools.SendData(export_ids.VSI_INDICATION, formatted_vsi) end function ExportScript.AOA_INDEXER(mainPanelDevice) local aoa_value = mainPanelDevice:get_argument_value(70) local aoa_units = aoa_value * 30 local formatted_aoa = string.format("%d", aoa_units) ExportScript.Tools.SendData(export_ids.AOA_INDEXER, formatted_aoa) end Also working on the rad alt. The math is a little off and I think it has more to do with some offsets between the raw values and eye-balling the needle value. If anyone has any idea on how to get these as close as possible, I would appreciate it. 2
Recommended Posts