Jump to content

[How To] Export ALL Indicators like MFCD via ViewPorts


icemaker

Recommended Posts

I got Hawgtouch up and running, but I'm not crazy about the window tabs. Minor gripe, but they are a bit distracting.

 

Can you download Helios somewhere besides their forum? Their registration requires telephone number and address o_O

Link to comment
Share on other sites

I got Hawgtouch up and running, but I'm not crazy about the window tabs. Minor gripe, but they are a bit distracting.

 

Can you download Helios somewhere besides their forum? Their registration requires telephone number and address o_O

 

mickey street, mickey land

phone 32112321

?

| VR goggles | Autopilot panel | Headtracker | TM HOTAS | G920 HOTAS | MS FFB 2 | Throttle Quadrants | 8600K | GTX 1080 | 64GB RAM| Win 10 x64 | Voicerecognition | 50" UHD TV monitor | 40" 1080p TV monitor | 2x 24" 1080p side monitors | 24" 1080p touchscreen |

Link to comment
Share on other sites

Hawgtouch

- has better looking prefab picture perfect panels

- has ugly window tabs showing

- clumsy editing

 

Helios

- has wysiwyg editor

- editor is rather complicated, until you figure it out (bad manual)

- defaults to mouse swipe, i edit the xml to click (touch)

- has boring multi-purpose panels

- has a very good control center

 

i steal Hawgtouch panel pics, and use them in Helios :D

 

 

Where is the manual located?

W7 x64, i7 965, Rampage II Extreme, GTX480, 6GB Corsair 1866 cl7

Link to comment
Share on other sites

  • 2 weeks later...

Hi i am having problems getting live data output using the easy config tool. I open easy config tool when in game and load my monitor lua file. I tick left and right MFCD i then drag the 2 screens onto my 2nd monitor where i want them to show and then save. The only time i get output data is when the drop down selection menu within easy config tool is open? Then when i minimise it it goes away back to the 2 image screenshots that come with the tool.

 

Btw i had this running perfect in my old 32bit system i have recently changed to 64bit could this be the problem?


Edited by Mule
Link to comment
Share on other sites

Hi i am having problems getting live data output using the easy config tool. I open easy config tool when in game and load my monitor lua file. I tick left and right MFCD i then drag the 2 screens onto my 2nd monitor where i want them to show and then save. The only time i get output data is when the drop down selection menu within easy config tool is open?

you should end EMC

those 'outputs' are for placement only

 

procedure is this

be in startup MENU or something (anything but flight)

run EMC, load, place, save, end EMC

run flight

if not ok, end flight

start EMC, etc, stop EMC

'fly again'

 

 

Then when i minimise it it goes away back to the 2 image screenshots that come with the tool.

 

Btw i had this running perfect in my old 32bit system i have recently changed to 64bit could this be the problem?

 

if there are problems with 'writing' your <monitor.config>.lua from EMC

(alt-tab to explorer and chk date/time of file)

 

define new name

 

it's x64 security vpriviliges that got messed up (with that filename)

| VR goggles | Autopilot panel | Headtracker | TM HOTAS | G920 HOTAS | MS FFB 2 | Throttle Quadrants | 8600K | GTX 1080 | 64GB RAM| Win 10 x64 | Voicerecognition | 50" UHD TV monitor | 40" 1080p TV monitor | 2x 24" 1080p side monitors | 24" 1080p touchscreen |

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

With the new 1.1.0.9 patch, something seems to be changed with this. My MFD's are still as they were on my second screen, but the CDU and the clock that worked under 1.1.0.8 also on my second screen are now suddenly very small in the top left corner of my first screen on top of each other. Anybody have the same experience?

i5-4690K@3.5GHz, 16GB, Asus Maximus VII hero, GTX 970 4Gb, Win 10 64bit, G15, TM Hotas Warthog, TM Cougar MFDs

Link to comment
Share on other sites

I solved the problem with version 1.1.0.9. The variables have been changed.

 

 

Here is the way to do that in version 1.1.0.9:

 

- First go to S:\DCS A-10C\Scripts\Aircrafts\A-10C\Cockpit

