Instructions on how to put a custom ship model in the game Part 2

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

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

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Instructions on how to put a custom ship model in the game Part 2

Post by Observe » Mon, 27. Feb 06, 23:20

Here is Part 2 of my Step by step instructions on how to put a custom ship model in the game. Part 1 showed you the procedure of how to modify an existing Argon Nova M3 in 3DS Max and get it back into the game as a custom ship. While most of the procedure here is the same, these new instructions will cover additional details if you are creating your ship from scratch instead of simply modifying an existing ship.

Would you like to be able to go from this in 3DS:

[ external image ]

To this in the game?:

[ external image ]

It's not that hard really. As a relative beginner, I created this model and these instructions in a couple of days. I'm sure an experienced 3D modeler could do much better in a shorter time.

I'm probably the last person who should be writing this, since I'm very new to 3D modeling in general, and to X3 modding in particular. But hey, if I can do it, so can you. Here's how.

Some of these steps are repeated from Part 1 so that you don't have to keep jumping back and forth.
We will be creating an M3 class ship based on the approximate size of the Argon Nova. We will be using Nova engines and lasers to keep things simple, and because I am usually on fairly good terms with the Argons. :)

Required software:
3DS Max design software. I'm using version 6. I don't know how compatible these instructions are with other versions. Currently there is a 30 day demo that you can download from Autodesk. I understand that GMax is a free alternative to the expensive 3DS Max, but I know nothing about that application. Other people in this forum may be able to help you with Gmax if you are interested.
Doubleshadow's X2BC - decompilation of BOB files and compilation of BOD files
Doubleshadow's DBOX2 - import/export body and scene files to 3ds max/gmax.
Doubleshadow's X3 Editor - edit game files and create mods.
Doubleshadow's X3 ModManager - unpack game files and manage .cat/.dat files. Instructions for Use.

And of course the X3 game itself.

1. Use Doubleshadow’s X3 ModManager (ver 0.0.5) and extract all the game files from 01.cat – 06.cat (or whatever the highest number is) into a working (sandbox) directory. You wouldn’t have to extract them all, but what the heck.

2. Now use Doubleshadow’s X2BC command line program to convert the file objects\ships\argon_M3.bob to argon_M3.bod. I extracted all my .cat files to e:\xtbc\data, so my command line is:
e:\x2bc\x2bc -d "E:\x2bc\data\objects\ships\argon\argon_M3.bob”. There are various ways to automate this procedure with batch files if you know how.

3. Make sure that the file objects\ships\argon_M3_scene is also in .bod format. As I recall, this file was already converted when I extracted the .cat files, but you may need to execute X2BC on that file as well (if it isn’t already.bod).

4. Install the Doubleshadow’s DBOX2 plugin for 3DS.

5. Run 3DS and use the MAXscript DBOX2 plugin to import ships\argon\argon_M3.bod as a Body with Detach Parts checked. This will import the Nova spaceship into 3DS.

You will see 2 imported objects. One is named argon_M3, and the other one is name Cockpit. The Cockpit object is that funny little box thing near the front of the cockpit. This is a "special" part that you will need to have. There is really nothing special about it except its name.

In my version of 3DS there is a tutorial on Modeling a Low-Polygon Spaceship. It takes you through the steps of creating a model from some drawings and a simple box shape.

6. Superimpose the Nova against the tutorial spaceship sketches, and resize the viewports so everything kind of lines up. When things look right, you should lock the viewport backgrounds so that everything stays in place as you work.

[ external image ]

7. Delete the argon_M3 object, but leave the Cockpit object. You can move the Cockpit object out of the way for now if you need to.

8. Continue with the 3DS Max tutorial until you are satisfied with your model. I'm just a beginner, and I didn't want to put too much time into the model when what I really wanted to do was figure out how to get it into the game first. Make sure you keep your polygon count down as low as possible. The Nova has about 10,000 polygons (not including the lasers and engines etc). With the application of judicious smoothing techniques, you should be able to keep your polygon count much less than the Nova, and have it still look quite good. NOTE: because of the way I sized the drawing to match the Nova, the measurement amounts for extrusions and such specified in the 3DS tuturial will need to be adjusted accordingly.

