Jump to content

Recommended Posts

Posted (edited)

Hey All,

This has probably been hashed and re-hashed, but my mouse wheel finger is severely fatigued of trying to "just" search for a solution. 

I do not use the Knee Board very much and I would like to be able to.  This is because it is just a real pain to use with my set-up.

 

I run a two display set-up, where screen 1 is 2560 x 1080 and screen 2 is 1920 x 1080.  They are positioned like the picture below. 

kneeboard 02.gif

The monitor setup file that I had been using is custom.  It has been is stable for quite some time now, with no changes.  That is, until I decided that I would like to use the Knee Board more often.  This is what the Knee Board looks like on my displays.

kneeboard 01.gif

So in in order for the Knee Board to actually be useful, it has to be re-sized and re-positioned each and every time it is used.  This is very annoying, some what time consuming and a bit painful especially in flight.

I have tried to edit my monitor setup file.  It currently looks like the picture below and obviously not working.

kneeboard 03.gif

The only lines that are new are contained within kneeboard.  I am not even sure that kneeboard is in fact a viewport.  I just copied this part of the script from another source to try it out.  I don't remember how to create or activate a viewport either.

Any help is appreciated and thanks in advance,

Caldera

Happy New Year!

Edited by Caldera
Posted (edited)

Believe me it gets worse if you have more monitors. Thankfully, we are at least able to drag it and resize it now. That is a very recent addition. 

Unless something has changed recently, the Monitor setup file has no effect on the Kneeboard. It hasn't for many years. I use the following changes (in green) to my  

Scripts\Aircrafts\_Common\Cockpit\ViewportHandling.lua  You will just need to tweak these numbers to position where you want.

local kneeY = 1000         -- Following lines by MD
local kneeX = 688           -- MD
local kneePosY = 70       -- MD
local kneePosX = 1216  -- RH side of my Leftmost monitor. 

-- positioning on screen in HUD Only view 
function update_screenspace_diplacement(aspect,is_left,zoom_value)
    local w = LockOn_Options.screen.width;
    local h = LockOn_Options.screen.height;
    
    if LockOn_Options.screen.oculus_rift then 
        local ui_x,ui_y,ui_w,ui_h = get_UIMainView()
        w = ui_w;
        h = ui_h;
    end    

    local x0 = 0
    local w0 = 0.5 * h
    
    local aspect     =     aspect or 1
    local zoom_value = zoom_value or 0
    local default_width  = w0 + (64 * zoom_value)

    if default_width > h then
       default_width = h
    end
    
    if default_width > 0.5 * w then
       default_width = 0.5 * w
    end
        
    local default_height = default_width / aspect
    local default_y      = h - default_height
    local default_x      = w - default_width - x0
    if  is_left then
        default_x   = x0
    end
    --dedicated_viewport           = {default_x,default_y,default_width,default_height}  -- This is the default value
    dedicated_viewport = {kneePosX,kneePosY,kneeX,kneeY}        -- MD  replaces line above with the values from the top

    dedicated_viewport_arcade = {default_x, 0        ,default_width,default_height}
end
 

Edited by mkiii
addl info
  • Thanks 3
Posted

Yes usually. You should look into using ovgme to install any mods such as this, as well as to temporarily disable them before updating. I'm sure there will be threads covering this if you are unsure of how it works. 

The essentials are simple though, you create a second "shadow" folder somewhere that mirrors the DCS file structure that you are changing. I store all my mods in a folder named _Mods. In that, this mod is in a folder called new_Kneeboard, so this file is in _Mods\new_Kneeboard\Scripts\etc etc.  When you enable the mod in ovgme, it backs up the original file to another folder, and when you need to update DCS, you disable the mod and ovgme copies the original file back. This ensures that your install is always 100% standard if no mods are enabled. Otherwise, you can do it manually. Just be sure that the file has not been changed by ED though... It does happen, and can cause problems if you apply an outdated file with a mod.

Basically, you still have to keep track of things..

Posted

MK,

Thanks!

I was using a kneeboard mod for awhile.  It did not pass IC and it did not relocate the kneeboard on my screen.  I still had to use the mouse each and every time I wanted to use it.  

I will give your method a try and see how much of a pain it is to maintain over update changes.

Caldera

Posted (edited)
On 1/13/2022 at 3:15 PM, Caldera said:

MK,

I tried this out yesterday.  It failed IC check.  Is there a way to get around that?

Caldera

Please check out the lower half of this post

edit: I've edited this post with a link to my main post about this topic. The file has been updated on the post below. Cheers

If the link below doesn't take you directly to the correct one, it is the lower half of the second post on page 1 of the topic,
 

 

Edited by jonsky7
  • Like 5
  • Thanks 2
Posted
On 1/27/2022 at 6:28 AM, Caldera said:

Jonsky,

Thanks!  As always, you are a saint. 

I suspect that it is going to take me awhile to digest all of this.

Caldera

No problem 😁

  • 3 months later...
Posted (edited)
On 1/26/2022 at 12:33 PM, jonsky7 said:

This moves the default opening position of the kneeboards and passes IC for multiplayer.

 

Changing the default opening position of the kneeboard

 

This zip file contains some mod files, you can either use a mod manager like OVGME, or copy them manually into
DCS World\Scripts\  --The main DCS install directory, eg C:\Program Files\DCS World\Scripts......   NOT "saved games"

Kneeboard.zip5.57 kB · 1 download