- Then go to the indicator folder you want to use (Eg : AN_ALR69V\indicator

- then open the init.lua file of your indicator (Eg : AN_ALR69V_init.lua here)

- find this line :

indicator_type = indicator_types.COMMON

 

-And just paste below this code :

 

purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT}

local x_size         = 1
local y_size         = 1

function update_screenspace_diplacement(zoom_value)
   local default_width  = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)
   if default_width > LockOn_Options.screen.height then
      default_width = LockOn_Options.screen.height
   end
   
   if default_width > 0.5 * LockOn_Options.screen.width then
      default_width = 0.5 * LockOn_Options.screen.width
   end
       
   local default_height = (y_size/x_size) * default_width
   local default_y      = LockOn_Options.screen.height - default_height
   local default_x      = LockOn_Options.screen.width  - default_width
  
   dedicated_viewport           = {default_x,default_y,default_width,default_height}
   dedicated_viewport_arcade = {default_x, 0        ,default_width,default_height}
end

update_screenspace_diplacement(0)    

function set_full_viewport_coverage(viewport)

  dedicated_viewport          = {viewport.x,
                               viewport.y,
                               viewport.width,
                               viewport.height}
  dedicated_viewport_arcade = dedicated_viewport
  purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always 
  render_target_always = true
end

-- try to find assigned viewport
local multimonitor_setup_name =  "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"
local env = {}
     env.screen = LockOn_Options.screen
local f = loadfile(multimonitor_setup_name)
if      f     then
     setfenv(f,env)
     pcall(f)
     
     local vp = nil
     vp = env.[color=Red]RWR_SCREEN[/color]
     
     if vp ~= nil then
        dbg_print("ok we have directly assigned viewport to MFCD\n")
        set_full_viewport_coverage(vp)
     end       
end

Change the red value name to set your viewport Name

-Go to \Config\MonitorSetup\YourMonitorFile.lua

- And add Viewport like this :


RWR_SCREEN =
{
x = 1000;
y = 1245;
width = 170;
height = 170;
}
[/Code]

RWR, Clock are fine, no change in position and size in comparison to 1.1.0.8.

However CMSC, CMSP, UHF are scaled differently and have to be repositioned and resized again via YourMonitorFile.lua.

Very annoying. :(


Edited by Abbath
  • Like 2

You are welcome to my DCS A-10 server "Ugly Bastards".

Link to comment
Share on other sites

Great job Abbath....cant wait to get home and fix my pit displays...rep inbound!

Airdog

| Asus ROG Strix Z370-E Mobo | i7 8700K @ 4.7 | 32 GB DDR4@3200mhz | Gigabyte 2080Ti OC 11GB| Samsung M.2 960 Evo 250Gb and 500Gb | Win10 Pro | Hotas Warthog #02743 | Track IR 5 | Toshiba 47" 120hz LED | Acer 23" Touchscreen | HELIOS |Oculus Rift-S|

 

http://www.blackknightssquadron.com/

Link to comment
Share on other sites

I am having problems getting the digital clock and CMSP to properly size. I did get the CDU to work. Is there a different code you use for CMSP and Digital clock?

Link to comment
Share on other sites

I am having problems getting the digital clock and CMSP to properly size. I did get the CDU to work. Is there a different code you use for CMSP and Digital clock?

 

No its the same code.

Some instruments have multiple purposes = {render_purpose.GENERAL} entries. In this case you have to replace this line with the following lines

purposes = {render_purpose.GENERAL,
                  render_purpose.HUD_ONLY_VIEW,
                  render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                  render_purpose.SCREENSPACE_INSIDE_COCKPIT}

 

Here are my digi clock and CMSP files:

 

DIGIT_CLK_init.lua

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

indicator_type = indicator_types.COMMON
purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT}

local x_size         = 1
local y_size         = 1

