Jump to content

Tried different MFD exports


Ridley_Dog

Recommended Posts

1 hour ago, Ridley_Dog said:

What are the correct names to export the MFD's.  Tried all kinds of different ones from looking at the LUA

Or maybe like the harrier they do not have it enabled yet

D:\DCS World OpenBeta\Mods\aircraft\AH-64D\Cockpit\Scripts\Displays\MFD\indicator

 

CoPilot MFDs:

MFD_cpg_left_init

MFD_cpg_right_init

Pilot:

MFD_plt_left_init

MFD_plt_right_init

Customize it like in the video only with your own created name and you should get a satisfied result

 

Screen_220317_233122.jpg

 

and for AV8

Search  for  "Right MPCD Export View ON/OFF"


Edited by Hobel
Link to comment
Share on other sites

Both Pilot and CP/G screens default to "LEFT_MFCD" and "RIGHT_MFCD", the same as most of the other modern jets. My setup worked right away without needing to modify anything. 

But you can change the display name to anything you like in the init.lua file in Cockpit/Scripts/Displays/MFD/indicator under the --ViewportHandling section at the botom.

  • Like 1
Link to comment
Share on other sites

44 minutes ago, Bunny Clark said:

Both Pilot and CP/G screens default to "LEFT_MFCD" and "RIGHT_MFCD", the same as most of the other modern jets. My setup worked right away without needing to modify anything. 

But you can change the display name to anything you like in the init.lua file in Cockpit/Scripts/Displays/MFD/indicator under the --ViewportHandling section at the botom.

I find it defaults to the Gunner MFDs even when I'm flying as the pilot

 

Link to comment
Share on other sites

17 minutes ago, Ian Boys UK said:

I find it defaults to the Gunner MFDs even when I'm flying as the pilot

 

Yeah. I'm noticing this as well. With the default exports (LEFT_MFCD & RIGHT_MFCD), I seem to be getting the CP/G MFDs. When I switch pages in the Pilot position, my MFD export doesn't change.

  • Like 3
Link to comment
Share on other sites

2 hours ago, Bunny Clark said:

Both Pilot and CP/G screens default to "LEFT_MFCD" and "RIGHT_MFCD", the same as most of the other modern jets. My setup worked right away without needing to modify anything. 

But you can change the display name to anything you like in the init.lua file in Cockpit/Scripts/Displays/MFD/indicator under the --ViewportHandling section at the botom.

 

My setup works, but as other have said, the CPG is taking preference over the pilots.

I've tried to change the display name under the MFD_cpg_left_init and right, and even deleted the try_find_assigned_viewport line. But no matter what, I'm seeing the gunners MFDs showing up.

 

Any ideas?

Link to comment
Share on other sites

The MPDs exported fine without any changes but I'm seeing the same thing with the CP/G displays being exported even when I'm in the back seat.  Is there a way to dynamically change these when crew positions are switched?  I'm afraid that the answer may be "no" as the exports appear to happen when the module loads.  Maybe the only way to get it to work is to have the module reload when changing seats.  Sort of like when you jump into another module with the RALT-J command.


Edited by Smashy
Link to comment
Share on other sites

I am also only seeing the CPG MPD's when I'm starting in the pilot seat with stock settings for RIGHT_MFCD and LEFT_MFCD

once renaming the variable  try_find_assigned_viewpoint()  for  MFD_cpg_left_init MFD_cpg_right_init, I used AH64_CPG_RIGHT and AH64_CPG_LEFT

also changed MFD_plt_left_init MFD_plt_right_init  try_find_assigned_viewpoint() to AH64_PILOT_RIGHT AH64_PILOT_LEFT

I added all variables to my monitor config lua.  The CPG still takes priority over the pilot.

 

only after commenting out the AH64_CPG_RIGHT and AH64_CPG_LEFT can I see the pilot MPDs in my monitor export. 

I have not experimented with alternate positions, so that they don't conflict in the same position. But, that wont work with my simpit.

 

Additionally, anyone know where the equivalent TEDAC folder path would be? I'm not getting the CENTER_MFCD working like the F18.

 

Or what the Variable is named?


Edited by JIGGAwest
Link to comment
Share on other sites

5 hours ago, Ian Boys UK said:

I find it defaults to the Gunner MFDs even when I'm flying as the pilot

