Configuring Screens and Pulling Data from DCS

Hello there! It has been awhile since my last post. I’ve been super busy in my personal/professional life and have not had much time for DCS or updating this blog. My apologies for that. I’ve been working on this post for quite some time. As you get through it you’ll see why. It’s long, complicated and technical. However, it’s incredibly important to building a SimPit.

But before we touch on that – HOLY SHIT! My friend randomly posted my pit on Reddit and it LITERALLY took off: https://www.reddit.com/r/gaming/comments/an7nth/my_buddys_flight_simulator_rig_he_designed_and/
I made it to the front page of Reddit – so cool!


Looking at the above picture we can see that I have 7 monitors being used.

Alright, I’m going to keep things very specific to my pit. Your mileage may vary based on how your setup is, but the general guidelines are the same. I’m going to try to drip feed information throughout this post and slowly build on these concepts. You’ll see reused images that have slightly more information each time. It’s going to be rough, but understanding the basics makes everything else a lot easier. We are going to focus on monitor configuration within Windows and DCS configuration of the Left, Right DDIs and the AMPCD. I will be referencing IKARUS in this, but will not go into specifics. That will be another post.

But first, you need to download NotePad++, this will allow you to do some simple LUA coding. If you don’t download it… good luck!

Lets start with some basics…

It is important to understand how Windows and other applications view monitors and images. Everything is on an X and Y Axis in terms of pixels. So that 3440×1440 monitor you have literally means you are 3440 pixels wide (0 to 3440 x) and 1440 pixels in height (0 to 1440 y). Up at the top left corner you are at 0,0 (x,y). If you move down you increase your “y” value and right you increase your “x” value.

If I had some application (IDK maybe IKARUS?) where I wanted to generate a dot in a particular place. I would need to figure out how many pixels on the x/y plane I would need to move. In the above example, I needed to place my red dot 100 pixels over to the right (x) and 50 pixels down (y) or 100, 50.

Now if my dot was actually a box and the box was 50×50 pixels in size (x,y) the concept is the same. The box’s size starts at the top left of it’s “image” and moves right and down (x,y). In this case, the box starts at 100, 50 (x,y) and moves to right right 50 pixels and down 50. So in this case it takes up pixels 100-50 on the x-plane and 50-100 on the y-plane. Middle School math – right?

That’s the basics of monitors and pixels…

Now to more complex topics, but it’s all the same.

Remember, back to a previous post; we are running both DCS (in window mode) and IKARUS. DCS will take up the main monitor and some of the screens and IKARUS will take up the remaining space.

DCS has:
– Left DDI
– Right DDI
– AMPCD
– The game (duh)

IKARUS has:
– Lamp indicators below the Left DDI
– Lamp indicators below the Right DDI
– UFC/touchscreen options
– Lower Left Front Console of the Engine Readouts
– Lower Right Front Console of the Gauges

Ref 1.1

The very first thing you will want to do is understand each of your monitors, their orientation and the resolution you will be using. In the above picture (Ref 1.1) I have laid out screens and their resolution in the physical pit.

This is NOT how it will look in Windows. In Windows, it is highly likely, on first start up with all of these plugged in, that they will be lined up from left to right in a horizontal fashion. This is NOT How you want it to be.

Ref 1.2

Instead we want to stack all of our monitors like this (Ref 1.2). Notice their number in the above screenshot (Ref 1.2) and their number in Ref 1.1. This is extremely important for configuration.

Ref 1.3

In Ref 1.3, the way all of this will work is that DCS, running in window mode, will populate all of screen 1 and 4 and a portion of screen 7 and 8. IKARUS will populate a portion of screen 7, 8 and all of 6, 5 and 3.

Ref 1.4

Further, we need to understand the starting corner of each monitor (Ref 1.4). So in the example of #7, my monitor starts at 0 on the x-axis and starts at 1440 on the y-axis. It starts at 1440 on the y-axis because the main monitor (#1) goes from 0-1440. Additionally, #8, starts at 800 on the x-axis, because it is over 800 pixels from the start of #7 and goes down 1440 pixels. Same Concept for #3, starts at 1600 on the x-axis (that is 800+800 of #7 and #8) and still down 1440 on the y-axis because it aligns with the bottom of #1.

Deep breath, easy right?

Let’s get more advanced…

Ref 1.5

To explain this a bit further, because DCS is running in window mode your game will generate black space for the area that is not in your main view and when we export the sensors they will populate in this area (we will get to this further down). In Ref 1.5 this is an actual capture of my DCS game. That is, the Main view and all of the black it generates below and the sensors we’ve exported. This space/sensors extend down to the other monitors. This is why the orientation and where we place them in windows is so important.

Each of those sensors in monitors #7, #8 and #4 have a pixel size (like the square i referred to early on in this lesson. I had to figure out how many pixels down, over and the size of the sensor in order for it to fill up the Thrustmaster MFD Panel. So how did we do that?

LUA EXPORTS!!! WHA?!?!

I’m going to over simplify this next topic, LUA exports. All you need to know is that each sensor has it’s own LUA config file that basically says, “hey if you export me, call me XXXXX” . We refer to that export name and pull it out from DCS, duplicate it and resize it to our needs. So if you navigate to your DCS directory, mine is here:

E:\DCS World OpenBeta\Mods\aircraft\FA-18C\Cockpit\Scripts\Multipurpose_Display_Group\MDI_IP1556A\indicator

You’ll find a bunch of files, use notepad++ to open MDI_left_init.LUA. All the way at the bottom you’ll see this:

–ViewportHandling
dofile(LockOn_Options.common_script_path..”ViewportHandling.lua”)
update_screenspace_diplacement(1, true, 0)
try_find_assigned_viewport(“LEFT_MFCD”)

