skypickle Posted March 1, 2022 Posted March 1, 2022 The panel in the lower right which shows the disposition of the gunners and copilot is the Crew status window. If you look in this folder: C:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\Uh-1H\Cockpit\Scripts\AI\ControlPanel you find three files: g_panel.lua, g_panel_definitions.lua, g_panel_page.lua I searched these files for the named of the Crew Status window but cannot find it. I want to reference the Crew Status window in my monitor setup file so I can change its location but cannot figure out what to call it. I know the g_panel_page.lua file asks the monitor setup file for info Starting at line 11 is this code local multimonitor_setup_name = "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua" local f = loadfile(multimonitor_setup_name) if f then local env = {} env.screen = LockOn_Options.screen setfenv(f,env) pcall(f) if env.UIMainView ~= nil then if (LockOn_Options.screen.width/2.0 > env.UIMainView.x) then aspect = (env.UIMainView.width + env.UIMainView.x - LockOn_Options.screen.width/2.0)/LockOn_Options.screen.height - 0.02 else aspect = (env.UIMainView.width + env.UIMainView.x)/LockOn_Options.screen.height - 0.02 end end end So it looks like it is asking for the aspect ratio. Unfortunately, it seems that Crew Status window is hard coded. Here is the code that seems to set its location: local shift_X = -0.65 local shift_Y = -1 local size_X = -shift_X + 0.02 local size_Y = 0.35 local border_s = 0.01 local Y_space = size_Y/6.0 However these numbers do not make sense. The code for generating the labels is this: txt_Status = CreateElement "ceStringPoly" txt_Status.name = "txt_Status" txt_Status.value = " CREW STATUS:" txt_Status.material = "font_general" txt_Status.init_pos = {0.0 + border_s, size_Y - border_s} txt_Status.alignment = "LeftTop" txt_Status.stringdefs = predefined_font_0 txt_Status.parent_element = base.name AddElement(txt_Status) txt_Hints = CreateElement "ceStringPoly" txt_Hints.name = "txt_Hints" txt_Hints.value = "HEALTH ROE AMMO BURST" txt_Hints.material = "font_general" txt_Hints.init_pos = {0.0 + border_s, size_Y - border_s - Y_space*1.0} txt_Hints.alignment = "LeftTop" txt_Hints.stringdefs = predefined_font_0 txt_Hints.parent_element = base.name AddElement(txt_Hints) the variable, border_s, is 0.01. No where in the code are pixel numbers evident. Does anyone have any insight into how to move this window? 1 4930K @ 4.5, 32g ram, TitanPascal
jonsky7 Posted March 2, 2022 Posted March 2, 2022 (edited) Try this @Tanuki44, Thank you for posting and providing the knowledge. I moved the crew status indicator based on your work. I was looking at the wrong file. For those who wish to move their crew indicator then please use this as a reference. The folder & file to edit is here: Folder: ...OpenBeta\Mods\aircraft\Uh-1H\Cockpit\Scripts\AI\ControlPanel File: g_panel_page.lua (See attachment) The lines of code to adjust will be the "local shift_X", "local shift_Y", and "local size_X". These should be on lines 42 - 44. Adjusting the "local shift_X" value will move the overlay along the X-axis. A negative value will move it left and a positive value will move it right. Adjusting the "local shift_Y" value will move the overlay along the Y-axis. A negative value will move it down and a positive value will move it up. Adjusting the "local size_X" value will adjust the width of the shaded box. Use a set decimal value instead of the variable value. A positive decimal value will increase the width of the shaded box to the right. A value of 0 will remove the shaded box. A negative decimal value will increase the width of the shaded box to the left. Note: No other values were adjusted. Your results may vary because of monitor resolution and monitor configuration. The values that work for my monitor setup are: local shift_X = -3.85 -- -0.65 local shift_Y = 0.40 -- -1 local size_X = 0.68 -- -shift_X + 0.02 Monitor setup is msi Optix MAG271CQR (27" curved) with 3 Cubesim displays. Monitor resolution for DCS is set at 4960x1440. P.S. You can save the file as is then rename your original file to *.lua.bak or *.lua.orig. If you want to use this file then remove the ".CURRENT" file extension after you make a backup of the original. g_panel_page.lua.CURRENT https://forums.eagle.ru/topic/276208-crew-indicator-relocation/?do=findComment&comment=4714394 Edited March 2, 2022 by jonsky7 1
skypickle Posted March 2, 2022 Author Posted March 2, 2022 I too got something to work by trial and error. I have a 1920x1080 screen just below a 4k monitor, left aligned. The 4k is specified in windows as the main screen. I moved the Huey controls to the left side of the 1920x1080 with these changes in ControlsIndicator_page.lua -- base.init_pos = {0,(1 - 1.3*size)} -- Left Top -- base.init_pos = {0,0} -- Left Center -- base.init_pos = {0,-(0.99 - 1.3*size)} -- Left Bottom base.init_pos = {0,-(0.9 - 1.3*size)} -- slightly above Left Bottom I moved the crew status to the right side of the 1920x1080 with these changes g_panel_page.lua --local shift_X = -0.65 (default) local shift_X = -1.28 (changing this to -1.32 does nothing) --local shift_Y = -1 (default) local shift_Y = -.85 --local size_X = -shift_X + 0.02 local size_X = -shift_X + 0.1 local size_Y = 0.35 local border_s = 0.01 local Y_space = size_Y/6.0 I wanted to shrink the crew status window but havent figured that out. 1 4930K @ 4.5, 32g ram, TitanPascal
jonsky7 Posted March 2, 2022 Posted March 2, 2022 (edited) 1 hour ago, skypickle said: I too got something to work by trial and error. I have a 1920x1080 screen just below a 4k monitor, left aligned. The 4k is specified in windows as the main screen. I moved the Huey controls to the left side of the 1920x1080 with these changes in ControlsIndicator_page.lua -- base.init_pos = {0,(1 - 1.3*size)} -- Left Top -- base.init_pos = {0,0} -- Left Center -- base.init_pos = {0,-(0.99 - 1.3*size)} -- Left Bottom base.init_pos = {0,-(0.9 - 1.3*size)} -- slightly above Left Bottom I moved the crew status to the right side of the 1920x1080 with these changes g_panel_page.lua --local shift_X = -0.65 (default) local shift_X = -1.28 (changing this to -1.32 does nothing) --local shift_Y = -1 (default) local shift_Y = -.85 --local size_X = -shift_X + 0.02 local size_X = -shift_X + 0.1 local size_Y = 0.35 local border_s = 0.01 local Y_space = size_Y/6.0 I wanted to shrink the crew status window but havent figured that out. So I've modified mine in a few ways, but I can't remember what exactly everything did, it was a long time ago. So first off is line 7 new_K = 73.5 --44 to new_K = 100 --73.5 --44 I think this made the font smaller because line 27 says FontSizeX1 = 0.0058 * (old_K / new_K) So if you make "new k" larger the font gets smaller. ------------------------------------------- line 47 went from local Y_space = size_Y/6.0 to local Y_space = size_Y/9.0 I think this makes the gap between the lines smaller. -------------------------------------------- looks like I've used line 60 to alter position base.init_pos = {aspect + shift_X,firstLineY + shift_Y} to base.init_pos = {aspect + shift_X - 4.6,firstLineY + shift_Y + 1.2} which brought it left and up ------------------------------------------------------------- and then had to adjust the top text to line it up better by changing line 80 from txt_Hints.value = "HEALTH ROE AMMO BURST" to txt_Hints.value = "HEALTH ROE AMMO BURST" just some extra spaces between the headings. I've included my file here g_panel_page.lua example Looks like I maybe couldn't figure out how to close together the green text horizontally. Edited March 2, 2022 by jonsky7 1
skypickle Posted March 3, 2022 Author Posted March 3, 2022 thank you jonsky... 4930K @ 4.5, 32g ram, TitanPascal
ANDR0ID Posted March 14, 2023 Posted March 14, 2023 Want to say this also works for the Mi-8... thank you! 3
RangerGav Posted May 6, 2023 Posted May 6, 2023 Any idea how to move all this over for a monitor setup that's not left aligned? I have a left-side monitor that's not used for DCS. Then a main monitor (2560x1440) with a smaller one (1920x1080) below it for MFDs. The main and MFD monitors line up on their left edges. I've tried various combinations of numbers but can't get the crew window to show up anywhere. What are the number values measuring... Pixels, inches, ????? 1
YSIAD_RIP Posted June 23, 2024 Posted June 23, 2024 nullThis thread was useful in tweaking my Huey status settings. Thanks @jonsky7 1 Do not own: | F-15E | JF-17 | Fw 190 A-8 | Bf 109 | Hardware: [ - Ryzen7-5800X - 64GB - RX 6800 - X56 HOTAS Throttle - WINWING Orion 2 F16EX Grip - TrackIR 5 - Tobii 5C - JetPad FSE - ]
Adamemnon Posted July 16, 2024 Posted July 16, 2024 (edited) This is a fantastic thread - Thank you. I have an issue with the boarder around the crew indicator, it seems to follow when changing Y values but is stuck in the original X position. Can anyone help? I have 4k middle screen, 1080p wing screens, and 3x MFDs (2 below the left and 1 below the right - invisible as Huey doesn't have any) also, trying to move things on my Mi-8 I've managed to move my Red controls indicator, but not the autopilot indicator (that's not in a bad position though) Trying to move the crew indicator, it doesn't seem to want to move from it's position in the far left bottom corner (which is off all my screens) Edited July 16, 2024 by Adamemnon adding mi-8 question and screenshot
Recommended Posts