Dummies Guide For The "MonitorSetup - Lua"1.0.2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Dummies Guide for the MonitorSetup.

lua
and placing/positioning different view-ports 1.0.1

1.
2.

Overview

The Monitor Setup Lua file


2.1 The Center View-port
2.2 The MFCD View-ports

3. The MFCD View-ports at a second monitor


3.1 Two Monitors with same resolution
3.2 Two Monitors with different resolution
4. Link-list for known bugs and the workarounds

PeterP
http://forums.eagle.ru/member.php?u=59989

28/05/2012

1. Overview
To keep it simple at the beginning, we will start with a Singel-Monitor setting to place
the default available view-ports.
For the A-10C = Right/Left MFCD
For the Ka-50 = Abris/Shkval
Later on in this document we will head to examples using more than one monitor and
view-ports of non-default available avionic displays similar like this:

But first lets talk about the basics.


Let's assume you just installed DCS and after a little familiarization you may realize that
it would be nice to have the MFCDs/Abris/Shkval or whatever a little bigger and always
visible on your screen while inside the cockpit, similar to the Hud Only View
[Alt+F1]....

So what do you need to know to get this on your cockpit view?...


You probably have noticed that the Options>System screen has a setting called
Monitors and a pres-set of different setting you can choose from the drop-down menu.

Lets have a closer look at this:

One important notice ahead:


Dont let you fool of the misleading naming Monitors.
DCS knows nothing about how many monitors you have attached
DCS only orientates on your overall in-game resolution and divides this space to
position the outputs on it.
And I will from now on only talk about view-ports instead of monitors.
As you can see there are at default seven different settings. I show you now how some
of them look when using a 1024x768 in-game resolution with the [F1] cockpit view (your
appearance my vary on different resolution/aspect-ratio especially this royal-blue
sky bug when using aspects smaller than 1 for a single camera-view-port just ignore
this for the moment):
1 Screen

3 Screen

Camera + LMFCD(on right side)

MFCD

So we see that it is possible to let the MFCDs always be visible, but this is not quit what
we are looking for remember: we want to have the R/L MFCD on our screen always
visible , but keeping the cockpit at the greatest possible size.
So let's have a look what the documentation (and I'm sure you already read it!!!) says
abut it:
e.g. A-10 GUI Manual , page 16:

That's all nothing more...


But this is a very meaningful sentence:

To customize these configurations or create your own new configurations, navigate to


\Config\MonitorSetup. Each configuration is defined by a separate lua file.
So it should be possible for us to reach our goal like in this picture below.
Our Goal and first practice:

2.The Monitor Setup Lua file


Some preparation:
Before we start to edit our own Monitor Setup Lua I want you to make some
preparation and download a proper file-editor.
Do this to get a pleasing graphical output that will help you to have always a overview
and to prevent corrupting this file.
Because every single line/point or comma is important for a proper function, and doing
only the slightest mistake can make this file useless.
The Windows-Onboard tool Notepad is not sufficient for this.
I highly recommend to use Notepad++. All what follows is done with this editor.
Quote from the website:

Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor
and Notepad replacement that supports several languages. Running in the MS
Windows environment, its use is governed by GPL License.
Download : http://notepad-plus-plus.org/
Now install it! ready?! good!
Lets navigate to the \Eagle Dynamics\DCS World\Config\MonitorSetup
folder.
The folder looks by default like this:

This looks familiar to what you see when opening the monitors drop-down menu in
DCS.

Here are some fundamentals that you need to know when editing a
MonitorSetup.lua
All values can be negative/positive.
X coordinate expressions are always drawn from left to right
and
Y coordinate expressions are always drawn from top to bottom
They can be written as number or as expression or even as mathematical abstraction.
When a expression is used like screen.height it equals always the same value that is
set in your
C:\Users\>your user name<\Saved Games\DCS\Config\Options.lua
The Options.lua < This file stores all your In-game setting
So when you use 1024x768 as in-game resolution,
screen.width is 1024 pixels,
screen.height is 768 pixels,
screen.aspect is 1,333333333333333 ( because 1024/768 = 4/3 = 1,333333333333333)
mathematical functions that can be used:
+ = plus
- = minus
* = multiply
/ = divide
That means that you can write
1024
or
screen.height + (screen.width / 4 )
when using 1024x768 as in-game resolution.
Because: 768 + ( 1024 / 4 ) = 1024
another example:
you can write
screen.aspect or
4/3 or
1024 / 768
OK?!
So please read this above again to fully understand This will be important later on.

