Jump to content

prestonflying

Members
  • Posts

    157
  • Joined

  • Last visited

Posts posted by prestonflying

  1. On 5/2/2025 at 3:02 PM, HanuXXL said:

    Yes, those names mentioned seem to be correct ones, thanks. Also I just found one missing line in ufcPatch.lua that had to be defined. Now it works in F-14 with dedicated lua definitions.

    This thing really helps to ulilize F-18 UFC better!

    Awesome job! Glad you are enjoying and nice skills

  2. @Hallsy

    Thank you! I set up the lua DCS export so new additions only require creating a new <AIRCRAFT_NAME.lua> file and filling out the required methods to extract data from the cockpit of a given module (since each module has unique ways to access this data).

    Re hornet weight: This can be hardcoded to a resonable number like 40000lbs, I just got carried way and tried to account for Fuel and stuff. SayIntentionsAI just needs a handful of fields to know where you are and what freq you are on. 

    For UHF only aircraft, it is possible we could do something like subtract 200hz from a UHF to get a proper VHF channel inside the export script for a given module (hacky, but would work).
    SayIntentionsAI requires a VHF (110-150hz) radio channel to communicate with the airports. And these radio channels are set inside the cockpit. Another solution would be having the SayIntentions desktop application set the radio frequencies, the DCS-SI lua adapter would capture those radio frequencies and store the current COM1 value and use that instead of the value in the cockpit. This solution would mean the pilot would not be able to set the radios from the cockpits, and instead the export script would handle all radio communications.

    As for adding more modules, the biggest limitation is I do not own all modules (I have hornet, huey, tomact, viper, ch47). So adding more modules will require someone with those to implement them. But anyone with super basic DCS lua knowledge will be able to add these modules.

    I added an example template file if someone wants to try to add their own

  3. @Darcaem I am also looking into this and writing an adapter using the newly released SimAPI for SI as a DCS Export LUA Script. 

    I agree with the "WHEEL RPM:0" question, seems like SimAPI just needs to know if we are moving on the ground or not, thus a simple function of speed + wheel radius should do. 

    re- how do I read/change radio freqs? You can use the "Device" for the VHF radio in the lua export script to interact with the VHF Radio Device.
    Example for UH-1H

    local VHFRadio = GetDevice(20)
    local freq = VHFRadio:get_frequency()
    
    -- Setting frequency to 121.5 for VHF radio in DCS
    VHFRadio:set_frequency(121500000)

     

    • Thanks 1
  4. 18 hours ago, josesaari said:

    Hi! I recently formatted my pc and reinstalled DCS, SimApp and Universal UFC. Everything is working fine except that in multiplayer the UFC and some lights (AA, AG, ALR67...) get out of sync when die and choose a new role. I've seen the post by Prestonflying and the fix works, but can get Universal UFC and the fix working at the same time. I tried several times to mix both Lua's but only works one or another.

    Any ideas?

    Thanks a lot!

    The cause is most likely inside the UFC code for this plugin, can you attach your /Saved Games/DCS/Logs/dcs.log file, it will include the reason for the failure and better help fix it

  5. @Nightdare Looking at the default dcs_event_bind_config.js, there appears to be an entry for the F-14B, does the default profile landing gear light work? If so, I would use the existing one and tweak/add to it. Otherwise there might an issue within SimApp Pro 

     

    	{
    		// f-14b默认没有完全对应的灯,但是可以自己自定
    		// f-14b does not have a completely corresponding light by default, but you can customize it yourself
    		
    		aircraft_name: ["F-14B","F-14A-135-GR"],
    		isResetLight: true,
    		recv: [
    			//F-14B
    			{
    				// 控制台灯光亮度 dcs_id:1801//目前只能按键调节,9个档位
    				// 另外还有仪表灯光亮度 dcs_id:1800
    				// 副驾驶的仪表灯光亮度 dcs_id:1802
    				// 副驾驶的控制台灯光亮度 dcs_id:1803
    				dcs_id: "0.1801",
    				process: (dcs_id, dcsmag) => {// 临时作为反向处理 // Temporary as reverse processing
    					dcsmag = 1 - dcsmag;
    					return dcsmag;
    				},
    				device_name: 0,
    				led: ["Backlight","INST_PNL_Backlight"]
    			},
    			{
    				// 起落架指示灯
    				// Landing Gear Indicator
    				// 目前暂时将起落架指示灯映射为起落架手柄灯
    				// Currently, the landing gear indicator is temporarily mapped to the landing gear handle light
    				dcs_id: "0.15001",
    				device_name: ["F18_TAKEOFF_PANEL", "TAKEOFF_PLANEL_2"],
    				led: ["Landing_gear_lights"]
    			}
    		]
    	},

     

    • Thanks 1
  6. @pierre0000

    The steps would look something like this

    1. Open the file, use NotePad++, VSCode, or other code editor:
      C:\Program Files (x86)\SimAppPro\resources\app.asar.unpacked\dcs_event_bind_config.js
    2. Add this into the list of exported objects, you will need to look for the DCS Module argument to power the light, I put a random one of `120`, which will not work. I do not own F4E so I can not look at the list of arguments, but they will be in this folder in some lua files: 
      DCS_INSTALL_PATH/Mods/aircraft/F-4E-45MC
      module.exports = [
        {*F18 Code block, etc},
        {*Other module code blocks, etc},
        {
            aircraft_name: ["F-4E-45MC"],
            isResetLight: true,
            recv: [
                {
                    dcs_id: "0.120", // You must find the DCS argument for the given data you want to drive this light. Look inside DCS_INSTALL_PATH/Mods/aircraft/F-4E-45MC/ and look through the lua files for the arguments you wish. Others on the forms might be able to help if you post 
                    device_name: ["F18_TAKEOFF_PANEL"],
                    led: ["Landing_gear_lights"]
                }
            ]
        }
      ];

       

    • Like 1
  7. @colsona Here is the latest version of the UFC Mod that includes the Torque for the UH-1H in slot 4! (Note: We are limited to 4 characters, and the gauge for torque is in PSI from 0-100, so I put the readout in the following format: `55%` for 55 PSI, `22%` for 22 PSI, etc).

    This version also includes light control for the UH-1H

    • Starter Gen Switch On => APU Light Super Taurus Throttle
    • Skids On Ground => Landing Gear Light On PTO
    • Master Arm Switch On => AG Light PCR On


    @Wostg@ANDR0ID For my fellow developers on this project, I added a light framework (just like the UFC payload methods to generate data, there is one for lights now). The UH-1H is setup with an example of controlling lights, ya'll will get the hang quickly. Feel free to add to other modules and make a pull request on Github

    • Like 2
  8. On 2/18/2025 at 5:11 PM, Nightdare said:

     

    What would be great would be a kind of DCS bios aimed at Winwing hardware

    The instructions for WW are fixed on F-18 commands, it would need something that can convert like whatever signal a "gears up" is from DCS to the "Gear up F-18" command for WW

    (Of course it would be even better if WW just changed their firmware to understand DCS Bios commands)

    I did explore a test branch on Github adding a light payload as you described, here is the commit showing code to get lights working. I never added to the project but can re-visit if it would be helpful to others. The example shows setting the PTO landing gear light on and can be conditionally controlled via Huey argument values. It is exactly what you described, a mapping of module commands into SimApp Pro F18 Commands 

    • Like 2
  9. 21 hours ago, ANDR0ID said:

    Likely related to how the F-18 is "spoofed" and the other modules using the same cockpit argument values for different functions. 

    Agreed, this mod works by sending data to SimApp pro as if you are flying the F18. When flying other modules, that data is being sent over and SimApp Pro does not know you are actually flying the apache. So this would break lights on other aircraft such as master arm light, apu light, station jettision light. 

    Ill try to think of a way to avoid this. One fix would be if WinWing allowed the F18 UFC payload to be set even if you are not flying that module, but SimApp Pro requires the aircraft type to be F18 in order to render data on the UFC for now.

  10. 1 minute ago, brettt777 said:

    I think this is the mod I tried last night. I couldn't get it to work. I loaded up an F-16 in SimAppPro and then in DCS, the buttons and knobs worked, the MFD's worked but the nothing on the UFC.

    Hey, if you can load into a mission and attach your `dcs.log` file (Located under Saved Games/<DCS_FOLDER>/Logs/dcs.log) I can take a look to see if there is a possible error occuring.

    Also, SimAppPro can overwrite the modded lua files which will remove the functionality so this may be happening, you can manually check the filed under Saved Games/<DCS_FOLDER>/Scripts/wwt/wwtExport.lua, try following the steps again from the GitHub page

  11. On 11/26/2024 at 9:12 AM, =DROOPY= said:

    ^ This... 

    I am not working on any features for it, just showing a proof of concept. I posted onto Github with a start template of writing data to the DED if others want to take a go at it. The hard part was figuring out how to draw/write text on the screen which in the Github project I use the DLLs from SimApp pro to call the methods WinWIng wrote to interface with the F16 DED.

    • Thanks 1
  12. On 9/1/2024 at 11:51 AM, Mayo said:

    I was about to post a question on how to get it to work 😄  (First time user)
    Seems like you gave me an answer right there

    Just verified it is still working, if you are not seeing what you expect on your UFC, re-copy the downloaded files from the installation (https://github.com/llamaXc/winwing-ufc-addon/releases/download/V1.0.18/wwt.zip) and paste the contents into your Saved Games/DCS/Scripts/wwt folder. Then replace/overwrite the existing files. 

    Once SimApp Pro updates, it will overwrite these files. So you just need to re-copy them in. Let me know if you have any issues!

    • Like 1
  13. 5 hours ago, TrigaNZ said:

    Thanks, found it this time, thank you. 
     

    Is it normal in multiplayer for it to get stuck on the first aircraft you load into? For example I started in an F4 and after being shot down (as always) I got in an F18 and the UFC kept the F4 display. Had to leave server to get it to go to F18

    Cheers

    Interesting edge case, I’ll take a look at it and test it out. I have an idea in mind what is causing this. I’ll report back here with an update 

×
×
  • Create New...