Jump to content

Any way to configure /MonitorSetup .lua's do be different in A10C and KA50


jib

Recommended Posts

So is there any clever way to configure /MonitorSetup .lua's do be different in A10C and KA50.

 

So that when I jump between the two in a multiplayer mission I dont have to quit-load single player-change to setting and rejoin.

 

I have Two Thurstmaster MFCDs for the A10 and export the MFCDS to them but when you switch the the KA50 they are the wrong aspect ratio size and position for what I want.

 

is there a way, or is it going to happen in the future of having different exports for different planes?

Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated!

Processor: Intel Q6600 @ 3.00GHz

GPU: GeForce MSI RTX 2060 6GB

RAM: Crucial 8GB DDR2

HDD: 1TBGB Crucial SSD

OS: Windows 10, 64-bit

Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey

Link to comment
Share on other sites

Thanks PeterP I have been trying to sort it with this code put directly into SHKVAL_init

From here: http://forums.eagle.ru/showthread.php?t=70716

 

-- Code below is used for the rendering when no viewport has been created
purposes      = {render_purpose.GENERAL, -- Rendering in 3D View
               render_purpose.HUD_ONLY_VIEW, -- Rendering In HUD only View
               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT, -- Rendering in External View
               render_purpose.SCREENSPACE_INSIDE_COCKPIT}  -- Rendering in In cockpit view but NOT in 3D cockpit 
-- End of rendering configuration

screenspace_scale_initial  = 3;
screenspace_diplacement    = {0,0}

local x_size         = 1
local y_size         = 1

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}
   
   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
-- The code below is used for rendering When you use viewports comments are same as above for rendering
  purposes      = {render_purpose.HUD_ONLY_VIEW,
                   --render_purpose.GENERAL, --Uncoment this line by removing the "--" to render in 3D cockpit.
                   render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                   render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always 
-- End of rendering configuration
  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.JIBS_SHKVAL
     
     if vp ~= nil then
        dbg_print("ok we have directly assigned viewport to CDU\n")
        set_full_viewport_coverage(vp)
     end       
end

It does work sort of, I can make it have different exports for different aircraft but the exports I have made myself only export to a small upper left conner of the screen no matter what values I put in and the in cockpit version disappears as well which is not what I want.

 

attachment.php?attachmentid=72251&stc=1&d=1350824429

Screen_121021_134427.thumb.jpg.8ca3f564c19859ead9dcec460930d776.jpg

Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated!

Processor: Intel Q6600 @ 3.00GHz

GPU: GeForce MSI RTX 2060 6GB

RAM: Crucial 8GB DDR2

HDD: 1TBGB Crucial SSD

OS: Windows 10, 64-bit

Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey

Link to comment
Share on other sites

I managed to fix it.

I am just using the normal export method (ie without icemaker's code) but I deleted the alternate names in the Shkval and ABRIS int_lua's.

 

So I can now use both LEFT/RIGHT_MFCD and ABRIS SHKVAL in the same monitor.lua.

so I can have different Export configurations for both KA50 and A10C while switching within the same mission.

 

PeterP, I know you have asked ED to do this before. it would make life a lot easier!

Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated!

Processor: Intel Q6600 @ 3.00GHz

GPU: GeForce MSI RTX 2060 6GB

RAM: Crucial 8GB DDR2

HDD: 1TBGB Crucial SSD

OS: Windows 10, 64-bit

Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey

Link to comment
Share on other sites

  • Recently Browsing   0 members

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