This is what I ended up with after going through the tutorial a few times:

[ external image ]

9. In 3DS select your ship and name it: ships\argon\phoenix_M3

10. Now you need to deal with that funny little Cockpit object. Go ahead and move it so it is placed on the outside of the cockpit about where your eyes would be looking out. You can see the red cross where I have placed mine (you won't see the red cross in your model right now).

11. Select the Cockpit object, and make it a Child (link) of the ships\argon\phoenix_M3 object.

12. Remove the Materials that the Cockpit object inherits from Nova. No sense keeping them unless you want to use them for your model.

13. Select the ships\argon\phoenix_M3 object, and using the DBOX Max Script plugin, scroll down to the Components section and click the Export button. This will update components.txt for your ship viewing (Cockpit) position. Now click the Show button. A red cross should now appear on the Cockpit object. This will verify that components.txt has made an entry for your ship.

14. Using the DBOX plugin, Export All (Body) to: objects\ships\argon\phoenix_M3.bod (this is an arbitrary name; it could be anything. I go by Phoenix in the game, and am in the habit of this naming convention).

15. Reset 3DS and import the Nova Scene file: objects\ships\argon\argon_M3_scene.bob with Detach Parts unchecked. Select the Nova, and rename it: Bships\argon\phoenix_M3_1b

16. Export the Scene file as: objects\ships\argon\phoenix_M3_scene.bod. Now import it again (Detach Parts unchecked), and you will see that your new ship has replaced the Nova in the scene. You will also see that the lasers and engines are not positioned correctly because our new ship is not exactly the same shape as the Nova.

17. Move the lasers and engines to position them correctly for your ship. There are about 15 parts left over from the Nova scene we are inheriting that start out with B566_. Doubleshadow informs us that these are RCS (reaction control system) jets. You will notice these jets if you are familiar with piloting the Nova. When you do a turn you will see little "jets" activating on one side or other of the nose. I deleted these parts from my model for simplicity.

You will notice that there is a cameradummy object in the scene that we are using from the Nova. This is the camera viewing position for the rear turret. Move it so that is a positioned above or below the direct line of fire for the rear turret. We will have to make a change in the Tships file for this object later.

[ external image ]

18. Using Doubleshadow’s TXT Editor, open the file types\Tships and copy and paste the Argon Nova.

19. In the ID section replace NEW_OBJECT_1 (or whatever) to something like SS_SH_001. Change the description number to 5902.

20. Still in TXT Editor, click on the Text Res button and open the file t\440001.pck.

21. Scroll down to the Boardcomp.objects section and right-click in the right window pane and select “Add text”. Enter 5902 in the ID, and enter a name for your ship. I called mine “Phoenix – M3 - experimental”. Add text again with ID number 5903. This will be the description of your ship. I entered “Classified”. Save and exit the Text Resource Editor.

22. Back in TXT Editor, in the Model tab for your ship (SS_SH_001) change the Ship scene line to: ships\argon\phoenix_M3_scene.

23. Open the scene file ship\argon\phoenix_M3_scene.bod with a text editor and look for the cameradummy entry. You will see a line like this:
P 12; B ships\props\cameradummy; C 2; N Bships\props\cameradummy_2h; b // idx 12
Note the idx number (12 in this case)

24. Select the Turrets tab (back in TXT Editor), and change the Path idx for ships\props\camerdummy to match the idx in the scene file (12 for our example).

25. Select the Raw data tab and scroll down to offset 56 (in this case). You will see an entry that still refers to the Nova. Change it to: ships\argon\phoenix_M3. Save and exit TXT Editor. NOTE: This may be of interest to people having problems with their cockpit view being stuck at 0,0,0. You have to change this offset reference or your viewing position (cockpit) will be incorrect.

26.Using Modmanager, create a new .cat file (I called mine flagship.cat) in the Mods subdirectory off the game root. When you start the game, you will be able to select flagship.mod.

27. Add the following files from your “sandbox” to your flagship.cat file in Modmanager:
types\Tships.pck
types\Components.pck
t\44001.pck
textures\yellowgreen.jpg (a texture I used in 3DS)
textures\steelplt.jpg (another texture)
objects\ships\argon\phoenix_M3.bpd
objects\ships\argon\phoenix_M3_scene.bpd

Run your game and either script in a Phoenix – M3 – experimental, or add one into the game with the Universe editor. I add my ships to one of the existing shipyards so I can buy them from there.

You will now have a custom ship in the game Part 2!!

By the way, here is the "cockpit" view for this ship. I like having the cockpit nearer the front of the ship than many of the X3 ships have it. That way I don't have a huge nose sticking up into the screen like a sore thumb :wink:

[ external image ]
Last edited by Observe on Sat, 21. Jul 07, 01:36, edited 16 times in total.

User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV » Tue, 28. Feb 06, 00:50

added to sticky :)

