cockpit-boxes in 3dsm/dbox

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

|K.O.S.H.
Posts: 3728
Joined: Fri, 19. Dec 03, 10:36
x3tc

cockpit-boxes in 3dsm/dbox

Post by |K.O.S.H. »

when i import a *.bod file with the option "detach parts" you can see a little box, calles copckpit

i guess, this is the cockpit position ;)

if i export my shipt and reimport it this box doesnt want to do, what i want.

its not on the right place and its called my_models_name_1 (e.g. split_m8_1)

im experimenting (right word??) with the pivot settings, but still no succes.

there are two questions:
1. what do i have to do, to get it on teh right place?
2. what do i have to do, that is gets the right name?
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!
|K.O.S.H.
Posts: 3728
Joined: Fri, 19. Dec 03, 10:36
x3tc

Post by |K.O.S.H. »

i think i'm wrong.

this is very confusing.
if anybody knows a good tutorial, for setting the cockpit position, please post a link here, thanks.

btw. now i know that the cockpit is a node in the scene, but why is there a box, called "cockpit" in every mesh??
maybe to remember the position later, when editing the scene?
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!
User avatar
-XTM-
Posts: 1277
Joined: Sat, 12. Nov 05, 19:46
x3

Post by -XTM- »

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.

You can also throw this all away, delete every cockpit body you come acros and just use a cameradummy for the bridge...easier, better to adjust and it also means your mod doesn't need a components.txt :)
The Xtended Mod

Need Help?

Ask Questions / View the FAQ's at TheXUniverse Forums
Read the News on Mod Developments at our Website
doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 08:14
x3

Post by doubleshadow »

Said Moxy - The component slayer :o


What are you describing |K.O.S.H. sounds like the cockpit is not linked to the main mesh when you are exporting the body. This is strange because dbox will link all parts to the main mesh upon import. Maybe you've deleted the link?
btw. now i know that the cockpit is a node in the scene, but why is there a box, called "cockpit" in every mesh??
Is is not. But it is in every body which has a cockpit (i.e. viewport) like ship hulls, turrets (in x2), cammera dummies (x3). Weapons contain similar part called "laser".
|K.O.S.H.
Posts: 3728
Joined: Fri, 19. Dec 03, 10:36
x3tc

Post by |K.O.S.H. »

http://www.uni-weimar.de/~kifx4335/priv ... pitbug.jpg

this is my problem.
the cockpit is always at 0, 0, 0

@ moxy: how can i set a camera dummy?
in the scene file, or in the mesh file?

@ doubleshadow: i think i dont know how to link the cockpit correctly (does "correct" have an adverb??)
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!
napalm_nabd
Posts: 25
Joined: Thu, 24. Nov 05, 04:25
x3tc

Post by napalm_nabd »

KOSH

Have you looked at this thread: http://forum.egosoft.com/viewtopic.php?t=130330?

It explains how to create a ship from scratch and mentions about the cockpit.

Napalm
User avatar
-XTM-
Posts: 1277
Joined: Sat, 12. Nov 05, 19:46
x3

Post by -XTM- »

You export cameradummies to the scenefile.

Just take your :twisted: 0,0,0 cockpit box and change it's name into
"Bships\props\cameradummy"

then export it to a new scenefile (set at correct location in 3ds first :wink: ) The resulting code should be someting like:

Code: Select all

P 19; B ships\props\cameradummy; C 1; N Bships\props\cameradummy_1bridge; b  // idx 19
{ 0x2002;  0; 58771; 9765;  0.000000; 0.000000; 0.000000; 0.000000;  -1; 1; } // 0
The "P 19" (when you export to a empty scene it's going to be P 0) is the Path Index reference for the X3 Editor entry under Turrets, first entry.
Usually you'll find someting like "ships\argon\argon_TL" there.
Edit that line and change it to ships\props\cameradummy
with the correct P-ID and you should be set to go...never fails.

Ofcourse you need to enter a body reference line to a scenefile also and link the scenefile to the Tships entry....guns and such are also nice additions :lol:
The Xtended Mod

Need Help?

Ask Questions / View the FAQ's at TheXUniverse Forums
Read the News on Mod Developments at our Website
doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 08:14
x3

Post by doubleshadow »

|K.O.S.H. wrote:http://www.uni-weimar.de/~kifx4335/priv ... pitbug.jpg

this is my problem.
the cockpit is always at 0, 0, 0

@ doubleshadow: i think i dont know how to link the cockpit correctly (does "correct" have an adverb??)
"Cockpit being still at 0,0,0" is a different problem. As posted in Observe's tutorial, you need also to export the cockpit location into types/Components.txt file. Use the Components->Export button in DBOX. This is also described in the "modding tutorial" in DBOX.

Moxy's method doesn't require this, but I always have problems to align the cammera dummy correctly as there is no reference. Couldn't they do it as an arrow? :shock:

To link a child to a parent, all you have to do is select the child, then click the link button and then drag and drop the cursor on the parent mesh. Both meshes will blink. After that, every time you move or rotate the parent, the child will follow it.

And finally a free english lesson from a Czech guy :D : "correctly" is... correct ;)
|K.O.S.H.
Posts: 3728
Joined: Fri, 19. Dec 03, 10:36
x3tc

