Ship modeling tutorial (Page 6 of 8)

Written by Killertide,

Ship modeling tutorial, written by Killertide


Weapons


Creating a forward weapon is very simple, you need to poke in a couple of Type files but that's the easy part. Create a model of a weapon, any one will do, if you're not to bother too much with it make a box with a pipe or cilinder, so you can make the destiction from the back to the tip of the gun and texture it. Remember: All scene file objects are to be reversed 180 in the X angle, the front is actualy the back (kinda imagine that if it was a ship, it had super reverse speed!).

For tutorial proposes i've imported a couple of ships, cut and joined this and that and made this:

Argon lol


Looks crazy hum? After the model is done, textured and faced in the proper direction, you can start. The pivots are importante so let's fix that now: Select Hierarchy, afect pivot only, center to object (that's not importante but, it's good practice), Transform and scale. That way the pivot is perfect. Convert the object to editable poli again and we're good to go on that. Name the weapon argontest, just for simplisity proposes, colapse and reset Xform prior to exporting. When you have exported the gun exit and re-enter 3ds. Import the weapon model again so we can resume.

The next step is to create one object, i use a cilinder. Flip it 90, fix the pivots just like you did with the weapon body like so:

Ship mesh


That object MUST be called Laser, notice the capital L pls. You'll need to link the weapon to the Laser object: select the Select and Link icon (top menu, 3rd icon from the left), select the weapon, drag and drop into the object. Now in Dbox, you need to export that component to the components txt located in the types folder. If sucessful, it will ask if you whant to add the entry, select yes. If you select show, it will make a red cross in the Laser object, that's the fire point of the weapon, pls delete that from 3ds after you've seen it.

The gun is ready now, we need only to let X3 know of it's existence!

In the components txt, search for the entry for your gun, it should be something like this:

SCTYPE_LASER; 20;
ships\props\bigturret_rightweapon; 1;
NULL; 0.000000;0.017776;0.551788; 0.000000;0.000000;0.000000;
ships\props\bigturret_leftweapon; 1;
NULL; 0.000000;0.131409;0.978302; 0.000000;0.000000;0.000000;
ships\props\turretdummy; 1;
NULL; 0.269867;0.457977;0.996826; 0.000000;0.000000;0.000000;
ships\props\weapondummy; 1;
NULL; 0.000000;0.120056;0.935944; 0.000000;0.000000;0.000000;
ships\props\invisible_weapon; 1;
NULL; -0.000031;0.028748;0.540283; 0.000000;0.000000;0.000000;
944; 1;
LASERF_ROTATE; -0.000031;0.086548;-0.813232; 0.000000;0.000000;1.000000;
772; 1;
NULL; -0.000031;-0.245972;0.639771; 0.000000;0.000000;0.000000;
111; 1;
NULL; -0.000031;0.003998;0.632385; 0.000000;0.000000;0.000000;
375; 1;
NULL; -0.000031;0.003998;0.632385; 0.000000;0.000000;0.000000;
503; 2;
NULL; -0.000031;-0.000031;0.985870; 0.000000;0.000000;0.000000;
NULL; -0.000031;-0.216125;0.326111; 0.000000;0.000000;0.000000;
504; 1;
NULL; 0.000122;-0.000031;0.955322; 0.000000;0.000000;0.000000;
887; 1;
NULL; -0.000336;-0.088959;0.848816; 0.000000;0.000000;0.000000;
950; 1;
NULL; -0.002045;-0.397278;0.561432; 0.000000;0.000000;0.000000;
argontest; 1;
NULL; -0.105978;0.981562;0.048373; 0.000000;0.000000;0.000000;

See the last entry? That's your gun. X3 will not recognize the weapon this way, it has no path, i'll elaborate:

The vanilla weapon is located in the ships\props\ folder, if we are going to place this one there aswell, we need to let X3 know that, making this:

ships\props\argontest; 1;
NULL; -0.105978;0.981562;0.048373; 0.000000;0.000000;0.000000;

I've added the path that i placed my weapon in, so X3 knows where it is! But still... It doesn't! There is one more file that needs to be fixed:the Dummies txt.

That file has several bits of info about docks, turrets, cockpits and so on, and we'll need to add our weapon there. Look here:

SDTYPE_GUN;12;
106;GUNF_FIXED;2;GUNSTATUS_INITIAL;4291; GUNSTATUS_FIRING;4292;0;
107;GUNF_FIXED;2;GUNSTATUS_INITIAL;4293; GUNSTATUS_FIRING;4294;0;
91;GUNF_ROTATE;1;GUNSTATUS_INITIAL;4290;2;90; GUNPARTF_ROTATEALPHA;89;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
708;GUNF_ROTATE;1;GUNSTATUS_INITIAL;4295;2;980; GUNPARTF_ROTATEGAMMA;981;GUNPARTF_ROTATEBETA|GUNPARTF_ROTATEGAMMA;
19018;GUNF_FIXED;0;0;
19019;GUNF_FIXED;0;0;
19080;GUNF_FIXED;0;0;
19081;GUNF_FIXED;0;0;
19082;GUNF_FIXED;0;0;
19083;GUNF_FIXED;0;0;
ships\props\bigturret_dummy;GUNF_ROTATE;1; GUNSTATUS_INITIAL;ships\props\bigturret_scene;3;ships\props\bigturret_body;GUNPARTF_ ROTATEALPHA;ships\props\bigturret_leftweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;ships\props\bigturret_rightweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
ships\props\bigturret2_dummy;GUNF_ROTATE;1; GUNSTATUS_INITIAL;ships\props\bigturret2_scene;3;ships\props\bigturret_body;GUNPARTF_ROTATEALPHA;ships\props\bigturret_leftweapon;
GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;ships\props\bigturret_rightweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;

This is the vanilla file, we need to add the gun there, logicaly, it has no movement so let's pick a FIXED type one, adding the weapon with the correct path to it and adding +1 to the top count, like so:

SDTYPE_GUN;13;
ships\props\argontest;GUNF_FIXED;0;0;

And the ship is ready to fire, and X3 know's that too

Next: Scene file construction, Tships and mini mod assembly
<< Previous Page - Next Page >>