So if any of you has seen, Umaibow seems to have stepped ahead of us and managed to figure out how to align instruments with cockpit srfs, creating a flawless cockpit with instrument controls. Of course, I need to learn how to do this, and on this thread I'll be recording how I break it down and what I did to understand what.
Important points will look like this.
So, to start off, I've decided what I want to do is breakdown that Stock C-130, and figure out what numbers go where. I've taken a look in the C-130 Dat , and here's what I got so far:
INSTPANL aircraft/c130.ist ISPNLHUD TRUE ISPNLPOS -0.5m 0.72m 10.4m
So, of course, INSTPANL determines the directory/filename of the insturment panel. And, judging by the variable name, ISPNLHUD determines if the DAT file uses both a HUD and an Instrument panel. The variable I really want to mess with is ISPNLPOS. What determines where the instrument panel is placed? What is it's offset from zero?
To figure it out, I'm going to breakdown the IST file, construct a small cockpit using circles and such in the exact places where the IST designated there are objects drawn, and load it in game to see where the instrument panel is, relative to the cockpit file.
Alright, IST open. Here's what I got:
REM ???????? x1 y1 x2 y2 REM (x1<x2, y1<y2) PNLRANGE -1.00 -1.0 1.00 -0.0 ATTITUDE 0.0 -0.0 0.05 HEADING_ 0.0 -0.12 0.05 ALTITUDE 0.12 0.0 0.05 VERTICAL 0.12 -0.12 0.05 AIRSPEED -0.12 0.0 0.05 TRNCOORD -0.12 -0.12 0.05 THROTTLE -0.12 -0.24 0.05 ILS_____ 0.24 0.0 0.05 VOR_____ 0.24 -0.12 0.05 ADF_____ 0.24 -0.24 0.05 GEAR____ 0.24 0.06 0.28 0.10 BRAKE___ 0.30 0.06 0.34 0.10 FUEL____ -0.25 -0.05 -0.22 0.05 GLOADING -0.21 -0.05 -0.18 0.05 FLAP____ 0.30 -0.17 0.33 -0.07 REM SPOILER_ 0.50 -0.67 0.62 -0.37 SPEEDVFE 0kt SPEEDVNO 350kt SPEEDVNE 380kt SPEEDRNG 400kt SPEEDMCH FALSE SPEEDARC 350deg
The REMs are notation lines that are skipped because the REM is at the front of the line. These are used to create notes for users and modders. However, I'm just interested in the middle variables.
For instance, this one:
ADF_____ 0.24 -0.24 0.05
This is a line for a round instrument. I vaguely remember seeing that PNLEDIT Perl script shows a visual form of the IST files. I'm going to load it up. Upon messing around with the ADF instrument, I realized that 0.24 -0.24 were the X and Y positions, and 0.05 was the diameter in meters of the instrument. So every positioning of round instrument panels are written as so:
NAMEOFINST XPOSFROMCNT YPOSFROMCNT RADIUS
Alright. I broke down the other ones as well.
Rectangular coding is written as so:
LEFTPOS BOTTOMPOS RIGHTPOS TOPPOS
Where each position is the position in x (for left and right) and y (for top and bottom) from zero.
what I'm going to do is reconstruct a cockpit based upon the values I found in this file.