Huh, it sure does. I just looked and saw that there were displays there and jumped immediately into starting to build a Helios button interface for the Apache without realizing I was looking at the wrong pages! 

3 hours ago, JIGGAwest said:

I have not experimented with alternate positions, so that they don't conflict in the same position. But, that wont work with my simpit.

I can't get the pilot MFDs to display at all. Even if I create 4 separate viewports for the pilot and CPG screens, I get two copies of the CPG screens. 

Screen_220317_234351.png

 

Quote

Additionally, anyone know where the equivalent TEDAC folder path would be? I'm not getting the CENTER_MFCD working like the F18.

It should be Cockpit/Scripts/Displays/TEDAC/TEDAC_init.lua but I can't get that to work either. 

 

EDIT:

Ahhhhhhhhh, it's because I still had LEFT_MFCD and RIGHT_MFCD defined in my monitor config. Looks like the CPG displays draw to the default LEFT_MFCD and RIGHT_MFCD in addition to whatever viewport they are assigned in ViewportHandeling. Removing those entries, and leaving only the 4 customized viewports for the Apache, gives me 4 unique view screens now. 

Screen_220317_235929.png


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

3 hours ago, JIGGAwest said:

 

 

only after commenting out the AH64_CPG_RIGHT and AH64_CPG_LEFT can I see the pilot MPDs in my monitor export. 

 

did you comment those lines out in your monitor profile or in the init.luas?

Link to comment
Share on other sites

21 minutes ago, Bread said:

did you comment those lines out in your monitor profile or in the init.luas?

Commenting out the function in the init.lua does not seem to have an effect on it drawing to LEFT_MFCD and RIGHT_MFCD. You need to assign the Pilot monitors to unique viewports and not have LEFT_MFCD and RIGHT_MFCD active in your monitor profile. 

Link to comment
Share on other sites

7 hours ago, Hobel said:

D:\DCS World OpenBeta\Mods\aircraft\AH-64D\Cockpit\Scripts\Displays\MFD\indicator

 

CoPilot MFDs:

MFD_cpg_left_init

MFD_cpg_right_init

Pilot:

MFD_plt_left_init

MFD_plt_right_init

Customize it like in the video only with your own created name and you should get a satisfied result

 

Screen_220317_233122.jpg

 

and for AV8

Search  for  "Right MPCD Export View ON/OFF"

 

Hi,

how do you name your 4 customized viewports for the Apache?

Ich have the same problem like you in my .lua: only the cpg-mpds are shown, on pilot seat, my screens stay dark...

What should I change?

This is my lua:

name = _('FlipperAH-64D');
Description = 'Left MFCD on the left monitor,Right MFCD on the right and camera on the center'
Viewports =
{
     Center =
     {
          x = 0;
          y = 0;
          width = 1920;
          height = 1080;
          viewDx = 0;
          viewDy = 0;
          aspect = 1920/1080;
     }
}

LEFT_MFCD =
{
     x = 1950;
     y = 0;
     width = 750;
     height = 600;
     aspect = 1024/600;
}

RIGHT_MFCD =
{
     x = 2974;
     y = 0;
     width = 750;
     height = 600;
     aspect = 1024/600;
}

CENTER_MFCD =
{
     x = 3998;
     y = 0;
     width = 750;
     height = 600;
     aspect = 1024/768;
}

UIMainView = Viewports.Center

 


Edited by Flipper

“The uninitiated non-believers think an airplane is a collection of moving parts and miles of wiring.

We know better.”

 

Marshall “War Dog” Lefavor

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

2 minutes ago, Flipper said:

Hi,

how do you name your 4 customized viewports for the Apache?

Navigate to Mods/aircraft/AH-64D/Cockpit/Scripts/Displays/MFD/indicator and find the following files:

MFD_plt_left_init.lua

MFD_plt_right_init.lua

MFD_cpg_left_init.lua

MFD_cpg_right_init.lua

Each one will have something like the following code at the bottom:

--ViewportHandling
update_screenspace_diplacement(1, false, 0)
try_find_assigned_viewport("RIGHT_MFCD")

Change the viewport name (in this example, "RIGHT_MFCD") to something unique in each file. 

Then add entries for each of those unique names in your monitor config file. You will also need to comment out or delete the RIGHT_MFCD and LEFT_MFCD entries in your monitor config at the moment, as they are causing problems. 

