Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#3664545 - 10/17/12 04:15 PM DCS Dual Monitor setup, need help with lua script please  
Joined: Jan 2009
Posts: 2,474
Biggles07 Offline
Member
Biggles07  Offline
Member

Joined: Jan 2009
Posts: 2,474
Newcastle Upon Tyne, England.
Greets all. Ok, decided to get off my arse and try out a dual monitor setup, with an old "Targa Visionary" 19' 1280x1024 LCD monitor gathering dust for many years, and my 'main' Samsung T240 SyncMaster 24' 1920x1200 screen. got them connected late last night but I'm having trouble. Please bear in mind this is the first time I have ever tried to setup two monitors together, I know nothing about scripts or programming, and I don't know WTF I am doing lol. smile

The 19' Targa is positioned to the direct 'lower' left, both physically and virtually in the Windows 7 'screen resolution' setup screen. I have set the option to make the left 19' 1280x1024 as my 'main display'.

What I want is to have the Left MFCD in DCS A10C on the entire 19' 1280x1024 monitor to the left (including the surrounding OSB Buttons if possible) and I want this to be static (IE no movement with TrackIR), with my entire pit on the 1920x1200 screen as it would normally be with single screen, as per usual.

Now, I read this guide @ED forums and it has just confused me more lol http://forums.eagle.ru/showthread.php?t=60815

I've managed to make a 'lua file' with 'Notepad++' (that's an impressive achievement, for me hehe) and named it, then plonked it in the Monitor setup folder. I based it on the 'Camera+LMFCD.lua' stock option. Confirm it shows up as an option, 'Samsung+Targa.lua'. I have also set my left monitor as 'main display' in the Windows 7 Control Panel 'Screen Resolution' options. When I press 'Identify', the 24' monitor is numbered '1', with the 19' to the left '2'. Here is a 'copy paste' of it.

_ = function(p) return p; end;
name = _('Samsung+Targa.lua');
Description = 'Samsung Cockpit-Targa One Left MFCD';
Viewports =
{
Center =
{
x = 0;
y = 0;
width = 1920;
height = 1200;
viewDx = 0;
viewDy = 0;
aspect = 1.6;
}
}

LEFT_MFCD =
{
x = 1280;
y = 1024;
width = 1280;
height = 1024;
}

UIMainView = Viewports.Center


'Function', 'return' and 'end' are blue, numbers entered are orange (just my bold for emphasis on forum). I know for a fact the LEFT MFCD values are completely wrong and should not be as so lol, its just to check if the structure is right for having the 'Left MFCD' on the 19' 1280x1024, or other things I am doing wrong. Can you please tell me what numbers I should have in for the setup I want?

I looked at MadTommys 'my example.lua' example in 'step 2' but they are both widescreen 1680x1050 monitors (with right and left MFCDS on the physical monitor to the right), and I do not know how he gets the y numbers '105' (though I suspect its maybe the 'virtual position' of the monitor in Windows setup when you move it?) as well as the x width coordinates. He has both MFCDS on one monitor, and has 1680 (the normal width of his monitor)coordinate in the LEFT_MFCD = section, but in the RIGHT_MFCD = 2520. Both widths combined (4200) add up to more than the combined width of the two 1680 monitors (3360), which is confusing me dizzy (easily done in my case hahaha )

I know it is required to add the combined width and use the highest monitor height (x1200 in my case). I have chose that option in DCS (3200x1200), as well as the automatically calculated aspect ratio, and also disabled full screen in DCS options as directed.

