Jump to content

Changes to how instruments are exported?


hakjar
 Share

Recommended Posts

Hi,

i can't find any info on this. I export the two MFCD's perfectly fine

to Helios and all gauges works perfectly but I cannot export RWR,

digital cklock, UHF and the rest of the indicators. Read through all

threads I can find but nothing help.

 

Any ideas?

[sIGPIC][/sIGPIC]

_____________Semper paratus, In hoc signo vinces________________

 

PC: Intel i7-8700K (4.9 GHz), Aorus Ultra Gaming Z370 MB, Aorus GTX 1080Ti (1.7 GHz/1.1 GHz), 32 GB DDR3 (3,2 GHz), Samsung EVO 860 M.2 500 GB SSD + Samsung 960 M.2 250 GB SSD Gaming: TM HOTAS WH, Crosswind pedals, HP Reverb

Link to comment
Share on other sites

To export additional gauges, you need to do some minor edits to their Lua files.

 

Let's use the RWR as an example. Open Mods/aircraft/A-10C/Cockpit/Scripts/AN_ALR69V/indicator/AN_ALR69V_init.lua and append the following lines to the end of the file:

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("ED_A10C_RWR")

 

("ED_A10C_RWR" is a unique name for the viewport, which you can pick arbitrarily as long as its a valid Lua variable name.)

 

You can then export the RWR like this in MonitorSetup.lua:

ED_A10C_RWR =
{
	x = 599;
	y = 1360;
	width = 179;
	height = 179;
}

 

I use this approach to export the clock and the RWR.

 

In general, under Cockpit/Scripts there is a subfolder for each device. Inside that is an indicator subfolder which includes one Lua file that ends with _init -- that is the one you want to edit.

 

Edit (2015-01-19): add code to the end of the file instead of the beginning (required for some indicators, others do not care)


Edited by [FSF]Ian
Link to comment
Share on other sites

I was using Easy Monitor Configurator for a while and it refused to work when I reinstalled everything (including DCS 1.2.8) on a new SSD (the button to update the Lua files simply wouldn't do anything). The funny thing is that it did work before with DCS 1.2.8, although that version was not freshly installed but the result of several updates.

Link to comment
Share on other sites

Hi Ian,

Thanks for the help but it still don't work. Getting a bit frustrated about this atm :)

 

Is there anything altered in Viewport aswell? I used to follow PeterP instructions but that doesn't work either.


Edited by hakjar

[sIGPIC][/sIGPIC]

_____________Semper paratus, In hoc signo vinces________________

 

PC: Intel i7-8700K (4.9 GHz), Aorus Ultra Gaming Z370 MB, Aorus GTX 1080Ti (1.7 GHz/1.1 GHz), 32 GB DDR3 (3,2 GHz), Samsung EVO 860 M.2 500 GB SSD + Samsung 960 M.2 250 GB SSD Gaming: TM HOTAS WH, Crosswind pedals, HP Reverb

Link to comment
Share on other sites

Update:

 

I copied all ini.lua files for the instruments from Loz helios profile and

now it works! Don't know what gives since I couldn't find any differences

in the files. But who cares, it works :)

[sIGPIC][/sIGPIC]

_____________Semper paratus, In hoc signo vinces________________

 

PC: Intel i7-8700K (4.9 GHz), Aorus Ultra Gaming Z370 MB, Aorus GTX 1080Ti (1.7 GHz/1.1 GHz), 32 GB DDR3 (3,2 GHz), Samsung EVO 860 M.2 500 GB SSD + Samsung 960 M.2 250 GB SSD Gaming: TM HOTAS WH, Crosswind pedals, HP Reverb

Link to comment
Share on other sites

  • 1 month later...

Its might be because the DCS World\Mods\Aircrafts (with "s") folder has been rename to DCS World\Mods\Aircrafts (without "s").

 

I had rename all the Aircrafts (with "s") folder for my JSGME installed mod into Aircraft (without "s").

 

 