function update_screenspace_diplacement(zoom_value)
   local default_width  = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)
   if default_width > LockOn_Options.screen.height then
      default_width = LockOn_Options.screen.height
   end
   
   if default_width > 0.5 * LockOn_Options.screen.width then
      default_width = 0.5 * LockOn_Options.screen.width
   end
       
   local default_height = (y_size/x_size) * default_width
   local default_y      = LockOn_Options.screen.height - default_height
   local default_x      = LockOn_Options.screen.width  - default_width
   
   dedicated_viewport           = {default_x,default_y,default_width,default_height}
   dedicated_viewport_arcade = {default_x, 0        ,default_width,default_height}
end

update_screenspace_diplacement(0)    

function set_full_viewport_coverage(viewport)

  dedicated_viewport          = {viewport.x,
                               viewport.y,
                               viewport.width,
                               viewport.height}
  dedicated_viewport_arcade = dedicated_viewport
  purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always 
  render_target_always = true
end

-- try to find assigned viewport
local multimonitor_setup_name =  "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"
local env = {}
     env.screen = LockOn_Options.screen
local f = loadfile(multimonitor_setup_name)
if      f     then
     setfenv(f,env)
     pcall(f)
     
     local vp = nil
     vp = env.Clock_SCREEN
     
     if vp ~= nil then
        dbg_print("ok we have directly assigned viewport to MFCD\n")
        set_full_viewport_coverage(vp)
     end       
end

-------PAGE IDs-------
id_Page =
{
   PAGE_OFF        = 0,
   PAGE_MAIN        = 1
}

id_pagesubset =
{
   MAIN            = 0
}

page_subsets = {}
page_subsets[id_pagesubset.MAIN]    = LockOn_Options.script_path.."DigitalClock/Indicator/DIGIT_CLK_page.lua"

----------------------
pages = {}

pages[id_Page.PAGE_OFF]        = {}
pages[id_Page.PAGE_MAIN]    = {id_pagesubset.MAIN}

init_pageID        = id_Page.PAGE_OFF
use_parser        = false

--- master modes
A10C_DIGIT_CLK_OFF           = 0 
A10C_DIGIT_CLK_MAIN        = 1 

------------------------------------
pages_by_mode                 = {}
clear_mode_table(pages_by_mode, 1, 0, 0)

function get_page_by_mode(master,L2,L3,L4)
   return get_page_by_mode_global(pages_by_mode,init_pageID,master,L2,L3,L4)
end

pages_by_mode[A10C_DIGIT_CLK_OFF][0][0][0]              = id_Page.PAGE_OFF
pages_by_mode[A10C_DIGIT_CLK_MAIN][0][0][0]              = id_Page.PAGE_MAIN

CSMP_init.lua

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

indicator_type = indicator_types.COMMON
purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT}

local x_size         = 1
local y_size         = 1

function update_screenspace_diplacement(zoom_value)
   local default_width  = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)
   if default_width > LockOn_Options.screen.height then
      default_width = LockOn_Options.screen.height
   end
   
   if default_width > 0.5 * LockOn_Options.screen.width then
      default_width = 0.5 * LockOn_Options.screen.width
   end
       
   local default_height = (y_size/x_size) * default_width
   local default_y      = LockOn_Options.screen.height - default_height
   local default_x      = LockOn_Options.screen.width  - default_width
   
   dedicated_viewport           = {default_x,default_y,default_width,default_height}
   dedicated_viewport_arcade = {default_x, 0        ,default_width,default_height}
end

update_screenspace_diplacement(0)    

function set_full_viewport_coverage(viewport)

  dedicated_viewport          = {viewport.x,
                               viewport.y,
                               viewport.width,
                               viewport.height}
  dedicated_viewport_arcade = dedicated_viewport
  purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always 
  render_target_always = true
end

-- try to find assigned viewport
local multimonitor_setup_name =  "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"
local env = {}
     env.screen = LockOn_Options.screen
local f = loadfile(multimonitor_setup_name)
if      f     then
     setfenv(f,env)
     pcall(f)
     
     local vp = nil
     vp = env.CMSP_SCREEN
     
     if vp ~= nil then
        dbg_print("ok we have directly assigned viewport to MFCD\n")
        set_full_viewport_coverage(vp)
     end       
end
opacity_sensitive_materials = 
{
   "font_CMSP"
}