Link to comment
Share on other sites

20 minutes ago, Bunny Clark said:

I can't get the pilot MFDs to display at all. Even if I create 4 separate viewports for the pilot and CPG screens, I get two copies of the CPG screens. 

It should be Cockpit/Scripts/Displays/TEDAC/TEDAC_init.lua but I can't get that to work either. 

 

EDIT:

Ahhhhhhhhh, it's because I still had LEFT_MFCD and RIGHT_MFCD defined in my monitor config. Looks like the CPG displays draw to the default LEFT_MFCD and RIGHT_MFCD in addition to whatever viewport they are assigned in ViewportHandeling. Removing those entries, and leaving only the 4 customized viewports for the Apache, gives me 4 unique view screens now. 

 

It's not good to remove LEFT_MFCD and RIGHT_MFCD from monitor.cfg because it affects other aircraft that use these, ie the A10C, Hornet etc...

If you do this then we need to change monitor config every time we switch aircraft... so far I've got all the modules working with a single monitor config EXCEPT the Apache unfortunately 😞 Hopefully ED patches it to have separate viewport names.

 

Regarding the TADS - it will export, I have put it on my Center LCD screen:

1. Edit the file E:\DCS World OpenBeta\Mods\aircraft\AH-64D\Cockpit\Scripts\Displays\TEDAC\TEDAC_init.lua

2. Add these two lines to the end of the file:

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("AH64_TEDAC")

3. Add an entry in your monitorconfig to read from the AH64_TEDAC viewport.

 

ISSUE - once doing this the in-game TEDAC will have a sort of double-vision ghosting 😞

Maybe someone who knows the LUA can figure out how to prevent the added viewport from messing up the in-game view?

image.png

Pimax Crystal VR & Simpit User | Ryzen CPU & Nvidia RTX GPU | Some of my mods

Link to comment
Share on other sites

2 minutes ago, DanDegen said:

It's not good to remove LEFT_MFCD and RIGHT_MFCD from monitor.cfg because it affects other aircraft that use these, ie the A10C, Hornet etc...

No

 

  Please watch the video I linked that you can apply to everything that concerns the apache.  The correct paths were also posted  🙂

 

 

If I am later again at the PC I will give again a more detailed answer should it not have settled by then already

Link to comment
Share on other sites

2 minutes ago, DanDegen said:

It's not good to remove LEFT_MFCD and RIGHT_MFCD from monitor.cfg because it affects other aircraft that use these, ie the A10C, Hornet etc...

If you do this then we need to change monitor config every time we switch aircraft... so far I've got all the modules working with a single monitor config EXCEPT the Apache unfortunately 😞 Hopefully ED patches it to have separate viewport names.

Yes. It's a problem. Right now the AH-64 seems to be exporting the CPG displays to LEFT_MFCD and RIGHT_MFCD regardless of what other viewports are defined in their init.lua files - in fact it exports to both if you enter new view port names. I assume deleting / commenting out the default view ports is a temporary fix until this can get sorted out and patched by ED, hopefully soon. 

Link to comment
Share on other sites

13 minutes ago, Hobel said:

No

 

  Please watch the video I linked that you can apply to everything that concerns the apache.  The correct paths were also posted  🙂

 

 

If I am later again at the PC I will give again a more detailed answer should it not have settled by then already

The video is not applicable to that issue though, because in the video they left the LEFT_MFCD and RIGHT_MFCD in the file. Also the video just shows the basic process of setting this up, which is very easy to do anyway. File paths are not an issue either as we're all using the same paths.

My issue was if we remove the default MFCD: I don't want to remove the default MFCDs from the MonitorConfig (same as the video, leaving them there is best) because I want to keep a single configuration for all aircraft.

What @Bunny Clark found though was that unless you remove them from the MonitorConfig, the CPG screens overwrite the pilot screens (and I verified it).

Your original post doesn't show your monitorConfig, so I'm not sure if it includes the default LEFT_MFCDs or not, I'm hoping it does so that you can share the solution... but I fear you maybe setup a separate config for the apache.

