@Chips:
While I'm here trolling about, might as well take a minute on this, sure
Sooooo..... here's a mini-description of what you should do to implement custom cockpits (not cockpit meshes... I've already written a Tutorial about that):
1. Make sure your new ships's CMP contains a Cockpit (no 01 after it) and a CockpitEx (again, no 01) HardPoint.
The Cockpit HP determines where the camera will be placed when the player switches to Cockpit view. Putting it in an unreasonable place (say, in the middle of your Super-Uber Star-Killer ship), will result in a jarring sensation for players- their brains will be saying, "uh... I know I can't see out've here", and they'll be able to see shots from their Turrets firing from apparantly empty space, because your ship's Turrets and other weapons aren't drawn in Cockpit View, but any ALEs on-screen will be...
CockpitEx is a legacy HP- the INI coding in Shiparch.ini for the exterior camera position actually overrides its functionality, if present. But if you goof up and forget to put that information in your INI and don't put a CockpitEX HP in, the game will CTD
That said, it's not strictly necessary, but I put it in anyway- I mean, how long does it take to make a HP with HardCMP?
2. Now let's look at the following entries that you should make in two different INI files: your Shiparch.ini (or, if you're me, the XML/FLMM script that's going to append a new entry to said file), and your new custom cockpit INI, which can be put anywhere in the DATA\COCKPITS folders (just note the path, since you're going to need that here in a minute).
In this case, this is the custom Cockpit/Turret setup for one of my mod's largest and most unwieldy flying objects: the Graf Drill. It's a gigantic zeppelin with multiple turrets all over it, so we need to have the Turret View set up so that we can circle it easily, but we don't want to be so far away that we can hardly tell what's going on.
In Shiparch.ini, I'm putting the following line into the Graf Drill's {Ship} entry:
cockpit = cockpits\liberty\graf_drill.ini
All this does is point towards another INI file, which is used to define the cockpit's actual behavior. DA did this so that they could re-use Cockpits for multiple ships with similar sizes and builds, such as the Civilian Light Fighters.
Next, we need to create a new file that will actually cotain this info. In this case, we've named the file graf_drill.ini.
Here's a line-by-line explanation of what everything does:
GRAF_DRILL.ini
[Cockpit
Tells the game engine you're defining a Cockpit
mesh = cockpits\civilian\models\cv_cockpit.cmp
Defines which mesh you're using. For more details about mesh specifications, etc., see my Tutorial on making custom Cockpits.
int_brightness = 0.500000
This line overrides any light/shadows that may effect the Cockpit during flight. It's best to leave at 0.5, because that enhances the player's sense of motion.
head_turn = 30, 10
I *think* this is supposed to make the player's model turn its head, but I don't think I've ever seen an example of this in action. I'd leave it alone.
[CockpitCamera
Note that this doesn't have any lines! DA apparantly was going to have seperate specifications for Cockpits and their Cameras, but they ended up imbedding the Cameras into their Meshes instead (which is a pretty ugly way of doing things, but it's what we have to work with).
[TurretCamera
Ah... now we're looking at the TurretCamera.
tether = 0.000000, 0, 120
The three variables after "tether =" are the displacement of the tether's centerpoint in XYZ. As you can see, you can use an integer or a float... FL doesn't care.
yaw_rotate_speed = 2.000000
This is how fast the Camera can spin from right to left, or vice-versa.
pitch_rotate_speed = 1.500000
This is how fast the Camera can move up and down. Please note that the "dead zones" at the very top and bottom of the Camera's arc are hard-coded, and caused by FL's funky coordinate system... so making this really fast will not make that go away!
accel_speed = 5
Making this higher will cause the camera to reach its top rotational speed faster. Set it to something really high, and the camera will track the mouse almost perfectly- which is good for people with low mouse sensitivity and good aim, and bad everybody else.
Edited by - Argh on 3/10/2005 2:34:10 PM