-------PAGE IDs-------
id_Page =
{
   PAGE_NULL = 0,
   PAGE_OFF  = 1,
   PAGE_MAIN = 2
}

id_pagesubset =
{
   MAIN   = 0
}

page_subsets = {}
page_subsets[id_pagesubset.MAIN]   = LockOn_Options.script_path.."CMSP/indicator/CMSP_page.lua"
     
----------------------
pages = {}
pages[id_Page.PAGE_MAIN] = {id_pagesubset.MAIN}

init_pageID     = id_Page.PAGE_MAIN
purposes      = {render_purpose.GENERAL,
               render_purpose.HUD_ONLY_VIEW,
               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
               render_purpose.SCREENSPACE_INSIDE_COCKPIT}


Edited by Abbath

You are welcome to my DCS A-10 server "Ugly Bastards".

Link to comment
Share on other sites

No go here. MFCD's, CMSC are now top right of prime monitor. CDU is not sized as my monitor file states....did any of the testers use Helios etc??

Using 2 x 23" monitors btw. I also checked and modded my files as per above. The clock is the only item positioned correctly.

 

Why oh why!

 

My monitor lua...

 

_ = function(p) return p; end;

name = _('Phills Wide Screen V2');

Description = 'Phills Wide Screen V2'

Viewports =

{

Center =

{

x = 0;

y = 0;

width = 1920;

height = 1080;

viewDx = 0;

viewDy = 0;

aspect = 1.77777777777778;

}

}

 

RIGHT_MFCD =

{

x = 3381;

y = 627;

width = 392;

height = 392;

}

 

LEFT_MFCD =

{

x = 1985;

y = 620;

width = 392;

height = 392;

}

 

DIGIT_CLOCK =

{

x = 3632;

y = 410;

width = 112;

height = 112;

}

 

CMSC =

{

x = 2986;

y = 396;

width = 260;

height = 260;

}

 

CDU =

{

x = 2555;

y = 63;

width = 242;

height = 242;

}

 

UIMainView = Viewports.Center

Ryzen 9 7950X3D - MSI MAG X670E TomaHawk MB, ASUS ROG Ryujin III 360 AIO

64gig Corsair DDR5@6000, Gigabyte GeForce RTX 4090 AORUS

Winwing Super Taurus, Orion2, TO / Combat panels, Collective with Topgun MIP

Winwing Skywalker pedals, NLR Boeing Mil Edition Simpit, Trackir

Link to comment
Share on other sites

No go here. MFCD's, CMSC are now top right of prime monitor. CDU is not sized as my monitor file states....did any of the testers use Helios etc??

Using 2 x 23" monitors btw. I also checked and modded my files as per above. The clock is the only item positioned correctly.

 

Why oh why!

 

My monitor lua...

 

_ = function(p) return p; end;

name = _('Phills Wide Screen V2');

Description = 'Phills Wide Screen V2'

Viewports =

{

Center =

{

x = 0;

y = 0;

width = 1920;

height = 1080;

viewDx = 0;

viewDy = 0;

aspect = 1.77777777777778;

}

}

 

RIGHT_MFCD =

{

x = 3381;

y = 627;

width = 392;

height = 392;

}

 

LEFT_MFCD =

{

x = 1985;

y = 620;

width = 392;

height = 392;

}

 

DIGIT_CLOCK =

{

x = 3632;

y = 410;

width = 112;

height = 112;

}

 

CMSC =

{

x = 2986;

y = 396;

width = 260;

height = 260;

}

 

CDU =

{

x = 2555;

y = 63;

width = 242;

height = 242;

}

 

UIMainView = Viewports.Center

 

my CMSC_init.lua

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

indicator_type = indicator_types.COMMON
purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT}

local x_size         = 1
local y_size         = 1

