Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: emark4 on January 15, 2018, 09:56:37 pm

Title: How to edit the number of secondary banks for an existing ship?
Post by: emark4 on January 15, 2018, 09:56:37 pm
Noob modding question, and not sure if I'm posting at the right section of the forum so sorry bout that in advance.

I wanted to know about modifying an existing ship using the tables.  I like to modify the number of secondary banks on a ship but I am not sure how to do it.
Title: Re: How to edit the number of secondary banks for an existing ship?
Post by: Trivial Psychic on January 16, 2018, 12:18:36 am
You need to make changes on the model as well.
Title: Re: How to edit the number of secondary banks for an existing ship?
Post by: 0rph3u5 on January 16, 2018, 08:39:13 am
1. (As Trivial Psychic said) You have to go into the model's .pof. There you have the option to add the data for where the firing points for the model need to be; a bank needs at least one valid firing point. In PCS, you add the bank first and then have the option to add the firing points.
If you are doing this to an existing ship, I highly advise you to save the result in a seperate file because banks that are on the model but not in the tables tend to produce an error message on start-up (and that muddles every debug).

2. Then you need to add the bank to the tables. Which generally just means finding the lines "$Default PBanks" or "$Default SBanks" respecitvely in the ships tbl/.tbm-entry and adding another data point in the ( [...] ).
Like so: [before - - - > after]
$Default PBanks: ( "Mekhu HL-7" "Mekhu HL-7" )  - - > $Default PBanks: ( "Mekhu HL-7" "Mekhu HL-7" "Mekhu HL-7" )

2a. If you also want the weapon banks to be restricted to certain weapons (FS_Open 3.6+ or newer), you also need to find the lines with "$Allowed SBanks:" or "$Allowed PBanks:" and add additional data.
Like so: [before - - - > after]
$Allowed SBanks: ( "Rockeye" ) - - ->  $Allowed SBanks: ( "Rockeye" ) ( "Tempest" ) ( "Tempest" )

If you are using a seperate model you should be using a seperate .tbl/.tbm entry.
 If you remove the "in tech database" from the $flags:-line it won't show in the tech room; anything you add to the name of the entry after a # should also be invisible during gameplay.

Edit: I really shouldn't type during a lecture