Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: HAZARDLEADER on January 02, 2012, 05:56:20 pm

Title: How to add Ships
Post by: HAZARDLEADER on January 02, 2012, 05:56:20 pm
How do i add ships to the list of ships, that i can use in fred2.
Title: Re: How to add Ships
Post by: The E on January 02, 2012, 06:39:30 pm
1. Why did you add a poll to this topic?
2. In order to add ships, you need to become familiar with FS2's table files (http://hard-light.net/wiki/index.php/Tables), especially ships.tbl (http://hard-light.net/wiki/index.php/Ships.tbl). I would recommend opening another mods' table files (or, with newer mods, .tbm files) for examples of how this is done.
Title: Re: How to add Ships
Post by: HAZARDLEADER on January 02, 2012, 06:43:37 pm
 From what i can tell the model packs, ships.tbl does not have "no_fred" enabled, so is there any thing you can tell me about that?
Title: Re: How to add Ships
Post by: The E on January 02, 2012, 07:03:06 pm
Okay, from the beginning. First of all, you are asking the wrong question :P The problem isn't "How do I add ships to FRED" the real question you are asking is "How do I add custom ships to a mod", or "How do I create my own mod". Because once you have ships in a mod, and you load up FRED with that mod active, all those ships will be there for both FRED and FS2 to use.

Now, first, you need to understand how to build a mod without ruining your FS2 install in the process. The first rule you should keep in mind is that the retail FS2 files are strictly "look, don't touch". You can, and indeed are encouraged, to unpack the vps, and take a look at the files contained therein, but don't, under any circumstances, alter them.
Second, in order to create a new mod, first make a new folder in your FS2 directory. Name it "Mymod" or whatever. In that folder, create an empty text file, and name it "mod.ini". This little file will tell the Launcher important things about your mod, like what other mods it depends on. If you wanted to always load the mediavps, your mod.ini would look like this:
Code: [Select]
[multimod]
primarylist  = ;
secondarylist = mediavps_3612;

Now, in order for your mod to actually have data in it, you need to create a subfolder named "data" in the "Mymod"-directory. Please refer to the wiki page on FS2 Data Structures (http://www.hard-light.net/wiki/index.php/FS2_Data_Structure) for further in-depth information on what goes there.

If you want to add ships, the important subfolders are data/models, data/maps and data/tables. These need to be created.

About ships: Every ship in FSO is made up of three parts. First is the actual 3D model file, also known as the ships' pof (Because the file extension is .pof, you see). This needs to be in data/models. In the pof, there's a list of textures, all of these (including the -glow, -shine and -normal variants) need to be in data/maps. Finally, there's the ships' table entry. This must be defined either in ships.tbl, or in a -shp.tbm. The latter is preferred for mods that are built on FS2, or other mods. For a further explanation of the difference between tbms and tbls, refer to this wiki page (http://www.hard-light.net/wiki/index.php/Modular_Tables).

This is basically all you need to know about adding ships. There will be no example here, as everything can be found by reading the documentation on the wiki, and looking at other mods' tbms as a guide. Good Luck.

EDIT: "no_fred" is a very special ship flag that is only used for one single ship, the Volition Bravos. It should be obvious why.
Title: Re: How to add Ships
Post by: headdie on January 02, 2012, 07:33:15 pm
Might I also chip in with

http://www.hard-light.net/wiki/index.php/Ships_and_General_Mod_Creation

This is a guide on the FS wiki for just this sort of thing, it even includes a step by step on how to ad a ship to FS2 towards the bottom.  I strongly suggest, once you have read it all, that you read through any and all relevant links in the modding section of the wiki, starting with The E's suggestions, they will put you in good stead for future modifications to the game, be it a ship, weapon, effect or anything else supported by FSO.
Title: Re: How to add Ships
Post by: HAZARDLEADER on January 02, 2012, 09:47:33 pm
Ahhh this should not be to hard, ive had expiences with another game called elite force, it had a simple structure like freespace, it was an fps, but i got pretty good at modding it, thx!!!  :rolleyes:  :P