function update_screenspace_diplacement(zoom_value)
   local default_width  = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)
   if default_width > LockOn_Options.screen.height then
      default_width = LockOn_Options.screen.height
   end
   
   if default_width > 0.5 * LockOn_Options.screen.width then
      default_width = 0.5 * LockOn_Options.screen.width
   end
       
   local default_height = (y_size/x_size) * default_width
   local default_y      = LockOn_Options.screen.height - default_height
   local default_x      = LockOn_Options.screen.width  - default_width
   
   dedicated_viewport           = {default_x,default_y,default_width,default_height}
   dedicated_viewport_arcade = {default_x, 0        ,default_width,default_height}
end

update_screenspace_diplacement(0)    

function set_full_viewport_coverage(viewport)

  dedicated_viewport          = {viewport.x,
                               viewport.y,
                               viewport.width,
                               viewport.height}
  dedicated_viewport_arcade = dedicated_viewport
  purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always 
  render_target_always = true
end

-- try to find assigned viewport
local multimonitor_setup_name =  "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"
local env = {}
     env.screen = LockOn_Options.screen
local f = loadfile(multimonitor_setup_name)
if      f     then
     setfenv(f,env)
     pcall(f)
     
     local vp = nil
     vp = env.CMSC_SCREEN
     
     if vp ~= nil then
        dbg_print("ok we have directly assigned viewport to MFCD\n")
        set_full_viewport_coverage(vp)
     end       
end
opacity_sensitive_materials = 
{
   "font_CMS"
}

-------PAGE IDs-------
id_Page =
{
   PAGE_NULL = 0,
   PAGE_OFF  = 1,
   PAGE_MAIN = 2
}

id_pagesubset =
{
   MAIN   = 0
}

page_subsets = {}
page_subsets[id_pagesubset.MAIN]   = LockOn_Options.script_path.."CMSC/indicator/CMSC_page.lua"
     
----------------------
pages = {}
pages[id_Page.PAGE_MAIN] = {id_pagesubset.MAIN}

init_pageID     = id_Page.PAGE_MAIN
purposes      = {render_purpose.GENERAL,
               render_purpose.HUD_ONLY_VIEW,
               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
               render_purpose.SCREENSPACE_INSIDE_COCKPIT}

  • Like 1

You are welcome to my DCS A-10 server "Ugly Bastards".

Link to comment
Share on other sites

Still no go, MFCD's are still rendering in the top left corner of the primary monitor 2"x2". CDU, CMSC and clock are large and render in the top right of the secondary monitor???

 

My files are attached

 

Monitor

 

_ = function(p) return p; end;

name = _('Phills Wide Screen V2');

Description = 'Phills Wide Screen V2'

Viewports =

{

Center =

{

x = 0;

y = 0;

width = 1920;

height = 1080;

viewDx = 0;

viewDy = 0;

aspect = 1.77777777777778;

}

}

 

RIGHT_MFCD =

{

x = 3381;

y = 627;

width = 392;

height = 392;

}

 

LEFT_MFCD =

{

x = 1985;

y = 620;

width = 392;

height = 392;

}

 

DIGIT_CLOCK =

{

x = 3632;

y = 410;

width = 112;

height = 112;

}

 

CMSC =

{

x = 2986;

y = 396;

width = 260;

height = 260;

}

 

CDU =

{

x = 2555;

y = 63;

width = 242;

height = 242;

}

 

UIMainView = Viewports.Center

 

CDU

 

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

 

indicator_type = indicator_types.COMMON

used_render_mask = "interleave.bmp"

 

purposes = {render_purpose.GENERAL,

render_purpose.HUD_ONLY_VIEW,

render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,

render_purpose.SCREENSPACE_INSIDE_COCKPIT}

 

local x_size = 1

local y_size = 1

 

function update_screenspace_diplacement(zoom_value)

local default_width = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)

if default_width > LockOn_Options.screen.height then

default_width = LockOn_Options.screen.height

end

 

if default_width > 0.5 * LockOn_Options.screen.width then

default_width = 0.5 * LockOn_Options.screen.width

end

 

local default_height = (y_size/x_size) * default_width

local default_y = LockOn_Options.screen.height - default_height

local default_x = LockOn_Options.screen.width - default_width

 

dedicated_viewport = {default_x,default_y,default_width,default_height}

dedicated_viewport_arcade = {default_x, 0 ,default_width,default_height}

