Jump to content

Mosquito Cockpit parameters in Mission Editor


anfieldroad

Recommended Posts

Hi,

Does anyone know if documentation exists yet for identifying parameters to change in the mission editor?

My campaign in progress relies on being able to read parameters and set parameters to override the user input eg to shut down an engine etc.

Can anyone point me in the right direction where I can find this info if the doco does not already exist?  I found the modelviewer but that appears to just be for animation not for the actual functionality.  It could still be useful though to 'force' instruments to show something incorrect as if failed.

I also need to figure out how to set up those highlight boxes around switches etc that are used during tutorial missions. 

Link to comment
Share on other sites

3 hours ago, anfieldroad said:

Hi,

Does anyone know if documentation exists yet for identifying parameters to change in the mission editor?

 

Hi,

I'm not aware of any official documentation, but I did make this spreadsheet of Mosquito Parameters, that I obtained using the LUA Console tool of DCS-BIOS. Each line of the sheet has this format:

 

BASE_SENSOR_FUEL_TOTAL:995.477234\

 

The part before the colon is the Parameter Name, the part after the colon is the Parameter value at the moment I captured the data. On this case its the value corresponding to full internal fuel, which is 2,197 pounds ... the Parameter value is actually expressed on Kilograms. Same for other parameters, most are in meters or meters/sec even if the aircraft has its instruments on british units. The backslash is the end of line.

These Parameters are used on the following Trigger Conditions:

 

X:COCKPIT PARAM EQUAL TO

X:COCKPIT PARAM IN RANGE

X:COCKPIT PARAM IS EQUAL TO ANOTHER

 

3 hours ago, anfieldroad said:

My campaign in progress relies on being able to read parameters and set parameters to override the user input eg to shut down an engine etc.

 

Parameters are read-only, you can't use them to force user input. However, you can flip cockpit switches, using these trigger Actions:

 

X:COCKPIT PERFORM CLICKABLE ACTION

 

3 hours ago, anfieldroad said:

I also need to figure out how to set up those highlight boxes around switches etc that are used during tutorial missions. 

 

For that you use this trigger Action:

 

X:COCKPIT HIGHLIGHT ELEMENT

 

It is only valid for Single Player missions, they dont work on Multiplayer. The Elements names can be obtained on the clickabledata.lua file of the Mosquito (on its /Cockpit/Scripts/ path). Open a Mosquito training mission on the Mission Editor to see examples of use.

Best regards,

 

Eduardo

DCS Mosquito Parameters.xlsx

  • Like 3

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

5 minutes ago, anfieldroad said:

It's a pity that ED don't provide these things ready to go for content developers to hit the deck running.


Edited by Rudel_chw
Sorry … mistaken thread

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Looking at the spreadsheet theres not many parameters.

I'm trying to understand what value there is to all the data I have been getting from modelviewer on the mosquito cockpit.  There are 387 parameters although some are marked unused.  I am figuring out which are for what but wiggling the slider and seeing what animation moves in the cockpit.  However, my fear is these parameters control animation only and not the actual function.

I don't see how I can actually flick a switch.

Link to comment
Share on other sites

11 minutes ago, anfieldroad said:

Looking at the spreadsheet theres not many parameters.

 

Yes, most WW2 aircrafts are like that .. modern jets have much more.

 

11 minutes ago, anfieldroad said:

I'm trying to understand what value there is to all the data I have been getting from modelviewer on the mosquito cockpit. 

 

I don't know .. I have never used ModelViewer for that type of thing.

11 minutes ago, anfieldroad said:

I don't see how I can actually flick a switch.

 

Did you look at the clickabledata.lua file?  .. for example, one of its lines is like this:

elements["WINDOW_LOCK_LEFT"] = mcabin_2_position_tumbler({0}, _("Cockpit.Mosquito.canopy_left_window_lock"), devices.CONTROLS, device_commands.Button_22, 251, true, {{SOUND_NOSOUND, SOUND_NOSOUND}})

 

The first parameter, WINDOW_LOCK_LEFT, is the name of a cockpit element. I can use that name to highlight it, like this:

 

6RFG4Z8.jpg

 

Now, to manipulate this element from within a trigger, I use the X:COCKPIT PERFORM CLICKABLE ACTION, like this:

 

PmFar9P.jpg

 

Where do I get the device and command codes?  You first have to enable the first line of the MissionEditor.Lua file (not on Saved games, it's on the DCS program path), it should read like this:

OPTIONS_ADD_COMMAND_CODES_TO_TOOLTIP = true   (by default it's False)

 

This line adds a Toltip to the Controls screen, like this:

 

HqLmOin.jpg

 

Hope that gets you started. here is the sample mission.

 

 

 

test.miz

  • Like 2

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Believe it or not while you wrote that I was in the process of pulling apart the clickabledata.lua myself.  The thing is that something above doesn't line up right - the device ID comes from the  device_commands.Button_XXX number + 3000.  The above should be 3022 yet you have 3023.

Probably because there are multiple functions assigned to that window lock - open, close and a open/close state toggle.

The device ID is the easiest part, it's getting the values correct.

One thing for sure, getting the first part of my campaign missions is going to be massive as I will be making substantial use of these functions.  The campaign is a recreation of what actual Mosquito pilots went through in a squadron which transitioned from single engine fighters to twin engined Mosquitos and had to learn a whole new way of flying as a result.  I want a virtual instructor to demonstrate the engine failure procedure and then put the pilot in control to go through it, whilst monitoring the parameters and giving feedback.

  • Like 1
Link to comment
Share on other sites

From the DCS World Manual:

Command – sets the command value for the required control, starting with a base value of 3000. Command values are described in Scripts\Aircrafts\Aircraft Name\Cockpit\clickabledata.lua, using the argument “device_commands.Button_n” (where ‘n’ is the command value of interest). To quickly locate a desired command in the .LUA file, perform a search for relevant terms (such as “autopilot” or “MFCD”). For example, the command to engage the autopilot in A-10C is scripted as “device_commands.Button_2”. As such, it would be entered in the Command field as “3002”

Looking at the Mosquito clickabledata.lua there is no "device_commands.Button_23" for the window lock functionality, only "device_commands.Button_22".

So given the above, where do we get a device ID of 3023 from?

 


Edited by anfieldroad
Link to comment
Share on other sites

I just put this together using some linux filtering of the lua.

It still doesn't explain the odd device number above 3023 instead of 3022 for the window lock.

Not sure yet how to use the "data" at the end of each line and I put that in as raw text from the lua.  Also not sure I understand why the range of values for various functions is 0.  Or does that mean the default is 0 ie off? 

Aircraft Cockpit Params.xlsx

Link to comment
Share on other sites

I dont know all the whys … when I edit my training missions, there is a lot of trial/error to confirm which switch position produces which value.

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

  • 1 year later...
9 minutes ago, mitchelrobertson said:

Can I use this trigger to set the correct pressure when I get into the airplane? 

 

Yes, but only for Single player missions.

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

1 hour ago, mitchelrobertson said:

Changing it from 27.00 to 29.77 is very painful while in VR

 

What aircraft are you talking about?  The Mosquito uses hecto pascals, not mbar, and the aicraft spawns with the correct pressure already set.

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

  • Recently Browsing   0 members

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