:thumb_up:

User avatar
DeadlyDa
Posts: 1882
Joined: Mon, 5. Jan 04, 04:46
x4

Post by DeadlyDa » Tue, 28. Feb 06, 01:19

Observe,

Very nicely done :!:

I have always felt guilty that I didn't take the time to write up a formal tutorial...and now I don't have to :D

(Anyway...I always "overcook" my tutorials to the point where no one knows what I'm talking about :roll: )

Very impressive. Come on folks! You no longer have an excuse...now you can build the ship of your dreams!.

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Tue, 28. Feb 06, 01:36

Thank you DeadlyDa for your kind remarks and for your many very helpful posts that assisted me in learning how to do this stuff. :)

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 08:14
x3

Post by doubleshadow » Tue, 28. Feb 06, 11:56

DeadlyDa wrote:Anyway...I always "overcook" my tutorials to the point where no one knows what I'm talking about :roll:
:lol:

That's why it is in fact a good thing that you are still beginner Observe (sort of... ;) ). Because of this, your tutorial is very straithforward.

Some clarification:
For work like this, you don't even need to import the "original" argon m3 scene. You can just import the weapons you want to use (as bodies). Of course you must know how to name them correctly. But because you have to name your own ship body anyway, that's not a big deal.

The cockpit part is just a simple cube - there is no magic about it. You just need to name it cockpit and link it as a child of the hull.
There are about 15 parts that start out with B566_. I'm currently not exactly sure what those parts do, but I deleted them all from my scene.
Those are RCS (reaction control system) jets. X3 will display the "jet effect" while maneuvering based on position and name of these objects. This isn't anything you want to mess with when you've just started with X3 modding.

Similar to the RCS, you can place position lights on your ship. Look at Deadly's models (the Banshee for example).

Keep it up :thumb_up:

PS: I will have to read that "Space ship tutorial" too. I ended with the Chess tutorial (finished the castle :D )

Starscream99
Posts: 59
Joined: Tue, 6. Dec 05, 04:03
x3

Post by Starscream99 » Tue, 28. Feb 06, 13:56

Observe

thank's for doing such a great job keep up the good work by the way were could I find that model you made for your game need a good looking fighter pilot for my carrier :roll:

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Tue, 28. Feb 06, 18:52

Thanks for the clarifications Doubleshadow!!

One question: Should I change the instructions to leave the RCS parts from the Nova in the scene for the new ship, and just reposition them to match? Or should we go ahead and create scenes without the RCS parts for now just to keep things simple in the beginning?

All honors go to Doubleshadow for his amazing tools! I am merely a messenger. :wink:

DIGSIN
Posts: 538
Joined: Fri, 28. Oct 05, 12:37
x4

Re: Instructions on how to put a custom ship model in the game Part 2

Post by DIGSIN » Tue, 28. Feb 06, 20:04

Observe wrote:
I'm probably the last person who should be writing this, since I'm very new to 3D modeling in general, and to X3 modding in particular. But hey, if I can do it, so can you. Here's how.
Why?

I think you would be better giving this sort of information,for one reason.
All the others modders would probably give the information better, but also they would give too much information.
Being new to modding you can only say how to do it, you probably have not found all the pitfalls the more experienced modders have come across.
The more experienced modders would add the pitfalls into the list and possibly confuse anyone who was interested in getting started in modding.

If i was interested in modding, this is the sort of information i would look for, simple and easy to follow. Hopefully a few more people will start modding from this information and show their work to the rest of the community.


Hope i have not offended any experienced modders with this post, if i have i apologize in advance.

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 08:14
x3

