jonsky7 Posted September 18, 2021 Share Posted September 18, 2021 I like to move my exported displays around depending on the aircraft I'm in. So since they removed the ability to change names of the MFDs in order to do that, we need a new way to do it. I found this in the default config file for the 3 monitor setup --[[ also you can use "displays" table to perfectly match you configuration . it is generated by DCS automatically. displays table is contains information about all currently attached displays for example my setup is : displays = { [1] = { x = 0, -- note : x == 0 and y == 0 is always mark primary windows display y = 0, width = 1920, height = 1200 }, [2] = { x = -1440, -- mark that secondary display is on left side of primary display y = 0, width = 1440, height = 900 }, ... for all displays } screen table also contain x, y members which mark top left corner of DCS window note about fullscreen : directx doesn't allow fullscreen applications with resolutions more than primary display can handle, so multimonitor presets in DCS will fall back to windowed mode if fullscreen initialization failed ( this info also will be printed to dcs.log) for reconfigure viewports setup for each unit type independently you can declare here function function reconfigure_for_unit(unit_type) --unit type is string with unit name if unit_type == "A-10C" then Viewports = ... define new Viewports table -- also you can define cockpit displays viewports here RIGHT_MFCD = ... define new RIGHT_MFCD viewport else Viewports = ... define default for others RIGHT_MFCD = nil -- remove for others end end --]] I'd like to use the reconfigure for unit type part and came up with this _ = function(p) return p; end; name = _('Jordiecam'); Description = 'Jordie'; function reconfigure_for_unit(unit_type) --unit type is string with unit name if unit_type == "A-10C" then Viewports = { Center = { x = 0; y = 0; width = 2560; height = 1440; viewDx = 0; viewDy = 0; aspect = 2560/1440; } } LEFT_MFCD = { x = 4490; y = 360; width = 825; height = 825; } RIGHT_MFCD = { x = 5570; y = 360; width = 825; height = 825; } else Viewports = { Center = { x = 0; y = 0; width = 2560; height = 1440; viewDx = 0; viewDy = 0; aspect = 2560/1440; } } LEFT_MFCD = { x = 4090; y = 360; width = 825; height = 825; } RIGHT_MFCD = { x = 5170; y = 360; width = 825; height = 825; } end end UIMainView = Viewports.Center But it isn't even showing up as a selectable config. I'm obviously doing something wrong. Does anybody know how it works please? Link to comment Share on other sites More sharing options...
Gumbie Posted September 18, 2021 Share Posted September 18, 2021 this is how mine is set up depends on size of each monitor but you know this I use 34 inch center then I have my two MFD, I also have 27 inch monitors off the sides but those are not added into the screen size because I use them for my apps and things. _ = function(p) return p; end; name = _('CUBESIM'); Description = 'Left MFCD on the left monitor,Right MFCD on the right and camera on the center' Viewports = { Center = { x = 1600; y = 0; width = 2560; height = 1080; viewDx = 0; viewDy = 0; aspect = 2560 / 1080; } } LEFT_MFCD = { x = 80; y = 0; width = 600; height = 600; } RIGHT_MFCD = { x = 880; y = 0; width = 600; height = 600; } F14_HSD = { x = 80; y = 0; width = 600; height = 600; } F14_VDI = { x = 880; y = 0; width = 600; height = 600; } UIMainView = Viewports.Center GU_MAIN_VIEWPORT = Viewports.Center Hope this helps you out this is how it should look depending on screen sizes as you can see here I do have the Cube Sim screens This is a standard setup with one center monitor and then your MFD's screens but well work with any setup as long as you change the center monitor size to the correct width and length for the monitor or monitors your are using. Link to comment Share on other sites More sharing options...
dartagnan Posted November 12, 2021 Share Posted November 12, 2021 Hello Gumbie my VIZIO tv monitor has a resolution of 1920 x 1080 and is 42" The LUA file CubeSim sent me makes DCS disapere from my screen I can here the music but no picture all 3 of my cubesim screens just show my desktop. I contacted them about all he said was but my main monitor to the right in the display settings. That didn't work. I also explained to him that I use the STEAM version of DCS he tell me download a stable version of DCS. Anyway I was looking at your LUA file and mine has a CENTER_MFCD before the F14_HSD. I think my file is wrong please will you take a look at it? CUBESIM.lua _ = function(p) return p; end; name = _('CUBESIM'); Description = 'Left MFCD on the left monitor,Right MFCD on the right and camera on the center' Viewports = { Center = { x = 2400; y = 0; width = 1920; height = 1080; viewDx = 0; viewDy = 0; aspect = 1920 / 1080; } } LEFT_MFCD = { x = 80; y = 0; width = 600; height = 600; } RIGHT_MFCD = { x = 880; y = 0; width = 600; height = 600; } CENTER_MFCD = { x = 1680; y = 0; width = 600; height = 600; } F14_HSD = { x = 80; y = 0; width = 600; height = 600; } F14_VDI = { x = 1680; y = 0; width = 600; height = 600; } UIMainView = Viewports.Center GU_MAIN_VIEWPORT = Viewports.Center Thank You Link to comment Share on other sites More sharing options...
jonsky7 Posted November 14, 2021 Author Share Posted November 14, 2021 (edited) @dartagnan Check out this guide Edited November 14, 2021 by jonsky7 Link to comment Share on other sites More sharing options...
Gumbie Posted November 29, 2021 Share Posted November 29, 2021 For some reason it seems like you might need to reset the graphic settings where you saved graphic settings needs to be deleted and then you reset the display settings again after re launching the game. I have noticed a weird bug that does happen if you do not have your MFD's screens on when launching the game the game might not be on the screen at all but you can hear the music and sounds or it could be any where on any screen or number of screens at once, this could have happened your MFD's could have been disconnected and the issue you are having would happen and continue to happen. An I would advise switching to DCS Download and not use Steam Version I don't see why anyone would want the steam client running in background just my opinion, we already have other programs running like Track Ir, TacView, Voice attack, Viacom, hell many other apps that are used with DCS. Make sure you delete the saved Graphic settings yes you will have to set them up again, and make sure that your MFD's screens are Plugged in and being picked up by windows display settings or you will be repeating this process, seems to be a weird bug when splitting the display to multiple monitors maybe one day they will fix the display settings to have a setting for MFD's, Touch screens, and Multiple Monitors. Link to comment Share on other sites More sharing options...
Bailey Posted November 30, 2021 Share Posted November 30, 2021 (edited) On 9/18/2021 at 9:31 PM, jonsky7 said: I like to move my exported displays around depending on the aircraft I'm in. So since they removed the ability to change names of the MFDs in order to do that, we need a new way to do it. I found this in the default config file for the 3 monitor setup --[[ also you can use "displays" table to perfectly match you configuration . it is generated by DCS automatically. displays table is contains information about all currently attached displays for example my setup is : displays = { [1] = { x = 0, -- note : x == 0 and y == 0 is always mark primary windows display y = 0, width = 1920, height = 1200 }, [2] = { x = -1440, -- mark that secondary display is on left side of primary display y = 0, width = 1440, height = 900 }, ... for all displays } screen table also contain x, y members which mark top left corner of DCS window note about fullscreen : directx doesn't allow fullscreen applications with resolutions more than primary display can handle, so multimonitor presets in DCS will fall back to windowed mode if fullscreen initialization failed ( this info also will be printed to dcs.log) for reconfigure viewports setup for each unit type independently you can declare here function function reconfigure_for_unit(unit_type) --unit type is string with unit name if unit_type == "A-10C" then Viewports = ... define new Viewports table -- also you can define cockpit displays viewports here RIGHT_MFCD = ... define new RIGHT_MFCD viewport else Viewports = ... define default for others RIGHT_MFCD = nil -- remove for others end end --]] I'd like to use the reconfigure for unit type part and came up with this _ = function(p) return p; end; name = _('Jordiecam'); Description = 'Jordie'; function reconfigure_for_unit(unit_type) --unit type is string with unit name if unit_type == "A-10C" then Viewports = { Center = { x = 0; y = 0; width = 2560; height = 1440; viewDx = 0; viewDy = 0; aspect = 2560/1440; } } LEFT_MFCD = { x = 4490; y = 360; width = 825; height = 825; } RIGHT_MFCD = { x = 5570; y = 360; width = 825; height = 825; } else Viewports = { Center = { x = 0; y = 0; width = 2560; height = 1440; viewDx = 0; viewDy = 0; aspect = 2560/1440; } } LEFT_MFCD = { x = 4090; y = 360; width = 825; height = 825; } RIGHT_MFCD = { x = 5170; y = 360; width = 825; height = 825; } end end UIMainView = Viewports.Center But it isn't even showing up as a selectable config. I'm obviously doing something wrong. Does anybody know how it works please? I don't think function reconfigure_for_unit(unit_type) has worked for a really long time. I have tried for a while today without a good result. Edited November 30, 2021 by Bailey 1 DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays Link to comment Share on other sites More sharing options...
okopanja Posted November 30, 2021 Share Posted November 30, 2021 10 minutes ago, Bailey said: function reconfigure_for_unit(unit_type) I did research this 3 weeks ago: it does not work anymore. What you can do is the following: define display size with prefix, e.g. F16_LEFT_MFCD. Then you go into the lua files of modules and find the one containing> try_....(LEFT_MFCD) and turn it into try_(F16_LEFT_MFCD) ( I will update this to be more precise later). Note each module has different files for this, sometimes you have to edit multiple files (F-16), sometimes just one (Ka-50)! It will work fine, but on next module update say good buy to the modifications in module files (this is actually not hard to update, since your size definitions remain unchanged). Link to comment Share on other sites More sharing options...
okopanja Posted December 1, 2021 Share Posted December 1, 2021 First of all, I could not find the original post, but here is the more precise hint: Such files usually have init.lua in the filename. More importantly they have this inside: try_find_assigned_viewport("ABRIS","RIGHT_MFCD") you need to turn this to: try_find_assigned_viewport("ABRIS","KA50_RIGHT_MFCD") and later use KA50_RIGHT_MFCD to define the structure inside your export.lua file. Now with each update DCS will overwrite those files! (except export.lue which is what matters). When they overwrite they create a special backup folder, which you can use later to merge the files. I would suggest using some visual diff, e.g. https://winmerge.org/ Link to comment Share on other sites More sharing options...
jonsky7 Posted December 2, 2021 Author Share Posted December 2, 2021 Thanks for the suggestions everyone, I posted this when the new Integrity Checks came into force and you couldn't change any of the files. As that has now been reversed, I'm all good again. Changing the display names of each export is exactly what I do to have them where I want them for each aircraft. On 12/1/2021 at 1:52 PM, okopanja said: First of all, I could not find the original post, but here is the more precise hint: Such files usually have init.lua in the filename. More importantly they have this inside: try_find_assigned_viewport("ABRIS","RIGHT_MFCD") you need to turn this to: try_find_assigned_viewport("ABRIS","KA50_RIGHT_MFCD") and later use KA50_RIGHT_MFCD to define the structure inside your export.lua file. Now with each update DCS will overwrite those files! (except export.lue which is what matters). When they overwrite they create a special backup folder, which you can use later to merge the files. I would suggest using some visual diff, e.g. https://winmerge.org/ If there is two names in the line like the below try_find_assigned_viewport("ABRIS","RIGHT_MFCD") It searches for the first name first in your monitor config file, if it doesn't find it it reverts to the second name. In this case ABRIS is first, RIGHT_MFCD is second. So instead of modifying the file, you can simply define ABRIS in your monitor config file. 1 Link to comment Share on other sites More sharing options...
okopanja Posted December 2, 2021 Share Posted December 2, 2021 I will test, check and confirm, my assumption is that ABRIS was for the original "viewport" within the cockpit, so I did not even try that. Link to comment Share on other sites More sharing options...
okopanja Posted December 2, 2021 Share Posted December 2, 2021 Confirmed. I think it makes sense to collect the names of displays and group them together with information on their true aspect (and ideally physical size). Link to comment Share on other sites More sharing options...
jonsky7 Posted December 2, 2021 Author Share Posted December 2, 2021 59 minutes ago, okopanja said: I will test, check and confirm, my assumption is that ABRIS was for the original "viewport" within the cockpit, so I did not even try that. Not all of the exportable "viewports" have two names in them. I've only seen a few with two names. Link to comment Share on other sites More sharing options...
okopanja Posted December 2, 2021 Share Posted December 2, 2021 (edited) 8 minutes ago, jonsky7 said: Not all of the exportable "viewports" have two names in them. I've only seen a few with two names. I can try to document for the modules I own: FC3, Mig-21, Ka-50, F-16C. IMHO: table should contain: Aircraft Display name Primary lua name Secondary lua name Aspect Physical dimensions Possible example with easy to modify snippet that can be easily pasted and adjusted to the specific configuration In fact, we can generate the complete template file with easy to modify parameters of the displays and perhaps so automatically calculated mapping of these named lua structures. I need to think how this can be done. Edited December 2, 2021 by okopanja 1 Link to comment Share on other sites More sharing options...
okopanja Posted December 2, 2021 Share Posted December 2, 2021 Does anybody know if the DCS populate any variable containing: - configured display size (as in the Options menu) - geometry of monitors as configured in windows? (perhaps we can call a make DLL/EXE call to determine this?) Note I personally did try negative values for x and y, coordinates relative to the primary display and that did not work for me ( I have read advice that this is possible). Link to comment Share on other sites More sharing options...
jonsky7 Posted December 4, 2021 Author Share Posted December 4, 2021 On 12/2/2021 at 6:49 PM, okopanja said: Note I personally did try negative values for x and y, coordinates relative to the primary display and that did not work for me ( I have read advice that this is possible). I havent done much testing myself to confirm this, but from my experience and from comments I've read: in the past DCS would use the top left of your primary display as x=0 y=0, when I started doing this you could not have negative values, so I placed my secondary monitors to the right of my primary display. It is my understanding that as of now, DCS will use the top left of the total resolution, independent of where your primary display is. I've based this on nothing more than forum posts. So now negative values aren't used but rather a positive offset will be used for the cockpit/gui display. So if you want any kind of multiple monitor setup, and have a secondary monitor to the left of your main display with say a third on the right, it's very difficult to use that secondary display for other apps like Web browsing etc. As while you can tell DCS to display the cockpit view on the main display using the config file, DCS will black out the display on the left and it will still be the "on top" application. Link to comment Share on other sites More sharing options...
Bailey Posted December 4, 2021 Share Posted December 4, 2021 You can use any values you want, negative or positive. Bad info in, bad info out. The only limitation is how you have logically set it up. With the limit being you can easily put a display off screen if you aren’t familiar with how things work. DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays Link to comment Share on other sites More sharing options...
okopanja Posted December 4, 2021 Share Posted December 4, 2021 4 hours ago, Bailey said: You can use any values you want, negative or positive. Bad info in, bad info out. The only limitation is how you have logically set it up. With the limit being you can easily put a display off screen if you aren’t familiar with how things work. The way I see it although negative can be accepted, it is kind of useless. Also by playing around with monitor setup, I found that the lua namespace is devoid of ant other modules. E.g. you can not use extarnal utlity to figure out real screen geometry. The best you have is the screen variable. Not sure if there is any other variable defined? Link to comment Share on other sites More sharing options...
Bailey Posted December 6, 2021 Share Posted December 6, 2021 On 12/4/2021 at 6:45 PM, okopanja said: The way I see it although negative can be accepted, it is kind of useless. Also by playing around with monitor setup, I found that the lua namespace is devoid of ant other modules. E.g. you can not use extarnal utlity to figure out real screen geometry. The best you have is the screen variable. Not sure if there is any other variable defined? You can define your own variables. You can also look in other default monitor luas to see some code they left laying around and examples too. Some modules also have example monitor Lua code like the Jf17. DCS VoiceAttack Profiles | My Mods and Utilities on ED User Files | DiCE: DCS Integrated Countermeasure Editor DCS Update Witching Utility | DCS-ExportScripts for Stream Deck Community Github Library | Kiowa Integrated Overlays Link to comment Share on other sites More sharing options...
Recommended Posts