Jump to content

[How to] Export displays like RWR and CMSP set-up guide - Jan 2021


jonsky7

Recommended Posts

Hi

 

I know this is covered previously, but that topic is over 10 years old and I think there is a simpler way of doing it now. I'm sure this is covered elsewhere but for the sake of visibility I'm posting here too. 

 

For displays, like the RWR you can simply add these two lines to the bottom of the xxxxx_init.lua of the display you're trying to export, where xxxxx is the display/instrument name.

At least it works for all of the displays I've tried.

 

For example, the A-10C RWR

 

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

 

located

%%%/DCS World/Mods/Aircraft/A-10C/Cockpit/Scripts/AN_ALR69V/indicator/AN_ALR69V_init.lua

 

you can change the name in brackets, eg ("A10C_RWR"), to anything you like, be sure to include the quotation marks inside the brackets.

 

BE AWARE, that any files located in the main DCS directory/folder, will be overwritten every update, use a mod manager like OVGME or JSGME

Also, during updates, the content of these files can be changed. If after reinstalling mods after an update, things are broken, compare the original file to your modded one and look for changes.

 

If you want to, you can use the same name for multiple aircraft if you want that display to always be in same place

ie, if you edit the A10C RWR, and the F16 RWR file, calling them both something like try_find_assigned_viewport("RWR")

then you would only need one entry in your monitor config file, described below

 

 

Edit your monitor config file to look for the name you gave it, give it position and dimensions just like the MFCDs.

 

Just make sure the last line of your monitor config file is UIMainView = Viewports.Center

 

example

 

A10C_RWR =
{
x = 2561;
y = 880;
width = 520;
height = 520;
}

 

I've added the file so you can compare with the original

AN_ALR69V_init.lua


Edited by jonsky7
  • Thanks 1
Link to comment
Share on other sites

  • jonsky7 changed the title to [How to] Export displays like RWR and CMSP set-up guide - Jan 2021
  • 4 months later...
  • 2 weeks later...

Thank you

  • Thanks 1

Mac Pro 5,1 (Early 2009) - 2 x 2.26 GHz Quad-Core Intel Xeon - 48 GB RAM - Radeon RX 590

Mac OS X 10.15 - Bootcamp - Windows 10 - 2 x SSD 1TB - T16000M HOTAS - DCS World & Open Beta - Operator still a newbie

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...
29 minutes ago, dlder said:

Do you know of any way to do the same thing for FC3 planes? Like the F-15C for example, which doesn't show the TEWS or MPCD on either the right or center MFD. Only the VSD is displayed on the "LEFT_MFCD"

You can do this wit Flanker (Su-27 and Su-33 only!) and F-15C by installing a Helios 1.4, but likely you need a second monitor, or create your own profile.

Overview of the steps(read instructions):

1. download and helios 1.4 (1.6 is for newer!) https://github.com/BlueFinBima/Helios14

2. download the profile and install it according to instructions: http://www.captzeen.com/helios/su-33.asp    http://www.captzeen.com/helios/F-15C.asp (read installation instructions carefully !!!)

3. edit the profile with helios editor, so it fits your monitor configuration

5. start the helios

6. load the profile

7. run DCS

I opted to import lua file instead of dumping everything into export.lua

E.g. I did:

local Heliosflanker=require('lfs');dofile(Heliosflanker.writedir()..'Scripts/Su27HeliosExport.lua')

Link to comment
Share on other sites

1 hour ago, dlder said:

ty!

Do you know of any way to do the same thing for FC3 planes? Like the F-15C for example, which doesn't show the TEWS or MPCD on either the right or center MFD. Only the VSD is displayed on the "LEFT_MFCD"

thx!

Sorry, I do not know of any way to do this within DCS.

Using Notepad++ to search for EVERY instance of LEFT_MFCD doesn't show any files relating the FC3 planes. So I assume their files are buried in some non-editable code somewhere. 

Link to comment
Share on other sites

3 hours ago, jonsky7 said:

Using Notepad++ to search for EVERY instance of LEFT_MFCD doesn't show any files relating the FC3 planes. So I assume their files are buried in some non-editable code somewhere. 

There is no such file, it is hardcoded as far I know. FC3 is legacy format...

For both Flanker and F-15 I managed to export only one (one uses LEFT_MFCD, other RIGHT_MFCD). (that is if I do not go Helios way, which is like recrated UI feed through export via network.

 

Link to comment
Share on other sites

On 12/7/2021 at 8:43 AM, okopanja said:

You can do this wit Flanker (Su-27 and Su-33 only!) and F-15C by installing a Helios 1.4, but likely you need a second monitor, or create your own profile.

Overview of the steps(read instructions):

1. download and helios 1.4 (1.6 is for newer!) https://github.com/BlueFinBima/Helios14

2. download the profile and install it according to instructions: http://www.captzeen.com/helios/su-33.asp    http://www.captzeen.com/helios/F-15C.asp (read installation instructions carefully !!!)

3. edit the profile with helios editor, so it fits your monitor configuration

5. start the helios

6. load the profile

7. run DCS

I opted to import lua file instead of dumping everything into export.lua

E.g. I did:

local Heliosflanker=require('lfs');dofile(Heliosflanker.writedir()..'Scripts/Su27HeliosExport.lua')

No matter what I try, only the "LEFT_MFD" is displayed (as that is a DCS rendered viewport). Helios & CZ won't show the other 2 displays

Link to comment
Share on other sites

  • 1 month later...

hi,

in my case when i export ehsi come´s a white screen. Without any symbol´s.

What is wrong?
 

_  = function(p) return p; end;
name = _('LMFCD+Camera+RMFCD');
Description = 'Left MFCD on the left monitor,Right MFCD on the right and camera on the center'
Viewports =
{
     Center =
     {
          x = 0;
          y = 0;
          width = 5120;
          height = 1440;
          viewDx = 0;
          viewDy = 0;
          aspect = 5120 / 1440;
     }
}

LEFT_MFCD =
{
     x = 1700;
     y = 1450;
     width = 480;
     height = 480;
}

RIGHT_MFCD =
{
     x = 2820;
     y = 1450;
     width = 480;
     height = 480;
}

F16_EHSI =
{
     x = 2220;
     y = 2010;
     width = 480;
     height = 480;
}

UIMainView = Viewports.Center
GU_MAIN_VIEWPORT = Viewports.Center

 

And here the EHSI_PAGE_INIT.lua :
 

--
local count = 0
local function counter()
    count = count + 1
    return count


end

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
update_screenspace_diplacement(1, true, 0)
try_find_assigned_viewport("F16_EHSI")


-- list of subsets
count = -1
local id_subset =
{
    BASE    = counter(),
    FAIL    = counter(),
    MAIN    = counter(),
}


local EHSI_PagesPath = LockOn_Options.script_path.."Displays/EHSI/indicator/Pages/"

-- construct subsets
page_subsets = {}
page_subsets[id_subset.BASE]                = EHSI_PagesPath.."EHSI_Page_base.lua"
page_subsets[id_subset.FAIL]                = EHSI_PagesPath.."EHSI_Page_FAIL.lua"
page_subsets[id_subset.MAIN]                = EHSI_PagesPath.."EHSI_Page_MAIN.lua"


-- list of pages
count = -1
id_Page =
{
    OFF        = counter(),
    FAIL    = counter(),
    MAIN    = counter(),
}

init_pageID    = id_Page.OFF

-- construct pages
pages = {}
pages[id_Page.OFF]                    = {}
pages[id_Page.FAIL]                    = {id_subset.BASE, id_subset.FAIL}
pages[id_Page.MAIN]                    = {id_subset.BASE, id_subset.MAIN}


--
local function tablelen(T)
    local count = 0
    for _ in pairs(T) do count = count + 1 end
    return count


end


EHSI_DISP_FMT_LEV1 =
{
    OFF        = 0,
    FAIL    = 1,
    MAIN    = 2,
}

EHSI_DISP_FMT_LEV2 = { NONE = 0 }
EHSI_DISP_FMT_LEV3 = { NONE = 0 }
EHSI_DISP_FMT_LEV4 = { NONE = 0 }


pages_by_mode = {}
clear_mode_table(pages_by_mode, tablelen(EHSI_DISP_FMT_LEV1), tablelen(EHSI_DISP_FMT_LEV2), tablelen(EHSI_DISP_FMT_LEV3), tablelen(EHSI_DISP_FMT_LEV4))

--
pages_by_mode[EHSI_DISP_FMT_LEV1.OFF]    [EHSI_DISP_FMT_LEV2.NONE][EHSI_DISP_FMT_LEV3.NONE][EHSI_DISP_FMT_LEV4.NONE]    = id_Page.OFF
pages_by_mode[EHSI_DISP_FMT_LEV1.FAIL]    [EHSI_DISP_FMT_LEV2.NONE][EHSI_DISP_FMT_LEV3.NONE][EHSI_DISP_FMT_LEV4.NONE]    = id_Page.FAIL
pages_by_mode[EHSI_DISP_FMT_LEV1.MAIN]    [EHSI_DISP_FMT_LEV2.NONE][EHSI_DISP_FMT_LEV3.NONE][EHSI_DISP_FMT_LEV4.NONE]    = id_Page.MAIN

--
function get_page_by_mode(master, L2, L3, L4)
    return get_page_by_mode_global(pages_by_mode, init_pageID, master, L2, L3, L4)


end

Thanks.


Edited by 33rd_Elvis

Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 |

Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria

System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD

Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S

Link to comment
Share on other sites

6 hours ago, 33rd_Elvis said:

hi,

in my case when i export ehsi come´s a white screen. Without any symbol´s.

What is wrong?

 

You've got the wrong viewport name and lua file. The F-16's EHSI actually has built-in support for exporting unlike most other module secondary displays, so you don't even need to edit the display script. But for reference, the correct script for that is EHSI_init.lua not EHSI_Pages_init.lua. 

The default viewport is just "EHSI" - plug that into your displays config and it should work. 

  • Like 1
Link to comment
Share on other sites

thank you,

it is working.🤗

  • Like 1

Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 |

Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria

System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD

Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S

Link to comment
Share on other sites

  • 3 weeks later...
On 12/9/2021 at 7:54 AM, dlder said:

No matter what I try, only the "LEFT_MFD" is displayed (as that is a DCS rendered viewport). Helios & CZ won't show the other 2 displays

Did you ever figure this out?

This guide should help you out, if not you can DM me and I'll do what I can to help, just set it up myself last night

https://forums.eagle.ru/topic/258724-how-to-multi-monitor-mfcd-display-export-set-up-guide-jan-2021/


Edited by menace
Link to comment
Share on other sites

  • 10 months later...
  • 2 months later...
  • 3 months later...

I can’t seem to be able to export the M2K RWR to the left screen of my Winwing MIP for some reason.  I have edited all the lua files necessary but still no joy. 

EDIT: It turns out that I just realized I don't even have an RWR folder in the Cockpit directory of the M2000C.  Is it supposed to be there and what files does it contain beside the RWR_Init.lua?

 

EDIT2: Nevermind, I found out that the RWR folder has been changed to VCM and the VCM_screen_init.lua is the file that needs to be modified.


Edited by AstroEma
  • Thanks 1

Kaby Lake @ 4.6Ghz - Gigabyte Z170-D3H - 16Gb DDR4 - Gigabyte GTX 1080 G1 OC - Samsung EVO 250Gb SSD - Seagate 1 Tb HDD - HTC Vive - Rift CV1

Link to comment
Share on other sites

  • 2 months later...
On 2/13/2022 at 5:34 AM, Bunny Clark said:

You've got the wrong viewport name and lua file. The F-16's EHSI actually has built-in support for exporting unlike most other module secondary displays, so you don't even need to edit the display script. But for reference, the correct script for that is EHSI_init.lua not EHSI_Pages_init.lua. 

The default viewport is just "EHSI" - plug that into your displays config and it should work. 

Hi,

 I’m trying to export my EHSI as well, without any luck. 
i have my MFDs on separate 800x480 8” displays, and my EHSI on a much smaller (2.5”?) display also 800x480.

 My MFDs work fine, but my EHSI doesn’t show up. I edited my display config file in the saved games folder to state “EHSI”, followed by position and size. I assumed an EHSI size of 480, and recalculated the x position accordingly. It shows complete black.

 Do I need to name it “EHSI” or “F_16_EHSI” as indicated by @idenwen?

 How can I find out if it’s location is within visual range? (Other than trial and error)

Link to comment
Share on other sites

vor 2 Stunden schrieb BaronVonVaderham:

 Do I need to name it “EHSI” or “F_16_EHSI” as indicated by @idenwen?

EHSI

vor 2 Stunden schrieb BaronVonVaderham:

How can I find out if it’s location is within visual range?

show me your monitor layout


Edited by Hobel
Link to comment
Share on other sites

13 hours ago, Hobel said:

EHSI

show me your monitor layout

 

Attached are images showing my monitor setup, as well as my monitor setup lua. 
 

1= center 3840x2160

4= LEFT_MFCD 1280x800

3= RIGHT_MFCD 1280x800

2= EHSI 800x480

you can ignore the MFDL/R entries. Those are meant for the T-45, and is a different topic (also issues).

I tried drawing it out on paper to make sure I didn’t make a calculation mistake, but the x and y values are correct. 
as mentioned the display of the EHSI works fine in windows. 
Someone told me I also have to edit the EHSI_init.lua , but from this thread I got the impression that was not necessary. 
I’m going to attempt Helios add my next step. 

IMG_1486.jpeg

IMG_1488.jpeg

Link to comment
Share on other sites

So it took an plunge and installed Helios.

Somehow I managed to get the EHSI to show up. Unfortunately I don’t know if this is because I used the right name for the EHSI, or because Helios patched some DCS files. In case of the latter I hope that doesn’t violate the Integrity Checks, or I’ll be back at square one.

Link to comment
Share on other sites

  • 1 month later...

Question: Helios is failing integrity checks so I’m back to basic export. 
where can I find the name of the devices (viewports) that can be exported?

I can find a devices.lua, which quotes MFD_LEFT/RIGHT, but my export.lua works (or used to anyway) when I use the name LEFT/RIGHT_MFCD. Soo United they changed the name of the MFDs, the devices.lua does not specify it. 
The devices _init.lua states MFD_LEFT/RIGHT, and RMFD/LMFD.

 The MFD_left/right_init.lua mentions LMFD/RMFD, LEFT/RIGHT_MFCD

 So I’m a bit lost…

surely someone must know which file will specify the device bashes that can be used for exportable viewports?

i don’t want an answer that says “this is the name”, I want to learn how to fish, to use a biblical expression. This way I can find out with each update if I have to adjust my export for or not, and how, without having to ask here yet again.


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

vor 5 Minuten schrieb BaronVonVaderham:

Question: Helios is failing integrity checks so I’m back to basic export. 
where can I find the name of the devices (viewports) that can be exported?

I can find a devices.lua, which quotes MFD_LEFT/RIGHT, but my export.lua works (or used to anyway) when I use the name LEFT/RIGHT_MFCD. Soo United they changed the name of the MFDs, the devices.lua does not specify it. 
The devices _init.lua states MFD_LEFT/RIGHT, and RMFD/LMFD.

 The MFD_left/right_init.lua mentions LMFD/RMFD, LEFT/RIGHT_MFCD

 So I’m a bit lost…

surely someone must know which file will specify the device bashes that can be used for exportable viewports?

i don’t want an answer that says “this is the name”, I want to learn how to fish, to use a biblical expression. This way I can find out with each update if I have to adjust my export for or not, and how, without having to ask here yet again.

 

Sorry I forgot, I'll answer you again tomorrow, I know how to do it.

  • Like 1
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...