Jump to content

(1) single “MonitorSetup.lua” for ALL Modules


Recommended Posts

I am using Helios, and I have (2) separate “MonitorSetup.lua” files I can successfully use for the F-18 & the KA-50. Like most others, I would like to combine them into (1) common “MonitorSetup.lua” file.

 

 

As I have read, the “ reconfigure_for_unit(unit_type)” no longer works.

The work around for that (as I have read) is to change the “NAMES” of the Export via its “init.lua” file, so as you don’t have multiple entries within your “MonitorSetup.lua” such as (2) or more “LEFT_MFCD” (because this wont work).

 

So I have been struggling now to get this to work. I have created a single monitor config that incorporates the F-18 & KA-50.

In the KA-50 init.lua file for the Shkval (for 1 example), I changed the name to “SHKVAL”. I also call this out in the “MonitorSetup.lua”

To make this change work, I leave the default init.lua’s alone in DCS’s Programs folder, and I have created the file structure with the EDITED init.lua file and enable it via OVGME.

It wont work? The SHKVAL appears to show up in the same location as the F-18 Left MFCD would show up? I am missing something here?

 

 

Here are the lines withing the “Shkval init.lua”

 

 

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

 

------------------------ added by Fakum

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

try_find_assigned_viewport("SHKVAL")

------------------------ end of added by Fakum

 

indicator_type = indicator_types.COMMON

used_render_mask = LockOn_Options.script_path.."../IndicationTextures/SHKVAL_MASK.bmp"

render_target_always = LockOn_Options.flight.easy_radar

 

purposes = {render_purpose.GENERAL}

____________________________________________________

 

Here is my “MonitorSetup.lua”

 

 

_ = function(p) return p; end;

name = _('Fakum All Helios V1');

Description = '38" Top Main, 23" Bottom Touch Screen for ALL Modules'

 

--TOTAL DEL VIEWPORT

Viewports =

{

Center =

{

x = 0;

y = 0;

width = 3840;

height = 1600;

viewDx = 0;

viewDy = 0;

aspect = 2.4;

}

}

 

-- ########

-- ## F-18

-- ########

 

--LEFT

LEFT_MFCD =

{

x = 282;

y = 1798;

width = 389;

height = 375;

}

 

--RIGHT

RIGHT_MFCD =

{

x = 1261;

y = 1798;

width = 389;

height = 375;

}

 

 

-- RWR

F18_RWR =

{

x = 1494;

y = 2320;

width = 182;

height = 182;

}

 

 

 

--AMPCD

CENTER_MFCD =

{

x = 775;

y = 2290;

width = 370;

height = 354;

}

 

--IFEI

F18_IFEI =

{

x = 151;

y = 2356;

width = 530;

height = 200;

}

 

 

--UFC

F18_UFC =

{

x = 738;

y = 1630;

width = 462;

height = 262;

}

 

 

-- ########

-- ## KA-50

-- ########

 

--SHKVAL

SHKVAL =

{

x = 722;

y = 1850;

width = 505;

height = 316;

}

 

 

 

--ABRIS

ABRIS =

{

x = 1284;

y = 1977;

width = 418;

height = 536;

}

 

 

 

UIMainView = Viewports.Center

_____________________________________________________

 

Here is the file structure on my OVGME

1818357121_FileStructure.png.4a9e53bb6d5fc5583afd659fe54f617f.png


Edited by Fakum

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

It is now working!!!! After several more hours of experimenting, I found out that no mater what name I changed the “SHKVAL” init,lua file name to, it didn’t work.

 

 

I eventually opened up the MonitorSetup.lua file again, and changed the name of “SHKVAL” to ”Shkval” Yeah, that’s all that was needed.

 

 

 

I got rid of the modified “SHKVAL” init.lua file (with the added lines and name changes) that I was enabling via OVGME and it all still works! I don’t even need to edit any init.lua files to be able to get rid of the (2) Left_MFCD names in the MonitorSetup.lua. All I had to freakin do is rename the KA-50 Left_MFCD to “Shkval” and NOT” SHKVAL” in the MonitorSetup.lua. And BINGO, no more conflict between the F-18 Left_MFCD and the KA-50 SHKVAL!

 

 

After all of my hours of searching, I don’t recall ever seeing any mention of this?

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