Cheers

Hans

Link to comment
Share on other sites

i7-8700k 3.07mhz|32GB DDR4 G.SKILL Ripjaws V Series 3200|ASUS ROG STRIX GeForce RTX 2080 8G GDDR6|Corsair 750D|Corsair H-100i|Corsair AX750|AOC Agon AG241QX 24"|Hanspree HT231DPBU|TM Cougar MFDs| Buddyfox UFC|Thrust master Warthog HOTAS(Modified spring/Slew control)|Saitek Combat Pedals|Logitech Marble Trackball|CorsairK70|TrackIR5|Custom Panels

http://goo.gl/vCWXRd

Desktop Simpit Thread

http://goo.gl/uNaNN1

Helios Tutorials

http://goo.gl/Sw1Uo6

Helios Profile

http://goo.gl/RM8BLP

Link to comment
Share on other sites

  • 1 year later...

[FSF]Ian please see below.

 

 

Ian;2133064']To export additional gauges, you need to do some minor edits to their Lua files.

 

Let's use the RWR as an example. Open Mods/aircraft/A-10C/Cockpit/Scripts/AN_ALR69V/indicator/AN_ALR69V_init.lua and append the following lines to the end of the file:

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("ED_A10C_RWR")

("ED_A10C_RWR" is a unique name for the viewport, which you can pick arbitrarily as long as its a valid Lua variable name.)

 

You can then export the RWR like this in MonitorSetup.lua:

ED_A10C_RWR =
   {
       x = 599;
       y = 1360;
       width = 179;
       height = 179;
   }

I use this approach to export the clock and the RWR.

 

In general, under Cockpit/Scripts there is a subfolder for each device. Inside that is an indicator subfolder which includes one Lua file that ends with _init -- that is the one you want to edit.

 

Edit (2015-01-19): add code to the end of the file instead of the beginning (required for some indicators, others do not care)

 

 

Here is the .LUA file that I built. I don't think there is anything here that would black out the cockpit screens. It all worked fine the last time I played and then this today.

 

_ = function(p) return p; end;

name = _('duelmonitors');

Description = 'Two monitor configuration';

Viewports =

{

Center =

{

x = 0;

y = 0;

width = 1920;

height = 1080;

viewDx = 0;

viewDy = 0;

aspect = 1.7;

}

}

 

LEFT_MFCD =

{

x = 2000;

y = 105;

width = 550;

height = 800;

}

 

RIGHT_MFCD =

{

x = 2555;

y = 105;

width = 550;

height = 800;

}

 

UIMainView = Viewports.Center

Link to comment
Share on other sites

Here is the .LUA file that I built. I don't think there is anything here that would black out the cockpit screens.

 

You are right, if all you edited was the MonitorSetup file, your cockpit screens should not be blacked out. I had assumed that you had edited the files to change the export names (so you can have different names for Ka-50 and A-10C for example) and something went wrong. Editing the indivudual XYZ_init.lua files for each indicator is the only way I know of turning off the in-cockpit displays.

Link to comment
Share on other sites

  • 3 months later...
Its might be because the DCS World\Mods\Aircrafts (with "s") folder has been rename to DCS World\Mods\Aircrafts (without "s").

 

I had rename all the Aircrafts (with "s") folder for my JSGME installed mod into Aircraft (without "s").

 

 

Cheers

Hans

 

I had to do teh same as Hans. Instead of copying the init.luas to locations underneath \Mods\Aircrafts, copy them to the same locations underneath \Mods\Aircraft.

Link to comment
Share on other sites

  • 2 weeks later...
Ian;2133064']

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("ED_A10C_RWR")

 

Hi Guys,

 

short question. I don't have a "ViewportHandling.lua" where or how do I get one?

Since I see it's being referenced I guess that's the reason it's not working for me.

I am able to export MFCDs without problems.

 

Cheers

Khegrow