The portion that says, “LEFT_MFCD” is particularly important for us, as it references the Left DDI that we will need to export. The same can be found in MDI_right_init.LUA and if you navigate to
you will find AMPCD_init.LUA:

E:\DCS World OpenBeta\Mods\aircraft\FA-18C\Cockpit\Scripts\Multipurpose_Display_Group\AMPCD\indicator

Basically it boils down to this:
– L DDI = LEFT_MFCD
– R DDI = RIGHT_MFCD
– AMPCD = CENTER_MFCD


You can actually rename these to anything you want in each of those LUA files. For example you could name the LEFT_MFCD to F18LEFT. You will just need to take note of what you named each one. But often times, on updates to DCS World, these custom names you make get overwritten and you’ll have to go back and rename them each time. I’ve found it much easier just to stick with the stock names.

Now, we need to create a custom monitor configuration file that DCS can access. In E:\DCS World OpenBeta\Config\MonitorSetup
Copy any of the files, rename them to whatever makes sense for you, call it “Practice” if you want. Open it up in Notepad++.

When you open the file, delete its contents and replace it with:

_ = function(p) return p; end;
name = _(‘My setting’);
Description = ‘This is a test’
Viewports =
{
Center =
{
x = 0;
y = 0;
width = 3440;
height = 1440;
viewDx = 0;
viewDy = 0;
aspect = 3440/1440;
}
}
LEFT_MFCD =
{
x = 76;
y = 1465;
width = 650;
height = 650;
}
RIGHT_MFCD =
{
x = 885;
y = 1467;
width = 650;
height = 650;
}
CENTER_MFCD =
{
x = 1625;
y = 1710;
width = 555;
height = 537;
}
UIMainView = Viewports.Center

This is my custom file based on my monitor configuration. But lets take each piece chunk by chunk.

Name =_(‘My setting’)

This is the name DCS will refer to your file in game. If you wanted to call it “DCSEXPORT” go for it. Basically, when you’re in the options screen of DCS you will select this name as a setting (more on this later).

Center =
{
x = 0;
y = 0;
width = 3440;
height = 1440;
viewDx = 0;
viewDy = 0;
aspect = 3440/1440;
}

Center“, is always your actual in-game view in DCS (this is the cockpit). You can see the X,Y value are both 0,0. This indicates that it generates at the top left corner of my windows config (Ref 1.2) . This is what we want, right? Also, remember Ref 1.4, Monitor #1 starts at 0,0.

Width” and “Height“, this is the actual width and height of the image being generated. Because this is our center-in-game view, we want it to span the entire size of our main monitor. In this case, 3440 is the width (x) and 1440 is the height (y). Your aspect is simply your x divided by your y. It’s easiest just to have DCS calculate 3440/1440 (it is literally doing the division).

LEFT_MFCD =
{
x = 76;
y = 1465;
width = 650;
height = 650;
}

LEFT_MFCD references the Left DDI that we talked about above from the file we opened in Notepad++ called MDI_left_init.LUA . It’s basically initializing this viewport to be exported to a different location. The x/y values you see are telling it to move to the right 76 pixels (x) (from 0) and move down 1465 pixels (from 0) . Take note that this is 25 pixels past the 1440 of your main monitor. If you look at the DCS screenshot in Ref 1.5 above you’ll see how this looks.

Just like with Center, above, “Width” and “Height” are the x/y size in pixels of the export. In this case it is 650×650 pixels in size. You could make this 50×50 if you wanted to (but good luck seeing it).

The RIGHT_MFCD and the CENTER_MFCD are configured the exact same way. Set where you want them and the size of the generated export.

The thing to remember is, if you’re not using the same hardware as me and decide to go with differently sized monitors you’ll need to play around with those values. It will not work the first time, it will take lots of tweaking to get them just right, but there is an example all the way at the bottom.

Time to launch DCS

So you’ve configured your L,R DDIs and AMPCD. Launch DCS and immediately go into Settings.

Ref 1.6

In Ref 1.6 you can see a green-box for “monitors”. If you remember editing your LUA monitor file you changed the name of, or kept:

name = _(‘My setting’);

You want to select whatever you named that attribute within the code.

Next you’ll see in a red-box both the Resolution and Aspect Ratio. Aspect Ratio will auto calculate for you. The Resolution would be the TOTAL area DCS would take up. This would include the amount of space from your CENTER, LEFT_MFCD, RIGHT_MFCD, and CENTER_MFCD. How do you calculate this?

The largest screen we have is 3440×1440. So we know the 3440 (x) will be the widest part. We also know that we have 3 screens being used (2 partial) below the 1440 height, of that main monitor, for the exports. Because of the way the monitor sits into the simpit on panel #4 (Ref 1.1) the CENTER_MFCD exports at the bottom of that monitor. So I effectively have 1440 + 800 = 2240 high (y).

Once you figure out yours, type it into the box (IE: “3440×2240”) and click save.

Time to test

Holy Toledo – if you did everything correctly and followed me through, launch an instant action mission where you are already fired up. I usually do “Ready on Ramp”.

If everything worked flawlessly you will have perfectly generated exports in all 3 of your MFDs. However it is likely misalignment will occur.

Ref 1.7

In Ref 1.7, we have our L DDI too low and too far over. This would indicate that our values for X/Y are too high. Revisit you monitor config LUA file where you defined X,Y,Width and Height. Figure out about how many pixels you need to reduce by (estimate, but you’ll get better). Or reduce the width/height values. Basically its trial and error. but eventually you should get perfect exports. Save and relaunch DCS. This is trial and error and will be an extremely tedious process.

If you did everything… then CONGRATS! You effectively exported 3 sensors to your MFDs.

I hope this helps. My next post will be on IKARUS.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s