2.1

The Center View-port

Now lets have a look at the 1.Camera.lua and I already edited and add explanations
(in Green) what every value does.
Open it simultaneously also in your Notpad++ and edit it exactly like I.
So you can practice a little and you will also have some hints in it. You will use this file
for further editing/practice of your own setting.

Now save this file after you have edited it like I have in the picture above, as
My Practice.lua in the \Eagle Dynamics\DCS World\Config\MonitorSetup folder.
Make sure you don't overwrite your 1Camera.lua !!!
We will use this file to add more functions later on.
For our first practice will re-size the center view-port to 800x600 and move it inside the
in-game resolution to the bottom right corner,
while the in-game Simulation screen stays at 1024x768.
So please set your in-game resolution to 1024x768
(windowed or full-screen. What works best for you)
Now open your My Practice.lua with Notepad++ and do this edits:
1.
2.
3.
4.
5.

x = 1024 - 800;
y = 768 - 600;
width = 800;
height = 600;
aspect = 800 / 600;

This will look like this:

Now save this file and start DCS.


Select My setting in Monitors and set the resolution to 1024x768. - When you now
start a mission it should look like this:

WOW!
You now learned how to move/re-size a view-port! Congrats!
Now lets add the MFCDs!

2.2

The MFCD View-ports

Now we open the the LMFCD+Camera+RMFCD.lua and My Practice.lua to edit it


entirely.
You will notice that this LMFCD+Camera+RMFCD.lua has additional View-port entries.
These are LEFT_MFCD = and RIGHT_MFCD =
(Note: Change this to Shkval = and ABRIS = when you using the Ka-50 to get a better
overview)
They use a shorter syntax as the are only 2D.
x = 0;
y = 0;
width = screen.width / 3;
height = screen.height;
This file uses some mathematical expressions so it will work on every monitor setting.
We will do similar to get the Left/Right MFCD in 300x300px in the lower corners.
Lets first reset your My Practice.lua and copy'n'paste everything bellow line 17 from
the LMFCD+Camera+RMFCD.lua to your My Practice.lua (dont forget the
UIMainView = Viewports.Center line)
Now edit the LEFT_MFCD like this:
x = 0;
y = screen.height -300;
width = 300;
height = 300;
and the RIGHT_MFCD to that:
x = screen.width -300;
y = screen.height -300;
width = 300;
height = 300;
Please pay special attention to the X/Y expression. And remember what you already
learned
than you will realize that we sure could also use
y = 768 -300; or simply y= 468;
but by writing
y = screen.height -300;
we make sure that they will always at the bottom-line of your used in-game resolution.
Whatever this is...

So the file will look like this:

Now save this file and start DCS. (Double-check for a missing semicolon !)
Select My setting in Monitors and set the resolution to 1024x768. - When you now
start a mission it should look like this:

3. The MFCD View-ports at a second monitor.


Things to remember:
DCS knows nothing about how many monitors you have attached DCS only
orientates on your overall in-game resolution and divides this space to position the
outputs on, no matter if it is full-screen or windowed.
So it is very imported how you set up your monitors in the windows properties!

A ideal setup has always the same vertical resolution on all monitors. As DCS
renders always a square. So the goal is to configure a in-game resolution
that is exactly matching your combined resolution of your both monitors.
3.1 Two Monitors with same resolution
Lets start by setting up our monitors:
Good:

Bad:

In the example above I have two monitors each 1024x768.


So in the good setting we have to set DCS to 2048x768 to cover the whole space on the
two monitors.
And in the bad setting we need four times as much 2048x1440 to get both screens
covered by DCS !!!
off course we will use the Good setting. - the goal is to use always the smallest
possible resolution.

It also always advisable to sett your left monitor as MainScreen


As sometimes windows are not properly spawned across the whole Desktop if the
left/up corner of your main-screen is not at the X-0/Y-0 position of your entire desktop.
And if you can enable NVIDIA-Sorround or Eyefinity you should off course do this than
you will be able to use the Full-screen setting and have a overall better performance.
When you can't you have to use windowed (or SoftTH see the link lists) .
So lets assume you have everything set up correctly so you can use 2048x768.
DCS will usually only schow you the possible resolution of your main-screen - so
2048x768 will not show up in the in-game drop-down menu. - if this is the case :
A) type in 2048x768 manually and press OK
if this is however not possible...
B) use this instruction: http://forums.eagle.ru/showthread.php?t=87104