Maybe it's a 'reserved' name. And as I didn't see an error in your configs I could not jump in.

 

I renamed all viewports locally as <module>_<viewport>

Like "Ka50_Shkval".

So there wasn't even a tiny chance to see the problem you had, as your syntax was OK.

 

Glad you solved it.

Link to comment
Share on other sites

Are you saying you named them "Ka50_Shkval" in your MonitorSetup.lua or your init.lua?

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

Ok, so yesterday I found out that it didnt matter what name I tried in the init.lua file, as long as the MonitorSetup.lua had the "SHKVAL" name in all capital letters, no name worked in the init.lua file.

 

 

Once I changed the name in the MonitorSetup.lua to all lower case "Shkval", it worked fine, and thats when I also found out you dont even have to edit the names in the init.lua

 

 

So for at least the KA-50, no init.lua file editing is required.

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

  • 2 weeks later...

I, too, am fiddling around with my Monitor setup files and whenever I thought I found a solution it did turn out to not work anymore.

 

I wanted to have one Monitor setup for all my planes, but since the function reconfigure_for_unit is not working anymore, I started to modify the _init.lua Files for the A-10Cs MFCDs and the KA-50 Shkval and Abris. I still did not get it working.

 

Even if I changed the LEFT_MFCD in the A10Cs mfcd_init.lua to lmfcd or garbage or something else stupid, it made no difference and the left / right MFCDs of the A-10 could still be exported with the keywords LEFT_MFCD and RIGHT_MFCD. It is as if the name in the try_find_assigned_viewport section is not used at all.

 

In the end, I too changed nothing in the LUAs and for the KA-50 I just used "Shkval" and "Abris", which makes them exporting just fine.

 

I have no idea where these names come from and why they are case sensitive. I just fear that I will not be able to export any other displays if someone else is not finding how to type them properly. This us super frustrating.

 

We had great solutions in the past with EMC / Easy Monitor Configurator which stopped working and other good solutions with the reconfigure_for_units function, which is also not working anymore and then with renaming the instruments in the _init.lua files which is also not working anymore :cry:

Link to comment
Share on other sites

Both of them.

I designed a single MonitorSetup.lua with distinct names for the viewports and put them in every needed init.lua.

 

Would you mind posting a sample of one of the init files and your monitor file? No matter what I type into my init.lua files, it neither breaks anything nor makes it work like I want to. It is like DCS is not reading the files at all.

Link to comment
Share on other sites

Would you mind posting a sample of one of the init files and your monitor file? No matter what I type into my init.lua files, it neither breaks anything nor makes it work like I want to. It is like DCS is not reading the files at all.

 

Hi buedi,

 

sure... attached: my monitorconfig.lua

Not rocket science in there. I think you'll get the idea...

 

Don't forget to rename the vewports in the corresponding lua-files of the instruments!

Use OVGME as a modmanager for re-applying the mofified files after each update.

All_Modules_WQHD.lua

Link to comment
Share on other sites

Thank you very much RightStuff! This helps a lot :thumbup:

 

Thanks also for mentioning OVGME. I came across this on the Hoggit Wiki this morning and installed it already. This will make life much easier after updats rush in for DCS :)

Link to comment
Share on other sites

...I have no idea where these names come from and why they are case sensitive. I just fear that I will not be able to export any other displays if someone else is not finding how to type them properly. This us super frustrating.

I did a Search/Find in files using Notepad++, using "try_find_assigned_viewport" as search string. Here is what I got back:

 

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\A-10C\Cockpit\Scripts\MFCD\indicator\BAKE\init.lua (2 hits)

Line 15: try_find_assigned_viewport("LEFT_MFCD")

