Jump to content

Qazplm

Members
  • Posts

    58
  • Joined

  • Last visited

Posts posted by Qazplm

  1. 8分钟前,Qazplm说:

    Thank you. Is this function a function of DCS? Or is it from MIST or MOOSE?

    I don't understand either. It looks as if the function is set to trigger, once, continuously, with condition changes,...... Is it this function? I'm looking for a function that can determine the position after the player clicks the switch through the task script. Can it do it?

  2. 12小时前,Miguel21说:

    ouha, you're bringing out a 3 year old post? not bad 🙂

    the AddFileTriggerTempo() function is in the MAIN_NextMission.lua file (about line 327)

    timing is the function's second argument
    I've given you an example of the integration of 3 files with this system

     

     

    function AddFileTriggerTempo(filename, time, predicat0, ActionPredicate0)
    ...
    end
    
    
    AddFileTriggerTempo("CG_ArtySpotter.lua", 2, "triggerOnce", { [1] = {["Predicate"] = "a_do_script_file"}})
    
    if mission_ini.load_mist then
        AddFileTriggerTempo("mist.lua", 2, "triggerOnce", { [1] = {["Predicate"] = "a_do_script_file"}})    -- modification M60 CTLD
    end
    if mission_ini.load_CTLD then
        AddFileTriggerTempo("CTLD.lua", 4, "triggerOnce", { [1] = {["Predicate"] = "a_do_script_file"}})    -- modification M60 CTLD
    end
     

    Thank you. Is this function a function of DCS? Or is it from MIST or MOOSE?

  3. 2022/8/7 PM9点33分,Miguel21说:

    Hi,
    we start slowly to install some scripts like this.
    mist and CTLD are already installed, I have to make room for the F10 menu and it will work.
    However, you have to activate them in the conf_mod

    To add others, it's not very complicated but you have to tinker with some files

    you have to put the file(s) in the folder
    Mods\tech\DCE\ScriptsMod.NG\Mission Scripts

    Then add 2 lines in the file MAIN_NextMission.lua
    look for example how the Fuel_Check.lua script is added:

    1st line (about line number 243)
    AddFileTrigger("Fuel_Check.lua")
    if you need a precise timing, use the function
    AddFileTriggerTempo(filename, time, predicate0, ActionPredicate0)

    like for example mist with 2 seconds
    AddFileTriggerTempo("mist.lua", 2, "triggerOnce", { [1] = {["Predicate"] = "a_do_script_file"}})

    2nd line (about line 663)
    miz:zipAddFile("l10n/DEFAULT/Fuel_Check.lua", "../../ScriptsMod."..versionPackageICM.."/Mission Scripts/Fuel_Check.lua")

    Translated with www.DeepL.com/Translator (free version)

    Hi, hello! Where is the function AddFileTriggerTempo obtained? Can it be used directly in the task script?

  4. Hi, guys! Excuse me. Does anyone know how to monitor the clicking actions of players in the cockpit? Use scripts instead of in the task editor. That is to say, every time a player clicks a switch or a button, an action will be triggered.

    Or rather, does DCS have a function that can monitor the click actions of users

  5. 6小时前,Cyking说:

    As far as I am aware you cannot read out the cockpit parameters with a lua script, but maybe I am wrong. So you need to setup the condition check in the ME. In the "Action" you can put a do script for messages or sth else. 

    I can use scripts to read and set cockpit parameters, but I'm not familiar with programming. The scripts I wrote can only determine the current status of the switches and will not be written to make judgments after the player pulls the switches

  6. 11小时前,Cyking说:

    You can use several conditions in the Mission Editor to check the position of switches or settings within the cockpit. 

    e.g. X: COCKPIT ARGUMENT IN RANGE or X: COCKPIT PARAM EQUAL TO / IN RANGE

    Example below checks if the Master Arm Switch is turned on in  the F-4. 

    image.png

    • Thank you. I understand this. What I want to say is how to implement this function with a script. Each time the player pulls the switch, a message is displayed.
  7. I think every time the player pulls down the switch, there will be a message showing the current position of the switch. If I use scripts instead of triggers, what should I do? Can anyone help me? thanks

  8. Hi, guys. I'm not familiar with the script and have a problem. I input

    return _G.c_argument_in_range(142,0,0.1,"")

    in the LUA console. It can return true or false, but how should I use it in the script?

    if net.dostring_in('mission', 'return _G.c_argument_in_range(142,0,0.1,"") ') then

    trigger.action.outText("very good! Please proceed to the next step" ,10 )

    end

    But it doesn't work

  9. 2025/2/15 PM6点44分,Actium说:

    TL;DR: WebConsole.lua is an experimental, interactive, browser-based Lua console with syntax highlighting for scripting in all of DCS' scripting environments. It explicitly supports mission scripting to accelerate otherwise slow mission development cycles (edit DO SCRIPT code, start mission, test, stop mission, repeat). Install by downloading WebConsole.lua into your %USERPROFILE%\Saved Games\DCS.*\Scripts\Hooks\ folder, start a DCS mission, and open the console in your web browser. Script return values are automatically serialized as human- and machine-readable JSON. Also supports non-interactive use through an HTTP API to issue DCS scripting commands from any programming language. Read below security advisory before installing!

    I'm publishing it in its current state, because I already use it productively for mission scripting and I'm looking for feedback from the community. As it is experimental, there are no support or compatibility guarantees. Use at your own risk, feel free to break it, and don't hesitate to report any issues in this thread!

    Features

    • Easily run arbitrary code in all of DCS' scripting environments (called Lua states, accessed via net.dostring_in()). Currently, these include config, export, gui, mission, and server. Let me know if anything is missing.
      Access to the separate mission scripting environment (dubbed *a_do_script), where all DO SCRIPT code from the mission editor runs, is supported out of the box since DCS 2.9.13 (no modification of MissionScripting.lua required). UPDATE: Broken since 2.9.15.9408.
    • Supports both clients and (dedicated) servers. Clients not also serving missions, e.g., from the mission editor, are restricted to the gui environment.
    • Lua syntax highlighting and checking via an embedded code editor (ACE).
    • Secure integration into mission scripting: Unlike other consoles, WebConsole.lua does not require disabling the sanitization in MissionScripting.lua.
    • Serialization of complex return values into human- and machine-readable JSON. Interactive inspection of returned JSON objects (see screenshot). The serialization format is a work-in-progress, i.e., not stable. Beware of arrays starting with null.
      Alternatively serializing to Lua is feasible, but currently missing. Feel free to implement and contribute it.
    • HTTP API for non-interactive use from a programming language of your choice. Includes error handling and translation into appropriate HTTP status codes (Success -> 200 OK; Error -> 500 Internal Server Error). Note that the API is not stable and may change without notice.

    Security Advisory

    All DCS Lua consoles, e.g., dcs-witchcraft, DCS-BIOS, DCS Fiddle, DCS Lua Runner, DCS Code Injector, and my WebConsole.lua, use a socket bound to localhost (127.0.0.1) to issue scripting commands to DCS. This socket is not accessible remotely, neither from the internet, nor from your local area network. However, the socket is open to any user or program on your local computer. Without authentication or a firewall in place, other users (and whatever software they run) can use the socket and Lua's os.execute() to escape the DCS Lua scripting environment, enabling arbitrary code execution with user permissions. This is a potential security vulnerability that could be exploited to access/steal your files, install malware, etc. Single-user computers are generally safe. However, multi-user systems are vulnerable, unless properly authenticated (password protected), firewalled, or all co-users are absolutely trustworthy.

    Do **NOT EVER** modify any Lua console to bind its socket to 0.0.0.0 to enable remote scripting access, as this would enable remote code execution for anyone. Password protection via HTTP Basic authentication is unencrypted and generally insecure. If you want to use any Lua console remotely you could, e.g.:

    1. Set up a reverse HTTP(S) proxy that authenticates and encrypts all web console requests.
    2. Use encrypted and authenticated port forwarding, e.g., via Secure Shell: ssh -L 8089:127.0.0.1:8089 user@server (also possible on Windows)
    3. Set up a VPN and bind the socket to the VPN interface IP address. Note that everyone on the VPN will be allowed access, unless firewall rules are in place.

    Installation

    1. Download WebConsole.lua and copy it into your Scripts/Hooks folder, e.g., %USERPROFILE%\Saved Games\DCS.*\Scripts\Hooks\WebConsole.lua.
    2. Optionally, configure port and password in your %USERPROFILE%\Saved Games\DCS.*\Config\autoexec.cfg as follows. If left unconfigured, port defaults to 8089 and authentication is disabled.
      -- configure Scripts/Hooks/WebConsole.lua:
      -- WARNING: the web console is not remote-accessible via network. however, it
      --          enables arbitrary code execution with user privileges to anyone
      --          with access to its socket.
      --          this is a potential security vulnerability on multi-user systems,
      --          enabling other local users to run arbitary code from your user
      --          account, access your files, install malware, etc.
      --          enable HTTP authentication with a strong password below or use an
      --          appropriately configured firewall on multi-user systems!
      -- web console HTTP port (number: -1 to disable | >1023 to enable | nil: 8089)
      webconsole_port = 8089
      -- base64-encoded "username:password" string for optional HTTP Basic
      -- authentication or nil to disable authentication. on Windows PowerShell use
      -- `[Convert]::ToBase64String([char[]] "username:password")` and on Linux use
      -- `echo -n "username:password" | base64` for base64-encoding. example value
      -- for "username:password": webconsole_auth = "dXNlcm5hbWU6cGFzc3dvcmQ="
      webconsole_auth = nil

    Interactive Use

    After installing as instructed below, start a mission (e.g., from the mission editor or on a server). Open http://127.0.0.1:8089/ (if using the default port) in your browser while the mission is running. Type code, press Execute, and check its return value. Rinse, repeat.
    The console does not work while the mission/server is paused.

    Non-Interactive Use

    Exemplary curl command line to fetch server logs:

    curl "http://127.0.0.1:8089/execute" -X POST \
    -H "Accept: application/json" -H "Content-Type: application/lua" -H "X-Lua-State: gui" \
    --data-raw "return {DCS.getLogHistory()}"

    Exemplary Windows PowerShell code to fetch list of currently connected players from a server:

    (Invoke-WebRequest `
    -Uri http://127.0.0.1:8089/execute -Method POST `
    -Headers @{"Accept" = "application/json"; "X-Lua-State" = "gui"} `
    -ContentType "application/lua" `
    -Body "local players = {}
    for _, id in ipairs(net.get_player_list()) do
        players[#players + 1] = net.get_player_info(id)
    end
    return players").Content

    Screenshots

    Web console used to retrieve and display the contents of the global variable world in the mission scripting environment:

    Screenshot 2025-02-15 at 10-20-34 DCS WebConsole.lua.png

    The web console can also be used to recursively dump all global variables via return _G. Note that doing so will freeze the server until serialization and HTTP transfer have completed. To avoid browser performance issues, the result display is truncated. The entire result can be saved to a local file via the Save button.
    Serializing to JSON has the benefit of being able to use web development tools, like the interactive JSON inspectors included in, e.g., Firefox and Chrome. Click the Open button to open the result in a new window:

    Screenshot 2025-02-15 at 10-31-55 .png

    very good

    • Thanks 1
  10. 6小时前,SloppyDog说:

    You can find the device_id, button_ID and which values they assume when clicked inside the file clickabledtata.lua. Every aircraft in DCS has this file, and normally it is inside the Cockpit folder. For the F-18 for instance is inside the DCS World>Mods>aircraft>FA-18C>Cockpit>Scripts folder.

    • I see. They come from mission in the LUA console. But I don't have a LUA console. How can I obtain these functions?
  11. 26分钟前,SloppyDog说:

    You can find the device_id, button_ID and which values they assume when clicked inside the file clickabledtata.lua. Every aircraft in DCS has this file, and normally it is inside the Cockpit folder. For the F-18 for instance is inside the DCS World>Mods>aircraft>FA-18C>Cockpit>Scripts folder.

    Thank you for your answer. I already know this. I learned it from you! I mean to ask about this function Where is _G.a_cockpit_perform_clickable_action obtained and where can such functions be found?

    _G.a_cockpit_perform_clickable_action

  12. 2024/7/30 AM2点48分,Orca57说:

    Hello pilots,

    Being new to DCS I wanted to practice my carrier landings in the FA-18C. I was looking for scripts to automate the cockpit configuration, e.g. gear down, flaps full, hook down, TCN and ILS channels configured, etc. so that I could focus just on the landing part without manually having to repeat the landing configuration steps at each trial.

    Using the Mission Editor with triggers and "X: COCKPIT PERFORM CLICKABLE ACTION" actions I got things working, but needed a lot of triggers because many UFC keyboard buttons require a delay between press and release. Anyway, I found various pieces of information on the web, explored the available DCS lua code, manuals, tutorials and combined my findings  into a single script that automates cockpit configuration actions, including time delays between certain actions. Combining the steps into a single script also allows comments with explenations to be added, which helps for future reference.

    The attached example mission file has one "Mission Start" trigger and one "DO SCRIPT" action. It first sets Active Pause on, goes through multiple time delayed configuration steps and ends with the message "Ready: unpause and good luck!" at which point the pilot can deactivate active pause and practice the carrier landing.

    The code below is included in the mission and demonstrates the technique I used, which should be applicable for other cockpit configurations as well. Hope it's usefull. If there are better approaches, please let me know. It certainly helped me in improving my landing skills 🙂

    -Orca57

    
    --[[
        Automated cockpit configuration for an F18 carrier landing training mission.
    
        Some clickable cockpit actions in the F18 require a delay between press and release, for example various UFC keyboard buttons and the course select button.
        In stead of creating multiple triggers with TIME MORE(1) conditions and X: COCKPIT PERFORM CLICKABLE ACTION actions in the mission editor,
        this script does all the cockpit configuration actions in a single script, which is easier to edit, maintain and explain with comments.
    
        The technique is to configure a LUA table with sequential steps to perform with some delay between them. The steps are implemented in anonymous functions, wich perform
        cockpit clickable actions using the function call net.dostring_in('mission', "_G.a_cockpit_perform_clickable_action(<device id>, <button id>, <value>, ''))", which has the same functionality as X: COCKPIT PERFORM CLICKABLE ACTION()
        At the end of each action the next action is triggered with a time delay using timer.scheduleFunction(steps[step], step + 1, timer.getTime() + 1)
        The very last action must not trigger further actions.
    
        The actions are:
        - setup the TCN channel (73X)
        - setup the ILS channel, default 1
        - configure the course select (334)
        - configere the left MDI as HSI with TCN and ILS boxed
    
        When completed, the message "Ready: unpause and good luck!" is shown, at which point active pause can be released by the pilot.
    
        author: Orca57
    ]]--
    
    local steps = {} -- The table with actions, populated below.
    
    -- local support functions, reducing syntax clutter.
    local function cockpit_action(device_id, action_id, value)
        -- identical to the mission editor action X: COCKPIT PERFORM CLICKABLE ACTION
        net.dostring_in('mission', '_G.a_cockpit_perform_clickable_action('..device_id..', '..action_id..', '..value..', "")')
    end
    
    local function set_command(command_id)
        -- identical to the mission editor action X: SET COMMAND
        net.dostring_in('mission', '_G.a_set_command('..command_id..')')
    end
    
    local function message(txt, time)
        -- Show message
        trigger.action.outText(txt, time)
    end
    
    local function next_step(step, delay)
        -- Schedule the next step
        if (steps[step] ~= nil) then
            timer.scheduleFunction(steps[step], step + 1, timer.getTime() + delay)
        end
    end
    
    --[[
        Each table index is automaticaly incremented, the actions are anomymous functions that take the current step index as argument, which is used to invoke the next step after a time delay.
        Order is important. From first to last action. Which actions require a delay between them and the delay value takes some trial and error.
        The arguments for the a_cockpit_perform_clickable_action function are the same as for X: COCKPIT PERFORM CLICKABLE ACTION(), which is rather obscure and cockpit specific, but can be found in various on-line resources.
        or extracted from (for example) C:\Program Files\Eagle Dynamics\DCS World\Mods\aircraft\FA-18C\Cockpit\Scripts\clickabledata.lua
    ]]--
    steps[#steps + 1] = function(step)
        message("Setup TCN 73X", 2)
        cockpit_action(25, 3003, 0) -- UFC, TCN (release)
        cockpit_action(25, 3025, 1) -- UFC, 7 (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3025, 0) -- UFC Keyboard Pushbutton, 7 (release)
        cockpit_action(25, 3021, 1) -- UFC Keyboard Pushbutton, 3 (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3012, 0) -- UFC Keyboard Pushbutton, 3 release
        cockpit_action(25, 3029, 1) -- UFC Keyboard Pushbutton, ENT (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3029, 0) -- UFC, ENT (release)
        cockpit_action(25, 3007, 1) -- UFC, ON/OFF (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        message("Setup ILS Channel 1", 2)
        cockpit_action(25, 3007, 0) -- UFC, ON/OFF (release)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3004, 1) -- UFC, ILS (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3004, 0) -- UFC, ILS (release)
        cockpit_action(25, 3007, 1) -- UFC, ON/OFF (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        message("Configure HDI", 2)
        -- ILS On
        cockpit_action(25, 3007, 0) -- UFC, ON/OFF (release)
        -- box TCN on HSI
        cockpit_action(35, 3015, 1) -- Left MDI, 5
        -- box ILS on left MDI HSI
        cockpit_action(35, 3014, 1) -- Left MDI, 4
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        message("Setting CRS to 334", 2)
        cockpit_action(35, 3007, -1) -- Course set switch (press)
        next_step(step, 3)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(35, 3007, 0) -- Course set switch (release)
        cockpit_action(25, 3021, 1) -- UFC Keyboard Pushbutton, 3 (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3021, 0) -- UFC Keyboard Pushbutton, 3 (release)
        cockpit_action(25, 3021, 1) -- UFC Keyboard Pushbutton, 3 (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3021, 0) -- UFC Keyboard Pushbutton, 3 (release)
        cockpit_action(25, 3022, 1) -- UFC Keyboard Pushbutton, 4 (press)
        next_step(step, 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3022, 0) -- UFC Keyboard Pushbutton, 4 (release)
        cockpit_action(25, 3029, 1) -- UFC Keyboard Pushbutton, ENT (press)    
        timer.scheduleFunction(steps[step], step + 1, timer.getTime() + 1)
        return nil
    end
    
    steps[#steps + 1] = function(step)
        cockpit_action(25, 3029, 0) -- UFC Keyboard Pushbutton, ENT (release)
        message("Ready: unpause and good luck!", 5)
        --This is the last action, no further timer calls.
        --timer.scheduleFunction(steps[step], step + 1, timer.getTime() + 1)
        return nil
    end
    
    -- Mission init
    message("Start: setting landing configuration, wait for ready message!", 2)
    set_command(816) -- Active pause on
    
    -- Landing configuration
    cockpit_action(5, 3001, 0)  -- Landing Gear Control Handle, Down
    cockpit_action(5, 3009, 0)  -- Arresting Hook Handle, Down
    cockpit_action(2, 3007, -1) -- FLAP Switch, Full
    cockpit_action(5, 3004, -1) -- Anti Skip Switch, Off
    
    -- Left MDI settup with HDI at 5nm
    cockpit_action(35, 3028, 1) -- Left MDI PB 18
    cockpit_action(35, 3028, 1) -- Left MDI PB 18
    cockpit_action(35, 3012, 1) -- Left MDI PB 2 (select HDI)
    cockpit_action(35, 3018, 1) -- Left MDI PB 8 (scale 20nm)
    cockpit_action(35, 3018, 1) -- Left MDI PB 8 (scale 10nm)
    cockpit_action(35, 3018, 1) -- Left MDI PB 8 (scale 5nm)
    
    -- Start TCN, ILS and course configuration actions
    cockpit_action(25, 3003, 1) -- UFC , TCN (press)
    
    -- Comms
    set_command(179) -- Main communications menu
    
    -- Start first time delayed action
    next_step(1, 1)

     


    F18 carrier landing final approach configured.miz 24.11KB · 8次下载

    Hello, could you tell me these functions _G.a_cockpit_perform_clickable_action(<) device id> , < button id> , < value> Where did ")) get it from? It feels much more convenient than in the ME trigger. Thank you very much!

  13. 2025/5/18 AM12点06分,SloppyDog说:

    Well, I don't know much about the Ka-50 PVI, maybe you should ask in the Ka-50 Mission Editor forum. They can help you better.

    Regarding indication and parameters: indications is everything that is shown to you on a screen, on a instrument, on a HUD. 

    Parameters are related to the aircraft attitude. Meaning altitude, speed, bank angle, etc. As you said, sometimes they can be confused with each other, not exactly replaced. 

    Let's say you want something to happen when the helicopter speed reaches 200 kph. You can make a trigger based on the real helicopter speed (parameter) or from a indication showed in a instrument or HUD (indication). The difference is in the fact that the parameter takes the real speed of the helicopter. If you have a problem with your instruments, and they show you 200 kph while the real is speed is 100 kph, you may trigger an action at the wrong moment. 

    Indication also work to trigger actions based on a warning light inside the cockpit. Let's say you want something to happen when the oil temperature light comes on, that's an indication. Also, if you trying to trigger an action based on the PVI visor, that's an indication too.

    Regarding the coordinates, the first thing that comes to mind is if you are using the same coordinates system. Make sure the PVI is in Latitude/Longitude (lat/long) and you are using lat long to check the coordinates.

    Other reason may be the difference between the real coordinates and the Inertial Navigation System (INS) coordinates for the helicopter computer. One of the characteristics of INS systems is that they drift, they deviate from the initial position with time. And they deviate fairly quickly. To fix this problem you need to make a manual fix, and this procedure is different to each aircraft. And some aircraft in DCS does not even allow for a INS fix.

    The best and easiest way to avoid INS drift is to set your missions after 1996 in the Mission Editor and/or set the mission options to include the option "SATNAV available for all sides" or something like that. Doing this will allow for GPS or GLONASS to be available in the mission, and these system will automatically correct any drift that the INS has. Try doing this and then checking the computer position and the real aircraft position. Just be sure to be in the same coordinate system. 

     

    Thank you, I think I've figured out how to use the indicator, and I'll look into the parameters later。

    Screen_250522_053006.jpg

    Screen_250522_053039.jpg

    • Like 2
  14. 2025/5/15 AM1点14分,SloppyDog说:

    Yes, it is available for aircraft. Although, the files locations and parameters may vary from one to another. But the logic is the same.

    For the 1-1 I believe it is a string.

    To find the format types of the values, and the functions of cockpits arguments, you can refer to page 165 onwards of the DCS User Manual. There is a treasure trove of information in that and most people don't know nothing about it.  

     

    Thanks, I found the indication for KA50 PVI waypoint number, please, is there any difference between indication and parameters? Sometimes they can be substituted for each other, in addition, the coordinates highlighted by the indicator are not on the indicator and deviate greatly. I've tried multiple planes and they're all the same

    Damn translation, I hope you understand what I'm talking about

  15. 2024/12/9 PM5点09分,SloppyDog说:

    Ok, if you are trying to set a trigger based on a radio frequency set in the Remote Frequency Indicator, I think I have this figured out. It was an interesting challenge to learn how to do it.

    In order to detect a parameter from an indicator in the cockpit you need to use the function X: COCKPIT INDICATION TEXT IS EQUAL TO. This function asks for three parameters to be filled in order to work correctly:

    INDICATOR ID

    ELEM NAME

    VALUE

    ----------

    INDICATOR ID

    Indicators are anything that present a value to the crew. In the case of the Remote Frequency Indicator (RFD), or any indicator, you have to find its ID. The ID for indicators are normally inside the Cockpit folder for the module, referenced in the device_init.lua file.

    For the Kiowa, this file can be found in the \Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\OH-58D\Cockpit folder.

    Inside the device_init.lua you have to look for the indicators section. I am using the Notepad++ software to open the lua files, and I recommend that you use it too, as it identifies the line numbers. I'll be referencing the line numbers from now on.

    The indicators section starts at line 82. The RFD is listed on line 91. From the DCS User Manual, page 166, it is stated that the indicators ID start at 0 and increase by 1 with each subsequent line. So, if you count from line 83, "OH58D::ccControls Indicator", considering it as 0, to line 91, "OH58D::ccRFD Indicator", you will end up with 8. This is the INDICATOR ID you are looking for.

    -----------

    ELEM NAME 

    This is the tricky part. You have to look for the Main_page.lua file inside the indicator folder.

    For the RFD it is inside the Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\OH-58D\Cockpit\RFD\Indicator.

    As you are looking for a frequency showed in the RFD, you have to look for the Frequency section inside the file. 

    Using Notepad++ it is on page 134.

    The ELEM NAME is always listed as "Something.name". In the case of a radio frequency, on line 140 we found Freq.name. 

     Freq.name                = "Freq".. string.format("%i", i)

    So, we have the first part of the ELEM NAME, Freq.

    The Freq is inside a for loop, counting from 1 to 5, as shown on line 136:

     for i = 1, 5 do

    So, as we are interested on Frequency 5 on the RFD, the string.format("%i", i) will be 5.

    Thus, the ELEM NAME is Freq5

    -----------

    VALUE

    This is the easy part. It is a simple string. Sometimes it requires the dot,sometimes it doesnt. In the case of the A-10C it was not necessary to input the dot; in the case of the Kiowa it was needed. Pure trial and error to find out.

    I chose 055.000 Mhz as the desired frequency to activate the trigger, thus the VALUE in this case will be 055.000.

    --------------------

    Now, you can get in the Triggers section of the Mission Editor and input the parameters

    For the Triggers I created a Switched Condition, so that every time you input the right frequency the trigger will be activated.

    The Condition is the  X: COCKPIT INDICATION TEXT IS EQUAL TO, with the following parameters

    INDICATOR ID = 8

    ELEM NAME = Freq5

    VALUE = 055.000

    The Action is a Message to All

    -----------------------------------

    I made a mission using two A-10C as testbeds and a Kiowa. 

    For the A-10s, every time you input:

    Preset Channel in the UHF radio equal to 02 or;

    A frequency of 255.000 Mhz in the UHF radio, a message will appear.

     

    For the Kiowa, every time you input 055.000 in the Radio 05, a message will appear.

    Attached is a track file showing the operation in the Kiowa and the mission I used for the tests.

     

     

     

     

     

      

     

    Oh-58D Kiowa RFD Frequency Trigger.trk 134.28KB · 16次下载 A-10C-Radio Text Test.miz 11.03KB · 16次下载

    Hello, is it possible for all pilotable aircraft to find parameters in this way? If yes, that's great

    By the way, man, can you find the format type for this value? Is it -1-1 decimal or string

  16. 2025/3/27 PM7点44分,Wroblowaty说:

    When designating target via targeting pod, make sure to designate place where wheels/tracks meet the ground. Otherwise if you point at the "center of mass"  you will in reality provide the aircraft with coordinates of a place behind the target itself. If its done from a shallow angle and from a distance, error can be pretty big.

    You look at this picture of mine, I just aimed at a point on the ground, but all four GBU38s avoided this target point. The error is about 5 meters

     

    Screen_250327_080430_edit_558245317497108.jpg

    2025/3/27 PM7点41分,Muchocracker说:

    the F-16's INS overhaul hasnt been moved over, so the relative vs absolute targetting modelling isn't relevant to the hornet yet. The JDAM should always be hitting to the spec'd 5 meter CEP. If There is excessive missing it's either caused by aircraft INS error (from not having GPS or not turning on IFA) or error in the coordinates being handed off to it. To diagnose why there is a disparity in these images you'll need to post the trackfile.

    ……JDAM TOO targeting currently is not recommended for the F/A-18 aircraft due to inherent sensor/system inaccuracies, unless mission failure or collateral damage due to wide misses can be tolerated.……

    This is what I saw on a PDF, which should be the reason. Only PP mode can be used, and TOO mode cannot be used to specify targets for small targets

  17. 3小时前,graveyard4DCS说:

    I totally understand your questions regarding bomb fuzes, since I had exactly the same... I tried to understand how they're supposed to work IRL and I wrote a post about it.

    For example, you can learn that FMU-143 is specifically designed for use with BLU-109 and should not be used on any other bomb body. 

    Your conclusions are correct : in its current state, DCS is reproducing weirdly fuze options, with settings that should not be available for example (like the example of DLY2).

    At this point, I think we should take these options as more cosmetic than anything else. Still, it's always nice to understand the logic behind.

    Yes, some deficiencies are also understandable, because this may involve military secrecy,

     

×
×
  • Create New...