Now we can use all newly learned and to edit our MY Practice.lua to let it work with
the Two monitors.
We will edit a setting like this:

And I did made two versions that will appear the same on a 2048x768 resolution.
But the second one will work for every set-up that uses two monitor of the same size
side by side.
Please compare them to realize how it is done.

Using only Pixel values:

Using only mathematical expressions:

Now you should have enough knowledge to position the view-ports everywhere you
want. !!!
And it is almost the same for a Triple-head set-up.
Now we take a look at different sized Monitors.
I will also introduce a new view-port that is dedicated to the Simulation GUI, that is
showing the Briefing screen, Multi-player GUI, rearm-menu and so on.
So keep on reading! - and dont miss the link list with important workarounds for known
problems/bugs when using more than one screen.

3.1

Two Monitors with different resolution

It is basically the same as before, but now we must ask our-self first how to place them,
because using monitors that are not equal in height will always come with some
problems.
Lets have a look again at the desktop properties we assume that we have two screens.
One (the main-screen) is 1280x1024 and the second is 1024x768.

A:

Perfect conditions
The second screen in Portrait. Use almost the same method like for the
two screen setup in 3.1, the in-game resolution would be 2048x1024.

B:

Good conditions
We will not be able to see parts of the right bottom-line
So we will not be able to see the whole info-bar in the out-side views see the
Red space.

C:

Bad conditions
We will have heavy problems with the communication menu and the Map-view to
use all buttons/options see the Red space.

For all problems that I mentioned above are workarounds via some file edits available,
but some of them are quite complex so I will not explain them here . You will check the
link-list at the end how to fix them.
Lets do a edit for example B. And this time we will use the Ka-50.
But all what is shown works almost the same for the A-10C.

We have again to calculate the whole in-game resolution.


Of this two screens side by side 1280x1024+1024x768 .
It also always advisable to sett your left monitor as MainScreen
As sometimes windows are not properly spawned across the whole Desktop if the
left/up corner of your main-screen is not at the X-0/Y-0 position of your entire desktop.
You have to use windowed (or SoftTH see the link lists) .
So lets assume you have everything set up correctly so you can use 2304x1024.
DCS will usually only present you the possible resolution of your main-screen - so
2304x1024 will not show up in the in-game drop-down menu. - if this is the case :
A) type in 2304x1024 manually and press OK
if this is however not possible...
B) use this instruction: http://forums.eagle.ru/showthread.php?t=87104
We want that it will look like this:

In the following code I have also inserted a new View-port


Its the GUI
I edited the bottom line in such a way that it also points to this view-port.
So the Simulation-GUI will only spawn at the right monitor.

4. Link-list for known bugs and the workarounds


Here is a list of forum postings to help you out with the most common problems you may
encounter when using more than one screen and editing the MonitorSetup.lua
Triple-head/Multi-Monitor GUI and NVG Fix
a must read for you
How to move the status bar?
instruction to move the Info-bar in DCS 1.1.2.1
A Plea for View-Export/Multi-head/TH Users.
various workarounds for some known bugs. Just follow the links.
Fix: adding a custom resolution to in-game options.
enabling Cockpit Exports in DCS-A10

This pre-sets will switch on the export of avionics to dedicated view-ports - just
by simple copy'n'paste. One of the pre-sets will also only disable the in-cockpit
MFCDs for better performance.

SoftTH NEWS
a in-sight overview about SofTH. SoftTH is donation-ware and let you do what the
big GPU company's don't allow you to do or only at high costs.
SoftTh let you render every monitor combination at High FPS in full-screen mode.
You can even Mix SoftTH with AMD-Eyefinity and/or TH2GO,NVIDIA-Surround !
Especially interesting for DCS. -SoftTH let you use full-screen Mode If you export
MDFS/ABRIS ect. on additional screens . You are not forced to use Windowed
mode any more.
Even Helios is working with DCS in Fullscreen on all secondary heads.
And Yes , it will gain your performance!
Multi-monitor set-up guide & help (unofficial)
Please post your question(s) in this thread above if you having problems that you
can't solve by using this guide. Many helping folks visit this thread and will sure
help you too!
Thanks for reading I hope I could help you to enjoy DCS even more!
See you in the forums! :)
>>> http://forums.eagle.ru/index.php
PeterP
http://forums.eagle.ru/member.php?u=59989
28/05/2012

You might also like