Line 18: try_find_assigned_viewport("RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\A-10C\Cockpit\Scripts\MFCD\indicator\MFCD_init.lua (2 hits)

Line 22: try_find_assigned_viewport("LEFT_MFCD")

Line 24: try_find_assigned_viewport("RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\AV8BNA\Cockpit\MPCD\indicator\MPCDL_init.lua (1 hit)

Line 4: --try_find_assigned_viewport("LEFT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\AV8BNA\Cockpit\MPCD\indicator\MPCDR_init.lua (1 hit)

Line 4: --try_find_assigned_viewport("RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\AV8BNA\Cockpit\MPCD\indicator\MPCD_init.lua (2 hits)

Line 13: try_find_assigned_viewport("RIGHT_MFCD")

Line 15: try_find_assigned_viewport("LEFT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Cockpit\Scripts\Displays\EHSI\indicator\EHSI_init.lua (1 hit)

Line 48: try_find_assigned_viewport("EHSI")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Cockpit\Scripts\Displays\EHSI\indicator\LCD\EHSI_LCD.lua (1 hit)

Line 14: try_find_assigned_viewport("EHSI")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Cockpit\Scripts\Displays\MFD\indicator\LCD\MFD_LCD.lua (2 hits)

Line 19: try_find_assigned_viewport("LEFT_MFCD")

Line 21: try_find_assigned_viewport("RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Cockpit\Scripts\Displays\MFD\indicator\MFD_left_init.lua (1 hit)

Line 40: try_find_assigned_viewport("LEFT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Cockpit\Scripts\Displays\MFD\indicator\MFD_right_init.lua (1 hit)

Line 41: try_find_assigned_viewport("RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-5E\Cockpit\Scripts\AN_APQ159\indicator\AN_APQ159_init.lua (1 hit)

Line 23: try_find_assigned_viewport("RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Cockpit\Scripts\Multipurpose_Display_Group\AMPCD\indicator\AMPCD_init.lua (1 hit)

Line 63: try_find_assigned_viewport("CENTER_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Cockpit\Scripts\Multipurpose_Display_Group\MDI_IP1556A\indicator\MDI_left_init.lua (1 hit)

Line 24: try_find_assigned_viewport("LEFT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Cockpit\Scripts\Multipurpose_Display_Group\MDI_IP1556A\indicator\MDI_right_init.lua (1 hit)

Line 24: try_find_assigned_viewport("RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Cockpit\Scripts\TEWS\indicator\RWR_ALR67_init.lua (1 hit)

Line 15: try_find_assigned_viewport("F18_RWR")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\Ka-50\Cockpit\Scripts\ABRIS\BAKE\init.lua (1 hit)

Line 12: try_find_assigned_viewport("ABRIS","RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\Ka-50\Cockpit\Scripts\SHKVAL\BAKE\init.lua (1 hit)

Line 13: try_find_assigned_viewport("Shkval","LEFT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\M-2000C\Cockpit\VTB\VTB_init.lua (1 hit)

Line 41: try_find_assigned_viewport("RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\MIG-21bis\Cockpit\RADAR\Indicator\init.lua (1 hit)

Line 24: try_find_assigned_viewport("RP22","RIGHT_MFCD")

K:\Eagle Dynamics\DCS World OpenBeta\Scripts\Aircrafts\_Common\Cockpit\ViewportHandling.lua (1 hit)

Line 89: function try_find_assigned_viewport(exactly_name,abstract_name)

Note: the line showing "F18_RWR" is the result of me editing that file. I can still not display the RWR on my secondary monitor. Just black where it should show.

 

 

Edit: I have now managed to display the IFEI on my secondary monitor after adding these lines to the ini file:

------------------------ added by HWF
dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("F18_IFEI")
------------------------ end of added by HWF

but I can still not display the RWR at all although I have added these lines to its ini file:

------------------------ added by Capt Zeen
dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("F18_RWR")
------------------------ end of added by Capt Zeen


Edited by LeCuvier

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

Thank you very much RightStuff! This helps a lot :thumbup:

 

Thanks also for mentioning OVGME. I came across this on the Hoggit Wiki this morning and installed it already. This will make life much easier after updats rush in for DCS :)

 

You're welcome.

 

And now:

FInd attached my OVGME-Patchfile for Helios.

 

Together with my monitorconfig.lua you're almost ready to go.

You just need to reposition the viewports for your monitor.

 

Good luck!

HELIOS Profiles cleaned.zip


Edited by RightStuff
Archive cleaned
Link to comment
Share on other sites

Edit: I have now managed to display the IFEI on my secondary monitor after adding these lines to the ini file:

[...] but I can still not display the RWR at all although I have added these lines to its ini file:

------------------------ added by Capt Zeen
dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("F18_RWR")
------------------------ end of added by Capt Zeen

 

That way it should work!

 

What's the corresponding part in your monitorconfig.lua?

Maybe a naming problem?

Link to comment
Share on other sites

That way it should work!

 

What's the corresponding part in your monitorconfig.lua?

Maybe a naming problem?

I got it to work, but I don't like what I get. I will used the exported MFD to display the RWR screen.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • 3 weeks later...

Hi, i would like to do the same.

However i don't understand a thing. It is clear to me how to do the all in one file.

But reading the first post i understood that there is also something else to change some init but don't understand how and where.

I am new to the touchscreen stuff just followed instructions in captzeen txt so don't know how it works behind the scenes. But i would like to customize so i will be able to use my aircraft without changing the dcs config every time.

Thanks for help

🖥️ R7-5800X3D 64GB RTX-4090 LG-38GN950  🥽   🕹️ VPForce Rhino FFB, Virpil F-14 (VFX) Grip, F-15EX Throttle, Winwing Orion (Skywalker) Pedals, Razer Tartarus V2 💺SpeedMaster Flight Seat, JetSeat

CVW-17_Profile_Background_VF-103.png

Link to comment
Share on other sites

Hi buedi,

 

sure... attached: my monitorconfig.lua

Not rocket science in there. I think you'll get the idea...

 

Don't forget to rename the vewports in the corresponding lua-files of the instruments!

Use OVGME as a modmanager for re-applying the mofified files after each update.

 

This is what i need. I have different aircraft but i understand the concept

But i am missing the second piece...would you please share the changed init file or maybe help me find out how to do?

 

Thanks so much

🖥️ R7-5800X3D 64GB RTX-4090 LG-38GN950  🥽   🕹️ VPForce Rhino FFB, Virpil F-14 (VFX) Grip, F-15EX Throttle, Winwing Orion (Skywalker) Pedals, Razer Tartarus V2 💺SpeedMaster Flight Seat, JetSeat

CVW-17_Profile_Background_VF-103.png

Link to comment
Share on other sites

You're welcome.

 

And now:

FInd attached my OVGME-Patchfile for Helios.

 

Together with my monitorconfig.lua you're almost ready to go.

You just need to reposition the viewports for your monitor.

 

Good luck!

 

OK i think i have almost all my answers.

Did not read through all the thread.

Now i just have to understand how to add the f16 and f14 to the mix.

you guys are awesome

🖥️ R7-5800X3D 64GB RTX-4090 LG-38GN950  🥽   🕹️ VPForce Rhino FFB, Virpil F-14 (VFX) Grip, F-15EX Throttle, Winwing Orion (Skywalker) Pedals, Razer Tartarus V2 💺SpeedMaster Flight Seat, JetSeat

CVW-17_Profile_Background_VF-103.png

Link to comment
Share on other sites

You're welcome.

 

And now:

FInd attached my OVGME-Patchfile for Helios.

 

Together with my monitorconfig.lua you're almost ready to go.

You just need to reposition the viewports for your monitor.

 

Good luck!

 

Sorry trying to work on the files i have another question.

I see you used f18_Left_MFD (and the same with center and right) in the monitor.lua but i cannot see any modification for the mfd in the archive.

About the A10 for example i can cleary see your modifications.

Did you miss some file in the archive?

THe most probably thing is obviously that i didn't understand how this stuff works :)

🖥️ R7-5800X3D 64GB RTX-4090 LG-38GN950  🥽   🕹️ VPForce Rhino FFB, Virpil F-14 (VFX) Grip, F-15EX Throttle, Winwing Orion (Skywalker) Pedals, Razer Tartarus V2 💺SpeedMaster Flight Seat, JetSeat

CVW-17_Profile_Background_VF-103.png

Link to comment
Share on other sites

I tried digging in dcs file and found the solution for the hornet and the viper. Thanks anyway also if noone replied.

Should someone need help feel free to drop me a PM.

Bye

🖥️ R7-5800X3D 64GB RTX-4090 LG-38GN950  🥽   🕹️ VPForce Rhino FFB, Virpil F-14 (VFX) Grip, F-15EX Throttle, Winwing Orion (Skywalker) Pedals, Razer Tartarus V2 💺SpeedMaster Flight Seat, JetSeat

CVW-17_Profile_Background_VF-103.png

Link to comment
Share on other sites

  • Recently Browsing   0 members

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