Edited by Khegrow
typo
Link to comment
Share on other sites

  • 2 weeks later...

I found the file in an old DCS Install I still had. These are the contents of the

<dcsFolder>\Scripts\Aircrafts\_Common\Cockpit\ViewportHandling.lua

 

local x0 = 0
local w0 = 0.5 * LockOn_Options.screen.height
if LockOn_Options.screen.oculus_rift then 
  w0 =  0.4 * LockOn_Options.screen.height
  x0 = 0.18 * LockOn_Options.screen.width
end 
				   
-- positioning on screen in HUD Only view 
function update_screenspace_diplacement(aspect,is_left,zoom_value)
local aspect     =     aspect or 1
local zoom_value = zoom_value or 0
local default_width  = w0 + (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 = default_width / aspect
local default_y      = LockOn_Options.screen.height - default_height

local default_x      = LockOn_Options.screen.width  - default_width - x0
if  is_left then
	default_x   = x0
end
dedicated_viewport 		  = {default_x,default_y,default_width,default_height}
dedicated_viewport_arcade = {default_x, 0	    ,default_width,default_height}
end

function make_viewport(aspect,is_left,is_top,default_width,zoom_value)
local aspect      	 =     aspect or 1
local zoom_value	 = zoom_value or 0
local default_width  = default_width or w0
	  default_width  = default_width + (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 = default_width / aspect
local default_y      = LockOn_Options.screen.height - default_height
local default_x      = LockOn_Options.screen.width  - default_width - x0
if  is_left then
	default_x   = x0
end
if is_top then 
    default_y 	= 0
end
return {default_x,default_y,default_width,default_height}
end

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
function try_find_assigned_viewport(exactly_name,abstract_name)
local viewport  = find_viewport(exactly_name) or 
				  find_viewport(abstract_name)				  
if viewport then 
   set_full_viewport_coverage(viewport)
end
end

Link to comment
Share on other sites

  • 1 year later...
Ian;2133064']To export additional gauges, you need to do some minor edits to their Lua files.

 

Let's use the RWR as an example. Open Mods/aircraft/A-10C/Cockpit/Scripts/AN_ALR69V/indicator/AN_ALR69V_init.lua and append the following lines to the end of the file:

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("ED_A10C_RWR")

("ED_A10C_RWR" is a unique name for the viewport, which you can pick arbitrarily as long as its a valid Lua variable name.)

 

You can then export the RWR like this in MonitorSetup.lua:

ED_A10C_RWR =
   {
       x = 599;
       y = 1360;
       width = 179;
       height = 179;
   }

I use this approach to export the clock and the RWR.

 

In general, under Cockpit/Scripts there is a subfolder for each device. Inside that is an indicator subfolder which includes one Lua file that ends with _init -- that is the one you want to edit.

 

Edit (2015-01-19): add code to the end of the file instead of the beginning (required for some indicators, others do not care)

 

Do this way current?

Link to comment
Share on other sites

  • 1 year later...
Ian;2133064']To export additional gauges, you need to do some minor edits to their Lua files.

 

Let's use the RWR as an example. Open Mods/aircraft/A-10C/Cockpit/Scripts/AN_ALR69V/indicator/AN_ALR69V_init.lua and append the following lines to the end of the file:

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("ED_A10C_RWR")

 

("ED_A10C_RWR" is a unique name for the viewport, which you can pick arbitrarily as long as its a valid Lua variable name.)

 

You can then export the RWR like this in MonitorSetup.lua:

ED_A10C_RWR =
{
	x = 599;
	y = 1360;
	width = 179;
	height = 179;
}

 

I use this approach to export the clock and the RWR.

 

In general, under Cockpit/Scripts there is a subfolder for each device. Inside that is an indicator subfolder which includes one Lua file that ends with _init -- that is the one you want to edit.

 

Edit (2015-01-19): add code to the end of the file instead of the beginning (required for some indicators, others do not care)

 

 

FSF is this still valid?

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...