Jump to content

Placing Cockpit Guages


Recommended Posts

I have created an add-on interceptor aircraft from the 60's era and have everything working pretty good except for a working instrument panel.

I can find example files of how they are declared (mainpanel_init.lua in some aircraft). Many aircraft don't even have such a file?

After much time searching, I cannot find how they are placed on the instrument panel, ie. the x,y,z coordinates and the desired size.

I have looked at some existing models in modelviewer and they show a huge number of strangely numbered points, but they appear to be just for clickable switches and knobs.

I don't need clickable objects or a HUD. I just want to place a dozen or so working instruments on the main panel.

Can anyone help me out here? Thanks in advance

Link to comment
Share on other sites

Not sure what exactly you are doing. But if you have built your own 3D cockpit, then AFAIK it would be a matter of making animated gauges and just put them wherever you want them in the pit.

 

Simple needle gauges don't need their position or size to be defined - they just react to specific animation arguments. The same goes for switches and knobs - I think what you found in regards to placement coordinates has to do with the clickable overlay function.

 

But its been a long time since I dabbled with this, so I cannot say for sure how things work these days :) .

Link to comment
Share on other sites

Thank you for your help Seaeagle. Now it is much clearer what I have to do to make working guages and maybe a few switches. I had in the back of my head they needed to be sized and given x/y coordinated as is the case in MSFS. Guages were projected so to speak, onto the main panel and not created as part of the model.

So from what I have read I can make up my own argument numbers? I made a couple of simple guages as a test and they do show up in the model. The problem now is I am getting some nebulous error in reading the mainpanel_init.lua so they don't actually work.

I just used the file for the F-104T from years ago.

Link to comment
Share on other sites

Thank you for your help Seaeagle. Now it is much clearer what I have to do to make working guages and maybe a few switches.

 

No problem mate - but like I said its been quite awhile since I last did any modding, so between what I have forgotten and structure changes in the meantime, I may not be of much help to you.

 

I had in the back of my head they needed to be sized and given x/y coordinated as is the case in MSFS. Guages were projected so to speak, onto the main panel and not created as part of the model.

 

Yeah and as I recall, that was also the case for some cockpit elements in this sim earlier on.

 

So from what I have read I can make up my own argument numbers?

 

See thats where I am out of the loop - back when I last did any modding, you could not add new aircraft entries, but had to mod your stuff on an existing slot. So you would get whatever instrumentation already assigned/declared for that and all you could really do was to put it where it was appropriate in your own cockpit environment.

 

But yes these days you should be able to(and probably need to) build up everything you need in various lua files, but I haven't tried that.

 

I made a couple of simple guages as a test and they do show up in the model. The problem now is I am getting some nebulous error in reading the mainpanel_init.lua so they don't actually work.

 

I just used the file for the F-104T from years ago.

 

I don't know if thats the problem, but if you used an old file as template, it could be out of date - as I understand from people who have worked on this, there has been alot of changes made in the sim structure over the recent years, so something that worked fine a few years ago might not today.

 

You can check this old post by Alex O'kean on creating a cockpit from scratch:

https://forums.eagle.ru/showpost.php?p=1470816&postcount=9

 

Its a little over my head and I don't know how current it is, but it should at least give you an idea.


Edited by Seaeagle
Link to comment
Share on other sites

  • Recently Browsing   0 members

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