hreich Posted June 16, 2021 Share Posted June 16, 2021 How can i move PetrovichAI window to my left screen, now it sits ine the middle between my 2 monitor setup [sIGPIC][/sIGPIC] Pilot from Croatia Link to comment Share on other sites More sharing options...
ED Team NineLine Posted June 16, 2021 ED Team Share Posted June 16, 2021 Can you show me an image of what you are seeing please? Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug** Link to comment Share on other sites More sharing options...
jonsky7 Posted June 16, 2021 Share Posted June 16, 2021 (edited) Same here Autopilot indicator in top right, on 3rd monitor Petrovich flight helper, not over to the left (not sure if correct or not) Petrovich weapon helper not in centre viewport Weapon sight not in centre viewport, LWin+H helper box on third monitor Thanks Edited June 16, 2021 by jonsky7 Link to comment Share on other sites More sharing options...
hreich Posted June 16, 2021 Author Share Posted June 16, 2021 [sIGPIC][/sIGPIC] Pilot from Croatia Link to comment Share on other sites More sharing options...
ED Team NineLine Posted June 16, 2021 ED Team Share Posted June 16, 2021 Ok, thanks for the screenshot guys. Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug** Link to comment Share on other sites More sharing options...
canadianbaken Posted June 17, 2021 Share Posted June 17, 2021 I'm having the same problem when I look through the gun sight. Need to find the file to tell it not to use both my monitors. Link to comment Share on other sites More sharing options...
jonsky7 Posted June 17, 2021 Share Posted June 17, 2021 (edited) Well this is the first few lines of 9K113_CAM_base_page.lua As the LALT-A Keybind is listed as "9k113 aiming profile on/off" I thought it was a good bet on being the file responsible for the sight view. And from looking at it, it seems to me that it should be getting the center viewport information, but it isn't. I've played around with the entries from ULX,ULY,SZX,SZY,GUI_scale = get_UIMainView() to aspect = SZX/SZY but nothing seemed to make any difference. I don't really know what I'm doing, was just hoping to hit the jackpot by guessing, but sadly no. dofile(LockOn_Options.common_script_path.."elements_defs.lua") dofile(LockOn_Options.script_path.."ASP17V/Indicator/ASP_17V_definitions.lua") HUD_DEFAULT_LEVEL = 2 HUD_NOCLIP_LEVEL = HUD_DEFAULT_LEVEL - 1 ULX,ULY,SZX,SZY,GUI_scale = get_UIMainView() local v = find_viewport ("GU_MAIN_VIEWPORT", "CENTER") if v ~= nil then ULX = v.x ULY = v.y SZX = v.width SZY = v.height else ULX = ULX ULY = ULY SZX = SZX SZY = SZY end aspect = SZX/SZY SetScale(FOV) HUD_OnlyX = LockOn_Options.screen.width / 100.0 -- 6.0 HUD_OnlyY = LockOn_Options.screen.height / 100.0 --6.0 Edited June 17, 2021 by jonsky7 Link to comment Share on other sites More sharing options...
canadianbaken Posted June 17, 2021 Share Posted June 17, 2021 I'm trying to create a try_find_assigned_viewport for 9K113_CAM_init.lua file and create a viewport in my monitor folder. But it's not quite working. I'm getting it to send it to my other monitor but it's a black screen. I'll let you know when I figure it out. Link to comment Share on other sites More sharing options...
Deadseed Posted June 18, 2021 Share Posted June 18, 2021 (edited) I have found a workaround to fix both the 9k113 sight as well as the Petrovich crosshair. I use a stacked monitor setup with the top being my main and then a smaller screen below that for MFD outputs and things like the control indicators. I was having the same issues with Petrovich's crosshair from the pilot seat (it would put it right between the two monitors) as well as the 9k113 when sighted in (it would split the resolution between both screens and be completely useless. I managed to fix both with some tinkering (and help from a clever friend). The solution for both just require a couple of small .lua tweaks. @jonsky7was on track for the 9k113 and the solution lies in the 9K113_CAM_base_page.lua. The file first pulls your viewport that is defined in the monitors .lua and sets the width and height as SZX and SZY ULX,ULY,SZX,SZY,GUI_scale = get_UIMainView() local v = find_viewport ("GU_MAIN_VIEWPORT", "CENTER") if v ~= nil then ULX = v.x ULY = v.y SZX = v.width SZY = v.height However, the lines below this then ignore that and define the hud-size as your entire screen resolution, instead of using the SZX and SZY it defined. HUD_OnlyX = LockOn_Options.screen.width / 100.0 -- 6.0 HUD_OnlyY = LockOn_Options.screen.height / 100.0 --6.0 To fix the 9k113 view not showing up on your main (and only main) screen, you just have to change the Hud_OnlyX and Hud_OnlyY to reflect the SZX and SZY coordinates instead: HUD_OnlyX = SZX / 100.0 -- 6.0 HUD_OnlyY = SZY / 100.0 --6.0 so just change LockOn_Options.screen.width to SZX and LockOn_Options.screen.height to SZY and you're good to go. To change the location of the crosshair use it like a helmet sight as intended, you'll need to find the HelperAI_page_common.lua file in \dcsworld\mods\aircraft\mi-24p\cockpit\scripts\HelperAI. Open the file and scroll to line 88 which should be where the crosshair is defined. You will then insert a new line under crosshair.vertices as seen here: local crosshair = CreateElement "ceTexPoly" crosshair.name = "crosshair" crosshair.material = MakeMaterial("Mods/aircraft/Mi-24P/Textures/ai_crosshair.dds",{255,255,255,255}) crosshair.vertices = simple_square(cross_size / 2.2) crosshair.init_pos = {0.01 * aspect, 0.5} ------ add this line to define the position of the crosshair crosshair.tex_coords = default_tex_coords crosshair.indices = default_box_indices if not is_vr then crosshair.controllers = {{"show_crosshair"}} else crosshair.controllers = {{"show_crosshair_VR"}} end crosshair.h_clip_relation = h_clip_relations.REWRITE_LEVEL crosshair.level = DEFAULT_LEVEL if not is_vr then crosshair.screenspace = ScreenType.SCREENSPACE_TRUE end crosshair.use_mipfilter = true Add(crosshair) Once you have added the line, the two numbers will define where in your screen space you want to have it located. On my setup, 0.01 and 0.5 puts it right in the middle of my main monitor. You may have to make small adjustments to those numbers to tweak it to where you want it. Save the file, do a backup and you're done. *bonus tip -> i also moved the Petrovich compass a handier position on my bottom screen to save real estate on my main (i also do this with the controls indicator and AP readouts). In the same file (HelperAI_page_common.lua) that you adjusted the crosshair, you can find the coordinates to move the compass: if not is_vr then compass_pos = {-0.10 * aspect, -0.5} --relative to screen center, 1 equals screen height afaik else compass_pos = {0, -0.2} Just change the 2 coordinate numbers (-0.10 and -0.5 in this case) and adjust until the compass sits where you want. In this example, the compass is placed in the center of my bottom monitor. I then have controls indicator to the left and the AP to the right. Hope that helps. Happy Hinding. Edited June 18, 2021 by Deadseed 3 1 Link to comment Share on other sites More sharing options...
hreich Posted June 18, 2021 Author Share Posted June 18, 2021 Can you plese post a screenshot with your monitor setup? [sIGPIC][/sIGPIC] Pilot from Croatia Link to comment Share on other sites More sharing options...
Deadseed Posted June 18, 2021 Share Posted June 18, 2021 (edited) Operator seat with the controls indicator, AP and compass on the 2nd lower monitor This is the 9k113 scope view after the lua edits 9k113 before the lua edits. This setup meant that the actual thing i was trying to target was between the two monitors. This is the after of the crosshair adjustment. Using the crosshair to look and target things much easier when it's actually on screen Both fixes should work regardless of your screen setup. You just need to adjust the X and Y until it's aligned where you want it. Edited June 18, 2021 by Deadseed Link to comment Share on other sites More sharing options...
horus-DCS Posted June 18, 2021 Share Posted June 18, 2021 6 hours ago, Deadseed said: I have found a workaround to fix both the 9k113 sight as well as the Petrovich crosshair. I use a stacked monitor setup with the top being my main and then a smaller screen below that for MFD outputs and things like the control indicators. I was having the same issues with Petrovich's crosshair from the pilot seat (it would put it right between the two monitors) as well as the 9k113 when sighted in (it would split the resolution between both screens and be completely useless. I managed to fix both with some tinkering (and help from a clever friend). The solution for both just require a couple of small .lua tweaks. @jonsky7was on track for the 9k113 and the solution lies in the 9K113_CAM_base_page.lua. The file first pulls your viewport that is defined in the monitors .lua and sets the width and height as SZX and SZY ULX,ULY,SZX,SZY,GUI_scale = get_UIMainView() local v = find_viewport ("GU_MAIN_VIEWPORT", "CENTER") if v ~= nil then ULX = v.x ULY = v.y SZX = v.width SZY = v.height However, the lines below this then ignore that and define the hud-size as your entire screen resolution, instead of using the SZX and SZY it defined. HUD_OnlyX = LockOn_Options.screen.width / 100.0 -- 6.0 HUD_OnlyY = LockOn_Options.screen.height / 100.0 --6.0 To fix the 9k113 view not showing up on your main (and only main) screen, you just have to change the Hud_OnlyX and Hud_OnlyY to reflect the SZX and SZY coordinates instead: HUD_OnlyX = SZX / 100.0 -- 6.0 HUD_OnlyY = SZY / 100.0 --6.0 so just change LockOn_Options.screen.width to SZX and LockOn_Options.screen.height to SZY and you're good to go. To change the location of the crosshair use it like a helmet sight as intended, you'll need to find the HelperAI_page_common.lua file in \dcsworld\mods\aircraft\mi-24p\cockpit\scripts\HelperAI. Open the file and scroll to line 88 which should be where the crosshair is defined. You will then insert a new line under crosshair.vertices as seen here: local crosshair = CreateElement "ceTexPoly" crosshair.name = "crosshair" crosshair.material = MakeMaterial("Mods/aircraft/Mi-24P/Textures/ai_crosshair.dds",{255,255,255,255}) crosshair.vertices = simple_square(cross_size / 2.2) crosshair.init_pos = {0.01 * aspect, 0.5} ------ add this line to define the position of the crosshair crosshair.tex_coords = default_tex_coords crosshair.indices = default_box_indices if not is_vr then crosshair.controllers = {{"show_crosshair"}} else crosshair.controllers = {{"show_crosshair_VR"}} end crosshair.h_clip_relation = h_clip_relations.REWRITE_LEVEL crosshair.level = DEFAULT_LEVEL if not is_vr then crosshair.screenspace = ScreenType.SCREENSPACE_TRUE end crosshair.use_mipfilter = true Add(crosshair) Once you have added the line, the two numbers will define where in your screen space you want to have it located. On my setup, 0.01 and 0.5 puts it right in the middle of my main monitor. You may have to make small adjustments to those numbers to tweak it to where you want it. Save the file, do a backup and you're done. *bonus tip -> i also moved the Petrovich compass a handier position on my bottom screen to save real estate on my main (i also do this with the controls indicator and AP readouts). In the same file (HelperAI_page_common.lua) that you adjusted the crosshair, you can find the coordinates to move the compass: if not is_vr then compass_pos = {-0.10 * aspect, -0.5} --relative to screen center, 1 equals screen height afaik else compass_pos = {0, -0.2} Just change the 2 coordinate numbers (-0.10 and -0.5 in this case) and adjust until the compass sits where you want. In this example, the compass is placed in the center of my bottom monitor. I then have controls indicator to the left and the AP to the right. Hope that helps. Happy Hinding. Thanks comrade! Link to comment Share on other sites More sharing options...
jonsky7 Posted June 18, 2021 Share Posted June 18, 2021 @Deadseed You Sir are a hero of mother Russia , and me. Seriously though, never thought that a fix would come so quick ! Thank You very much ! Link to comment Share on other sites More sharing options...
jonsky7 Posted June 18, 2021 Share Posted June 18, 2021 (edited) Just for info, the compass position Deadseed mentioned is at line 26-29 if not is_vr then compass_pos = {-0.10 * aspect, -0.5} --relative to screen center, 1 equals screen height afaik else compass_pos = {0, -0.2} Edited June 18, 2021 by jonsky7 Link to comment Share on other sites More sharing options...
canadianbaken Posted June 18, 2021 Share Posted June 18, 2021 FYI you guys rock!!!! Link to comment Share on other sites More sharing options...
Skunk 2-1 Posted June 19, 2021 Share Posted June 19, 2021 Fixed the Crosshairs. But the AI Target list is still somewhere lost. Any clue, where I can correct the position of the AI Target list? Cheers Link to comment Share on other sites More sharing options...
Deadseed Posted June 20, 2021 Share Posted June 20, 2021 14 hours ago, Skunk 2-1 said: Fixed the Crosshairs. But the AI Target list is still somewhere lost. Any clue, where I can correct the position of the AI Target list? Cheers for me the target list shows up in the same place as where i moved the compass to. Since that was ideal for me i never needed to change it. Not sure if that just worked out or if it had to do with moving the compass placement though. Link to comment Share on other sites More sharing options...
Skunk 2-1 Posted June 20, 2021 Share Posted June 20, 2021 You are right. The AI Target List Position is slaved to the AI Compass Position. Great! Thanks for the help! Link to comment Share on other sites More sharing options...
demonesque Posted June 22, 2021 Share Posted June 22, 2021 My 2 monitors are of a different pixel height. So when I apply the above fix the prtrovitch sight centers on my main screen but the pitch angle is reading about -20 when looking at the horizon. Anyone else have that issue or know where to set and adjustment? Petrovitch seems to be looking too low when I tell him to search for a target. Thanks. Link to comment Share on other sites More sharing options...
Flappie Posted June 22, 2021 Share Posted June 22, 2021 24 minutes ago, demonesque said: My 2 monitors are of a different pixel height. So when I apply the above fix the prtrovitch sight centers on my main screen but the pitch angle is reading about -20 when looking at the horizon. Anyone else have that issue or know where to set and adjustment? Petrovitch seems to be looking too low when I tell him to search for a target. Thanks. Take a look at this post, then: Maybe it'll help. Don't accept indie game testing requests from friends in Discord. Ever. Link to comment Share on other sites More sharing options...
jonsky7 Posted June 22, 2021 Share Posted June 22, 2021 3 hours ago, demonesque said: My 2 monitors are of a different pixel height. So when I apply the above fix the prtrovitch sight centers on my main screen but the pitch angle is reading about -20 when looking at the horizon. Anyone else have that issue or know where to set and adjustment? Petrovitch seems to be looking too low when I tell him to search for a target. Thanks. You have to play with the numbers for your particular setup, deadseed used 0.01 and 0.5 for his particular setup. The first number is left right, the second is up down. But if you have your monitors side by side, try 0.0 instead of 0.5 Link to comment Share on other sites More sharing options...
demonesque Posted June 23, 2021 Share Posted June 23, 2021 (edited) 4 hours ago, jonsky7 said: You have to play with the numbers for your particular setup, deadseed used 0.01 and 0.5 for his particular setup. The first number is left right, the second is up down. But if you have your monitors side by side, try 0.0 instead of 0.5 Thanks Jonsky. For side by side monitors a value of 0 seems to be correct. So my settings are (-.95 , 0) for reference of anyone else. Will test some more but seems better. I am not a programmer but I cant figure why the * Aspect is there in the X dimention in the brackets. Do you know what theat is supposed to do? I have just got the numerals for X and Y and it works fine..... Edited June 23, 2021 by demonesque typo 1 Link to comment Share on other sites More sharing options...
demonesque Posted June 23, 2021 Share Posted June 23, 2021 Brilliant. (-.95 , 0) works great for me, so blew some stuff up as well as best flight and landing ever in the Hind so far, Yay! Finally working out how to use those autopilot assists. Thanks heaps. Link to comment Share on other sites More sharing options...
hreich Posted June 28, 2021 Author Share Posted June 28, 2021 (edited) On 6/18/2021 at 3:42 PM, horus-DCS said: Thanks comrade! Can somebody share files that fixes and move petrovich sight and 9k113 - so all are visible on my main monitor in side by side 2 monitor configuration with standard resolution 1920*1080 for each monitor? I just tried to edit files, now i cant launch mi-24 - it crashes upon netering misisons..Where do you enter (-.95 , 0) Is it here like this? crosshair.init_pos = {-0.9 * aspect, 0} ------ add this line to define the position of the crosshair ? Edited June 28, 2021 by hreich [sIGPIC][/sIGPIC] Pilot from Croatia Link to comment Share on other sites More sharing options...
deamonesque Posted July 2, 2021 Share Posted July 2, 2021 (edited) On 6/28/2021 at 9:23 PM, hreich said: Can somebody share files that fixes and move petrovich sight and 9k113 - so all are visible on my main monitor in side by side 2 monitor configuration with standard resolution 1920*1080 for each monitor? I just tried to edit files, now i cant launch mi-24 - it crashes upon netering misisons..Where do you enter (-.95 , 0) Is it here like this? crosshair.init_pos = {-0.9 * aspect, 0} ------ add this line to define the position of the crosshair ? here: Except yours will probably be a different number than -0.95 as my monitors are different sizes and i wanted it in the middle of screen 1. But start with that then modify. Edited July 2, 2021 by deamonesque [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now