Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: basnyy213 on March 30, 2009, 08:56:24 pm

Title: Adding in new ships
Post by: basnyy213 on March 30, 2009, 08:56:24 pm
Ok I'm trying to figure out how to install stand alone ships.  I downloaded a couple. Ok here's an example of one.
GTCA Phoenix
-dishside.pcx
-hangerlights.pcx
-strikecarrier.pof
-phoenix_tbl.txt

Can someone walk me through what to do?
Sorry if this is a stupid question but I really can't figure this out.
Title: Re: Adding in new ships
Post by: Galemp on March 30, 2009, 09:40:04 pm
No problem. Have a minute? I'm gonna start typing.

You're running FS2 Open I assume?
Title: Re: Adding in new ships
Post by: basnyy213 on March 30, 2009, 09:50:07 pm
Yes I am.
Title: Re: Adding in new ships
Post by: Galemp on March 30, 2009, 09:58:56 pm
OK, I'm gonna walk you through the easiest way to do this. First, you will want to set this up as your own mod. This is done in the same way as other mods you may have downloaded; simply make a new folder in your Freespace 2 installation directory called "yourmodname" (not literall yourmodname, just whatever name you want) then pick it from the Mod tab of the launcher. You'll need to set up a few more folders in that one to get things to work properly.

In yourmodname create a new folder called Data, and within that create three new folders named Maps, Models, and Tables. The two PCX files go in Maps, and the POF goes into Models.

The table is a little trickier. You'll be editing the file to make it into a modular table which will make the ship available in FRED.
I'm hoping that StratComm only included the ship entry in the table; if he included weapons too this is gonna take more work.

Opening phoenix_tbl.txt, you should encounter a block that starts with $Name: and probably ends with a list of subsystems. If there's any other notes in there, delete them. Put #Ship Classes at the beginning, and #End at the end, with an extra line break between those and the rest of the data. Finally, save the result as phoenix-shp.tbm in data/tables/.

Alright, you should be all set. To check if your mod successfully made it in-game, from the FS2 Main Hall press F3 to bring up the Ship Lab. You ought to be able to click Ship Classes->Terran and see the Phoenix in there. If you do, congratulations! You've installed it correctly. Now all you have to do is make a mission that features it.

If you don't have any experience creating missions... well, that's something you really ought to do first, by following the FRED tutorial (on its help menu.) If you do know what you're doing, then all you have to do is launch FRED using the same -mod yourmodname command, and it should appear in FRED.

So. If the text file included looks like it contains more than just a ship, or if FRED or FS2 spit out errors when you try to start it, post the contents of the text file here and we'll help you sort it out.
Title: Re: Adding in new ships
Post by: basnyy213 on March 30, 2009, 10:04:35 pm
FRED I can do looking to expand the ships I have access to. Thanks for the help, saving this.
Title: Re: Adding in new ships
Post by: Galemp on March 30, 2009, 10:12:33 pm
Glad I could help. Most every ship will come with a model (always .pof) some textures (older ones are .pcx, newer ones are .tga or .dds) and a table entry in some form. Player-flyable ships usually come with interface art too--.ani files, and some .pcx files which should be clearly named as such (like 2_loadfighter.pcx.) These go in the yourmodname/data/interface folder.

If you come across a mod packaged as a single .VP file, you're in luck. Just drop it as-is into the base "yourmodname" folder.

I've set you up with that as a modular table so you don't have to muck about with extracting the original data. You don't need to make a new .tbm for each ship, you can just keep adding them on to the TBM you already have, provided it starts with #Ship Classes and ends with #End. There is a limit to how many ships you can have total, though, but you can add about twenty before you get there. If you do, come back and we'll go deeper.

To investigate further yourself, you should browse the Modding Portal (http://www.hard-light.net/wiki/index.php/Portal:Modding) of the Freespace Wiki.
Title: Re: Adding in new ships
Post by: basnyy213 on March 30, 2009, 10:16:37 pm
Thanks again