The Mod adds 3 files, IT DOES NOT REPLACE THE ORIGINAL FILES.

 

 

Whichever method you choose check the folders to make sure the files have copied correctly.
DCS World\Scripts\Aircrafts\_Common\Cockpit\
should contain the file
ViewportHandling-resize.lua
and ViewportHandling.lua should remain

viewporthandlingresize.jpg

--------------------------------------------------------------------------------------------------------------------------------

DCS World\Scripts\Aircrafts\_Common\Cockpit\KNEEBOARD
should contain the file
declare_kneeboard_device2.lua
and declare_kneeboard_device.lua should remain

kneeboard.jpg

--------------------------------------------------------------------------------------------------------------------------------

and 
DCS World\Scripts\Aircrafts\_Common\Cockpit\KNEEBOARD\indicator
should now contain the file
init2.lua
and init.lua should remain

indicator.jpg

--------------------------------------------------------------------------------------------------------------------------------

For the next steps you will need notepad++
https://notepad-plus-plus.org/downloads/

Go back to 
DCS World\Scripts\Aircrafts\_Common\Cockpit\
and open the file
ViewportHandling-resize.lua

This is where will configure where we want the kneeboard to open.
Line 33 says 
    dedicated_viewport = {0,0,default_width,default_height}

This is already modified and will open the kneeboard on the top left

You can however replace all the text with numbers, eg:

dedicated_viewport = {1000,360,600,800}

where
dedicated_viewport = {position-X coordinate, position-Y coordinate, width in pixels, height in pixels}
much like configuring your MFDs

The original line reads dedicated_viewport = {default_x,default_y,default_width,default_height}

viewporthandlingresize1.jpg

--------------------------------------------------------------------------------------------------------------------------------

We now need to change the aircraft files to look for the newly installed mod files above. The easiest way is to use notepad++ to do this automatically.

Open notepad++
Click on the Search button
Click on Find in files

note1.jpg

--------------------------------------------------------------------------------------------------------------------------------

Enter the following, make sure to copy the entry listed in bold in full including quotation marks and brackets:
Find what: "KNEEBOARD/declare_kneeboard_device.lua")
Replace with: "KNEEBOARD/declare_kneeboard_device2.lua")
Filters: *.lua
Directory: G:\DCS World\Mods\aircraft     (you will have to change this to your install directory)

edit: some aircraft have a space in the line 
dofile(LockOn_Options.common_script_path.."KNEEBOARD/declare_kneeboard_device2.lua")
and some do not, so this instruction is slightly different to the one included in the text file that is in the zip file.

note2.jpg

--------------------------------------------------------------------------------------------------------------------------------

Click on "Replace in files" and click OK

note3.jpg

--------------------------------------------------------------------------------------------------------------------------------

Notepad++ will replace the text in all of your installed aircraft files

note4.jpg

--------------------------------------------------------------------------------------------------------------------------------

When complete, the number here should be pretty much how many aircraft you have installed.

note5.jpg

On the next DCS update, you should only have to do the steps to replace the text in the aircraft files.

Hope that helps

 

Thankyou so much for this, is incredible to me how they cant just make it save the position, incredible pain in the ass.

For anyone interested, with the Su-25T and I think F-15 you have to change from this line.

image.png

Edited by malarcky
  • Like 1
  • 2 months later...
Posted (edited)

Anyone know how to do it with the mig21 and mirage2000? It works for all the modules but not for this two.

Edited by malarcky
  • 2 weeks later...
Posted
On 8/3/2022 at 4:39 PM, malarcky said:

Anyone know how to do it with the mig21 and mirage2000? It works for all the modules but not for this two.

 

I dont have the Mig21 but for the Mirage it seems Razbam have used a different file system with regards to the kneeboard. Probably because they have aircraft "controls" embedded in the kneeboard.

And so this "mod" doesn't work with them.

  • Like 2
  • 10 months later...
  • 1 year later...
Posted

@uboats Can you please do something about this? I can't even drag the kneebroad out since it's top bar is hidden from the view.

  • Like 1

qLjvyQ3.png

My Adorable Communist Errand Girls  🙂

Led by me, the Communist Errand Panda 🥰

Posted
On 4/16/2025 at 4:27 AM, PLAAF said:

@uboats Can you please do something about this? I can't even drag the kneebroad out since it's top bar is hidden from the view.

any more details?

On 1/27/2022 at 2:28 PM, Caldera said:

Jonsky,

Thanks!  As always, you are a saint. 

I suspect that it is going to take me awhile to digest all of this.

Caldera

do you still have the issue? sorry first time to notice this thread 😞

  • Like 1

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

  • 2 weeks later...
Posted
On 4/18/2025 at 11:56 AM, uboats said:

any more details?

do you still have the issue? sorry first time to notice this thread 😞

nullIt's like this. The kneeboard stuck at the right MFCD. I tried to edit as the guy told us, but somehow it's not working.

image.jpeg

qLjvyQ3.png

My Adorable Communist Errand Girls  🙂

Led by me, the Communist Errand Panda 🥰

Posted
On 4/27/2025 at 10:22 PM, PLAAF said:

nullIt's like this. The kneeboard stuck at the right MFCD. I tried to edit as the guy told us, but somehow it's not working.

image.jpeg

hmmm, i don't have multi-monitor.

I checked other modules, but didn't see any export config 😞

will investigate

  • Thanks 1

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...