Post by |K.O.S.H. »

moxy i love you

doubleshadow, i also love you, for your tools :)

everything works correctly ;)
except teh engines, but i didnt tried that, jet.

so here is the result:

http://www.uni-weimar.de/~kifx4335/priv ... ockpit.jpg

the secont ship i exportet and the first one, that works so, like i want.
so
only 14 ships to create and one to be updated, that should not last very long ;)
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!
User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Congratulations K.O.S.H.! It's good to see another player pass through the gates of ship building. Be sure to let us see more of your designs. :)
User avatar
-XTM-
Posts: 1277
Joined: Sat, 12. Nov 05, 19:46
x3

Post by -XTM- »

Yeah, :thumb_up: Kosh!
The Xtended Mod

Need Help?

Ask Questions / View the FAQ's at TheXUniverse Forums
Read the News on Mod Developments at our Website
Sharuel
Posts: 12
Joined: Sat, 11. Dec 04, 17:47
x2

Post by Sharuel »

I'm back - working on my heavy corvette again.

I've abandonned quite a few things to make it as simple as possible.

For now my custom turrets and the enginetrail is on hold - which brings me back to the problem at hand - cockpits.

I have read so many tutorials and after quite a few unsuccessful tries with the components.txt method I decided to give the camaradummy trick a try instead.

I have made a cameradummy_1bridge, positioned it correctly and exported it to the scenefile. I have replaced the hull-reference in tships with "ships/props/cameradummy" as you guys have explained so many times.

In game every turret works perfectly, but my main view is stuck at 0,0,0 and I can't fire the main guns.

I have doublechecked all the references to the scenefile, everything checks out there.

Since my game can't handle fake patches I make the addon, then extract the ship with the ship-creator tool and then add it to the game using the plug-in manager - can this be part of the problem?

Oh and a minor detail, my turrets aren't moving, but they fire as they should so it's a minor problem, any advice is highly appreciated.

From the scene file:

Code: Select all

P 17; B ships\props\cameradummy; C 1; F 0; N Bships\props\cameradummy_1bridge; b  // idx 17
{ 0x2002;  0; 3563; 22415;  0.000000; 0.000000; 0.000000; 0.000000;  -1; 1; } // 0

P 18; B ships\props\turretdummy; C 2; N Bships\props\turretdummy_2; b  // idx 18
{ 0x2002;  0; -4353; 45503;  0.000000; 0.000000; 0.000000; 0.000000;  -1; 1; } // 0

P 19; B ships\props\turretdummy; C 3; N Bships\props\turretdummy_3; b  // idx 19
{ 0x2002;  1820; -4260; 34533;  0.250000; 0.000000; 1.000000; 0.000000;  -1; 1; } // 0

P 20; B ships\props\turretdummy; C 5; N Bships\props\turretdummy_5; b  // idx 20
{ 0x2002;  -1820; -4260; 34533;  0.250000; 0.000000; -1.000000; 0.000000;  -1; 1; } // 0

P 21; B ships\props\turretdummy; C 4; N Bships\props\turretdummy_4; b  // idx 21
{ 0x2002;  0; 1515; -41865;  0.500000; 0.000000; 1.000000; 0.000000;  -1; 1; } // 0

P 22; B ships\props\cameradummy; C 2; N Bships\props\cameradummy_2front; b  // idx 22
{ 0x2002;  0; 0; 38715;  0.000000; 0.000000; 0.000000; 0.000000;  -1; 1; } // 0

P 23; B ships\props\cameradummy; C 5; N Bships\props\cameradummy_5left; b  // idx 23
{ 0x2002;  -2000; 2500; 35000;  0.250000; 0.000000; -1.000000; 0.000000;  -1; 1; } // 0

P 24; B ships\props\cameradummy; C 3; N Bships\props\cameradummy_3right; b  // idx 24
{ 0x2002;  2000; 2000; 35000;  0.250000; 0.000000; 1.000000; 0.000000;  -1; 1; } // 0

P 25; B ships\props\cameradummy; C 4; N Bships\props\cameradummy_4rear; b  // idx 25
{ 0x2002;  0; 7421; -45918;  0.500000; 0.000000; 1.000000; 0.000000;  -1; 1; } // 0
and here is the tships:
[ external image ]

Return to “X³: Reunion - Scripts and Modding”