Post by doubleshadow » Wed, 1. Mar 06, 08:37

Observe wrote:Should I change the instructions to leave the RCS parts from the Nova in the scene for the new ship, and just reposition them to match? Or should we go ahead and create scenes without the RCS parts for now just to keep things simple in the beginning?
No leave the tutorial as it is. You can always write more advanced one later.
But you may want to try to create the scene as I described: without importing any original x3 scene. If you will be able to do that, than you may think about updating this tutorial. (the only thing you are using from the orignal scene is the cockpit iirc :) )

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Wed, 1. Mar 06, 16:53

Thanks Doubleshadow! I realize that my instructions may not represent the best/cleanest procedure for doing this, they are just the way I did things to make the very least changes necessary; so that the process of elimination would be easier if/when things didn't work quite right at some stage.

User avatar
Hank001
Posts: 1652
Joined: Tue, 21. Feb 06, 23:50
x3ap

Post by Hank001 » Wed, 1. Mar 06, 20:27

Man I tell you,

I started a thread and created a monster here!

Your explanation here is like Desa-vu from the freelancer threads in
LancersReactor that opened up THAT game to SUPERMODS!
YOU DO GOOD WORK MAN!

HANK001 score of 9.9995 out of 10.

Edit: posted in 2006. 11 years later and change Good Work to
Spectacular and Groundbreaking work! Ad Astra!
Last edited by Hank001 on Wed, 14. Feb 18, 04:49, edited 1 time in total.

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Wed, 1. Mar 06, 21:36

Hank001 wrote:Man I tell you, I started a thread and created a monster here!
Much like a butterfly crossing the desert in China. You never know what the global effects might be! :D Thanks Hank!

sgtslap
Posts: 46
Joined: Sun, 25. Jan 04, 17:34
x3

A request for help.

Post by sgtslap » Thu, 2. Mar 06, 12:34

Hi guys, I have been following all these wonderful tutorials over the last week to try and compile my specially made M3 fighter for X3 which I am planning to release as soon as its finished and compiled, which is all that remains.

[ external image ]
[ external image ]
[ external image ]
[ external image ]
[ external image ]
[ external image ]