end

 

update_screenspace_diplacement(0)

 

function set_full_viewport_coverage(viewport)

 

dedicated_viewport = {viewport.x,

viewport.y,

viewport.width,

viewport.height}

dedicated_viewport_arcade = dedicated_viewport

purposes = {render_purpose.GENERAL,

render_purpose.HUD_ONLY_VIEW,

render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,

render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always

render_target_always = true

end

 

-- try to find assigned viewport

local multimonitor_setup_name = "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"

local env = {}

env.screen = LockOn_Options.screen

local f = loadfile(multimonitor_setup_name)

if f then

setfenv(f,env)

pcall(f)

 

local vp = nil

vp = env.CDU_SCREEN

 

if vp ~= nil then

dbg_print("ok we have directly assigned viewport to MFCD\n")

set_full_viewport_coverage(vp)

end

end

 

 

 

 

dofile(LockOn_Options.script_path.."CDU/indicator/CDU_pages.lua")

init_pageID = id_CDU_Pages.CDU_PAGE_OFF

 

CDU_preinit_files_path = LockOn_Options.script_path.."CDU/Indicator/Preinit/"

page_subsets = {}

dofile(LockOn_Options.script_path.."CDU/indicator/CDU_subsets_init.lua")

 

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

pages = {}

pages_by_mode = {}

clear_mode_table(pages_by_mode, 10, 10, 29)

 

function get_page_by_mode(master, L2, L3, L4)

return get_page_by_mode_global(pages_by_mode,init_pageID,master,L2,L3,L4)

end

 

dofile(LockOn_Options.script_path.."CDU/indicator/CDU_pages_init.lua")

 

use_parser = false

 

 

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

 

indicator_type = indicator_types.COMMON

used_render_mask = "interleave.bmp"

 

 

 

CMSC

 

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

 

indicator_type = indicator_types.COMMON

 

purposes = {render_purpose.GENERAL,

render_purpose.HUD_ONLY_VIEW,

render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,

render_purpose.SCREENSPACE_INSIDE_COCKPIT}

 

local x_size = 1

local y_size = 1

 

function update_screenspace_diplacement(zoom_value)

local default_width = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)

if default_width > LockOn_Options.screen.height then

default_width = LockOn_Options.screen.height

end

 

if default_width > 0.5 * LockOn_Options.screen.width then

default_width = 0.5 * LockOn_Options.screen.width

end

 

local default_height = (y_size/x_size) * default_width

local default_y = LockOn_Options.screen.height - default_height

local default_x = LockOn_Options.screen.width - default_width

 

dedicated_viewport = {default_x,default_y,default_width,default_height}

dedicated_viewport_arcade = {default_x, 0 ,default_width,default_height}

end

 

update_screenspace_diplacement(0)

 

function set_full_viewport_coverage(viewport)

 

dedicated_viewport = {viewport.x,

viewport.y,

viewport.width,

viewport.height}

dedicated_viewport_arcade = dedicated_viewport

purposes = {render_purpose.GENERAL,

render_purpose.HUD_ONLY_VIEW,

render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,

render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always

render_target_always = true

end

 

-- try to find assigned viewport

local multimonitor_setup_name = "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"

local env = {}

env.screen = LockOn_Options.screen

local f = loadfile(multimonitor_setup_name)

if f then

setfenv(f,env)

pcall(f)

 

local vp = nil

vp = env.CMSC_SCREEN

 

if vp ~= nil then

dbg_print("ok we have directly assigned viewport to MFCD\n")

set_full_viewport_coverage(vp)

end

end

 

 

opacity_sensitive_materials =

{

"font_CMS"

}

 

-------PAGE IDs-------

id_Page =

{

PAGE_NULL = 0,

PAGE_OFF = 1,

PAGE_MAIN = 2

}

 

id_pagesubset =

{

MAIN = 0

}

 

page_subsets = {}

page_subsets[id_pagesubset.MAIN] = LockOn_Options.script_path.."CMSC/indicator/CMSC_page.lua"

 

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

pages = {}

pages[id_Page.PAGE_MAIN] = {id_pagesubset.MAIN}

 

init_pageID = id_Page.PAGE_MAIN

 

Clock

 

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

 

indicator_type = indicator_types.COMMON

 

purposes = {render_purpose.GENERAL,

render_purpose.HUD_ONLY_VIEW,

render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,

render_purpose.SCREENSPACE_INSIDE_COCKPIT}

 

local x_size = 1

local y_size = 1

 

function update_screenspace_diplacement(zoom_value)

local default_width = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)

