ED Forums - View Single Post - How to edit the controls indicator window? Ctrl+return
View Single Post
Old 10-17-2013, 03:41 PM   #6
davedontmind
Junior Member
 
Join Date: Jul 2012
Posts: 41
Default

Funny, I was just looking at this yesterday, while I was trying to re-position the controls indicator for my 3-screen setup, so I can give you some pointers for at least changing the colours. It's not trivial, but if you have no problem editing lua files, then read on.

The file you want to look at is "DCS World\Mods\aircrafts\<X>\Cockpit\Scripts\ControlsIndicator\ControlsIndicator_page.lua" where <X> is one of the aircraft you have installed (look in the Mods\aircrafts folder to see what's there)

I suggest that, rather than editing the file directly, you set up JSGME (see http://forums.eagle.ru/showthread.php?t=98607), then make a copy of the ControlsIndicator_page.lua into your own mod folder, and edit that version so you have your own mod, but if you feel reckless go ahead and edit the default .lua file (just don't blame me if you break it! - make back-up copies before editing, just to be on the safe side).

If you look at that ControlsIndicator_page.lua (the versions for the different aircraft are all very similar), somewhere around line 33 is this:

local orange_mat = MakeMaterial("",{0,200,0,50})

This is the red (orange) material used for the background of the controls indicator. Rather than changing that line to be green (I hate it when variable names don't describe the contents accurately), what you want to do is add these lines just after it:

local background_mat = MakeMaterial("",{0,200,0,50}) -- colour for the background
local line_mat = MakeMaterial("arcade.tga",{0,255,0,200}) -- colour for the lines
local controls_font = "font_ARCADE_GREEN" -- colour for any text


These lines define the new colours we're going to use to display the controls panel. The numbers in each line are values for the Red, Green, Blue, and Alpha values of the colour. The values should be in the range 0-255. Alpha represents the transparency (255 is opaque, 0 is transparent). So what I have defined above is a green colour to use for the background, mostly transparent, and a brighter green (fully opaque) to use for the lines, and a green font for any text.

That just defines some colours. Next you need to use the colours.

First look for this line (around line 38-ish):

base.material = orange_mat -- "GREEN_TRANSPARENT"

and change it to:

base.material = background_mat

Then look for all occurrences of

XXXX.material = "ARCADE_3_RED"
or
XXXX.material = ... something with red in it ...

(where XXXX represents anything, it's not literally XXXX).
and change them to

XXXX.material = line_mat

Also look for anything like:

XXXX.material = "font_ARCADE_RED"

and change to

XXXX.material = controls_font

ARCADE_3_RED and font_ARCADE_RED, font_ARCADE_GREEN etc are defined elsewhere, in Mods\aircrafts\<X>\Cockpit\Scripts\materials.lua - you can look in that file to see predefined alternatives you can use, or you can create your own using MakeMaterial as I did above.

Changing the way the lines are drawn, to add graduation marks is trickier, and it look to me like it requires some lua programming. Perhap I'll look into it later if I have some time.

If this is way beyond you and looks like gibberish, let me know which aircraft you want this for and I'll see if I can whip up a mod for the colour change (no promises or guarantees, caveat emptor, batteries not included, etc).

Last edited by davedontmind; 10-17-2013 at 03:43 PM.
davedontmind is offline