I have spent more time now trying to get a fully working version into the game than it took to model the ship, so I am asking for some direct help if possible, mayby an offer from somebody with far more experience :wink: :wink: to compile it as a unique ship but with duplicate nova stats. I have got it in the game almost fully working but I have some issues with it that are making my head hurt. A list of probs below. :(

1. Bump maps no longer show up whatever I do. I have used the correct mat6 entries and the nukepaks but they refuse to show up anymore. Its crazy, because they quite literaly stopped working one compile, after working just fine at first. :?

2. The level of details for the body file dont seem to work correctly. There are 4 LOD's but as you pan out in external view from the ship, the first LOD goes all funny like the polys are flipped and the further you get out it seems to correct itself. :roll:

3. The turret never works. I havent been able to get it to function with the turret view. When I switch from the cockpit view, which is correctly set for my ship, to the turret view, the view goes to that darn 0,0,0 position again. And the turret never fires when AI are using the ship model. :(

4.The weapons on my ship are from the nova scene and do work, but its crude. All I have done is place them inside and over my ship model. What I did try and idealy want is the invisible_weapon to work. I replaced all my weapondummy models with the invisible_weapon correctly named of course, but after a compile or 10, they dont seem to work.

5. And finaly, how do you change the position of the exit point of launched missiles..? As you can see my ship is needing a new location for this to occure, around the upper and wing missile racks if possible.

Apart from all these probs, I have been able to get the ship into the game, but cant really spend much more time trying. :cry: I am willing to send all the max files and textures to anybody who can offer assistance in compiling it, if not just your help will do fine.. I thank you.. :wink: If you would like to e-mail me or leave me a PM, I will get back to you right away.. :)

BTW. There is a history behind this mysterious fighter that I will release in the form of a small story together with my new HUD that I promised to release sometime back.

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Re: A request for help.

Post by Observe » Thu, 2. Mar 06, 22:31

sgtslap wrote:3. The turret never works. I havent been able to get it to function with the turret view. When I switch from the cockpit view, which is correctly set for my ship, to the turret view, the view goes to that darn 0,0,0 position again. And the turret never fires when AI are using the ship model.
Great work Sgtslap !!

Since I'm still very inept with 3D modeling, I can't speak to the issues you are having with materials, but I expect that some of the resident experts around here can help you out in that area. I'll be very interested in what you learn about this, because I'm currently expanding my understanding of how to use textures in 3DS.

However, the turret not working and the view not being correct may be related to the path index for cameradummy in the Turrets section of Tships. Doubleshadow talks about this in his help file included with DBOX2 (found in the 3dsmax help directory).

I should have noticed this when I developed the tutorial - but I've been so busy figuring out the whole process myself that I haven't logged much flying time with the tutorial ship. :cry:

Open the scene bod file for your ship in a text editor, and note the idx number for camerdummy. Then make sure the Path idx is that same number in Tships. I think this may solve your problem with the turret.

Thanks for pointing this out. I'll update my tuturial to include this step.

sgtslap
Posts: 46
Joined: Sun, 25. Jan 04, 17:34
x3

Post by sgtslap » Fri, 3. Mar 06, 07:08

:D Thanks Observe, the path index was indeed set incorrectly for my ship, and after changing it as you suggested, the turret now works perfectly. :D

The bump maps for the ships however continue to refuse to appear no matter how much compiling/re-compiling/editing/re-saving I do. :evil: They simply are not appearing as far as I can tell. I am sure that my dds's are fine, because as I mentioned before I had the bump maps on ships working just fine :!: prior to me re-installing X3. The only difference is now I am using 1.3.2 instead of 1.3. Mayby something got messed with the patch, but I wont go back to 1.3 I dont think after experiencing the massive fps boost that the 1.3.2 patch gives. Ill just keep trying to get bumps to appear again. I am also still trying to use invisible weapons in order to remove the weapondummy models, and change the missile launch exit point. Any suggestions.? :wink:

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 08:14
x3

Post by doubleshadow » Fri, 3. Mar 06, 08:16

If you manage to send me the files till 15:00 GMT (UTC) I will take a look during the weekend.

Not sure why the bumpmaps are wrong but it's certainly not by "messed up" x3 installation. The invisible weapons should work - this will be just some error on your side.

The files must be 3ds max 5 compatible. Also send be the scene/body files. Try to pack it with 7zip on max level so my inbox won't be killed :|

Shepherd1
Posts: 5
Joined: Thu, 15. Dec 05, 03:56
x3

ship modding problems

Post by Shepherd1 » Sat, 4. Mar 06, 04:45

is not metioned in the instructions as to weather or not one has to recompile the _scene.bod file back .bob, or the comand line to do this if necesary. I have a great model, have all the parts 4 it, followed every line in the instructions but all i get in the game is a radar target with no visible "body".

any help here would b greatly apreciated....

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Sat, 4. Mar 06, 05:10

Shepherd1, you don't have to recompile the bod files back to bob. The ModManager will take care of all that when you create your cat file.

Have you linked all your objects to the main mesh? Do you see your ship when you import it back into 3dS from the bod file? I've had times when the ship didn't show up in the game, and also didn't show up when I reloaded it back into 3DS. Make sure you that your ship is the "parant" of the cockpit object in your ship body file.

If you have named everything correctly, your ship shows up in the scene file, and you've updated Tships etc, and all those files are in your mod cat, then you should be good to go.

It sounds like you are almost there!

Make sure your procedure works using just the stock Nova (as outlined in Part 1 of my instructions). Then gradually replace the Nova with your own model. You should be able to isolate when things stop working.

Please let us know how you make out so I can adjust the tutorial if needed.

Shepherd1
Posts: 5
Joined: Thu, 15. Dec 05, 03:56
x3

re: ship modding

Post by Shepherd1 » Sat, 4. Mar 06, 05:39

the only thing i seem to be haveing trouble imoprting into 3ds is the engines, emitters and the origanal body that comes with the scene, i get an "expected version specification" error. i'm using the latest versions of dbox, x2bc, and 3dsmax version 8.

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Sat, 4. Mar 06, 05:52

Let's see what Doubleshadow has to say about the version error.

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