if default_width > LockOn_Options.screen.height then

default_width = LockOn_Options.screen.height

end

 

if default_width > 0.5 * LockOn_Options.screen.width then

default_width = 0.5 * LockOn_Options.screen.width

end

 

local default_height = (y_size/x_size) * default_width

local default_y = LockOn_Options.screen.height - default_height

local default_x = LockOn_Options.screen.width - default_width

 

dedicated_viewport = {default_x,default_y,default_width,default_height}

dedicated_viewport_arcade = {default_x, 0 ,default_width,default_height}

end

 

update_screenspace_diplacement(0)

 

function set_full_viewport_coverage(viewport)

 

dedicated_viewport = {viewport.x,

viewport.y,

viewport.width,

viewport.height}

dedicated_viewport_arcade = dedicated_viewport

purposes = {render_purpose.GENERAL,

render_purpose.HUD_ONLY_VIEW,

render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,

render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always

render_target_always = true

end

 

-- try to find assigned viewport

local multimonitor_setup_name = "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"

local env = {}

env.screen = LockOn_Options.screen

local f = loadfile(multimonitor_setup_name)

if f then

setfenv(f,env)

pcall(f)

 

local vp = nil

vp = env.DIGIT_CLK_SCREEN

 

if vp ~= nil then

dbg_print("ok we have directly assigned viewport to MFCD\n")

set_full_viewport_coverage(vp)

end

end

 

 

 

-------PAGE IDs-------

id_Page =

{

PAGE_OFF = 0,

PAGE_MAIN = 1

}

 

id_pagesubset =

{

MAIN = 0

}

 

page_subsets = {}

page_subsets[id_pagesubset.MAIN] = LockOn_Options.script_path.."DigitalClock/Indicator/DIGIT_CLK_page.lua"

 

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

pages = {}

 

pages[id_Page.PAGE_OFF] = {}

pages[id_Page.PAGE_MAIN] = {id_pagesubset.MAIN}

 

init_pageID = id_Page.PAGE_OFF

use_parser = false

 

--- master modes

A10C_DIGIT_CLK_OFF = 0

A10C_DIGIT_CLK_MAIN = 1

 

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

pages_by_mode = {}

clear_mode_table(pages_by_mode, 1, 0, 0)

 

function get_page_by_mode(master,L2,L3,L4)

return get_page_by_mode_global(pages_by_mode,init_pageID,master,L2,L3,L4)

end

 

pages_by_mode[A10C_DIGIT_CLK_OFF][0][0][0] = id_Page.PAGE_OFF

pages_by_mode[A10C_DIGIT_CLK_MAIN][0][0][0] = id_Page.PAGE_MAIN

 

MFCD's

 

dofile(LockOn_Options.common_script_path.."devices_defs.lua")

dofile(LockOn_Options.script_path.."materials.lua")

dofile(LockOn_Options.script_path.."config.lua")

 

function GetScale()

return 1

end

dofile(LockOn_Options.script_path.."MFCD/indicator/MFCD_sizes.lua")

 

if LockOn_Options.flight.easy_radar then

render_target_always = true

purposes = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW,render_purpose.SCREENSPACE_OUTSIDE_COCKPIT}

else

render_target_always = false

purposes = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW}

end

 

indicator_type = indicator_types.COMMON

used_render_mask = "interleave.bmp"

 

screenspace_scale_initial = 6;

screenspace_diplacement = {0,0}

 

local x_size = size_k

local y_size = size_k

 

function update_screenspace_diplacement(zoom_value)

screenspace_scale = screenspace_scale_initial + zoom_value;

if screenspace_scale < 1 then