So, to recap I'd like the entire Left MFCD on the physically and virtually left 19' 1280x1024 (static, with surrounding OSB's and unaffected by TrackIR), and my whole pit as per usual on the 24' 1920x1200 to its right.

Any help is greatly appreciated, and thanks kindly. smile just had an hour and a half and was too tired to try any more last night, I will give it another go this evening. From what I have seen though potential wise, I have been daft to wait so long to do it.....It will make life a lot easier instead of squinting at zoomed MFCDS all the time hehe. Think I will try the same with BS2 once I understand how its done.

Cheers!









"I am fond of pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals".

Sir Winston Churchill
Inline advert (2nd and 3rd post)

#3664603 - 10/17/12 05:47 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: Biggles07]  
Joined: May 2010
Posts: 3,812
JAMF Offline
Frugalite & P-38 fan
JAMF  Offline
Frugalite & P-38 fan
Senior Member

Joined: May 2010
Posts: 3,812
The Netherlands
Originally Posted By: Biggles07
I looked at MadTommys 'my example.lua' example in 'step 2' but they are both widescreen 1680x1050 monitors (with right and left MFCDS on the physical monitor to the right), and I do not know how he gets the y numbers '105' (though I suspect its maybe the 'virtual position' of the monitor in Windows setup when you move it?) as well as the x width coordinates. He has both MFCDS on one monitor, and has 1680 (the normal width of his monitor)coordinate in the LEFT_MFCD = section, but in the RIGHT_MFCD = 2520. Both widths combined (4200) add up to more than the combined width of the two 1680 monitors (3360), which is confusing me dizzy (easily done in my case hahaha )


Click to reveal..


He has both MFDs displayed on the screen, but vertically centred. That's why he shifted the MFDs down his 2nd display by 105 pixels. (105 + 840 + 105 = 1050)

His main screen is 1680 wide, but his "left" MFD is only 840 wide. That makes the starting position of the "right" MFD on the X-axis 1680 + 840 = 2520.

(Actually, I wonder if more precise starting positioning should be 1681 and 2521?)


Originally Posted By: Biggles07
So, to recap I'd like the entire Left MFCD on the physically and virtually left 19' 1280x1024 (static, with surrounding OSB's and unaffected by TrackIR), and my whole pit as per usual on the 24' 1920x1200 to its right.



In your case, the MFD starts on x=0 and y=0, but then the main view hast to start on x=1280 (and y=0)

_ = function(p) return p; end;
name = _('Samsung+Targa.lua');
Description = 'Samsung Cockpit-Targa One Left MFCD';
Viewports =
{
Center =
{
x = 1280;
y = 0;
width = 1920;
height = 1200;
viewDx = 0;
viewDy = 0;
aspect = 1.6;
}
}

LEFT_MFCD =
{
x = 0;
y = 0;
width = 1024;
height = 1024;
}

UIMainView = Viewports.Center


The blue is the starting position on the X-axis for the main view (which might need to be 1281?)

#3664608 - 10/17/12 05:55 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: Biggles07]  
Joined: May 2010
Posts: 3,812
JAMF Offline
Frugalite & P-38 fan
JAMF  Offline
Frugalite & P-38 fan
Senior Member

Joined: May 2010
Posts: 3,812
The Netherlands
Oh, if you want to centre the MFD on the left screen, make the starting position on the Y axis at pixel 128.

1280 - 1024 = 256 (Screen width minus MFD width {when MFD is square, maximum MFD width is the screen height} )
256 / 2 = 128

LEFT_MFCD =
{
x = 128;
y = 0;
width = 1024;
height = 1024;
}

#3664630 - 10/17/12 06:31 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: JAMF]  
Joined: Jan 2009
Posts: 2,474
Biggles07 Offline
Member
Biggles07  Offline
Member

Joined: Jan 2009
Posts: 2,474
Newcastle Upon Tyne, England.
Thank you very much for the explanation JAMF, yer a Star. thumbsup You have explained it very well, and I think I understand it now. I'll grab something to eat and try it later on.

Cheers again mate. cheers


"I am fond of pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals".

Sir Winston Churchill
#3664639 - 10/17/12 06:46 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: Biggles07]  
Joined: May 2009
Posts: 7,033
komemiute Offline
Hell Drummer
komemiute  Offline
Hell Drummer
Hotshot

Joined: May 2009
Posts: 7,033
Can I actually put as well both consoles on my secondary monitor?
Would they be still mouse-clickable?


Click to reveal..
"Himmiherrgottksakramentzefixhallelujah!"
Para_Bellum

"It takes forever +/- 2 weeks for the A-10 to get anywhere significant..."
Ice

"Ha! If it gets him on the deck its a start!"
MigBuster

"What people like and what critics praise are rarely the same thing. 'Critic' is just another one of those unnecessary, overpaid, parasitic jobs that the human race has churned out so that clever slackers won't have to actually get a real job and possibly soil their hands."
Sauron
#3664651 - 10/17/12 07:18 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: Biggles07]  
Joined: May 2010
Posts: 3,812
JAMF Offline
Frugalite & P-38 fan
JAMF  Offline
Frugalite & P-38 fan
Senior Member

Joined: May 2010
Posts: 3,812
The Netherlands
YW Biggles. smile I don't know if it is the right code, but I think that should be correct.

Komemiute, the image above in the spoiler tags shows the example of two MFDs on one screen. In the forum post linked by Gibbles, the last "spoiler" shows code to more than just the two MFDs on the screen. Don't know about clickable. What size screens do you use?

Going from 2 FullHD screens, the code should logically be:

_ = function(p) return p; end;
name = _('Tommy_v3');
Description = 'Two monitor configuration';
Viewports =
{
Center =
{
x = 0;
y = 0;
width = screen.width /2;
height = screen.height;
viewDx = 0;
viewDy = 0;
aspect = 1.6;
}
}
LEFT_MFCD =
{
x = 1920;
y = 0;
width = 960;
height = 960;
}
RIGHT_MFCD =
{
x = 2880;
y = 0;
width = 960;
height = 960;
}
UIMainView = Viewports.Center

#3664655 - 10/17/12 07:33 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: Biggles07]  
Joined: May 2009
Posts: 7,033
komemiute Offline
Hell Drummer
komemiute  Offline
Hell Drummer
Hotshot

Joined: May 2009
Posts: 7,033
Ok my second monitor is 1024 wide for 1280 tall ( a normal 4/3 turned sidewise).

I'll check that thread. biggrin Thanks!


Click to reveal..
"Himmiherrgottksakramentzefixhallelujah!"
Para_Bellum

"It takes forever +/- 2 weeks for the A-10 to get anywhere significant..."
Ice

"Ha! If it gets him on the deck its a start!"
MigBuster

"What people like and what critics praise are rarely the same thing. 'Critic' is just another one of those unnecessary, overpaid, parasitic jobs that the human race has churned out so that clever slackers won't have to actually get a real job and possibly soil their hands."
Sauron
#3664666 - 10/17/12 08:14 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: Biggles07]  
Joined: May 2010
Posts: 3,812
JAMF Offline
Frugalite & P-38 fan
JAMF  Offline
Frugalite & P-38 fan
Senior Member

Joined: May 2010
Posts: 3,812
The Netherlands
}
LEFT_MFCD =
{
x = 1920;
y = 0;
width = 640;
height = 640;
}
RIGHT_MFCD =
{
x = 1920;
y = 640;
width = 640;
height = 640;
}
UIMainView = Viewports.Center

#3664696 - 10/17/12 09:16 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: JAMF]  
Joined: Jan 2009
Posts: 2,474
Biggles07 Offline
Member
Biggles07  Offline
Member

Joined: Jan 2009
Posts: 2,474
Newcastle Upon Tyne, England.
Sorted, JAMF! smile It is centred but 'cropped' a bit either side, but I understand that's because it has be the square it is in the pit and not an oblong or rectangle lol....I remember that much from school heheh. Gives a very good result though, and I'm quite 'wowed' by the novelty factor of it all. yep Map is a cinch to read now, and it really helps with seeing the TAD object symbology, as well as hooked object coordinates and SADL NET info etc in better detail. Squinting at tiny zoomed MFCD's is now a thing of the past! I have no idea why I didn't do this much sooner, would have saved muchos eyestrain. hahaha Couldn't have done it without you JAMF, thanks again. biggrin

I think I understand the formula now so I'll try some other resolutions as I'm taking quite a hefty FPS hit on a GTX580 1.5mb card, (with MFCD's set at 512 in options). Unless I'm mistaken I think I once saw some screenshots where people had set up MFCD's and the MFCD's were blank and missing from the pit itself on their centre screen. Is it possible to do this for the left MFCD in the pit on my 1920 monitor to maybe help framerates, and if so do you know how?



"I am fond of pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals".

Sir Winston Churchill
#3664719 - 10/17/12 09:51 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: Biggles07]  
Joined: May 2010
Posts: 3,812
JAMF Offline
Frugalite & P-38 fan
JAMF  Offline
Frugalite & P-38 fan
Senior Member

Joined: May 2010
Posts: 3,812
The Netherlands
No clue. I was only translating your setup to the code. oops


BTW, you could move the MFD to the left and use the 256pixels for RDR warn.

_ = function(p) return p; end;
name = _('Samsung+Targa.lua');
Description = 'Samsung Cockpit-Targa One Left MFCD';
Viewports =
{
Center =
{
x = 1280;
y = 0;
width = 1920;
height = 1200;
viewDx = 0;
viewDy = 0;
aspect = 1.6;
}
}

LEFT_MFCD =
{
x = 0;
y = 0;
width = 1024;
height = 1024;
}
RWR_SCREEN =
{
x = 1024;
y = 0;
width = 256;
height = 256;
}
UIMainView = Viewports.Center



...or if you want the radar warn at the lower right, change it's Y-value to 1024.

#3664729 - 10/17/12 10:00 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: JAMF]  
Joined: Jan 2009
Posts: 2,474
Biggles07 Offline
Member
Biggles07  Offline
Member

Joined: Jan 2009
Posts: 2,474
Newcastle Upon Tyne, England.
Originally Posted By: JAMF
No clue. I was only translating your setup to the code. oops


BTW, you could move the MFD to the left and use the 256pixels for RDR warn.

_ = function(p) return p; end;
name = _('Samsung+Targa.lua');
Description = 'Samsung Cockpit-Targa One Left MFCD';
Viewports =
{
Center =
{
x = 1280;
y = 0;
width = 1920;
height = 1200;
viewDx = 0;
viewDy = 0;
aspect = 1.6;
}
}

LEFT_MFCD =
{
x = 0;
y = 0;
width = 1024;
height = 1024;
}
RWR_SCREEN =
{
x = 1024;
y = 0;
width = 256;
height = 256;
}
UIMainView = Viewports.Center



...or if you want the radar warn at the lower right, change it's Y-value to 1024.


Interesting! Cheers JAMF I'll give that a try too. thumbsup


"I am fond of pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals".

Sir Winston Churchill
#3666183 - 10/19/12 11:24 PM Re: DCS Dual Monitor setup, need help with lua script please [Re: Biggles07]  
Joined: Aug 2009
Posts: 37
MadTommy Offline
Junior Member
MadTommy  Offline
Junior Member

Joined: Aug 2009
Posts: 37
Glad you got it sussed. smile


Moderated by  Force10, RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Epic flypast for D Day anniversary
by HeinKill. 05/20/19 05:44 PM
Funniest Forgotten Weapons video in a while...
by RSColonel_131st. 05/19/19 09:21 PM
And Now, a Movie About Apollo 8
by F4UDash4. 05/19/19 04:16 PM
Subnautica is amazing and frightening
by VF9_Longbow. 05/19/19 04:28 AM
First Trans Atlantic attempt
by No105_Archie. 05/18/19 02:14 PM
Herman Wouk was 103
by F4UDash4. 05/17/19 04:53 PM
F-16 Crash
by rwatson. 05/17/19 09:33 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0