Troubleshooting Cockpits

From X-Wiki

Jump to: navigation, search
This tutorial was converted from a HTML document and needs to be futher converted into wiki style.

Have you tried to move the cockpit part and failed? The reason why is easy. It is called types\Components.txt

This file hold position of all "special" parts in all bodies (meshes). Unlike X2, X3 does not use the "special" parts in mesh to determine the cockpit/laser positions. Instead it will look in the "component" file and use the position stored there. That's why moving the cockpit part "does nothing".


Contents

Why I don't like the "components" file

I really don't see any reason why Egosoft did this. There can hardly be some performance gain as you can simply calculate all the positions "on the fly" while loading the mesh - that is when the corresponding ship (whatever) is being displayed.


Solutions

There are several different methods to resolve this problem. Staring with the "most correct":

Updating the components file

Pros:

  • The "correct" way to set camera positions
  • No visible "cameradummy" box
  • Is done with the body rather than scene

Cons:

  • More time consuming and error-prone than using a cameradummy
  • Means that your ship will require editing the components file to get into a mod


The cockpit box/mesh is used by Egosoft as a placeholder for exporting it's coordinates to components.txt

Every cockpit object in components.txt get's a camera attached to it and this is going to be your bridge/cockpit view.

Exporting a cockpit body to components is done via Dbox (export to components option) and the cockpit needs to be linked to the main mesh prior to doing so > you need to select the main mesh for export, Dbox will seperate the cockpit coordinates itself and ask you if it should enter a new entry to the components.txt

Make sure the pivot of the main mesh is at 0,0,0 before exporting.

Using a cameradummy

Pros:

  • does not require altering of the components file


Cons:

  • Moves the cockpit problem to the cameradummy object (not likely to bite you)
  • cameradummy is visible as small box


  1. Import the scene file (for eg argon_TL_scene.bod)
  2. Import body file "cameradummy" (located in the ships/props folder).
  3. Make sure to label the part "Bships/props/cameradummy_##" (where "##" is a number to use for reference to find it).
  4. Position the cameradummy part where you want it.
  5. Export all to "scene"
  6. Put the scene file into your mod catalog (say, newship.cat), into folder objects/ships/argon (for this example).

Then you'll have to open up TShips, and go to the ship's cockpits/turrets tab. The first listed should be argon_tl_something. Replace this with "ships/props/cameradummy", then put the proper IDX in for it (open your scene file in notepad, it should be the last item, use that index number). For ease of testing, I'd put TShips and the scene file into their own catalog.

Save it, and you should now have a new cockpit position in game.


Deleting the compnents file

Pros:

  • simple


Cons:

  • time-consuming rebuild
  • hard to remove default components file
  • won't work with mixed mods


Just move the cockpit/laser parts where you want them, export the body file and then delete the Components.txt file. X3 will re-create the file based on the body data and your cockpit/lasers position will be as you exported them.

If you are running the "unpacked" game, then you can do it. If not then you hav problem because the components file is located in 04.cat and 05.cat (X3 ver 1.2) so you cannot delete it. Well you can, but the only way is by using X3ModManager to delete it from all the catalogs and mods. Then X3 will re-create it in types directory.

Re-creation of the components file takes AGES to complete. At last at my computer (which is not really up to date anymore...). I don't understand why it takes so long to recreate the file. Hmm... as I'm thinking of it now, maybe I know why, but nevertheless I'm refusing to wait ages every time I move my cockpit.

I think that the components file can make problems when creating ship mods.

Example: I will shift cockpit in my Dragon forward but Deadly will leave it as it is in his "Super duper X3 mod". I will use his mod which will have to include the compoennts file as well and the result will be that my changes to cockpit position will be lost because overwriten by Deadly's componenets file from his mod.


Physcially moving the body

Pros:

  • Simple to implament
  • Takes advantage of lack of components entry

Cons:

  • Causes the ship recticle to center on the cockpit rather than the ship (can cause aiming problems with autotarget and AI
  • Can only solve the problem for a single cockpit
Personal tools
sections