screenspace_scale = 1

end

local screen_height = 2.0;

local screen_width = screen_height * LockOn_Options.screen.aspect;

local scaled_width = SelfWidth * screenspace_scale

local scaled_height = y_size * scaled_width -- for indicator all sizes is function of width

scaled_width = x_size * scaled_width

 

screenspace_diplacement = { 0.5 * screen_width - 0.5 * scaled_width,

-0.5 * screen_height + 0.5 * scaled_height}

 

if disposition == 'L' then

screenspace_diplacement[1] = -screenspace_diplacement[1]

end

 

screenspace_diplacement_arcade = {screenspace_diplacement[1],

0.5 * screen_height - 0.5 * scaled_height}

 

end

 

update_screenspace_diplacement(0)

 

 

 

function set_full_viewport_coverage(viewport)

local w = LockOn_Options.screen.width

local h = LockOn_Options.screen.height

local a = LockOn_Options.screen.aspect

local x = (-1.0 + 2.0 * (viewport.x / w)) * a

local y = 1.0 - 2.0 * (viewport.y / h)

 

local width = (viewport.width / w) * a

local height = viewport.height / h

local scl_hgt_K = y_size * SelfWidth -- size always function of SelfWidth

local scl_wdt_K = x_size * SelfWidth -- size always function of SelfWidth

 

screenspace_scale_x = 2.0 * width / scl_wdt_K

screenspace_scale_y = 2.0 * height / scl_hgt_K

screenspace_diplacement = {x + width,

y - height}

 

screenspace_diplacement_arcade = screenspace_diplacement

purposes = {render_purpose.GENERAL,

render_purpose.HUD_ONLY_VIEW,

render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,

render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always

render_target_always = true

end

 

-- try to find assigned viewport

local multimonitor_setup_name = "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"

local env = {}

env.screen = LockOn_Options.screen

local f = loadfile(multimonitor_setup_name)

if f then

setfenv(f,env)

pcall(f)

 

local vp = nil

if disposition == 'L' then

vp = env.LEFT_MFCD

else

vp = env.RIGHT_MFCD

end

if vp ~= nil then

dbg_print("ok we have directly assigned viewport to MFCD\n")

set_full_viewport_coverage(vp)

end

 

 

Ryzen 9 7950X3D - MSI MAG X670E TomaHawk MB, ASUS ROG Ryujin III 360 AIO

64gig Corsair DDR5@6000, Gigabyte GeForce RTX 4090 AORUS

Winwing Super Taurus, Orion2, TO / Combat panels, Collective with Topgun MIP

Winwing Skywalker pedals, NLR Boeing Mil Edition Simpit, Trackir

Link to comment
Share on other sites

Found the changes in 1.0.0.9

 

in init lua files you have to change the function update_screenspace_diplacement and set_full_viewport_coverage by the new ones (see spoiler below)

 

 

 

function update_screenspace_diplacement(zoom_value)

local default_width = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)

if default_width > LockOn_Options.screen.height then

default_width = LockOn_Options.screen.height

end

 

if default_width > 0.5 * LockOn_Options.screen.width then

default_width = 0.5 * LockOn_Options.screen.width

end

 

local default_height = (y_size/x_size) * default_width

local default_y = LockOn_Options.screen.height - default_height

local default_x = LockOn_Options.screen.width - default_width

 

dedicated_viewport = {default_x,default_y,default_width,default_height}

dedicated_viewport_arcade = {default_x, 0 ,default_width,default_height}

end

 

update_screenspace_diplacement(0)

 

function set_full_viewport_coverage(viewport)

 

dedicated_viewport = {viewport.x,

viewport.y,

viewport.width,

viewport.height}

dedicated_viewport_arcade = dedicated_viewport

purposes = {render_purpose.GENERAL,

render_purpose.HUD_ONLY_VIEW,

render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,

render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always

render_target_always = true

end

 

 

You need to change the sizes of your indicators because the aspect ratio has changed too for example CMSC is now 260 x 47.

 

I will release a new version of EMC to use this new changes.

 

Thanks abbath for the solution... :thumbup:

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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