Happy to be proven wrong (actually HOPING I'll be proven wrong) to fix this, but I feel it was just a miscommunication.

 

  

11 minutes ago, Bunny Clark said:

Yes. It's a problem. Right now the AH-64 seems to be exporting the CPG displays to LEFT_MFCD and RIGHT_MFCD regardless of what other viewports are defined in their init.lua files - in fact it exports to both if you enter new view port names. I assume deleting / commenting out the default view ports is a temporary fix until this can get sorted out and patched by ED, hopefully soon. 

Yeah I've done a "find in files" for the whole module folder hierarchy and it seems there's no extra calls to try_find_assigned_viewport, except I did find some in the _LCD indicators for the MFDs but commenting these out didn't fix the issue. In fact I commented out EVERY single reference to the MFCD viewports and the CPG viewports are STILL exported lol. I reckon it might be in a dll or some other hidden code, unless there's another lua method besides the try_find_assigned_viewport that we don't know about.

 


Edited by DanDegen

Pimax Crystal VR & Simpit User | Ryzen CPU & Nvidia RTX GPU | Some of my mods

Link to comment
Share on other sites

32 minutes ago, DanDegen said:

My issue was if we remove the default MFCD: I don't want to remove the default MFCDs from the MonitorConfig (same as the video, leaving them there is best) because I want to keep a single configuration for all aircraft.

Then please look more closely.


I use a single file for all aircraft as they also wish 🙂

Link to comment
Share on other sites

47 minutes ago, Hobel said:

Then please look more closely.

Have been looking VERY closely 🙂 The MonitorConfig in the video is the same format as me (default LEFT_MFCD at the top, custom at the bottom of each section). So far everything matches.. and you haven't posted your MonitorConfig, please share.

Setting the indicator exports for pilot with the names in your post #2 doesn't prevent the default CPG RIGHT_MFCD from overwriting them.

ACTUALLY - I have an idea. Looking at your post #2 I can see that you listed the CPG first, and the Pilot second. This wouldn't reproduce the issue of being overwritten because you wouldn't notice the pilot getting overwritten because it is in a new location (and CPG overwriting itself is a non-issue). Try and switch them around, see if you can get the Pilot MFD to go in the same position as your Hornet LEFT_MFCD would go. That should highlight the issue we are having.

I don't have a choice of putting the CPG first unfortunately because I only have one left and right LCD, so I can only export the pilot.. and it has to be the same location as the default LEFT_MFCD because it's used for the Hornet and others.


Edited by DanDegen

Pimax Crystal VR & Simpit User | Ryzen CPU & Nvidia RTX GPU | Some of my mods

Link to comment
Share on other sites

There are actually 9 files that define something with reference to left_mfcd and right_mfcd.

There's the files already mentioned in the indicator folder, and then these are somewhat repeated in the LCD folder inside the indicator folder.

I did rename them all but it didn't swap the displays per seat, but I didn't try 4 different positions.

Link to comment
Share on other sites

4 minutes ago, jonsky7 said:

There are actually 9 files that define something with reference to left_mfcd and right_mfcd.

There's the files already mentioned in the indicator folder, and then these are somewhat repeated in the LCD folder inside the indicator folder.

I did rename them all but it didn't swap the displays per seat, but I didn't try 4 different positions.

Moving the Pilot MFDs to a new position will work, which is why @Hobel is able to work I believe.

Those of us that are limited to one default location are stuck..

Pimax Crystal VR & Simpit User | Ryzen CPU & Nvidia RTX GPU | Some of my mods

Link to comment
Share on other sites

3 minutes ago, DanDegen said:

Moving the Pilot MFDs to a new position will work, which is why @Hobel is able to work I believe.

Those of us that are limited to one default location are stuck..

I thought that might help with leaving left_mfcd and right_mfcd defined in your monitor config.

Not at the pc right now. But bunny mentioned above that even renaming the displays and having 4 positions he was having duplicate cfg displays.

 

I need to try changing the names in the 8 files to see if we can leave the left_right_mfcd defined in monitor config file.

  • Like 1
Link to comment
Share on other sites

40 minutes ago, jonsky7 said:

I need to try changing the names in the 8 files to see if we can leave the left_right_mfcd defined in monitor config file.

Good call, but renaming the viewport in MPD_LCD_Cpg_Left.lua and MPD_LCD_Cpg_Right.lua didn't allow me to export the pilot MFDs to LEFT_MFCD and RIGHT_MFCD. 

I can't find any more files with viewport references, did I miss something? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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