Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Problem with turret view

The general place to discuss MOD''ing Freelancer!

Post Wed Dec 15, 2004 6:29 am

Problem with turret view

Got a problem...

I made the Rheinland gunboat flyable and changed the camera to fit. I also want to change the turret view's distance to the ship because the camera sometimes goes into the ship, and I did so in the cockpit ini-file. Looks like this:

[TurretCamera
tether = 0.000000, 250.000000, 500.000000
yaw_rotate_speed = 2.000000
pitch_rotate_speed = 1.500000
accel_speed = 5

The huge amounts are for testing only. Now: There seems to be no difference at all, whether I take small amount or huge ones.

What's wrong?

Post Wed Dec 15, 2004 9:32 am

Check you only have one entry in the shiparch.ini part for the gunboat that pertains to the view of the camera. Remember - that is the turret cam, and check that the link to cockpit camera points at that file........

Post Wed Dec 15, 2004 12:07 pm

There is only one entry and it is pointing to the rite cockpit file.

Strange...

Post Thu Mar 10, 2005 6:16 am

I had the same problem. I made a custom cockpit for a ship and unloaded and reloaded the mod several times with no success. I finally checked the actual game directory and found the new cockpit ini files had not been copied. I then realized that FLMM needed to be restarted to register the new files.

Post Thu Mar 10, 2005 11:09 am

FLMM must also be restarted to recognise changes to an xml file. Changes in ini files work fine however.

Post Thu Mar 10, 2005 12:41 pm

I've done a lot've custom cameras for my mod... so here are a few things to look at:

1. Did you put a Cockpit and CockpitEx into your CMP?

2. Look at the following sample. Does this match what you're doing?

SHIPARCH.INI
cockpit = cockpits\liberty\graf_drill.ini

GRAF_DRILL.ini
[Cockpit
mesh = cockpits\civilian\models\cv_cockpit.cmp
int_brightness = 0.500000
head_turn = 30, 10
[CockpitCamera
[TurretCamera
tether = 0.000000, 0, 120
yaw_rotate_speed = 2.000000
pitch_rotate_speed = 1.500000
accel_speed = 5

Post Thu Mar 10, 2005 12:45 pm

Wow, thanks for all the feedback.

My problem was, like most of my problems are, the result of doziness when I am modding through the night. ;-)

The shiparch.ini pointed at the wrong cockpit ini file. So all the changes were just not regognized.

Post Thu Mar 10, 2005 1:22 pm

That was in my first reply too

Argh, any chance of giving everyone a thorough debrief on what each of the things mean? It hasn't been done as far as I am aware - and it could be useful for alot of modders too. Resources are always good!

Post Thu Mar 10, 2005 1:25 pm

Yeah, sorry for the inconvenience. As I said, my fault. And a stupid one, too.

Post Thu Mar 10, 2005 2:33 pm

@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

Return to Freelancer General Editing Forum